Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> int main(void){ int i, ANS=0, CNT=0; char S[15]; scanf("%s", S); for(i=0; S[i]!='\0'; i++){ if(S[i]=='A'||S[i]=='C'||S[i]=='G'||S[i]=='T'){ CNT++; if(CNT > ANS) ANS = CNT; } else CNT = 0; } printf("%d\n", ANS); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210769/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210769/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %S = alloca [15 x i8], align 1 call void @llvm.lifetime.start.p0(i64 15, ptr nonnull %S) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S) br label %for.cond for.cond: ; preds = %for.inc, %entry %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] %ANS.0 = phi i32 [ %ANS.1, %for.inc ], [ 0, %entry ] %CNT.0 = phi i32 [ %CNT.1, %for.inc ], [ 0, %entry ] %arrayidx = getelementptr inbounds [15 x i8], ptr %S, i64 0, i64 %indvars.iv %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 switch i8 %0, label %for.inc [ i8 0, label %for.end i8 65, label %if.then i8 67, label %if.then i8 71, label %if.then i8 84, label %if.then ] if.then: ; preds = %for.cond, %for.cond, %for.cond, %for.cond %inc = add nsw i32 %CNT.0, 1 %cmp24.not = icmp slt i32 %CNT.0, %ANS.0 %spec.select = select i1 %cmp24.not, i32 %ANS.0, i32 %inc br label %for.inc for.inc: ; preds = %if.then, %for.cond %ANS.1 = phi i32 [ %spec.select, %if.then ], [ %ANS.0, %for.cond ] %CNT.1 = phi i32 [ %inc, %if.then ], [ 0, %for.cond ] %indvars.iv.next = add nuw i64 %indvars.iv, 1 br label %for.cond, !llvm.loop !8 for.end: ; preds = %for.cond %call29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ANS.0) call void @llvm.lifetime.end.p0(i64 15, ptr nonnull %S) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #define NUMBER 10 int main() { char in[NUMBER]; int i, temp, len = 0; scanf("%s", in); for (i = 0; in[i] != '\0'; ++i) { if (in[i] == 'A' || in[i] == 'T' || in[i] == 'C' || in[i] == 'G') { len++; if (len > temp) temp = len; } else if (len != 0) len = 0; } printf("%d", temp); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210811/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210811/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %in = alloca [10 x i8], align 1 call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %in) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %in) br label %for.cond for.cond: ; preds = %for.inc, %entry %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] %temp.0 = phi i32 [ %temp.1, %for.inc ], [ undef, %entry ] %len.0 = phi i32 [ %len.1, %for.inc ], [ 0, %entry ] %arrayidx = getelementptr inbounds [10 x i8], ptr %in, i64 0, i64 %indvars.iv %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 switch i8 %0, label %for.inc [ i8 0, label %for.end i8 65, label %if.then i8 84, label %if.then i8 67, label %if.then i8 71, label %if.then ] if.then: ; preds = %for.cond, %for.cond, %for.cond, %for.cond %inc = add nsw i32 %len.0, 1 %cmp24.not = icmp slt i32 %len.0, %temp.0 %spec.select = select i1 %cmp24.not, i32 %temp.0, i32 %inc br label %for.inc for.inc: ; preds = %if.then, %for.cond %temp.1 = phi i32 [ %spec.select, %if.then ], [ %temp.0, %for.cond ] %len.1 = phi i32 [ %inc, %if.then ], [ 0, %for.cond ] %indvars.iv.next = add nuw i64 %indvars.iv, 1 br label %for.cond, !llvm.loop !8 for.end: ; preds = %for.cond %call33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %temp.0) call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %in) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main() { char s[10]; int i,moji=0,sum=0; scanf("%s", &s); for(i=0;i<10;i++){ if(s[i]=='A' || s[i]=='C' || s[i]=='G' || s[i]=='T') moji++; else moji=0; if(moji>sum) sum=moji; } printf("%d", sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210855/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210855/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [10 x i8], align 1 call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %s) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %0 = load i8, ptr %s, align 1, !tbaa !5 switch i8 %0, label %if.end [ i8 65, label %if.then i8 67, label %if.then i8 71, label %if.then i8 84, label %if.then ] if.then: ; preds = %entry, %entry, %entry, %entry br label %if.end if.end: ; preds = %entry, %if.then %moji.1 = phi i32 [ 1, %if.then ], [ 0, %entry ] %arrayidx.1 = getelementptr inbounds [10 x i8], ptr %s, i64 0, i64 1 %1 = load i8, ptr %arrayidx.1, align 1, !tbaa !5 switch i8 %1, label %if.end.1 [ i8 65, label %if.then.1 i8 67, label %if.then.1 i8 71, label %if.then.1 i8 84, label %if.then.1 ] if.then.1: ; preds = %if.end, %if.end, %if.end, %if.end %inc.1 = add nuw nsw i32 %moji.1, 1 br label %if.end.1 if.end.1: ; preds = %if.then.1, %if.end %moji.1.1 = phi i32 [ %inc.1, %if.then.1 ], [ 0, %if.end ] %arrayidx.2 = getelementptr inbounds [10 x i8], ptr %s, i64 0, i64 2 %2 = load i8, ptr %arrayidx.2, align 1, !tbaa !5 switch i8 %2, label %if.end.2 [ i8 65, label %if.then.2 i8 67, label %if.then.2 i8 71, label %if.then.2 i8 84, label %if.then.2 ] if.then.2: ; preds = %if.end.1, %if.end.1, %if.end.1, %if.end.1 %inc.2 = add nuw nsw i32 %moji.1.1, 1 br label %if.end.2 if.end.2: ; preds = %if.then.2, %if.end.1 %moji.1.2 = phi i32 [ %inc.2, %if.then.2 ], [ 0, %if.end.1 ] %arrayidx.3 = getelementptr inbounds [10 x i8], ptr %s, i64 0, i64 3 %3 = load i8, ptr %arrayidx.3, align 1, !tbaa !5 switch i8 %3, label %if.end.3 [ i8 65, label %if.then.3 i8 67, label %if.then.3 i8 71, label %if.then.3 i8 84, label %if.then.3 ] if.then.3: ; preds = %if.end.2, %if.end.2, %if.end.2, %if.end.2 %inc.3 = add nuw nsw i32 %moji.1.2, 1 br label %if.end.3 if.end.3: ; preds = %if.then.3, %if.end.2 %moji.1.3 = phi i32 [ %inc.3, %if.then.3 ], [ 0, %if.end.2 ] %arrayidx.4 = getelementptr inbounds [10 x i8], ptr %s, i64 0, i64 4 %4 = load i8, ptr %arrayidx.4, align 1, !tbaa !5 switch i8 %4, label %if.end.4 [ i8 65, label %if.then.4 i8 67, label %if.then.4 i8 71, label %if.then.4 i8 84, label %if.then.4 ] if.then.4: ; preds = %if.end.3, %if.end.3, %if.end.3, %if.end.3 %inc.4 = add nuw nsw i32 %moji.1.3, 1 br label %if.end.4 if.end.4: ; preds = %if.then.4, %if.end.3 %moji.1.4 = phi i32 [ %inc.4, %if.then.4 ], [ 0, %if.end.3 ] %arrayidx.5 = getelementptr inbounds [10 x i8], ptr %s, i64 0, i64 5 %5 = load i8, ptr %arrayidx.5, align 1, !tbaa !5 switch i8 %5, label %if.end.5 [ i8 65, label %if.then.5 i8 67, label %if.then.5 i8 71, label %if.then.5 i8 84, label %if.then.5 ] if.then.5: ; preds = %if.end.4, %if.end.4, %if.end.4, %if.end.4 %inc.5 = add nuw nsw i32 %moji.1.4, 1 br label %if.end.5 if.end.5: ; preds = %if.then.5, %if.end.4 %moji.1.5 = phi i32 [ %inc.5, %if.then.5 ], [ 0, %if.end.4 ] %arrayidx.6 = getelementptr inbounds [10 x i8], ptr %s, i64 0, i64 6 %6 = load i8, ptr %arrayidx.6, align 1, !tbaa !5 switch i8 %6, label %if.end.6 [ i8 65, label %if.then.6 i8 67, label %if.then.6 i8 71, label %if.then.6 i8 84, label %if.then.6 ] if.then.6: ; preds = %if.end.5, %if.end.5, %if.end.5, %if.end.5 %inc.6 = add nuw nsw i32 %moji.1.5, 1 br label %if.end.6 if.end.6: ; preds = %if.then.6, %if.end.5 %moji.1.6 = phi i32 [ %inc.6, %if.then.6 ], [ 0, %if.end.5 ] %arrayidx.7 = getelementptr inbounds [10 x i8], ptr %s, i64 0, i64 7 %7 = load i8, ptr %arrayidx.7, align 1, !tbaa !5 switch i8 %7, label %if.end.7 [ i8 65, label %if.then.7 i8 67, label %if.then.7 i8 71, label %if.then.7 i8 84, label %if.then.7 ] if.then.7: ; preds = %if.end.6, %if.end.6, %if.end.6, %if.end.6 %inc.7 = add nuw nsw i32 %moji.1.6, 1 br label %if.end.7 if.end.7: ; preds = %if.then.7, %if.end.6 %moji.1.7 = phi i32 [ %inc.7, %if.then.7 ], [ 0, %if.end.6 ] %arrayidx.8 = getelementptr inbounds [10 x i8], ptr %s, i64 0, i64 8 %8 = load i8, ptr %arrayidx.8, align 1, !tbaa !5 switch i8 %8, label %if.end.8 [ i8 65, label %if.then.8 i8 67, label %if.then.8 i8 71, label %if.then.8 i8 84, label %if.then.8 ] if.then.8: ; preds = %if.end.7, %if.end.7, %if.end.7, %if.end.7 %inc.8 = add nuw nsw i32 %moji.1.7, 1 br label %if.end.8 if.end.8: ; preds = %if.then.8, %if.end.7 %moji.1.8 = phi i32 [ %inc.8, %if.then.8 ], [ 0, %if.end.7 ] %arrayidx.9 = getelementptr inbounds [10 x i8], ptr %s, i64 0, i64 9 %9 = load i8, ptr %arrayidx.9, align 1, !tbaa !5 switch i8 %9, label %if.end.9 [ i8 65, label %if.then.9 i8 67, label %if.then.9 i8 71, label %if.then.9 i8 84, label %if.then.9 ] if.then.9: ; preds = %if.end.8, %if.end.8, %if.end.8, %if.end.8 %inc.9 = add nuw nsw i32 %moji.1.8, 1 br label %if.end.9 if.end.9: ; preds = %if.then.9, %if.end.8 %moji.1.9 = phi i32 [ %inc.9, %if.then.9 ], [ 0, %if.end.8 ] %spec.select.1 = call i32 @llvm.smax.i32(i32 %moji.1.1, i32 %moji.1) %spec.select.2 = call i32 @llvm.smax.i32(i32 %moji.1.2, i32 %spec.select.1) %spec.select.3 = call i32 @llvm.smax.i32(i32 %moji.1.3, i32 %spec.select.2) %spec.select.4 = call i32 @llvm.smax.i32(i32 %moji.1.4, i32 %spec.select.3) %spec.select.5 = call i32 @llvm.smax.i32(i32 %moji.1.5, i32 %spec.select.4) %spec.select.6 = call i32 @llvm.smax.i32(i32 %moji.1.6, i32 %spec.select.5) %spec.select.7 = call i32 @llvm.smax.i32(i32 %moji.1.7, i32 %spec.select.6) %spec.select.8 = call i32 @llvm.smax.i32(i32 %moji.1.8, i32 %spec.select.7) %spec.select.9 = call i32 @llvm.smax.i32(i32 %moji.1.9, i32 %spec.select.8) %call25 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %spec.select.9) call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %s) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <string.h> int main(void) { char s[11]; scanf("%s",s); int i,j=0,a=0,n=strlen(s); for(i=0;i<n;i++){ a=0; while(s[i]=='A'||s[i]=='C'||s[i]=='G'||s[i]=='T'){ a++; i++; } if (j<a) j=a; } printf("%d\n",j); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210899/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210899/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [11 x i8], align 1 call void @llvm.lifetime.start.p0(i64 11, 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 %cmp37 = icmp sgt i32 %conv, 0 br i1 %cmp37, label %while.cond.preheader, label %for.end while.cond.preheader: ; preds = %entry, %while.end %i.039 = phi i32 [ %inc26, %while.end ], [ 0, %entry ] %j.038 = phi i32 [ %spec.select, %while.end ], [ 0, %entry ] %0 = sext i32 %i.039 to i64 br label %while.cond while.cond: ; preds = %while.cond.preheader, %while.body %indvars.iv = phi i64 [ %0, %while.cond.preheader ], [ %indvars.iv.next, %while.body ] %a.0 = phi i32 [ 0, %while.cond.preheader ], [ %inc, %while.body ] %arrayidx = getelementptr inbounds [11 x i8], ptr %s, i64 0, i64 %indvars.iv %1 = load i8, ptr %arrayidx, align 1, !tbaa !5 switch i8 %1, label %while.end [ i8 65, label %while.body i8 67, label %while.body i8 71, label %while.body i8 84, label %while.body ] while.body: ; preds = %while.cond, %while.cond, %while.cond, %while.cond %inc = add nuw nsw i32 %a.0, 1 %indvars.iv.next = add i64 %indvars.iv, 1 br label %while.cond, !llvm.loop !8 while.end: ; preds = %while.cond %2 = trunc i64 %indvars.iv to i32 %spec.select = call i32 @llvm.smax.i32(i32 %j.038, i32 %a.0) %inc26 = add nsw i32 %2, 1 %cmp = icmp slt i32 %inc26, %conv br i1 %cmp, label %while.cond.preheader, label %for.end, !llvm.loop !10 for.end: ; preds = %while.end, %entry %j.0.lcssa = phi i32 [ 0, %entry ], [ %spec.select, %while.end ] %call27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %j.0.lcssa) call void @llvm.lifetime.end.p0(i64 11, 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: 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 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } 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, !9}
#include <stdio.h> int actg_flag(char); int main(void) { char d[10]; scanf("%s", d); int i; int max=0; int count=0; for(i=0;i<10;i++){ if (d[i]=="\0") { printf("%d", max); return 0; } if (actg_flag(d[i]) == 1){ count++; if (max < count){max = count;} } else{ count=0; } } printf("%d", max); } int actg_flag(char d){ if(d == 'A'){ return 1; } else if (d == 'T'){ return 1; } else if (d == 'C'){ return 1; } else if (d == 'G'){ return 1; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210941/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210941/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [2 x i8] zeroinitializer, align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %d = alloca [10 x i8], align 1 call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %d) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %d) %0 = load i8, ptr %d, align 1, !tbaa !5 %conv = sext i8 %0 to i64 %1 = inttoptr i64 %conv to ptr %cmp1 = icmp eq ptr %1, @.str.1 br i1 %cmp1, label %cleanup, label %if.end if.end: ; preds = %entry switch i8 %0, label %if.end18.i [ i8 65, label %actg_flag.exit i8 84, label %actg_flag.exit i8 67, label %actg_flag.exit i8 71, label %actg_flag.exit ] if.end18.i: ; preds = %if.end br label %actg_flag.exit actg_flag.exit: ; preds = %if.end, %if.end, %if.end, %if.end, %if.end18.i %cmp7.not = phi i32 [ 0, %if.end18.i ], [ 1, %if.end ], [ 1, %if.end ], [ 1, %if.end ], [ 1, %if.end ] %arrayidx.1 = getelementptr inbounds [10 x i8], ptr %d, i64 0, i64 1 %2 = load i8, ptr %arrayidx.1, align 1, !tbaa !5 %conv.1 = sext i8 %2 to i64 %3 = inttoptr i64 %conv.1 to ptr %cmp1.1 = icmp eq ptr %3, @.str.1 br i1 %cmp1.1, label %cleanup, label %if.end.1 if.end.1: ; preds = %actg_flag.exit switch i8 %2, label %5 [ i8 65, label %4 i8 84, label %4 i8 67, label %4 i8 71, label %4 ] 4: ; preds = %if.end.1, %if.end.1, %if.end.1, %if.end.1 %inc.1 = add nuw nsw i32 %cmp7.not, 1 br label %5 5: ; preds = %if.end.1, %4 %6 = phi i32 [ %inc.1, %4 ], [ %cmp7.not, %if.end.1 ] %7 = phi i32 [ %inc.1, %4 ], [ 0, %if.end.1 ] %arrayidx.2 = getelementptr inbounds [10 x i8], ptr %d, i64 0, i64 2 %8 = load i8, ptr %arrayidx.2, align 1, !tbaa !5 %conv.2 = sext i8 %8 to i64 %9 = inttoptr i64 %conv.2 to ptr %cmp1.2 = icmp eq ptr %9, @.str.1 br i1 %cmp1.2, label %cleanup, label %if.end.2 if.end.2: ; preds = %5 switch i8 %8, label %10 [ i8 65, label %actg_flag.exit.2 i8 84, label %actg_flag.exit.2 i8 67, label %actg_flag.exit.2 i8 71, label %actg_flag.exit.2 ] actg_flag.exit.2: ; preds = %if.end.2, %if.end.2, %if.end.2, %if.end.2 %inc.2 = add nuw nsw i32 %7, 1 %cmp10.not.2 = icmp ugt i32 %6, %7 %max.1.2 = select i1 %cmp10.not.2, i32 %6, i32 %inc.2 br label %10 10: ; preds = %if.end.2, %actg_flag.exit.2 %max.1.245 = phi i32 [ %max.1.2, %actg_flag.exit.2 ], [ %6, %if.end.2 ] %11 = phi i32 [ %inc.2, %actg_flag.exit.2 ], [ 0, %if.end.2 ] %arrayidx.3 = getelementptr inbounds [10 x i8], ptr %d, i64 0, i64 3 %12 = load i8, ptr %arrayidx.3, align 1, !tbaa !5 %conv.3 = sext i8 %12 to i64 %13 = inttoptr i64 %conv.3 to ptr %cmp1.3 = icmp eq ptr %13, @.str.1 br i1 %cmp1.3, label %cleanup, label %if.end.3 if.end.3: ; preds = %10 switch i8 %12, label %14 [ i8 65, label %actg_flag.exit.3 i8 84, label %actg_flag.exit.3 i8 67, label %actg_flag.exit.3 i8 71, label %actg_flag.exit.3 ] actg_flag.exit.3: ; preds = %if.end.3, %if.end.3, %if.end.3, %if.end.3 %inc.3 = add nuw nsw i32 %11, 1 %cmp10.not.3 = icmp ugt i32 %max.1.245, %11 %max.1.3 = select i1 %cmp10.not.3, i32 %max.1.245, i32 %inc.3 br label %14 14: ; preds = %if.end.3, %actg_flag.exit.3 %max.1.351 = phi i32 [ %max.1.3, %actg_flag.exit.3 ], [ %max.1.245, %if.end.3 ] %15 = phi i32 [ %inc.3, %actg_flag.exit.3 ], [ 0, %if.end.3 ] %arrayidx.4 = getelementptr inbounds [10 x i8], ptr %d, i64 0, i64 4 %16 = load i8, ptr %arrayidx.4, align 1, !tbaa !5 %conv.4 = sext i8 %16 to i64 %17 = inttoptr i64 %conv.4 to ptr %cmp1.4 = icmp eq ptr %17, @.str.1 br i1 %cmp1.4, label %cleanup, label %if.end.4 if.end.4: ; preds = %14 switch i8 %16, label %18 [ i8 65, label %actg_flag.exit.4 i8 84, label %actg_flag.exit.4 i8 67, label %actg_flag.exit.4 i8 71, label %actg_flag.exit.4 ] actg_flag.exit.4: ; preds = %if.end.4, %if.end.4, %if.end.4, %if.end.4 %inc.4 = add nuw nsw i32 %15, 1 %cmp10.not.4 = icmp ugt i32 %max.1.351, %15 %max.1.4 = select i1 %cmp10.not.4, i32 %max.1.351, i32 %inc.4 br label %18 18: ; preds = %if.end.4, %actg_flag.exit.4 %max.1.457 = phi i32 [ %max.1.4, %actg_flag.exit.4 ], [ %max.1.351, %if.end.4 ] %19 = phi i32 [ %inc.4, %actg_flag.exit.4 ], [ 0, %if.end.4 ] %arrayidx.5 = getelementptr inbounds [10 x i8], ptr %d, i64 0, i64 5 %20 = load i8, ptr %arrayidx.5, align 1, !tbaa !5 %conv.5 = sext i8 %20 to i64 %21 = inttoptr i64 %conv.5 to ptr %cmp1.5 = icmp eq ptr %21, @.str.1 br i1 %cmp1.5, label %cleanup, label %if.end.5 if.end.5: ; preds = %18 switch i8 %20, label %22 [ i8 65, label %actg_flag.exit.5 i8 84, label %actg_flag.exit.5 i8 67, label %actg_flag.exit.5 i8 71, label %actg_flag.exit.5 ] actg_flag.exit.5: ; preds = %if.end.5, %if.end.5, %if.end.5, %if.end.5 %inc.5 = add nuw nsw i32 %19, 1 %cmp10.not.5 = icmp ugt i32 %max.1.457, %19 %max.1.5 = select i1 %cmp10.not.5, i32 %max.1.457, i32 %inc.5 br label %22 22: ; preds = %if.end.5, %actg_flag.exit.5 %max.1.563 = phi i32 [ %max.1.5, %actg_flag.exit.5 ], [ %max.1.457, %if.end.5 ] %23 = phi i32 [ %inc.5, %actg_flag.exit.5 ], [ 0, %if.end.5 ] %arrayidx.6 = getelementptr inbounds [10 x i8], ptr %d, i64 0, i64 6 %24 = load i8, ptr %arrayidx.6, align 1, !tbaa !5 %conv.6 = sext i8 %24 to i64 %25 = inttoptr i64 %conv.6 to ptr %cmp1.6 = icmp eq ptr %25, @.str.1 br i1 %cmp1.6, label %cleanup, label %if.end.6 if.end.6: ; preds = %22 switch i8 %24, label %26 [ i8 65, label %actg_flag.exit.6 i8 84, label %actg_flag.exit.6 i8 67, label %actg_flag.exit.6 i8 71, label %actg_flag.exit.6 ] actg_flag.exit.6: ; preds = %if.end.6, %if.end.6, %if.end.6, %if.end.6 %inc.6 = add nuw nsw i32 %23, 1 %cmp10.not.6 = icmp ugt i32 %max.1.563, %23 %max.1.6 = select i1 %cmp10.not.6, i32 %max.1.563, i32 %inc.6 br label %26 26: ; preds = %if.end.6, %actg_flag.exit.6 %max.1.669 = phi i32 [ %max.1.6, %actg_flag.exit.6 ], [ %max.1.563, %if.end.6 ] %27 = phi i32 [ %inc.6, %actg_flag.exit.6 ], [ 0, %if.end.6 ] %arrayidx.7 = getelementptr inbounds [10 x i8], ptr %d, i64 0, i64 7 %28 = load i8, ptr %arrayidx.7, align 1, !tbaa !5 %conv.7 = sext i8 %28 to i64 %29 = inttoptr i64 %conv.7 to ptr %cmp1.7 = icmp eq ptr %29, @.str.1 br i1 %cmp1.7, label %cleanup, label %if.end.7 if.end.7: ; preds = %26 switch i8 %28, label %30 [ i8 65, label %actg_flag.exit.7 i8 84, label %actg_flag.exit.7 i8 67, label %actg_flag.exit.7 i8 71, label %actg_flag.exit.7 ] actg_flag.exit.7: ; preds = %if.end.7, %if.end.7, %if.end.7, %if.end.7 %inc.7 = add nuw nsw i32 %27, 1 %cmp10.not.7 = icmp ugt i32 %max.1.669, %27 %max.1.7 = select i1 %cmp10.not.7, i32 %max.1.669, i32 %inc.7 br label %30 30: ; preds = %if.end.7, %actg_flag.exit.7 %max.1.775 = phi i32 [ %max.1.7, %actg_flag.exit.7 ], [ %max.1.669, %if.end.7 ] %31 = phi i32 [ %inc.7, %actg_flag.exit.7 ], [ 0, %if.end.7 ] %arrayidx.8 = getelementptr inbounds [10 x i8], ptr %d, i64 0, i64 8 %32 = load i8, ptr %arrayidx.8, align 1, !tbaa !5 %conv.8 = sext i8 %32 to i64 %33 = inttoptr i64 %conv.8 to ptr %cmp1.8 = icmp eq ptr %33, @.str.1 br i1 %cmp1.8, label %cleanup, label %if.end.8 if.end.8: ; preds = %30 switch i8 %32, label %34 [ i8 65, label %actg_flag.exit.8 i8 84, label %actg_flag.exit.8 i8 67, label %actg_flag.exit.8 i8 71, label %actg_flag.exit.8 ] actg_flag.exit.8: ; preds = %if.end.8, %if.end.8, %if.end.8, %if.end.8 %inc.8 = add nuw nsw i32 %31, 1 %cmp10.not.8 = icmp ugt i32 %max.1.775, %31 %max.1.8 = select i1 %cmp10.not.8, i32 %max.1.775, i32 %inc.8 br label %34 34: ; preds = %if.end.8, %actg_flag.exit.8 %max.1.881 = phi i32 [ %max.1.8, %actg_flag.exit.8 ], [ %max.1.775, %if.end.8 ] %35 = phi i32 [ %inc.8, %actg_flag.exit.8 ], [ 0, %if.end.8 ] %arrayidx.9 = getelementptr inbounds [10 x i8], ptr %d, i64 0, i64 9 %36 = load i8, ptr %arrayidx.9, align 1, !tbaa !5 %conv.9 = sext i8 %36 to i64 %37 = inttoptr i64 %conv.9 to ptr %cmp1.9 = icmp eq ptr %37, @.str.1 br i1 %cmp1.9, label %cleanup, label %if.end.9 if.end.9: ; preds = %34 %switch.tableidx = add i8 %36, -65 %38 = icmp ugt i8 %switch.tableidx, 19 %switch.cast = zext i8 %switch.tableidx to i20 %switch.downshift = lshr i20 524218, %switch.cast %39 = and i20 %switch.downshift, 1 %switch.masked = icmp ne i20 %39, 0 %cmp7.not.9 = select i1 %38, i1 true, i1 %switch.masked %inc.9 = add nuw nsw i32 %35, 1 %cmp10.not.9 = icmp ugt i32 %max.1.881, %35 %40 = select i1 %cmp7.not.9, i1 true, i1 %cmp10.not.9 %max.1.9 = select i1 %40, i32 %max.1.881, i32 %inc.9 br label %cleanup cleanup: ; preds = %entry, %actg_flag.exit, %5, %10, %14, %18, %22, %26, %30, %34, %if.end.9 %max.1.9.sink = phi i32 [ %max.1.9, %if.end.9 ], [ 0, %entry ], [ %cmp7.not, %actg_flag.exit ], [ %6, %5 ], [ %max.1.245, %10 ], [ %max.1.351, %14 ], [ %max.1.457, %18 ], [ %max.1.563, %22 ], [ %max.1.669, %26 ], [ %max.1.775, %30 ], [ %max.1.881, %34 ] %call16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %max.1.9.sink) call void @llvm.lifetime.end.p0(i64 10, 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 nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @actg_flag(i8 noundef signext %d) local_unnamed_addr #3 { entry: switch i8 %d, label %if.end18 [ i8 65, label %return i8 84, label %return i8 67, label %return i8 71, label %return ] if.end18: ; preds = %entry br label %return return: ; preds = %entry, %entry, %entry, %entry, %if.end18 %retval.0 = phi i32 [ 0, %if.end18 ], [ 1, %entry ], [ 1, %entry ], [ 1, %entry ], [ 1, %entry ] ret i32 %retval.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree norecurse nosync nounwind willreturn memory(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 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <string.h> int check_atcg(char c) { if(c == 'A' || c == 'T' || c == 'C' || c == 'G') { return 1; } return 0; } int main(void) { int i = 0,len = 0,maxlen = 0; char S[10]; scanf("%s",S); for(i = 0;i < strlen(S);i++) { //printf("%c\n",S[i]); while(check_atcg(S[i]) == 1) { //printf("len %d\n",len); len++; i++; } if(len > maxlen) maxlen = len; len = 0; } printf("%d\n",maxlen); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210985/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210985/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @check_atcg(i8 noundef signext %c) local_unnamed_addr #0 { entry: switch i8 %c, label %if.end [ i8 84, label %return i8 71, label %return i8 67, label %return i8 65, label %return ] if.end: ; preds = %entry br label %return return: ; preds = %entry, %entry, %entry, %entry, %if.end %retval.0 = phi i32 [ 0, %if.end ], [ 1, %entry ], [ 1, %entry ], [ 1, %entry ], [ 1, %entry ] ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %S = alloca [10 x i8], align 1 call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %S) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S) %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %S) #7 %cmp20.not = icmp eq i64 %call2, 0 br i1 %cmp20.not, label %for.end, label %while.cond.preheader while.cond.preheader: ; preds = %entry, %while.end %maxlen.022 = phi i32 [ %spec.select, %while.end ], [ 0, %entry ] %i.021 = phi i32 [ %inc10, %while.end ], [ 0, %entry ] %0 = sext i32 %i.021 to i64 br label %while.cond while.cond: ; preds = %while.cond.preheader, %while.body %indvars.iv = phi i64 [ %0, %while.cond.preheader ], [ %indvars.iv.next, %while.body ] %len.1 = phi i32 [ 0, %while.cond.preheader ], [ %inc, %while.body ] %arrayidx = getelementptr inbounds [10 x i8], ptr %S, i64 0, i64 %indvars.iv %1 = load i8, ptr %arrayidx, align 1, !tbaa !5 switch i8 %1, label %while.end [ i8 84, label %while.body i8 71, label %while.body i8 67, label %while.body i8 65, label %while.body ] while.body: ; preds = %while.cond, %while.cond, %while.cond, %while.cond %inc = add nuw nsw i32 %len.1, 1 %indvars.iv.next = add i64 %indvars.iv, 1 br label %while.cond, !llvm.loop !8 while.end: ; preds = %while.cond %2 = trunc i64 %indvars.iv to i32 %spec.select = call i32 @llvm.smax.i32(i32 %len.1, i32 %maxlen.022) %inc10 = add nsw i32 %2, 1 %conv = sext i32 %inc10 to i64 %cmp = icmp ugt i64 %call2, %conv br i1 %cmp, label %while.cond.preheader, label %for.end, !llvm.loop !10 for.end: ; preds = %while.end, %entry %maxlen.0.lcssa = phi i32 [ 0, %entry ], [ %spec.select, %while.end ] %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %maxlen.0.lcssa) call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %S) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #5 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } attributes #7 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"} !10 = distinct !{!10, !9}
#include<stdio.h> #include<string.h> int main(void){ char S[10]; int max=0,maxi=-1,maxj=-1; scanf("%s",S); for(int i=0;i<strlen(S);i++){ for(int j=i;j<strlen(S);j++){ int count=0; for(int k=i;k<=j;k++){ if(S[k]=='A'||S[k]=='C'||S[k]=='G'||S[k]=='T') count++; } if(count==j-i+1){ if(max<count){ max=j-i+1; } } } } printf("%d",max); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211041/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211041/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %S = alloca [10 x i8], align 1 call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %S) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S) %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %S) #5 %cmp80.not = icmp eq i64 %call2, 0 br i1 %cmp80.not, label %for.cond.cleanup, label %for.cond12.preheader.preheader for.cond12.preheader.preheader: ; preds = %entry, %for.cond.cleanup10 %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond.cleanup10 ], [ 0, %entry ] %max.081 = phi i32 [ %max.2, %for.cond.cleanup10 ], [ 0, %entry ] br label %for.cond12.preheader for.cond.cleanup: ; preds = %for.cond.cleanup10, %entry %max.0.lcssa = phi i32 [ 0, %entry ], [ %max.2, %for.cond.cleanup10 ] %call54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %max.0.lcssa) call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %S) #4 ret i32 0 for.cond12.preheader: ; preds = %for.cond12.preheader.preheader, %for.cond.cleanup15 %indvar = phi i64 [ 0, %for.cond12.preheader.preheader ], [ %indvar.next, %for.cond.cleanup15 ] %indvars.iv95 = phi i64 [ %indvars.iv, %for.cond12.preheader.preheader ], [ %indvars.iv.next96, %for.cond.cleanup15 ] %max.177 = phi i32 [ %max.081, %for.cond12.preheader.preheader ], [ %max.2, %for.cond.cleanup15 ] %0 = add i64 %indvar, 1 %cmp13.not72 = icmp ugt i64 %indvars.iv, %indvars.iv95 br i1 %cmp13.not72, label %for.cond.cleanup15, label %for.body16.preheader for.body16.preheader: ; preds = %for.cond12.preheader %xtraiter = and i64 %0, 3 %1 = icmp ult i64 %indvar, 3 br i1 %1, label %for.cond.cleanup15.loopexit.unr-lcssa, label %for.body16.preheader.new for.body16.preheader.new: ; preds = %for.body16.preheader %unroll_iter = and i64 %0, -4 br label %for.body16 for.cond.cleanup10: ; preds = %for.cond.cleanup15 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond104.not = icmp eq i64 %indvars.iv.next, %call2 br i1 %exitcond104.not, label %for.cond.cleanup, label %for.cond12.preheader.preheader, !llvm.loop !5 for.cond.cleanup15.loopexit.unr-lcssa: ; preds = %for.inc.3, %for.body16.preheader %count.1.lcssa.ph = phi i32 [ undef, %for.body16.preheader ], [ %count.1.3, %for.inc.3 ] %indvars.iv84.unr = phi i64 [ %indvars.iv, %for.body16.preheader ], [ %indvars.iv.next85.3, %for.inc.3 ] %count.073.unr = phi i32 [ 0, %for.body16.preheader ], [ %count.1.3, %for.inc.3 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup15, label %for.body16.epil for.body16.epil: ; preds = %for.cond.cleanup15.loopexit.unr-lcssa, %for.inc.epil %indvars.iv84.epil = phi i64 [ %indvars.iv.next85.epil, %for.inc.epil ], [ %indvars.iv84.unr, %for.cond.cleanup15.loopexit.unr-lcssa ] %count.073.epil = phi i32 [ %count.1.epil, %for.inc.epil ], [ %count.073.unr, %for.cond.cleanup15.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.inc.epil ], [ 0, %for.cond.cleanup15.loopexit.unr-lcssa ] %arrayidx.epil = getelementptr inbounds [10 x i8], ptr %S, i64 0, i64 %indvars.iv84.epil %2 = load i8, ptr %arrayidx.epil, align 1, !tbaa !7 switch i8 %2, label %for.inc.epil [ i8 65, label %if.then.epil i8 67, label %if.then.epil i8 71, label %if.then.epil i8 84, label %if.then.epil ] if.then.epil: ; preds = %for.body16.epil, %for.body16.epil, %for.body16.epil, %for.body16.epil %inc.epil = add nsw i32 %count.073.epil, 1 br label %for.inc.epil for.inc.epil: ; preds = %if.then.epil, %for.body16.epil %count.1.epil = phi i32 [ %inc.epil, %if.then.epil ], [ %count.073.epil, %for.body16.epil ] %indvars.iv.next85.epil = add nuw i64 %indvars.iv84.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.cond.cleanup15, label %for.body16.epil, !llvm.loop !10 for.cond.cleanup15: ; preds = %for.cond.cleanup15.loopexit.unr-lcssa, %for.inc.epil, %for.cond12.preheader %count.0.lcssa = phi i32 [ 0, %for.cond12.preheader ], [ %count.1.lcssa.ph, %for.cond.cleanup15.loopexit.unr-lcssa ], [ %count.1.epil, %for.inc.epil ] %3 = sub nuw nsw i64 %indvars.iv95, %indvars.iv %4 = trunc i64 %3 to i32 %add = add nsw i32 %4, 1 %cmp38 = icmp eq i32 %count.0.lcssa, %add %cmp41 = icmp slt i32 %max.177, %count.0.lcssa %or.cond = select i1 %cmp38, i1 %cmp41, i1 false %max.2 = select i1 %or.cond, i32 %add, i32 %max.177 %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1 %cmp8 = icmp ugt i64 %call2, %indvars.iv.next96 %indvar.next = add i64 %indvar, 1 br i1 %cmp8, label %for.cond12.preheader, label %for.cond.cleanup10, !llvm.loop !12 for.body16: ; preds = %for.inc.3, %for.body16.preheader.new %indvars.iv84 = phi i64 [ %indvars.iv, %for.body16.preheader.new ], [ %indvars.iv.next85.3, %for.inc.3 ] %count.073 = phi i32 [ 0, %for.body16.preheader.new ], [ %count.1.3, %for.inc.3 ] %niter = phi i64 [ 0, %for.body16.preheader.new ], [ %niter.next.3, %for.inc.3 ] %arrayidx = getelementptr inbounds [10 x i8], ptr %S, i64 0, i64 %indvars.iv84 %5 = load i8, ptr %arrayidx, align 1, !tbaa !7 switch i8 %5, label %for.inc [ i8 65, label %if.then i8 67, label %if.then i8 71, label %if.then i8 84, label %if.then ] if.then: ; preds = %for.body16, %for.body16, %for.body16, %for.body16 %inc = add nsw i32 %count.073, 1 br label %for.inc for.inc: ; preds = %for.body16, %if.then %count.1 = phi i32 [ %inc, %if.then ], [ %count.073, %for.body16 ] %indvars.iv.next85 = add nuw i64 %indvars.iv84, 1 %arrayidx.1 = getelementptr inbounds [10 x i8], ptr %S, i64 0, i64 %indvars.iv.next85 %6 = load i8, ptr %arrayidx.1, align 1, !tbaa !7 switch i8 %6, label %for.inc.1 [ i8 65, label %if.then.1 i8 67, label %if.then.1 i8 71, label %if.then.1 i8 84, label %if.then.1 ] if.then.1: ; preds = %for.inc, %for.inc, %for.inc, %for.inc %inc.1 = add nsw i32 %count.1, 1 br label %for.inc.1 for.inc.1: ; preds = %if.then.1, %for.inc %count.1.1 = phi i32 [ %inc.1, %if.then.1 ], [ %count.1, %for.inc ] %indvars.iv.next85.1 = add nuw i64 %indvars.iv84, 2 %arrayidx.2 = getelementptr inbounds [10 x i8], ptr %S, i64 0, i64 %indvars.iv.next85.1 %7 = load i8, ptr %arrayidx.2, align 1, !tbaa !7 switch i8 %7, label %for.inc.2 [ i8 65, label %if.then.2 i8 67, label %if.then.2 i8 71, label %if.then.2 i8 84, label %if.then.2 ] if.then.2: ; preds = %for.inc.1, %for.inc.1, %for.inc.1, %for.inc.1 %inc.2 = add nsw i32 %count.1.1, 1 br label %for.inc.2 for.inc.2: ; preds = %if.then.2, %for.inc.1 %count.1.2 = phi i32 [ %inc.2, %if.then.2 ], [ %count.1.1, %for.inc.1 ] %indvars.iv.next85.2 = add nuw i64 %indvars.iv84, 3 %arrayidx.3 = getelementptr inbounds [10 x i8], ptr %S, i64 0, i64 %indvars.iv.next85.2 %8 = load i8, ptr %arrayidx.3, align 1, !tbaa !7 switch i8 %8, label %for.inc.3 [ i8 65, label %if.then.3 i8 67, label %if.then.3 i8 71, label %if.then.3 i8 84, label %if.then.3 ] if.then.3: ; preds = %for.inc.2, %for.inc.2, %for.inc.2, %for.inc.2 %inc.3 = add nsw i32 %count.1.2, 1 br label %for.inc.3 for.inc.3: ; preds = %if.then.3, %for.inc.2 %count.1.3 = phi i32 [ %inc.3, %if.then.3 ], [ %count.1.2, %for.inc.2 ] %indvars.iv.next85.3 = add nuw i64 %indvars.iv84, 4 %niter.next.3 = add i64 %niter, 4 %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter br i1 %niter.ncmp.3, label %for.cond.cleanup15.loopexit.unr-lcssa, label %for.body16, !llvm.loop !13 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @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 = distinct !{!5, !6} !6 = !{!"llvm.loop.mustprogress"} !7 = !{!8, !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.unroll.disable"} !12 = distinct !{!12, !6} !13 = distinct !{!13, !6}
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #include <time.h> typedef long long llint; typedef long double ldouble; // 大小 int compare( const void *a, const void *b){return *(llint *)b - *(llint *)a;} typedef struct{ llint aa; llint bb; }frequent; // 小大 int cmp( const void *p, const void *q ) { return ((frequent*)p)->bb - ((frequent*)q)->bb; } /*2つのうち小さい数を返す*/ llint min2(llint a,llint b){return a>=b?b:a;} int main(void){ llint n,i,even[100001],odd[100001],count; scanf("%lld",&n); llint num[n]; for(i=0;i<n;i++){ scanf("%lld",&num[i]); } for(i=0;i<100001;i++){ even[i]=0; odd[i]=0; } // 0:amount 1:num[i] llint emax[2]={0,0},emax2[2]={0,0},omax[2]={0,0},omax2[2]={0,0}; for(i=0;i<n;i++){ if(i%2==0){ even[num[i]]++; if(even[num[i]] > emax[0]){ emax[0]++; emax[1]=num[i]; continue; } if(even[num[i]] > emax2[0]){ emax2[0]++; emax2[1]=num[i]; } } if(i%2==1){ odd[num[i]]++; if(odd[num[i]] > omax[0]){ omax[0]++; omax[1]=num[i]; continue; } if(odd[num[i]] > omax2[0]){ omax2[0]++; omax2[1]=num[i]; } } } if(emax[1]!=omax[1]){ count = n - emax[0] - omax[0]; printf("%lld\n",count); return 0; } count = min2(n-emax[0]-omax2[0],n-emax2[0]-omax[0]); printf("%lld\n",count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211092/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211092/source.c" target datalayout = "e-m:e-p270: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.frequent = type { i64, i64 } @.str = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compare(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load i64, ptr %b, align 8, !tbaa !5 %1 = load i64, ptr %a, align 8, !tbaa !5 %sub = sub nsw i64 %0, %1 %conv = trunc i64 %sub to i32 ret i32 %conv } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @cmp(ptr nocapture noundef readonly %p, ptr nocapture noundef readonly %q) local_unnamed_addr #0 { entry: %bb = getelementptr inbounds %struct.frequent, ptr %p, i64 0, i32 1 %0 = load i64, ptr %bb, align 8, !tbaa !9 %bb1 = getelementptr inbounds %struct.frequent, ptr %q, i64 0, i32 1 %1 = load i64, ptr %bb1, align 8, !tbaa !9 %sub = sub nsw i64 %0, %1 %conv = trunc i64 %sub to i32 ret i32 %conv } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @min2(i64 noundef %a, i64 noundef %b) local_unnamed_addr #1 { entry: %cond = tail call i64 @llvm.smin.i64(i64 %a, i64 %b) ret i64 %cond } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %n = alloca i64, align 8 %even = alloca [100001 x i64], align 16 %odd = alloca [100001 x i64], align 16 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #8 call void @llvm.lifetime.start.p0(i64 800008, ptr nonnull %even) #8 call void @llvm.lifetime.start.p0(i64 800008, ptr nonnull %odd) #8 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i64, ptr %n, align 8, !tbaa !5 %1 = call ptr @llvm.stacksave.p0() %vla = alloca i64, i64 %0, align 16 %2 = load i64, ptr %n, align 8, !tbaa !5 %cmp142 = icmp sgt i64 %2, 0 br i1 %cmp142, label %for.body, label %if.end75 for.cond2.preheader: ; preds = %for.body call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800008) %even, i8 0, i64 800008, i1 false), !tbaa !5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800008) %odd, i8 0, i64 800008, i1 false), !tbaa !5 %cmp11145 = icmp sgt i64 %3, 0 br i1 %cmp11145, label %for.body12, label %if.end75 for.body: ; preds = %entry, %for.body %i.0143 = phi i64 [ %inc, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i64, ptr %vla, i64 %i.0143 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %inc = add nuw nsw i64 %i.0143, 1 %3 = load i64, ptr %n, align 8, !tbaa !5 %cmp = icmp slt i64 %inc, %3 br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !11 for.body12: ; preds = %for.cond2.preheader, %for.inc64 %omax2.sroa.0.0152 = phi i64 [ %omax2.sroa.0.1, %for.inc64 ], [ 0, %for.cond2.preheader ] %omax.sroa.8.0151 = phi i64 [ %omax.sroa.8.1, %for.inc64 ], [ 0, %for.cond2.preheader ] %omax.sroa.0.0150 = phi i64 [ %omax.sroa.0.1, %for.inc64 ], [ 0, %for.cond2.preheader ] %emax2.sroa.0.0149 = phi i64 [ %emax2.sroa.0.2, %for.inc64 ], [ 0, %for.cond2.preheader ] %emax.sroa.8.0148 = phi i64 [ %emax.sroa.8.1, %for.inc64 ], [ 0, %for.cond2.preheader ] %emax.sroa.0.0147 = phi i64 [ %emax.sroa.0.1, %for.inc64 ], [ 0, %for.cond2.preheader ] %i.2146 = phi i64 [ %inc65, %for.inc64 ], [ 0, %for.cond2.preheader ] %rem = and i64 %i.2146, 1 %cmp13 = icmp eq i64 %rem, 0 %arrayidx14 = getelementptr inbounds i64, ptr %vla, i64 %i.2146 %4 = load i64, ptr %arrayidx14, align 8, !tbaa !5 br i1 %cmp13, label %if.then, label %if.then39 if.then: ; preds = %for.body12 %arrayidx15 = getelementptr inbounds [100001 x i64], ptr %even, i64 0, i64 %4 %5 = load i64, ptr %arrayidx15, align 8, !tbaa !5 %inc16 = add nsw i64 %5, 1 store i64 %inc16, ptr %arrayidx15, align 8, !tbaa !5 %cmp20.not = icmp slt i64 %5, %emax.sroa.0.0147 br i1 %cmp20.not, label %if.end36.thread, label %if.then21 if.then21: ; preds = %if.then %inc23 = add nsw i64 %emax.sroa.0.0147, 1 br label %for.inc64 if.end36.thread: ; preds = %if.then %cmp29.not = icmp sge i64 %5, %emax2.sroa.0.0149 %inc32 = zext i1 %cmp29.not to i64 %spec.select = add nsw i64 %emax2.sroa.0.0149, %inc32 br label %for.inc64 if.then39: ; preds = %for.body12 %arrayidx41 = getelementptr inbounds [100001 x i64], ptr %odd, i64 0, i64 %4 %6 = load i64, ptr %arrayidx41, align 8, !tbaa !5 %inc42 = add nsw i64 %6, 1 store i64 %inc42, ptr %arrayidx41, align 8, !tbaa !5 %cmp46.not = icmp slt i64 %6, %omax.sroa.0.0150 br i1 %cmp46.not, label %if.end52, label %if.then47 if.then47: ; preds = %if.then39 %inc49 = add nsw i64 %omax.sroa.0.0150, 1 br label %for.inc64 if.end52: ; preds = %if.then39 %cmp56.not = icmp sge i64 %6, %omax2.sroa.0.0152 %inc59 = zext i1 %cmp56.not to i64 %spec.select138 = add nsw i64 %omax2.sroa.0.0152, %inc59 br label %for.inc64 for.inc64: ; preds = %if.end36.thread, %if.end52, %if.then47, %if.then21 %emax.sroa.0.1 = phi i64 [ %inc23, %if.then21 ], [ %emax.sroa.0.0147, %if.then47 ], [ %emax.sroa.0.0147, %if.end52 ], [ %emax.sroa.0.0147, %if.end36.thread ] %emax.sroa.8.1 = phi i64 [ %4, %if.then21 ], [ %emax.sroa.8.0148, %if.then47 ], [ %emax.sroa.8.0148, %if.end52 ], [ %emax.sroa.8.0148, %if.end36.thread ] %emax2.sroa.0.2 = phi i64 [ %emax2.sroa.0.0149, %if.then21 ], [ %emax2.sroa.0.0149, %if.then47 ], [ %emax2.sroa.0.0149, %if.end52 ], [ %spec.select, %if.end36.thread ] %omax.sroa.0.1 = phi i64 [ %omax.sroa.0.0150, %if.then21 ], [ %inc49, %if.then47 ], [ %omax.sroa.0.0150, %if.end52 ], [ %omax.sroa.0.0150, %if.end36.thread ] %omax.sroa.8.1 = phi i64 [ %omax.sroa.8.0151, %if.then21 ], [ %4, %if.then47 ], [ %omax.sroa.8.0151, %if.end52 ], [ %omax.sroa.8.0151, %if.end36.thread ] %omax2.sroa.0.1 = phi i64 [ %omax2.sroa.0.0152, %if.then21 ], [ %omax2.sroa.0.0152, %if.then47 ], [ %spec.select138, %if.end52 ], [ %omax2.sroa.0.0152, %if.end36.thread ] %inc65 = add nuw nsw i64 %i.2146, 1 %exitcond.not = icmp eq i64 %inc65, %3 br i1 %exitcond.not, label %for.end66, label %for.body12, !llvm.loop !13 for.end66: ; preds = %for.inc64 %cmp69.not = icmp eq i64 %emax.sroa.8.1, %omax.sroa.8.1 br i1 %cmp69.not, label %if.end75, label %if.then70 if.then70: ; preds = %for.end66 %7 = add i64 %emax.sroa.0.1, %omax.sroa.0.1 %sub73 = sub i64 %3, %7 br label %cleanup if.end75: ; preds = %entry, %for.cond2.preheader, %for.end66 %omax2.sroa.0.0.lcssa175 = phi i64 [ %omax2.sroa.0.1, %for.end66 ], [ 0, %for.cond2.preheader ], [ 0, %entry ] %emax2.sroa.0.0.lcssa174 = phi i64 [ %emax2.sroa.0.2, %for.end66 ], [ 0, %for.cond2.preheader ], [ 0, %entry ] %emax.sroa.0.0.lcssa173 = phi i64 [ %emax.sroa.0.1, %for.end66 ], [ 0, %for.cond2.preheader ], [ 0, %entry ] %omax.sroa.0.0.lcssa172 = phi i64 [ %omax.sroa.0.1, %for.end66 ], [ 0, %for.cond2.preheader ], [ 0, %entry ] %.lcssa162171 = phi i64 [ %3, %for.end66 ], [ %3, %for.cond2.preheader ], [ %2, %entry ] %8 = add i64 %emax.sroa.0.0.lcssa173, %omax2.sroa.0.0.lcssa175 %sub79 = sub i64 %.lcssa162171, %8 %9 = add i64 %emax2.sroa.0.0.lcssa174, %omax.sroa.0.0.lcssa172 %sub83 = sub i64 %.lcssa162171, %9 %cond.i = call i64 @llvm.smin.i64(i64 %sub79, i64 %sub83) br label %cleanup cleanup: ; preds = %if.end75, %if.then70 %cond.i.sink = phi i64 [ %cond.i, %if.end75 ], [ %sub73, %if.then70 ] %call85 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %cond.i.sink) call void @llvm.stackrestore.p0(ptr %1) call void @llvm.lifetime.end.p0(i64 800008, ptr nonnull %odd) #8 call void @llvm.lifetime.end.p0(i64 800008, ptr nonnull %even) #8 call void @llvm.lifetime.end.p0(i64 8, 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) #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 declare ptr @llvm.stacksave.p0() #5 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #6 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #8 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !6, i64 8} !10 = !{!"", !6, i64 0, !6, i64 8} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12}
#include <stdio.h> #include <math.h> int main(void) { //変数の宣言 int n; static int v[100010]; static int even[100010]; static int odd[100010]; int i; int evenmax; int evennumformax; int oddmax,oddnumformax; int ans; //データの読み込み scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&v[i]); } for(i=0;i<100000;i++){ even[i]=0; odd[i]=0; } // printf("nは%dです\n", n); // printf("データの読み込み終了\n"); //実際の処理 for(i=0;i<n;i=i+2){ even[v[i]]++; // printf("%dを一つカウントeven[%d]=%d\n",v[i],v[i],even[v[i]]); } for(i=1;i<n;i=i+2){ odd[v[i]]++; // printf("%dを一つカウントeven[%d]=%d\n",v[i],v[i],odd[v[i]]); } // printf("チェック1\n"); evenmax=0; for(i=1;i<100001;i++){ if(evenmax<even[i]){ // printf("%dが%d回\n",i,even[i]); evenmax=even[i]; evennumformax=i; } } // printf("evenmax=%d,evennumformax=%d\n",evenmax,evennumformax); oddmax=0; for(i=1;i<100001;i++){ if(i!=evennumformax){ if(oddmax<odd[i]){ // printf("%dが%d回\n",i,odd[i]); oddmax=odd[i]; oddnumformax=i; } } } // printf("oddmax=%d,oddnumformax=%d\n",oddmax,oddnumformax); ans=n-evenmax-oddmax; // printf("偶数番目の最頻値は%dで%d回出てきました\n",oddmax,oddnumformax); oddmax=0; evenmax=0; for(i=1;i<100001;i++){ if(oddmax<odd[i]){ oddmax=odd[i]; oddnumformax=i; } } for(i=1;i<100001;i++){ if(i!=oddnumformax){ if(evenmax<even[i]){ evenmax=even[i]; evennumformax=i; } } } if(ans>n-evenmax-oddmax){ ans=n-evenmax-oddmax; } // printf("計算部分終了\n"); //出力 printf("%d\n",ans); // printf("結果の出力終了\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211135/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211135/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @main.v = internal global [100010 x i32] zeroinitializer, align 16 @main.even = internal unnamed_addr global [100010 x i32] zeroinitializer, align 16 @main.odd = internal unnamed_addr global [100010 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 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 %cmp152 = icmp sgt i32 %0, 0 br i1 %cmp152, label %for.body, label %for.cond2.preheader.thread for.cond2.preheader.thread: ; preds = %entry call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400000) @main.even, i8 0, i64 400000, i1 false), !tbaa !5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400000) @main.odd, i8 0, i64 400000, i1 false), !tbaa !5 br label %for.cond33.preheader for.cond2.preheader: ; preds = %for.body call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400000) @main.even, i8 0, i64 400000, i1 false), !tbaa !5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400000) @main.odd, i8 0, i64 400000, i1 false), !tbaa !5 %cmp13155 = icmp sgt i32 %1, 0 br i1 %cmp13155, label %for.body14.preheader, label %for.cond33.preheader for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100010 x i32], ptr @main.v, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !9 for.body14.preheader: ; preds = %for.cond2.preheader %3 = zext i32 %1 to i64 %4 = add nsw i64 %3, -1 %5 = lshr i64 %4, 1 %6 = add nuw i64 %5, 1 %xtraiter = and i64 %6, 1 %7 = icmp ult i32 %1, 3 br i1 %7, label %for.cond22.preheader.unr-lcssa, label %for.body14.preheader.new for.body14.preheader.new: ; preds = %for.body14.preheader %unroll_iter = and i64 %6, -2 br label %for.body14 for.cond22.preheader.unr-lcssa: ; preds = %for.body14, %for.body14.preheader %indvars.iv175.unr = phi i64 [ 0, %for.body14.preheader ], [ %indvars.iv.next176.1, %for.body14 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond22.preheader, label %for.body14.epil for.body14.epil: ; preds = %for.cond22.preheader.unr-lcssa %arrayidx16.epil = getelementptr inbounds [100010 x i32], ptr @main.v, i64 0, i64 %indvars.iv175.unr %8 = load i32, ptr %arrayidx16.epil, align 8, !tbaa !5 %idxprom17.epil = sext i32 %8 to i64 %arrayidx18.epil = getelementptr inbounds [100010 x i32], ptr @main.even, i64 0, i64 %idxprom17.epil %9 = load i32, ptr %arrayidx18.epil, align 4, !tbaa !5 %inc19.epil = add nsw i32 %9, 1 store i32 %inc19.epil, ptr %arrayidx18.epil, align 4, !tbaa !5 br label %for.cond22.preheader for.cond22.preheader: ; preds = %for.cond22.preheader.unr-lcssa, %for.body14.epil %cmp23157 = icmp sgt i32 %1, 1 br i1 %cmp23157, label %for.body24.preheader, label %for.cond33.preheader for.body24.preheader: ; preds = %for.cond22.preheader %10 = add nsw i64 %3, -2 %11 = lshr i64 %10, 1 %12 = add nuw i64 %11, 1 %xtraiter202 = and i64 %12, 1 %13 = icmp ult i64 %10, 2 br i1 %13, label %for.cond33.preheader.loopexit.unr-lcssa, label %for.body24.preheader.new for.body24.preheader.new: ; preds = %for.body24.preheader %unroll_iter204 = and i64 %12, -2 br label %for.body24 for.body14: ; preds = %for.body14, %for.body14.preheader.new %indvars.iv175 = phi i64 [ 0, %for.body14.preheader.new ], [ %indvars.iv.next176.1, %for.body14 ] %niter = phi i64 [ 0, %for.body14.preheader.new ], [ %niter.next.1, %for.body14 ] %arrayidx16 = getelementptr inbounds [100010 x i32], ptr @main.v, i64 0, i64 %indvars.iv175 %14 = load i32, ptr %arrayidx16, align 16, !tbaa !5 %idxprom17 = sext i32 %14 to i64 %arrayidx18 = getelementptr inbounds [100010 x i32], ptr @main.even, i64 0, i64 %idxprom17 %15 = load i32, ptr %arrayidx18, align 4, !tbaa !5 %inc19 = add nsw i32 %15, 1 store i32 %inc19, ptr %arrayidx18, align 4, !tbaa !5 %indvars.iv.next176 = or i64 %indvars.iv175, 2 %arrayidx16.1 = getelementptr inbounds [100010 x i32], ptr @main.v, i64 0, i64 %indvars.iv.next176 %16 = load i32, ptr %arrayidx16.1, align 8, !tbaa !5 %idxprom17.1 = sext i32 %16 to i64 %arrayidx18.1 = getelementptr inbounds [100010 x i32], ptr @main.even, i64 0, i64 %idxprom17.1 %17 = load i32, ptr %arrayidx18.1, align 4, !tbaa !5 %inc19.1 = add nsw i32 %17, 1 store i32 %inc19.1, ptr %arrayidx18.1, align 4, !tbaa !5 %indvars.iv.next176.1 = add nuw nsw i64 %indvars.iv175, 4 %niter.next.1 = add nuw nsw i64 %niter, 2 %niter.ncmp.1.not = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1.not, label %for.cond22.preheader.unr-lcssa, label %for.body14, !llvm.loop !11 for.cond33.preheader.loopexit.unr-lcssa: ; preds = %for.body24, %for.body24.preheader %indvars.iv178.unr = phi i64 [ 1, %for.body24.preheader ], [ %indvars.iv.next179.1, %for.body24 ] %lcmp.mod203.not = icmp eq i64 %xtraiter202, 0 br i1 %lcmp.mod203.not, label %for.cond33.preheader, label %for.body24.epil for.body24.epil: ; preds = %for.cond33.preheader.loopexit.unr-lcssa %arrayidx26.epil = getelementptr inbounds [100010 x i32], ptr @main.v, i64 0, i64 %indvars.iv178.unr %18 = load i32, ptr %arrayidx26.epil, align 4, !tbaa !5 %idxprom27.epil = sext i32 %18 to i64 %arrayidx28.epil = getelementptr inbounds [100010 x i32], ptr @main.odd, i64 0, i64 %idxprom27.epil %19 = load i32, ptr %arrayidx28.epil, align 4, !tbaa !5 %inc29.epil = add nsw i32 %19, 1 store i32 %inc29.epil, ptr %arrayidx28.epil, align 4, !tbaa !5 br label %for.cond33.preheader for.cond33.preheader: ; preds = %for.body24.epil, %for.cond33.preheader.loopexit.unr-lcssa, %for.cond2.preheader, %for.cond2.preheader.thread, %for.cond22.preheader %.lcssa198201 = phi i32 [ %1, %for.cond22.preheader ], [ %1, %for.cond2.preheader ], [ %0, %for.cond2.preheader.thread ], [ %1, %for.cond33.preheader.loopexit.unr-lcssa ], [ %1, %for.body24.epil ] br label %for.body35 for.body24: ; preds = %for.body24, %for.body24.preheader.new %indvars.iv178 = phi i64 [ 1, %for.body24.preheader.new ], [ %indvars.iv.next179.1, %for.body24 ] %niter205 = phi i64 [ 0, %for.body24.preheader.new ], [ %niter205.next.1, %for.body24 ] %arrayidx26 = getelementptr inbounds [100010 x i32], ptr @main.v, i64 0, i64 %indvars.iv178 %20 = load i32, ptr %arrayidx26, align 4, !tbaa !5 %idxprom27 = sext i32 %20 to i64 %arrayidx28 = getelementptr inbounds [100010 x i32], ptr @main.odd, i64 0, i64 %idxprom27 %21 = load i32, ptr %arrayidx28, align 4, !tbaa !5 %inc29 = add nsw i32 %21, 1 store i32 %inc29, ptr %arrayidx28, align 4, !tbaa !5 %indvars.iv.next179 = add nuw nsw i64 %indvars.iv178, 2 %arrayidx26.1 = getelementptr inbounds [100010 x i32], ptr @main.v, i64 0, i64 %indvars.iv.next179 %22 = load i32, ptr %arrayidx26.1, align 4, !tbaa !5 %idxprom27.1 = sext i32 %22 to i64 %arrayidx28.1 = getelementptr inbounds [100010 x i32], ptr @main.odd, i64 0, i64 %idxprom27.1 %23 = load i32, ptr %arrayidx28.1, align 4, !tbaa !5 %inc29.1 = add nsw i32 %23, 1 store i32 %inc29.1, ptr %arrayidx28.1, align 4, !tbaa !5 %indvars.iv.next179.1 = add nuw nsw i64 %indvars.iv178, 4 %niter205.next.1 = add nuw i64 %niter205, 2 %niter205.ncmp.1.not = icmp eq i64 %niter205.next.1, %unroll_iter204 br i1 %niter205.ncmp.1.not, label %for.cond33.preheader.loopexit.unr-lcssa, label %for.body24, !llvm.loop !12 for.cond44.preheader: ; preds = %for.body35 %24 = zext i32 %spec.select144.1 to i64 br label %for.body46 for.body35: ; preds = %for.body35, %for.cond33.preheader %indvars.iv181 = phi i64 [ 1, %for.cond33.preheader ], [ %indvars.iv.next182.1, %for.body35 ] %evennumformax.0161 = phi i32 [ undef, %for.cond33.preheader ], [ %spec.select144.1, %for.body35 ] %evenmax.0160 = phi i32 [ 0, %for.cond33.preheader ], [ %spec.select.1, %for.body35 ] %arrayidx37 = getelementptr inbounds [100010 x i32], ptr @main.even, i64 0, i64 %indvars.iv181 %25 = load i32, ptr %arrayidx37, align 4, !tbaa !5 %cmp38 = icmp slt i32 %evenmax.0160, %25 %spec.select = call i32 @llvm.smax.i32(i32 %evenmax.0160, i32 %25) %26 = trunc i64 %indvars.iv181 to i32 %spec.select144 = select i1 %cmp38, i32 %26, i32 %evennumformax.0161 %indvars.iv.next182 = add nuw nsw i64 %indvars.iv181, 1 %arrayidx37.1 = getelementptr inbounds [100010 x i32], ptr @main.even, i64 0, i64 %indvars.iv.next182 %27 = load i32, ptr %arrayidx37.1, align 4, !tbaa !5 %cmp38.1 = icmp slt i32 %spec.select, %27 %spec.select.1 = call i32 @llvm.smax.i32(i32 %spec.select, i32 %27) %28 = trunc i64 %indvars.iv.next182 to i32 %spec.select144.1 = select i1 %cmp38.1, i32 %28, i32 %spec.select144 %indvars.iv.next182.1 = add nuw nsw i64 %indvars.iv181, 2 %exitcond.not.1 = icmp eq i64 %indvars.iv.next182.1, 100001 br i1 %exitcond.not.1, label %for.cond44.preheader, label %for.body35, !llvm.loop !13 for.body46: ; preds = %for.inc57.1, %for.cond44.preheader %indvars.iv184 = phi i64 [ 1, %for.cond44.preheader ], [ %indvars.iv.next185.1, %for.inc57.1 ] %oddnumformax.0164 = phi i32 [ undef, %for.cond44.preheader ], [ %oddnumformax.1.1, %for.inc57.1 ] %oddmax.0163 = phi i32 [ 0, %for.cond44.preheader ], [ %oddmax.1.1, %for.inc57.1 ] %cmp47.not = icmp eq i64 %indvars.iv184, %24 br i1 %cmp47.not, label %for.inc57, label %if.then48 if.then48: ; preds = %for.body46 %arrayidx50 = getelementptr inbounds [100010 x i32], ptr @main.odd, i64 0, i64 %indvars.iv184 %29 = load i32, ptr %arrayidx50, align 4, !tbaa !5 %cmp51 = icmp slt i32 %oddmax.0163, %29 %spec.select145 = call i32 @llvm.smax.i32(i32 %oddmax.0163, i32 %29) %30 = trunc i64 %indvars.iv184 to i32 %spec.select146 = select i1 %cmp51, i32 %30, i32 %oddnumformax.0164 br label %for.inc57 for.inc57: ; preds = %if.then48, %for.body46 %oddmax.1 = phi i32 [ %oddmax.0163, %for.body46 ], [ %spec.select145, %if.then48 ] %oddnumformax.1 = phi i32 [ %oddnumformax.0164, %for.body46 ], [ %spec.select146, %if.then48 ] %indvars.iv.next185 = add nuw nsw i64 %indvars.iv184, 1 %cmp47.not.1 = icmp eq i64 %indvars.iv.next185, %24 br i1 %cmp47.not.1, label %for.inc57.1, label %if.then48.1 if.then48.1: ; preds = %for.inc57 %arrayidx50.1 = getelementptr inbounds [100010 x i32], ptr @main.odd, i64 0, i64 %indvars.iv.next185 %31 = load i32, ptr %arrayidx50.1, align 4, !tbaa !5 %cmp51.1 = icmp slt i32 %oddmax.1, %31 %spec.select145.1 = call i32 @llvm.smax.i32(i32 %oddmax.1, i32 %31) %32 = trunc i64 %indvars.iv.next185 to i32 %spec.select146.1 = select i1 %cmp51.1, i32 %32, i32 %oddnumformax.1 br label %for.inc57.1 for.inc57.1: ; preds = %if.then48.1, %for.inc57 %oddmax.1.1 = phi i32 [ %oddmax.1, %for.inc57 ], [ %spec.select145.1, %if.then48.1 ] %oddnumformax.1.1 = phi i32 [ %oddnumformax.1, %for.inc57 ], [ %spec.select146.1, %if.then48.1 ] %indvars.iv.next185.1 = add nuw nsw i64 %indvars.iv184, 2 %exitcond187.not.1 = icmp eq i64 %indvars.iv.next185.1, 100001 br i1 %exitcond187.not.1, label %for.body63, label %for.body46, !llvm.loop !14 for.cond74.preheader: ; preds = %for.body63 %33 = zext i32 %spec.select148.1 to i64 br label %for.body76 for.body63: ; preds = %for.inc57.1, %for.body63 %indvars.iv188 = phi i64 [ %indvars.iv.next189.1, %for.body63 ], [ 1, %for.inc57.1 ] %oddnumformax.2167 = phi i32 [ %spec.select148.1, %for.body63 ], [ %oddnumformax.1.1, %for.inc57.1 ] %oddmax.2166 = phi i32 [ %spec.select147.1, %for.body63 ], [ 0, %for.inc57.1 ] %arrayidx65 = getelementptr inbounds [100010 x i32], ptr @main.odd, i64 0, i64 %indvars.iv188 %34 = load i32, ptr %arrayidx65, align 4, !tbaa !5 %cmp66 = icmp slt i32 %oddmax.2166, %34 %spec.select147 = call i32 @llvm.smax.i32(i32 %oddmax.2166, i32 %34) %35 = trunc i64 %indvars.iv188 to i32 %spec.select148 = select i1 %cmp66, i32 %35, i32 %oddnumformax.2167 %indvars.iv.next189 = add nuw nsw i64 %indvars.iv188, 1 %arrayidx65.1 = getelementptr inbounds [100010 x i32], ptr @main.odd, i64 0, i64 %indvars.iv.next189 %36 = load i32, ptr %arrayidx65.1, align 4, !tbaa !5 %cmp66.1 = icmp slt i32 %spec.select147, %36 %spec.select147.1 = call i32 @llvm.smax.i32(i32 %spec.select147, i32 %36) %37 = trunc i64 %indvars.iv.next189 to i32 %spec.select148.1 = select i1 %cmp66.1, i32 %37, i32 %spec.select148 %indvars.iv.next189.1 = add nuw nsw i64 %indvars.iv188, 2 %exitcond191.not.1 = icmp eq i64 %indvars.iv.next189.1, 100001 br i1 %exitcond191.not.1, label %for.cond74.preheader, label %for.body63, !llvm.loop !15 for.body76: ; preds = %for.inc87.1, %for.cond74.preheader %indvars.iv192 = phi i64 [ 1, %for.cond74.preheader ], [ %indvars.iv.next193.1, %for.inc87.1 ] %evenmax.2169 = phi i32 [ 0, %for.cond74.preheader ], [ %evenmax.3.1, %for.inc87.1 ] %cmp77.not = icmp eq i64 %indvars.iv192, %33 br i1 %cmp77.not, label %for.inc87, label %if.then78 if.then78: ; preds = %for.body76 %arrayidx80 = getelementptr inbounds [100010 x i32], ptr @main.even, i64 0, i64 %indvars.iv192 %38 = load i32, ptr %arrayidx80, align 4, !tbaa !5 %spec.select149 = call i32 @llvm.smax.i32(i32 %evenmax.2169, i32 %38) br label %for.inc87 for.inc87: ; preds = %if.then78, %for.body76 %evenmax.3 = phi i32 [ %evenmax.2169, %for.body76 ], [ %spec.select149, %if.then78 ] %indvars.iv.next193 = add nuw nsw i64 %indvars.iv192, 1 %cmp77.not.1 = icmp eq i64 %indvars.iv.next193, %33 br i1 %cmp77.not.1, label %for.inc87.1, label %if.then78.1 if.then78.1: ; preds = %for.inc87 %arrayidx80.1 = getelementptr inbounds [100010 x i32], ptr @main.even, i64 0, i64 %indvars.iv.next193 %39 = load i32, ptr %arrayidx80.1, align 4, !tbaa !5 %spec.select149.1 = call i32 @llvm.smax.i32(i32 %evenmax.3, i32 %39) br label %for.inc87.1 for.inc87.1: ; preds = %if.then78.1, %for.inc87 %evenmax.3.1 = phi i32 [ %evenmax.3, %for.inc87 ], [ %spec.select149.1, %if.then78.1 ] %indvars.iv.next193.1 = add nuw nsw i64 %indvars.iv192, 2 %exitcond195.not.1 = icmp eq i64 %indvars.iv.next193.1, 100001 br i1 %exitcond195.not.1, label %for.end89, label %for.body76, !llvm.loop !16 for.end89: ; preds = %for.inc87.1 %40 = add nuw i32 %spec.select.1, %oddmax.1.1 %sub60 = sub i32 %.lcssa198201, %40 %41 = add nuw i32 %spec.select147.1, %evenmax.3.1 %sub91 = sub i32 %.lcssa198201, %41 %spec.select150 = call i32 @llvm.smin.i32(i32 %sub60, i32 %sub91) %call97 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %spec.select150) 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 nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10}
#include <stdio.h> int main(void) { const char okList[9][9]={ /* A B C D E F G H I */ /* A */ {0,1,0,1,0,0,0,0,0}, /* B */ {1,0,1,0,1,0,0,0,0}, /* C */ {0,1,0,0,0,1,0,0,0}, /* D */ {1,0,0,0,1,0,1,0,0}, /* E */ {0,1,0,1,0,1,0,1,0}, /* F */ {0,0,1,0,1,0,0,0,1}, /* G */ {0,0,0,1,0,0,0,1,0}, /* H */ {0,0,0,0,1,0,1,0,1}, /* I */ {0,0,0,0,0,1,0,1,0} }; int i,j; char input[16]; for(i=0;i<1000;i++) { int okFlag=1; scanf("%s",input); for(j=1;input[j];j++) { if(!okList[input[j-1]-'A'][input[j]-'A']) { okFlag=0; break; } } if(okFlag)puts(input); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211186/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211186/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.okList = private unnamed_addr constant [9 x [9 x i8]] [[9 x i8] c"\00\01\00\01\00\00\00\00\00", [9 x i8] c"\01\00\01\00\01\00\00\00\00", [9 x i8] c"\00\01\00\00\00\01\00\00\00", [9 x i8] c"\01\00\00\00\01\00\01\00\00", [9 x i8] c"\00\01\00\01\00\01\00\01\00", [9 x i8] c"\00\00\01\00\01\00\00\00\01", [9 x i8] c"\00\00\00\01\00\00\00\01\00", [9 x i8] c"\00\00\00\00\01\00\01\00\01", [9 x i8] c"\00\00\00\00\00\01\00\01\00"], align 16 @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %input = alloca [16 x i8], align 16 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %input) #3 %arrayidx27 = getelementptr inbounds [16 x i8], ptr %input, i64 0, i64 1 br label %for.body for.body: ; preds = %entry, %if.end19 %i.030 = phi i32 [ 0, %entry ], [ %inc21, %if.end19 ] %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %input) %0 = load i8, ptr %arrayidx27, align 1, !tbaa !5 %tobool.not.not28 = icmp eq i8 %0, 0 br i1 %tobool.not.not28, label %if.then16, label %for.body2 for.cond1: ; preds = %for.body2 %indvars.iv.next = add nuw i64 %indvars.iv, 1 %idxprom = and i64 %indvars.iv.next, 4294967295 %arrayidx = getelementptr inbounds [16 x i8], ptr %input, i64 0, i64 %idxprom %1 = load i8, ptr %arrayidx, align 1, !tbaa !5 %tobool.not.not = icmp eq i8 %1, 0 br i1 %tobool.not.not, label %if.then16, label %for.body2, !llvm.loop !8 for.body2: ; preds = %for.body, %for.cond1 %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond1 ], [ 1, %for.body ] %2 = phi i8 [ %1, %for.cond1 ], [ %0, %for.body ] %3 = add nsw i64 %indvars.iv, -1 %arrayidx4 = getelementptr inbounds [16 x i8], ptr %input, i64 0, i64 %3 %4 = load i8, ptr %arrayidx4, align 1, !tbaa !5 %conv = sext i8 %4 to i64 %sub5 = add nsw i64 %conv, -65 %conv10 = sext i8 %2 to i64 %sub11 = add nsw i64 %conv10, -65 %arrayidx13 = getelementptr inbounds [9 x [9 x i8]], ptr @__const.main.okList, i64 0, i64 %sub5, i64 %sub11 %5 = load i8, ptr %arrayidx13, align 1, !tbaa !5 %tobool14.not = icmp eq i8 %5, 0 br i1 %tobool14.not, label %if.end19, label %for.cond1 if.then16: ; preds = %for.cond1, %for.body %call18 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %input) br label %if.end19 if.end19: ; preds = %for.body2, %if.then16 %inc21 = add nuw nsw i32 %i.030, 1 %exitcond.not = icmp eq i32 %inc21, 1000 br i1 %exitcond.not, label %for.end22, label %for.body, !llvm.loop !10 for.end22: ; preds = %if.end19 call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %input) #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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"} !10 = distinct !{!10, !9}
#include <stdio.h> int main(void) { int a,b; scanf("%d%d",&a,&b); if((a+1)/2>=b){ printf("YES"); }else{ printf("NO"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211229/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211229/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"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 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 %add = add nsw i32 %0, 1 %div = sdiv i32 %add, 2 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp.not = icmp slt i32 %div, %1 %.str.2..str.1 = select i1 %cmp.not, ptr @.str.2, ptr @.str.1 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2..str.1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(int argc, const char * argv[]) { int N,K; scanf("%d %d",&N,&K); if((N + 1) / 2 >= K){ printf("YES"); }else{ printf("NO"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211272/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211272/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"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: %N = alloca i32, align 4 %K = 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 %K) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %K) %0 = load i32, ptr %N, align 4, !tbaa !5 %add = add nsw i32 %0, 1 %div = sdiv i32 %add, 2 %1 = load i32, ptr %K, align 4, !tbaa !5 %cmp.not = icmp slt i32 %div, %1 %.str.2..str.1 = select i1 %cmp.not, ptr @.str.2, ptr @.str.1 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2..str.1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %K) #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 <stdlib.h> #include <string.h> #include <stdio.h> #include <math.h> int main() { int a,b,x,y,i,j,n,m,k; scanf("%d%d",&n,&k); if(n>=2*k||(n%2==1&&n+1>=2*k)){ printf("YES"); }else{ printf("NO"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211315/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211315/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"YES\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %k = 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 %k) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %k) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = load i32, ptr %k, align 4, !tbaa !5 %mul = shl nsw i32 %1, 1 %cmp.not = icmp slt i32 %0, %mul br i1 %cmp.not, label %lor.lhs.false, label %if.end lor.lhs.false: ; preds = %entry %2 = and i32 %0, -2147483647 %cmp1 = icmp ne i32 %2, 1 %add = add nsw i32 %0, 1 %cmp3.not = icmp slt i32 %add, %mul %or.cond = select i1 %cmp1, i1 true, i1 %cmp3.not %spec.select = select i1 %or.cond, ptr @.str.2, ptr @.str.1 br label %if.end if.end: ; preds = %lor.lhs.false, %entry %.str.2.sink = phi ptr [ @.str.1, %entry ], [ %spec.select, %lor.lhs.false ] %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void) { int n,i,j,k; int a[5000],b[5000],c[5000],d[5000],sum[101],x[101]; scanf("%d",&n); k=n*(n-1)/2; for(i=0;i<k;i++){ scanf("%d %d %d %d",&a[i],&b[i],&c[i],&d[i]); } for(i=1;i<=n;i++){ sum[i]=0; x[i]=1; } for(i=0;i<k;i++){ if(c[i]>d[i]){ sum[a[i]]+=3; } else if(c[i]<d[i]){ sum[b[i]]+=3; } else{ sum[a[i]]++; sum[b[i]]++; } } // for(i=1;i<=n;i++){ // printf("%d\n",sum[i]); // } for(i=1;i<=n;i++){ for(j=1;j<=n;j++){ if(sum[i]<sum[j]){ x[i]++; } } printf("%d\n",x[i]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211373/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211373/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [12 x i8] c"%d %d %d %d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %a = alloca [5000 x i32], align 16 %b = alloca [5000 x i32], align 16 %c = alloca [5000 x i32], align 16 %d = alloca [5000 x i32], align 16 %sum = alloca [101 x i32], align 16 %x = alloca [101 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 20000, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 20000, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 20000, ptr nonnull %c) #4 call void @llvm.lifetime.start.p0(i64 20000, ptr nonnull %d) #4 call void @llvm.lifetime.start.p0(i64 404, ptr nonnull %sum) #4 call void @llvm.lifetime.start.p0(i64 404, ptr nonnull %x) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %sub = add nsw i32 %0, -1 %mul = mul nsw i32 %sub, %0 %div = sdiv i32 %mul, 2 %cmp109 = icmp sgt i32 %mul, 1 br i1 %cmp109, label %for.body.preheader, label %for.cond8.preheader for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %div to i64 br label %for.body for.cond8.preheader.loopexit: ; preds = %for.body %.pre = load i32, ptr %n, align 4, !tbaa !5 br label %for.cond8.preheader for.cond8.preheader: ; preds = %for.cond8.preheader.loopexit, %entry %1 = phi i32 [ %.pre, %for.cond8.preheader.loopexit ], [ %0, %entry ] %cmp9.not111 = icmp slt i32 %1, 1 br i1 %cmp9.not111, label %for.cond18.preheader, label %for.body10.preheader for.body10.preheader: ; preds = %for.cond8.preheader %scevgep = getelementptr inbounds i8, ptr %sum, i64 4 %2 = zext i32 %1 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 nuw i32 %1, 1 %wide.trip.count123 = zext i32 %4 to i64 %5 = add nsw i64 %wide.trip.count123, -1 %min.iters.check = icmp ult i32 %1, 8 br i1 %min.iters.check, label %for.body10.preheader140, label %vector.ph vector.ph: ; preds = %for.body10.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 %x, i64 0, i64 %offset.idx store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %6, align 4, !tbaa !5 %7 = getelementptr inbounds i32, ptr %6, i64 4 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, 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.cond18.preheader, label %for.body10.preheader140 for.body10.preheader140: ; preds = %for.body10.preheader, %middle.block %indvars.iv120.ph = phi i64 [ 1, %for.body10.preheader ], [ %ind.end, %middle.block ] br label %for.body10 for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] %arrayidx = getelementptr inbounds [5000 x i32], ptr %a, i64 0, i64 %indvars.iv %arrayidx2 = getelementptr inbounds [5000 x i32], ptr %b, i64 0, i64 %indvars.iv %arrayidx4 = getelementptr inbounds [5000 x i32], ptr %c, i64 0, i64 %indvars.iv %arrayidx6 = getelementptr inbounds [5000 x i32], ptr %d, i64 0, i64 %indvars.iv %call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx2, ptr noundef nonnull %arrayidx4, ptr noundef nonnull %arrayidx6) %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.cond8.preheader.loopexit, label %for.body, !llvm.loop !13 for.cond18.preheader: ; preds = %for.body10, %middle.block, %for.cond8.preheader br i1 %cmp109, label %for.body20.preheader, label %for.cond56.preheader for.body20.preheader: ; preds = %for.cond18.preheader %wide.trip.count128 = zext i32 %div to i64 br label %for.body20 for.body10: ; preds = %for.body10.preheader140, %for.body10 %indvars.iv120 = phi i64 [ %indvars.iv.next121, %for.body10 ], [ %indvars.iv120.ph, %for.body10.preheader140 ] %arrayidx14 = getelementptr inbounds [101 x i32], ptr %x, i64 0, i64 %indvars.iv120 store i32 1, ptr %arrayidx14, align 4, !tbaa !5 %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1 %exitcond124.not = icmp eq i64 %indvars.iv.next121, %wide.trip.count123 br i1 %exitcond124.not, label %for.cond18.preheader, label %for.body10, !llvm.loop !14 for.cond56.preheader: ; preds = %for.inc53, %for.cond18.preheader br i1 %cmp9.not111, label %for.end80, label %for.cond59.preheader for.body20: ; preds = %for.body20.preheader, %for.inc53 %indvars.iv125 = phi i64 [ 0, %for.body20.preheader ], [ %indvars.iv.next126, %for.inc53 ] %arrayidx22 = getelementptr inbounds [5000 x i32], ptr %c, i64 0, i64 %indvars.iv125 %9 = load i32, ptr %arrayidx22, align 4, !tbaa !5 %arrayidx24 = getelementptr inbounds [5000 x i32], ptr %d, i64 0, i64 %indvars.iv125 %10 = load i32, ptr %arrayidx24, align 4, !tbaa !5 %cmp25 = icmp sgt i32 %9, %10 br i1 %cmp25, label %for.inc53, label %if.else if.else: ; preds = %for.body20 %cmp34 = icmp slt i32 %9, %10 br i1 %cmp34, label %for.inc53, label %if.else41 if.else41: ; preds = %if.else %arrayidx43 = getelementptr inbounds [5000 x i32], ptr %a, i64 0, i64 %indvars.iv125 %11 = load i32, ptr %arrayidx43, align 4, !tbaa !5 %idxprom44 = sext i32 %11 to i64 %arrayidx45 = getelementptr inbounds [101 x i32], ptr %sum, i64 0, i64 %idxprom44 %12 = load i32, ptr %arrayidx45, align 4, !tbaa !5 %inc46 = add nsw i32 %12, 1 store i32 %inc46, ptr %arrayidx45, align 4, !tbaa !5 br label %for.inc53 for.inc53: ; preds = %if.else, %for.body20, %if.else41 %a.sink = phi ptr [ %b, %if.else41 ], [ %a, %for.body20 ], [ %b, %if.else ] %.sink138 = phi i32 [ 1, %if.else41 ], [ 3, %for.body20 ], [ 3, %if.else ] %arrayidx27 = getelementptr inbounds [5000 x i32], ptr %a.sink, i64 0, i64 %indvars.iv125 %13 = load i32, ptr %arrayidx27, align 4, !tbaa !5 %idxprom28 = sext i32 %13 to i64 %arrayidx29 = getelementptr inbounds [101 x i32], ptr %sum, i64 0, i64 %idxprom28 %14 = load i32, ptr %arrayidx29, align 4, !tbaa !5 %add = add nsw i32 %14, %.sink138 store i32 %add, ptr %arrayidx29, align 4, !tbaa !5 %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.cond56.preheader, label %for.body20, !llvm.loop !15 for.cond59.preheader: ; preds = %for.cond56.preheader, %for.end74 %indvars.iv135 = phi i64 [ %indvars.iv.next136, %for.end74 ], [ 1, %for.cond56.preheader ] %15 = phi i32 [ %27, %for.end74 ], [ %1, %for.cond56.preheader ] %cmp60.not115 = icmp slt i32 %15, 1 br i1 %cmp60.not115, label %for.end74, label %for.body61.lr.ph for.body61.lr.ph: ; preds = %for.cond59.preheader %arrayidx63 = getelementptr inbounds [101 x i32], ptr %sum, i64 0, i64 %indvars.iv135 %16 = load i32, ptr %arrayidx63, align 4, !tbaa !5 %arrayidx69 = getelementptr inbounds [101 x i32], ptr %x, i64 0, i64 %indvars.iv135 %17 = add i32 %15, 1 %wide.trip.count133 = zext i32 %17 to i64 %18 = add nsw i64 %wide.trip.count133, -1 %xtraiter = and i64 %18, 1 %19 = icmp eq i32 %17, 2 br i1 %19, label %for.end74.loopexit.unr-lcssa, label %for.body61.lr.ph.new for.body61.lr.ph.new: ; preds = %for.body61.lr.ph %unroll_iter = and i64 %18, -2 br label %for.body61 for.body61: ; preds = %for.inc72.1, %for.body61.lr.ph.new %indvars.iv130 = phi i64 [ 1, %for.body61.lr.ph.new ], [ %indvars.iv.next131.1, %for.inc72.1 ] %niter = phi i64 [ 0, %for.body61.lr.ph.new ], [ %niter.next.1, %for.inc72.1 ] %arrayidx65 = getelementptr inbounds [101 x i32], ptr %sum, i64 0, i64 %indvars.iv130 %20 = load i32, ptr %arrayidx65, align 4, !tbaa !5 %cmp66 = icmp slt i32 %16, %20 br i1 %cmp66, label %if.then67, label %for.inc72 if.then67: ; preds = %for.body61 %21 = load i32, ptr %arrayidx69, align 4, !tbaa !5 %inc70 = add nsw i32 %21, 1 store i32 %inc70, ptr %arrayidx69, align 4, !tbaa !5 br label %for.inc72 for.inc72: ; preds = %for.body61, %if.then67 %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1 %arrayidx65.1 = getelementptr inbounds [101 x i32], ptr %sum, i64 0, i64 %indvars.iv.next131 %22 = load i32, ptr %arrayidx65.1, align 4, !tbaa !5 %cmp66.1 = icmp slt i32 %16, %22 br i1 %cmp66.1, label %if.then67.1, label %for.inc72.1 if.then67.1: ; preds = %for.inc72 %23 = load i32, ptr %arrayidx69, align 4, !tbaa !5 %inc70.1 = add nsw i32 %23, 1 store i32 %inc70.1, ptr %arrayidx69, align 4, !tbaa !5 br label %for.inc72.1 for.inc72.1: ; preds = %if.then67.1, %for.inc72 %indvars.iv.next131.1 = add nuw nsw i64 %indvars.iv130, 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.end74.loopexit.unr-lcssa, label %for.body61, !llvm.loop !16 for.end74.loopexit.unr-lcssa: ; preds = %for.inc72.1, %for.body61.lr.ph %indvars.iv130.unr = phi i64 [ 1, %for.body61.lr.ph ], [ %indvars.iv.next131.1, %for.inc72.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end74, label %for.body61.epil for.body61.epil: ; preds = %for.end74.loopexit.unr-lcssa %arrayidx65.epil = getelementptr inbounds [101 x i32], ptr %sum, i64 0, i64 %indvars.iv130.unr %24 = load i32, ptr %arrayidx65.epil, align 4, !tbaa !5 %cmp66.epil = icmp slt i32 %16, %24 br i1 %cmp66.epil, label %if.then67.epil, label %for.end74 if.then67.epil: ; preds = %for.body61.epil %25 = load i32, ptr %arrayidx69, align 4, !tbaa !5 %inc70.epil = add nsw i32 %25, 1 store i32 %inc70.epil, ptr %arrayidx69, align 4, !tbaa !5 br label %for.end74 for.end74: ; preds = %for.end74.loopexit.unr-lcssa, %if.then67.epil, %for.body61.epil, %for.cond59.preheader %arrayidx76 = getelementptr inbounds [101 x i32], ptr %x, i64 0, i64 %indvars.iv135 %26 = load i32, ptr %arrayidx76, align 4, !tbaa !5 %call77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %26) %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1 %27 = load i32, ptr %n, align 4, !tbaa !5 %28 = sext i32 %27 to i64 %cmp57.not.not = icmp slt i64 %indvars.iv135, %28 br i1 %cmp57.not.not, label %for.cond59.preheader, label %for.end80, !llvm.loop !17 for.end80: ; preds = %for.end74, %for.cond56.preheader call void @llvm.lifetime.end.p0(i64 404, ptr nonnull %x) #4 call void @llvm.lifetime.end.p0(i64 404, ptr nonnull %sum) #4 call void @llvm.lifetime.end.p0(i64 20000, ptr nonnull %d) #4 call void @llvm.lifetime.end.p0(i64 20000, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 20000, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 20000, 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: 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, !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}
#include <stdio.h> #include <string.h> #include <stdlib.h> typedef long long ll; typedef char keytype; int gcd(int a, int b){ return (a % b) ? gcd(b, a % b) : b;} int lcm(int a, int b){ return (a / gcd(a, b)) * b;} /* a[0], ..., a[n-1] の数の最大公約数 */ int ngcd(int n, int a[]) { int i, d; d = a[0]; for (i = 1; i < n && d != 1; i++) d = gcd(a[i], d); return d; } void quicksort(keytype a[], int first, int last) { int i, j; keytype x, t; x = a[(first + last) / 2]; i = first; j = last; for ( ; ; ) { while (a[i] < x) i++; while (x < a[j]) j--; if (i >= j) break; t = a[i]; a[i] = a[j]; a[j] = t; i++; j--; } if (first < i - 1) quicksort(a, first , i - 1); if (j + 1 < last) quicksort(a, j + 1, last); } int is_prime(int x){ if(x <= 1) return 0; for(int i = 2; i * i <= x; i++){ if(x % i == 0) return 0; } return 1; } int is_substr(char s[], char t[], int i){ int flag = 1; if(s[i] == '\0') flag = 0; for(int j = 0; j < strlen(t); ++j, ++i){ if(s[i] != t[j]){ flag = 0; break; } } return flag; } // factor list, number of factors, natural number void factorize(int ftr[], int *num, int n){ int a = 2, cnt = 0; while(n >= a){ if(n % a == 0){ n = n / a; ftr[cnt++] = a; }else{ a++; } } *num = cnt; } //#define N 5 //int p[N + 1]; int nextperm(int p[], int N) /* 辞書式順序で次の順列 */ { int i, j, t; i = N - 1; p[0] = 0; /* 番人 */ while (p[i] >= p[i + 1]) i--; if (i == 0) return 0; /* 完了 */ j = N; while (p[i] >= p[j]) j--; t = p[i]; p[i] = p[j]; p[j] = t; i++; j = N; while (i < j) { t = p[i]; p[i] = p[j]; p[j] = t; i++; j--; } return 1; /* 未了 */ } void comb(int size1, int size2, int v[size1][size2]){ for(int i = 0; i < size1; i++){ v[i][0] = 1; v[i][i] = 1; } for(int k = 1; k < size1; k++){ for(int j = 1; j < k; j++){ v[k][j] = (v[k-1][j-1] + v[k-1][j]); } } } int abs_val(int a, int b){ if(a > b) return a - b; else return b - a; } const int inf = 1012345678; int main(){ int a, b, c; ll k; scanf("%d %d %d %lld", &a, &b, &c, &k); int ans = a - b; if((k % 2) == 1) ans = -ans; printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211416/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211416/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @inf = dso_local local_unnamed_addr constant i32 1012345678, align 4 @.str = private unnamed_addr constant [14 x i8] c"%d %d %d %lld\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: br label %tailrecurse tailrecurse: ; preds = %tailrecurse, %entry %a.tr = phi i32 [ %a, %entry ], [ %b.tr, %tailrecurse ] %b.tr = phi i32 [ %b, %entry ], [ %rem, %tailrecurse ] %rem = srem i32 %a.tr, %b.tr %tobool.not = icmp eq i32 %rem, 0 br i1 %tobool.not, label %cond.end, label %tailrecurse cond.end: ; preds = %tailrecurse ret i32 %b.tr } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @lcm(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: br label %tailrecurse.i tailrecurse.i: ; preds = %tailrecurse.i, %entry %a.tr.i = phi i32 [ %a, %entry ], [ %b.tr.i, %tailrecurse.i ] %b.tr.i = phi i32 [ %b, %entry ], [ %rem.i, %tailrecurse.i ] %rem.i = srem i32 %a.tr.i, %b.tr.i %tobool.not.i = icmp eq i32 %rem.i, 0 br i1 %tobool.not.i, label %gcd.exit, label %tailrecurse.i gcd.exit: ; preds = %tailrecurse.i %div = sdiv i32 %a, %b.tr.i %mul = mul nsw i32 %div, %b ret i32 %mul } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @ngcd(i32 noundef %n, ptr nocapture noundef readonly %a) local_unnamed_addr #1 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %cmp8 = icmp sgt i32 %n, 1 %cmp19 = icmp ne i32 %0, 1 %1 = select i1 %cmp8, i1 %cmp19, i1 false br i1 %1, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %2 = zext i32 %n to i64 br label %for.body for.body: ; preds = %for.body.preheader, %gcd.exit %indvars.iv = phi i64 [ 1, %for.body.preheader ], [ %indvars.iv.next, %gcd.exit ] %d.011 = phi i32 [ %0, %for.body.preheader ], [ %b.tr.i, %gcd.exit ] %arrayidx2 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv %3 = load i32, ptr %arrayidx2, align 4, !tbaa !5 br label %tailrecurse.i tailrecurse.i: ; preds = %tailrecurse.i, %for.body %a.tr.i = phi i32 [ %3, %for.body ], [ %b.tr.i, %tailrecurse.i ] %b.tr.i = phi i32 [ %d.011, %for.body ], [ %rem.i, %tailrecurse.i ] %rem.i = srem i32 %a.tr.i, %b.tr.i %tobool.not.i = icmp eq i32 %rem.i, 0 br i1 %tobool.not.i, label %gcd.exit, label %tailrecurse.i gcd.exit: ; preds = %tailrecurse.i %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %cmp = icmp ult i64 %indvars.iv.next, %2 %cmp1 = icmp ne i32 %b.tr.i, 1 %4 = and i1 %cmp, %cmp1 br i1 %4, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %gcd.exit, %entry %d.0.lcssa = phi i32 [ %0, %entry ], [ %b.tr.i, %gcd.exit ] ret i32 %d.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @quicksort(ptr nocapture noundef %a, i32 noundef %first, i32 noundef %last) local_unnamed_addr #3 { entry: br label %tailrecurse tailrecurse: ; preds = %if.end30, %entry %first.tr = phi i32 [ %first, %entry ], [ %add31, %if.end30 ] %add = add nsw i32 %first.tr, %last %div = sdiv i32 %add, 2 %idxprom = sext i32 %div to i64 %arrayidx = getelementptr inbounds i8, ptr %a, i64 %idxprom %0 = load i8, ptr %arrayidx, align 1, !tbaa !11 br label %for.cond for.cond: ; preds = %if.end, %tailrecurse %j.0 = phi i32 [ %last, %tailrecurse ], [ %dec25, %if.end ] %i.0 = phi i32 [ %first.tr, %tailrecurse ], [ %inc24, %if.end ] %1 = sext i32 %i.0 to i64 br label %while.cond while.cond: ; preds = %while.cond, %for.cond %indvars.iv = phi i64 [ %indvars.iv.next, %while.cond ], [ %1, %for.cond ] %arrayidx2 = getelementptr inbounds i8, ptr %a, i64 %indvars.iv %2 = load i8, ptr %arrayidx2, align 1, !tbaa !11 %cmp = icmp slt i8 %2, %0 %indvars.iv.next = add i64 %indvars.iv, 1 br i1 %cmp, label %while.cond, label %while.cond5.preheader, !llvm.loop !12 while.cond5.preheader: ; preds = %while.cond %arrayidx2.le = getelementptr inbounds i8, ptr %a, i64 %indvars.iv %3 = trunc i64 %indvars.iv to i32 %4 = sext i32 %j.0 to i64 br label %while.cond5 while.cond5: ; preds = %while.cond5, %while.cond5.preheader %indvars.iv69 = phi i64 [ %indvars.iv.next70, %while.cond5 ], [ %4, %while.cond5.preheader ] %arrayidx8 = getelementptr inbounds i8, ptr %a, i64 %indvars.iv69 %5 = load i8, ptr %arrayidx8, align 1, !tbaa !11 %cmp10 = icmp slt i8 %0, %5 %indvars.iv.next70 = add i64 %indvars.iv69, -1 br i1 %cmp10, label %while.cond5, label %while.end13, !llvm.loop !13 while.end13: ; preds = %while.cond5 %6 = trunc i64 %indvars.iv69 to i32 %cmp14.not = icmp slt i32 %3, %6 br i1 %cmp14.not, label %if.end, label %for.end if.end: ; preds = %while.end13 %arrayidx8.le = getelementptr inbounds i8, ptr %a, i64 %indvars.iv69 store i8 %5, ptr %arrayidx2.le, align 1, !tbaa !11 store i8 %2, ptr %arrayidx8.le, align 1, !tbaa !11 %inc24 = add nsw i32 %3, 1 %dec25 = add nsw i32 %6, -1 br label %for.cond for.end: ; preds = %while.end13 %sub = add nsw i32 %3, -1 %cmp26 = icmp sgt i32 %sub, %first.tr br i1 %cmp26, label %if.then28, label %if.end30 if.then28: ; preds = %for.end tail call void @quicksort(ptr noundef nonnull %a, i32 noundef %first.tr, i32 noundef %sub) br label %if.end30 if.end30: ; preds = %if.then28, %for.end %add31 = add nsw i32 %6, 1 %cmp32 = icmp slt i32 %add31, %last br i1 %cmp32, label %tailrecurse, label %if.end36 if.end36: ; preds = %if.end30 ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @is_prime(i32 noundef %x) local_unnamed_addr #0 { entry: %cmp = icmp slt i32 %x, 2 br i1 %cmp, label %return, label %for.cond.preheader for.cond.preheader: ; preds = %entry %cmp1.not10 = icmp ult i32 %x, 4 br i1 %cmp1.not10, label %return, label %for.body for.cond: ; preds = %for.body %inc = add nuw nsw i32 %i.011, 1 %mul = mul nsw i32 %inc, %inc %cmp1.not = icmp sgt i32 %mul, %x br i1 %cmp1.not, label %cleanup.loopexit, label %for.body, !llvm.loop !14 for.body: ; preds = %for.cond.preheader, %for.cond %i.011 = phi i32 [ %inc, %for.cond ], [ 2, %for.cond.preheader ] %rem = srem i32 %x, %i.011 %cmp2 = icmp ne i32 %rem, 0 br i1 %cmp2, label %for.cond, label %cleanup.loopexit cleanup.loopexit: ; preds = %for.body, %for.cond %0 = zext i1 %cmp2 to i32 br label %return return: ; preds = %for.cond.preheader, %cleanup.loopexit, %entry %retval.1 = phi i32 [ 0, %entry ], [ 1, %for.cond.preheader ], [ %0, %cleanup.loopexit ] ret i32 %retval.1 } ; Function Attrs: nofree nounwind memory(argmem: read) uwtable define dso_local i32 @is_substr(ptr nocapture noundef readonly %s, ptr nocapture noundef readonly %t, i32 noundef %i) local_unnamed_addr #4 { entry: %idxprom = sext i32 %i to i64 %arrayidx = getelementptr inbounds i8, ptr %s, i64 %idxprom %0 = load i8, ptr %arrayidx, align 1, !tbaa !11 %cmp = icmp ne i8 %0, 0 %call = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %t) #12 %cmp323.not = icmp eq i64 %call, 0 br i1 %cmp323.not, label %cleanup, label %for.body for.body: ; preds = %entry, %for.inc %indvars.iv28 = phi i64 [ %indvars.iv.next29, %for.inc ], [ %idxprom, %entry ] %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] %arrayidx6 = getelementptr inbounds i8, ptr %s, i64 %indvars.iv28 %1 = load i8, ptr %arrayidx6, align 1, !tbaa !11 %arrayidx9 = getelementptr inbounds i8, ptr %t, i64 %indvars.iv %2 = load i8, ptr %arrayidx9, align 1, !tbaa !11 %cmp11.not = icmp eq i8 %1, %2 br i1 %cmp11.not, label %for.inc, label %cleanup for.inc: ; preds = %for.body %indvars.iv.next = add nuw i64 %indvars.iv, 1 %indvars.iv.next29 = add i64 %indvars.iv28, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %call br i1 %exitcond.not, label %cleanup, label %for.body, !llvm.loop !15 cleanup: ; preds = %for.inc, %for.body, %entry %flag.0.shrunk = phi i1 [ %cmp, %entry ], [ false, %for.body ], [ %cmp, %for.inc ] %flag.0 = zext i1 %flag.0.shrunk to i32 ret i32 %flag.0 } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: write) uwtable define dso_local void @factorize(ptr nocapture noundef writeonly %ftr, ptr nocapture noundef writeonly %num, i32 noundef %n) local_unnamed_addr #6 { entry: %cmp.not10 = icmp slt i32 %n, 2 br i1 %cmp.not10, label %while.end, label %while.body while.body: ; preds = %entry, %if.end %cnt.013 = phi i32 [ %cnt.1, %if.end ], [ 0, %entry ] %a.012 = phi i32 [ %a.1, %if.end ], [ 2, %entry ] %n.addr.011 = phi i32 [ %n.addr.1, %if.end ], [ %n, %entry ] %rem = srem i32 %n.addr.011, %a.012 %div = sdiv i32 %n.addr.011, %a.012 %cmp1 = icmp eq i32 %rem, 0 br i1 %cmp1, label %if.then, label %if.else if.then: ; preds = %while.body %inc = add nsw i32 %cnt.013, 1 %idxprom = sext i32 %cnt.013 to i64 %arrayidx = getelementptr inbounds i32, ptr %ftr, i64 %idxprom store i32 %a.012, ptr %arrayidx, align 4, !tbaa !5 br label %if.end if.else: ; preds = %while.body %inc2 = add nsw i32 %a.012, 1 br label %if.end if.end: ; preds = %if.else, %if.then %n.addr.1 = phi i32 [ %div, %if.then ], [ %n.addr.011, %if.else ] %a.1 = phi i32 [ %a.012, %if.then ], [ %inc2, %if.else ] %cnt.1 = phi i32 [ %inc, %if.then ], [ %cnt.013, %if.else ] %cmp.not = icmp slt i32 %n.addr.1, %a.1 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !16 while.end: ; preds = %if.end, %entry %cnt.0.lcssa = phi i32 [ 0, %entry ], [ %cnt.1, %if.end ] store i32 %cnt.0.lcssa, ptr %num, align 4, !tbaa !5 ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local i32 @nextperm(ptr nocapture noundef %p, i32 noundef %N) local_unnamed_addr #7 { entry: store i32 0, ptr %p, align 4, !tbaa !5 %0 = sext i32 %N to i64 %arrayidx3.phi.trans.insert = getelementptr inbounds i32, ptr %p, i64 %0 %.pre = load i32, ptr %arrayidx3.phi.trans.insert, align 4, !tbaa !5 br label %while.cond while.cond: ; preds = %while.cond, %entry %1 = phi i32 [ %2, %while.cond ], [ %.pre, %entry ] %indvars.iv = phi i64 [ %indvars.iv.next, %while.cond ], [ %0, %entry ] %indvars.iv.next = add nsw i64 %indvars.iv, -1 %arrayidx1 = getelementptr inbounds i32, ptr %p, i64 %indvars.iv.next %2 = load i32, ptr %arrayidx1, align 4, !tbaa !5 %cmp.not = icmp slt i32 %2, %1 br i1 %cmp.not, label %while.end, label %while.cond, !llvm.loop !17 while.end: ; preds = %while.cond %arrayidx1.le = getelementptr inbounds i32, ptr %p, i64 %indvars.iv.next %3 = trunc i64 %indvars.iv to i32 %4 = and i64 %indvars.iv.next, 4294967295 %cmp4 = icmp eq i64 %4, 0 br i1 %cmp4, label %cleanup, label %while.cond5 while.cond5: ; preds = %while.end, %while.cond5 %indvars.iv78 = phi i64 [ %indvars.iv.next79, %while.cond5 ], [ %0, %while.end ] %arrayidx9 = getelementptr inbounds i32, ptr %p, i64 %indvars.iv78 %5 = load i32, ptr %arrayidx9, align 4, !tbaa !5 %cmp10.not = icmp slt i32 %2, %5 %indvars.iv.next79 = add i64 %indvars.iv78, -1 br i1 %cmp10.not, label %while.end13, label %while.cond5, !llvm.loop !18 while.end13: ; preds = %while.cond5 %arrayidx9.le = getelementptr inbounds i32, ptr %p, i64 %indvars.iv78 store i32 %5, ptr %arrayidx1.le, align 4, !tbaa !5 store i32 %2, ptr %arrayidx9.le, align 4, !tbaa !5 %cmp2373 = icmp slt i32 %3, %N br i1 %cmp2373, label %while.body24, label %cleanup while.body24: ; preds = %while.end13, %while.body24 %indvars.iv83 = phi i64 [ %indvars.iv.next84, %while.body24 ], [ %indvars.iv, %while.end13 ] %indvars.iv81 = phi i64 [ %indvars.iv.next82, %while.body24 ], [ %0, %while.end13 ] %arrayidx26 = getelementptr inbounds i32, ptr %p, i64 %indvars.iv83 %6 = load i32, ptr %arrayidx26, align 4, !tbaa !5 %arrayidx28 = getelementptr inbounds i32, ptr %p, i64 %indvars.iv81 %7 = load i32, ptr %arrayidx28, align 4, !tbaa !5 store i32 %7, ptr %arrayidx26, align 4, !tbaa !5 store i32 %6, ptr %arrayidx28, align 4, !tbaa !5 %indvars.iv.next84 = add nsw i64 %indvars.iv83, 1 %indvars.iv.next82 = add nsw i64 %indvars.iv81, -1 %cmp23 = icmp slt i64 %indvars.iv.next84, %indvars.iv.next82 br i1 %cmp23, label %while.body24, label %cleanup, !llvm.loop !19 cleanup: ; preds = %while.body24, %while.end13, %while.end %retval.0 = phi i32 [ 0, %while.end ], [ 1, %while.end13 ], [ 1, %while.body24 ] ret i32 %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @comb(i32 noundef %size1, i32 noundef %size2, ptr nocapture noundef %v) local_unnamed_addr #7 { entry: %v73 = ptrtoint ptr %v to i64 %0 = zext i32 %size2 to i64 %cmp53 = icmp sgt i32 %size1, 0 br i1 %cmp53, label %for.body.preheader, label %for.cond.cleanup8 for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %size1 to i64 %xtraiter = and i64 %wide.trip.count, 3 %1 = icmp ult i32 %size1, 4 br i1 %1, label %for.cond6.preheader.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %wide.trip.count, 4294967292 br label %for.body for.cond6.preheader.unr-lcssa: ; preds = %for.body, %for.body.preheader %indvars.iv.unr = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next.3, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond6.preheader, label %for.body.epil for.body.epil: ; preds = %for.cond6.preheader.unr-lcssa, %for.body.epil %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %for.body.epil ], [ %indvars.iv.unr, %for.cond6.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.cond6.preheader.unr-lcssa ] %2 = mul nuw nsw i64 %indvars.iv.epil, %0 %arrayidx.epil = getelementptr inbounds i32, ptr %v, i64 %2 store i32 1, ptr %arrayidx.epil, align 4, !tbaa !5 %arrayidx5.epil = getelementptr inbounds i32, ptr %arrayidx.epil, i64 %indvars.iv.epil store i32 1, ptr %arrayidx5.epil, align 4, !tbaa !5 %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.cond6.preheader, label %for.body.epil, !llvm.loop !20 for.cond6.preheader: ; preds = %for.body.epil, %for.cond6.preheader.unr-lcssa %cmp757 = icmp sgt i32 %size1, 1 br i1 %cmp757, label %for.cond10.preheader.preheader, label %for.cond.cleanup8 for.cond10.preheader.preheader: ; preds = %for.cond6.preheader %wide.trip.count70 = zext i32 %size1 to i64 %3 = shl nuw nsw i64 %0, 2 %4 = add i64 %3, %v73 %5 = add i64 %4, 4 %6 = shl nuw nsw i64 %0, 2 %diff.check74 = icmp ult i32 %size2, 8 br label %for.cond10.preheader for.body: ; preds = %for.body, %for.body.preheader.new %indvars.iv = phi i64 [ 0, %for.body.preheader.new ], [ %indvars.iv.next.3, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.3, %for.body ] %7 = mul nuw nsw i64 %indvars.iv, %0 %arrayidx = getelementptr inbounds i32, ptr %v, i64 %7 store i32 1, ptr %arrayidx, align 4, !tbaa !5 %arrayidx5 = getelementptr inbounds i32, ptr %arrayidx, i64 %indvars.iv store i32 1, ptr %arrayidx5, align 4, !tbaa !5 %indvars.iv.next = or i64 %indvars.iv, 1 %8 = mul nuw nsw i64 %indvars.iv.next, %0 %arrayidx.1 = getelementptr inbounds i32, ptr %v, i64 %8 store i32 1, ptr %arrayidx.1, align 4, !tbaa !5 %arrayidx5.1 = getelementptr inbounds i32, ptr %arrayidx.1, i64 %indvars.iv.next store i32 1, ptr %arrayidx5.1, align 4, !tbaa !5 %indvars.iv.next.1 = or i64 %indvars.iv, 2 %9 = mul nuw nsw i64 %indvars.iv.next.1, %0 %arrayidx.2 = getelementptr inbounds i32, ptr %v, i64 %9 store i32 1, ptr %arrayidx.2, align 4, !tbaa !5 %arrayidx5.2 = getelementptr inbounds i32, ptr %arrayidx.2, i64 %indvars.iv.next.1 store i32 1, ptr %arrayidx5.2, align 4, !tbaa !5 %indvars.iv.next.2 = or i64 %indvars.iv, 3 %10 = mul nuw nsw i64 %indvars.iv.next.2, %0 %arrayidx.3 = getelementptr inbounds i32, ptr %v, i64 %10 store i32 1, ptr %arrayidx.3, align 4, !tbaa !5 %arrayidx5.3 = getelementptr inbounds i32, ptr %arrayidx.3, i64 %indvars.iv.next.2 store i32 1, ptr %arrayidx5.3, align 4, !tbaa !5 %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4 %niter.next.3 = add nuw i64 %niter, 4 %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter br i1 %niter.ncmp.3, label %for.cond6.preheader.unr-lcssa, label %for.body, !llvm.loop !22 for.cond10.preheader: ; preds = %for.cond10.preheader.preheader, %for.cond.cleanup12 %indvar = phi i64 [ 0, %for.cond10.preheader.preheader ], [ %indvar.next, %for.cond.cleanup12 ] %indvars.iv66 = phi i64 [ 1, %for.cond10.preheader.preheader ], [ %indvars.iv.next67, %for.cond.cleanup12 ] %11 = mul i64 %6, %indvar %12 = add i64 %5, %11 %13 = add i64 %11, %v73 %cmp1155 = icmp ugt i64 %indvars.iv66, 1 br i1 %cmp1155, label %for.body13.lr.ph, label %for.cond.cleanup12 for.body13.lr.ph: ; preds = %for.cond10.preheader %14 = add nsw i64 %indvars.iv66, -1 %15 = mul nuw nsw i64 %14, %0 %arrayidx15 = getelementptr inbounds i32, ptr %v, i64 %15 %16 = mul nuw nsw i64 %indvars.iv66, %0 %arrayidx25 = getelementptr inbounds i32, ptr %v, i64 %16 %invariant.gep = getelementptr i32, ptr %arrayidx15, i64 -1 %min.iters.check = icmp ult i64 %indvar, 8 br i1 %min.iters.check, label %for.body13.preheader, label %vector.memcheck vector.memcheck: ; preds = %for.body13.lr.ph %17 = sub i64 %12, %13 %diff.check = icmp ult i64 %17, 32 %conflict.rdx = or i1 %diff.check, %diff.check74 br i1 %conflict.rdx, label %for.body13.preheader, label %vector.ph vector.ph: ; preds = %vector.memcheck %n.vec = and i64 %indvar, -8 %ind.end = or i64 %n.vec, 1 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %offset.idx = or i64 %index, 1 %18 = getelementptr i32, ptr %invariant.gep, i64 %offset.idx %wide.load = load <4 x i32>, ptr %18, align 4, !tbaa !5 %19 = getelementptr i32, ptr %18, i64 4 %wide.load75 = load <4 x i32>, ptr %19, align 4, !tbaa !5 %20 = getelementptr inbounds i32, ptr %arrayidx15, i64 %offset.idx %wide.load76 = load <4 x i32>, ptr %20, align 4, !tbaa !5 %21 = getelementptr inbounds i32, ptr %20, i64 4 %wide.load77 = load <4 x i32>, ptr %21, align 4, !tbaa !5 %22 = add nsw <4 x i32> %wide.load76, %wide.load %23 = add nsw <4 x i32> %wide.load77, %wide.load75 %24 = getelementptr inbounds i32, ptr %arrayidx25, i64 %offset.idx store <4 x i32> %22, ptr %24, align 4, !tbaa !5 %25 = getelementptr inbounds i32, ptr %24, i64 4 store <4 x i32> %23, ptr %25, align 4, !tbaa !5 %index.next = add nuw i64 %index, 8 %26 = icmp eq i64 %index.next, %n.vec br i1 %26, label %middle.block, label %vector.body, !llvm.loop !23 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %indvar, %n.vec br i1 %cmp.n, label %for.cond.cleanup12, label %for.body13.preheader for.body13.preheader: ; preds = %vector.memcheck, %for.body13.lr.ph, %middle.block %indvars.iv60.ph = phi i64 [ 1, %vector.memcheck ], [ 1, %for.body13.lr.ph ], [ %ind.end, %middle.block ] %27 = sub i64 %indvars.iv66, %indvars.iv60.ph %28 = sub i64 %indvar, %indvars.iv60.ph %xtraiter78 = and i64 %27, 3 %lcmp.mod79.not = icmp eq i64 %xtraiter78, 0 br i1 %lcmp.mod79.not, label %for.body13.prol.loopexit, label %for.body13.prol for.body13.prol: ; preds = %for.body13.preheader, %for.body13.prol %indvars.iv60.prol = phi i64 [ %indvars.iv.next61.prol, %for.body13.prol ], [ %indvars.iv60.ph, %for.body13.preheader ] %prol.iter = phi i64 [ %prol.iter.next, %for.body13.prol ], [ 0, %for.body13.preheader ] %gep.prol = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv60.prol %29 = load i32, ptr %gep.prol, align 4, !tbaa !5 %arrayidx23.prol = getelementptr inbounds i32, ptr %arrayidx15, i64 %indvars.iv60.prol %30 = load i32, ptr %arrayidx23.prol, align 4, !tbaa !5 %add.prol = add nsw i32 %30, %29 %arrayidx27.prol = getelementptr inbounds i32, ptr %arrayidx25, i64 %indvars.iv60.prol store i32 %add.prol, ptr %arrayidx27.prol, align 4, !tbaa !5 %indvars.iv.next61.prol = add nuw nsw i64 %indvars.iv60.prol, 1 %prol.iter.next = add i64 %prol.iter, 1 %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter78 br i1 %prol.iter.cmp.not, label %for.body13.prol.loopexit, label %for.body13.prol, !llvm.loop !26 for.body13.prol.loopexit: ; preds = %for.body13.prol, %for.body13.preheader %indvars.iv60.unr = phi i64 [ %indvars.iv60.ph, %for.body13.preheader ], [ %indvars.iv.next61.prol, %for.body13.prol ] %31 = icmp ult i64 %28, 3 br i1 %31, label %for.cond.cleanup12, label %for.body13 for.cond.cleanup8: ; preds = %for.cond.cleanup12, %entry, %for.cond6.preheader ret void for.cond.cleanup12: ; preds = %for.body13.prol.loopexit, %for.body13, %middle.block, %for.cond10.preheader %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1 %exitcond71.not = icmp eq i64 %indvars.iv.next67, %wide.trip.count70 %indvar.next = add i64 %indvar, 1 br i1 %exitcond71.not, label %for.cond.cleanup8, label %for.cond10.preheader, !llvm.loop !27 for.body13: ; preds = %for.body13.prol.loopexit, %for.body13 %indvars.iv60 = phi i64 [ %indvars.iv.next61.3, %for.body13 ], [ %indvars.iv60.unr, %for.body13.prol.loopexit ] %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv60 %32 = load i32, ptr %gep, align 4, !tbaa !5 %arrayidx23 = getelementptr inbounds i32, ptr %arrayidx15, i64 %indvars.iv60 %33 = load i32, ptr %arrayidx23, align 4, !tbaa !5 %add = add nsw i32 %33, %32 %arrayidx27 = getelementptr inbounds i32, ptr %arrayidx25, i64 %indvars.iv60 store i32 %add, ptr %arrayidx27, align 4, !tbaa !5 %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1 %gep.1 = getelementptr i32, ptr %arrayidx15, i64 %indvars.iv60 %34 = load i32, ptr %gep.1, align 4, !tbaa !5 %arrayidx23.1 = getelementptr inbounds i32, ptr %arrayidx15, i64 %indvars.iv.next61 %35 = load i32, ptr %arrayidx23.1, align 4, !tbaa !5 %add.1 = add nsw i32 %35, %34 %arrayidx27.1 = getelementptr inbounds i32, ptr %arrayidx25, i64 %indvars.iv.next61 store i32 %add.1, ptr %arrayidx27.1, align 4, !tbaa !5 %indvars.iv.next61.1 = add nuw nsw i64 %indvars.iv60, 2 %gep.2 = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv.next61.1 %36 = load i32, ptr %gep.2, align 4, !tbaa !5 %arrayidx23.2 = getelementptr inbounds i32, ptr %arrayidx15, i64 %indvars.iv.next61.1 %37 = load i32, ptr %arrayidx23.2, align 4, !tbaa !5 %add.2 = add nsw i32 %37, %36 %arrayidx27.2 = getelementptr inbounds i32, ptr %arrayidx25, i64 %indvars.iv.next61.1 store i32 %add.2, ptr %arrayidx27.2, align 4, !tbaa !5 %indvars.iv.next61.2 = add nuw nsw i64 %indvars.iv60, 3 %gep.3 = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv.next61.2 %38 = load i32, ptr %gep.3, align 4, !tbaa !5 %arrayidx23.3 = getelementptr inbounds i32, ptr %arrayidx15, i64 %indvars.iv.next61.2 %39 = load i32, ptr %arrayidx23.3, align 4, !tbaa !5 %add.3 = add nsw i32 %39, %38 %arrayidx27.3 = getelementptr inbounds i32, ptr %arrayidx25, i64 %indvars.iv.next61.2 store i32 %add.3, ptr %arrayidx27.3, align 4, !tbaa !5 %indvars.iv.next61.3 = add nuw nsw i64 %indvars.iv60, 4 %exitcond65.not.3 = icmp eq i64 %indvars.iv.next61.3, %indvars.iv66 br i1 %exitcond65.not.3, label %for.cond.cleanup12, label %for.body13, !llvm.loop !28 } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @abs_val(i32 noundef %a, i32 noundef %b) local_unnamed_addr #8 { entry: %sub = sub nsw i32 %a, %b %retval.0 = tail call i32 @llvm.abs.i32(i32 %sub, i1 true) ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #9 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 %k = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #13 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #13 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #13 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %k) #13 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c, ptr noundef nonnull %k) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 %2 = load i64, ptr %k, align 8, !tbaa !29 %3 = and i64 %2, -9223372036854775807 %cmp = icmp eq i64 %3, 1 %sub1 = sub nsw i32 0, %sub %spec.select = select i1 %cmp, i32 %sub1, i32 %sub %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %spec.select) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %k) #13 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #13 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #13 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #13 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #10 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #10 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #11 attributes #0 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree norecurse nosync nounwind memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree norecurse nosync nounwind memory(argmem: write) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #8 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #9 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #10 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #11 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #12 = { nounwind willreturn memory(read) } attributes #13 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!7, !7, i64 0} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10} !19 = distinct !{!19, !10} !20 = distinct !{!20, !21} !21 = !{!"llvm.loop.unroll.disable"} !22 = distinct !{!22, !10} !23 = distinct !{!23, !10, !24, !25} !24 = !{!"llvm.loop.isvectorized", i32 1} !25 = !{!"llvm.loop.unroll.runtime.disable"} !26 = distinct !{!26, !21} !27 = distinct !{!27, !10} !28 = distinct !{!28, !10, !24} !29 = !{!30, !30, i64 0} !30 = !{!"long long", !7, i64 0}
#include<stdio.h> int main(){ long long A,B,C,K; scanf("%lld%lld%lld%lld",&A,&B,&C,&K); if(K%2==0)printf("%lld\n",A-B); else printf("%lld\n",B-A); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211474/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211474/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [17 x i8] c"%lld%lld%lld%lld\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %A = alloca i64, align 8 %B = alloca i64, align 8 %C = alloca i64, align 8 %K = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %A) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %B) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %C) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %K) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B, ptr noundef nonnull %C, ptr noundef nonnull %K) %0 = load i64, ptr %K, align 8, !tbaa !5 %1 = and i64 %0, 1 %cmp = icmp eq i64 %1, 0 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %2 = load i64, ptr %A, align 8, !tbaa !5 %3 = load i64, ptr %B, align 8, !tbaa !5 %sub = sub nsw i64 %2, %3 br label %if.end if.else: ; preds = %entry %4 = load i64, ptr %B, align 8, !tbaa !5 %5 = load i64, ptr %A, align 8, !tbaa !5 %sub2 = sub nsw i64 %4, %5 br label %if.end if.end: ; preds = %if.else, %if.then %sub2.sink = phi i64 [ %sub2, %if.else ], [ %sub, %if.then ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %sub2.sink) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %K) #3 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %C) #3 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %B) #3 call void @llvm.lifetime.end.p0(i64 8, 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 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> struct apple { int x,y; }edge[100010]; int k,f[100010]; long long cnt; void push_back(int x,int y) { edge[++k].x=x; edge[k].y=y; } int find(int x) { if(f[x]==x) return x; f[x]=find(f[x]); return f[x]; } void unioned(int x,int y) { int fx,fy; fx=find(x); fy=find(y); if(fx!=fy) { f[fx]=fy; cnt--; } } int judge(int x,int y) { int fx,fy; fx=find(x); fy=find(y); if(fx==fy) return 0; return 1; } int main() { int fla,q,i,x,y,z; long long n,m; fla=1; k=0; scanf("%lld%lld%d",&n,&m,&q); cnt=n; for(i=1;i<=n;i++) f[i]=i; for(i=1;i<=q;i++) { scanf("%d%d%d",&x,&y,&z); x++; y++; if(z==0) unioned(x,y); else push_back(x,y); } if(m==n-1) { if(k>0) printf("No"); else printf("Yes"); return 0; } for(i=1;i<=k;i++) if(!judge(edge[i].x,edge[i].y)) fla=0; if(m>n-cnt+cnt*(cnt-1)/2) fla=0; if(fla) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211568/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211568/source.c" target datalayout = "e-m:e-p270: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.apple = type { i32, i32 } @edge = dso_local local_unnamed_addr global [100010 x %struct.apple] zeroinitializer, align 16 @k = dso_local local_unnamed_addr global i32 0, align 4 @f = dso_local local_unnamed_addr global [100010 x i32] zeroinitializer, align 16 @cnt = dso_local local_unnamed_addr global i64 0, align 8 @.str = private unnamed_addr constant [11 x i8] c"%lld%lld%d\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.2 = 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: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @push_back(i32 noundef %x, i32 noundef %y) local_unnamed_addr #0 { entry: %0 = load i32, ptr @k, align 4, !tbaa !5 %inc = add nsw i32 %0, 1 store i32 %inc, ptr @k, align 4, !tbaa !5 %idxprom = sext i32 %inc to i64 %arrayidx = getelementptr inbounds [100010 x %struct.apple], ptr @edge, i64 0, i64 %idxprom store i32 %x, ptr %arrayidx, align 8, !tbaa !9 %y4 = getelementptr inbounds [100010 x %struct.apple], ptr @edge, i64 0, i64 %idxprom, i32 1 store i32 %y, ptr %y4, align 4, !tbaa !11 ret void } ; Function Attrs: nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @find(i32 noundef %x) local_unnamed_addr #1 { entry: %idxprom = sext i32 %x to i64 %arrayidx = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp = icmp eq i32 %0, %x br i1 %cmp, label %common.ret12, label %if.end common.ret12: ; preds = %entry, %if.end %common.ret12.op = phi i32 [ %call, %if.end ], [ %x, %entry ] ret i32 %common.ret12.op if.end: ; preds = %entry %call = tail call i32 @find(i32 noundef %0) store i32 %call, ptr %arrayidx, align 4, !tbaa !5 br label %common.ret12 } ; Function Attrs: nofree nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable define dso_local void @unioned(i32 noundef %x, i32 noundef %y) local_unnamed_addr #2 { entry: %call = tail call i32 @find(i32 noundef %x) %call1 = tail call i32 @find(i32 noundef %y) %cmp.not = icmp eq i32 %call, %call1 br i1 %cmp.not, label %if.end, label %if.then if.then: ; preds = %entry %idxprom = sext i32 %call to i64 %arrayidx = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %idxprom store i32 %call1, ptr %arrayidx, align 4, !tbaa !5 %0 = load i64, ptr @cnt, align 8, !tbaa !12 %dec = add nsw i64 %0, -1 store i64 %dec, ptr @cnt, align 8, !tbaa !12 br label %if.end if.end: ; preds = %if.then, %entry ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: nofree nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable define dso_local i32 @judge(i32 noundef %x, i32 noundef %y) local_unnamed_addr #2 { entry: %call = tail call i32 @find(i32 noundef %x) %call1 = tail call i32 @find(i32 noundef %y) %cmp = icmp ne i32 %call, %call1 %. = zext i1 %cmp to i32 ret i32 %. } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #4 { entry: %q = alloca i32, align 4 %x = alloca i32, align 4 %y = alloca i32, align 4 %z = alloca i32, align 4 %n = alloca i64, align 8 %m = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %q) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %z) #6 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #6 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %m) #6 store i32 0, ptr @k, align 4, !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m, ptr noundef nonnull %q) %0 = load i64, ptr %n, align 8, !tbaa !12 store i64 %0, ptr @cnt, align 8, !tbaa !12 %cmp.not75 = icmp slt i64 %0, 1 br i1 %cmp.not75, label %for.cond2.preheader, label %for.body.preheader for.body.preheader: ; preds = %entry %min.iters.check = icmp ult i64 %0, 8 br i1 %min.iters.check, label %for.body.preheader91, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %0, -8 %ind.end = or i64 %n.vec, 1 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.ind = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph ], [ %vec.ind.next, %vector.body ] %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4> %offset.idx = or i64 %index, 1 %1 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %offset.idx store <4 x i32> %vec.ind, ptr %1, align 4, !tbaa !5 %2 = getelementptr inbounds i32, ptr %1, i64 4 store <4 x i32> %step.add, ptr %2, align 4, !tbaa !5 %index.next = add nuw i64 %index, 8 %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8> %3 = icmp eq i64 %index.next, %n.vec br i1 %3, label %middle.block, label %vector.body, !llvm.loop !14 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %0, %n.vec br i1 %cmp.n, label %for.cond2.preheader, label %for.body.preheader91 for.body.preheader91: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 1, %for.body.preheader ], [ %ind.end, %middle.block ] br label %for.body for.cond2.preheader: ; preds = %for.body, %middle.block, %entry %4 = load i32, ptr %q, align 4, !tbaa !5 %cmp3.not78 = icmp slt i32 %4, 1 br i1 %cmp3.not78, label %for.end13, label %for.body5 for.body: ; preds = %for.body.preheader91, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader91 ] %arrayidx = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %indvars.iv %5 = trunc i64 %indvars.iv to i32 store i32 %5, ptr %arrayidx, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv, %0 br i1 %exitcond, label %for.cond2.preheader, label %for.body, !llvm.loop !18 for.body5: ; preds = %for.cond2.preheader, %for.inc11 %i.179 = phi i32 [ %inc12, %for.inc11 ], [ 1, %for.cond2.preheader ] %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x, ptr noundef nonnull %y, ptr noundef nonnull %z) %6 = load i32, ptr %x, align 4, !tbaa !5 %inc7 = add nsw i32 %6, 1 store i32 %inc7, ptr %x, align 4, !tbaa !5 %7 = load i32, ptr %y, align 4, !tbaa !5 %inc8 = add nsw i32 %7, 1 store i32 %inc8, ptr %y, align 4, !tbaa !5 %8 = load i32, ptr %z, align 4, !tbaa !5 %cmp9 = icmp eq i32 %8, 0 br i1 %cmp9, label %if.then, label %if.else if.then: ; preds = %for.body5 %call.i = call i32 @find(i32 noundef %inc7) %call1.i = call i32 @find(i32 noundef %inc8) %cmp.not.i = icmp eq i32 %call.i, %call1.i br i1 %cmp.not.i, label %for.inc11, label %if.then.i if.then.i: ; preds = %if.then %idxprom.i = sext i32 %call.i to i64 %arrayidx.i = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %idxprom.i store i32 %call1.i, ptr %arrayidx.i, align 4, !tbaa !5 %9 = load i64, ptr @cnt, align 8, !tbaa !12 %dec.i = add nsw i64 %9, -1 store i64 %dec.i, ptr @cnt, align 8, !tbaa !12 br label %for.inc11 if.else: ; preds = %for.body5 %10 = load i32, ptr @k, align 4, !tbaa !5 %inc.i = add nsw i32 %10, 1 store i32 %inc.i, ptr @k, align 4, !tbaa !5 %idxprom.i70 = sext i32 %inc.i to i64 %arrayidx.i71 = getelementptr inbounds [100010 x %struct.apple], ptr @edge, i64 0, i64 %idxprom.i70 store i32 %inc7, ptr %arrayidx.i71, align 8, !tbaa !9 %y4.i = getelementptr inbounds [100010 x %struct.apple], ptr @edge, i64 0, i64 %idxprom.i70, i32 1 store i32 %inc8, ptr %y4.i, align 4, !tbaa !11 br label %for.inc11 for.inc11: ; preds = %if.then.i, %if.then, %if.else %inc12 = add nuw nsw i32 %i.179, 1 %11 = load i32, ptr %q, align 4, !tbaa !5 %cmp3.not.not = icmp slt i32 %i.179, %11 br i1 %cmp3.not.not, label %for.body5, label %for.end13.loopexit, !llvm.loop !19 for.end13.loopexit: ; preds = %for.inc11 %.pre = load i64, ptr %n, align 8, !tbaa !12 br label %for.end13 for.end13: ; preds = %for.end13.loopexit, %for.cond2.preheader %12 = phi i64 [ %.pre, %for.end13.loopexit ], [ %0, %for.cond2.preheader ] %13 = load i64, ptr %m, align 8, !tbaa !12 %sub = add nsw i64 %12, -1 %cmp14 = icmp eq i64 %13, %sub %14 = load i32, ptr @k, align 4, !tbaa !5 br i1 %cmp14, label %if.then16, label %for.cond25.preheader for.cond25.preheader: ; preds = %for.end13 %cmp26.not80 = icmp slt i32 %14, 1 br i1 %cmp26.not80, label %for.end40, label %for.body28 if.then16: ; preds = %for.end13 %cmp17 = icmp sgt i32 %14, 0 br label %cleanup for.body28: ; preds = %for.cond25.preheader, %for.body28 %indvars.iv84 = phi i64 [ %indvars.iv.next85, %for.body28 ], [ 1, %for.cond25.preheader ] %fla.081 = phi i32 [ %spec.select, %for.body28 ], [ 1, %for.cond25.preheader ] %arrayidx30 = getelementptr inbounds [100010 x %struct.apple], ptr @edge, i64 0, i64 %indvars.iv84 %15 = load i32, ptr %arrayidx30, align 8, !tbaa !9 %y34 = getelementptr inbounds [100010 x %struct.apple], ptr @edge, i64 0, i64 %indvars.iv84, i32 1 %16 = load i32, ptr %y34, align 4, !tbaa !11 %call.i72 = call i32 @find(i32 noundef %15) %call1.i73 = call i32 @find(i32 noundef %16) %cmp.i.not = icmp eq i32 %call.i72, %call1.i73 %spec.select = select i1 %cmp.i.not, i32 0, i32 %fla.081 %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1 %17 = load i32, ptr @k, align 4, !tbaa !5 %18 = sext i32 %17 to i64 %cmp26.not.not = icmp slt i64 %indvars.iv84, %18 br i1 %cmp26.not.not, label %for.body28, label %for.end40.loopexit, !llvm.loop !20 for.end40.loopexit: ; preds = %for.body28 %.pre87 = load i64, ptr %m, align 8, !tbaa !12 %.pre88 = load i64, ptr %n, align 8, !tbaa !12 %19 = icmp eq i32 %spec.select, 0 br label %for.end40 for.end40: ; preds = %for.end40.loopexit, %for.cond25.preheader %20 = phi i64 [ %12, %for.cond25.preheader ], [ %.pre88, %for.end40.loopexit ] %21 = phi i64 [ %13, %for.cond25.preheader ], [ %.pre87, %for.end40.loopexit ] %fla.0.lcssa = phi i1 [ false, %for.cond25.preheader ], [ %19, %for.end40.loopexit ] %22 = load i64, ptr @cnt, align 8, !tbaa !12 %sub41 = sub i64 %20, %22 %sub42 = add nsw i64 %22, -1 %mul = mul nsw i64 %sub42, %22 %div = sdiv i64 %mul, 2 %add = add nsw i64 %sub41, %div %cmp43 = icmp sgt i64 %21, %add %tobool47.not = select i1 %cmp43, i1 true, i1 %fla.0.lcssa br label %cleanup cleanup: ; preds = %for.end40, %if.then16 %tobool47.not.sink = phi i1 [ %tobool47.not, %for.end40 ], [ %cmp17, %if.then16 ] %.str.2..str.389 = select i1 %tobool47.not.sink, ptr @.str.2, ptr @.str.3 %call49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2..str.389) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %m) #6 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %z) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %q) #6 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 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { 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 #2 = { nofree nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #4 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !6, i64 0} !10 = !{!"apple", !6, i64 0, !6, i64 4} !11 = !{!10, !6, i64 4} !12 = !{!13, !13, i64 0} !13 = !{!"long long", !7, i64 0} !14 = distinct !{!14, !15, !16, !17} !15 = !{!"llvm.loop.mustprogress"} !16 = !{!"llvm.loop.isvectorized", i32 1} !17 = !{!"llvm.loop.unroll.runtime.disable"} !18 = distinct !{!18, !15, !17, !16} !19 = distinct !{!19, !15} !20 = distinct !{!20, !15}
#include <stdio.h> void ft_swap(long *a, long *b) { long tmp; tmp = *a; *a = *b; *b = tmp; } void a_qsort(long *tab, long left, long right) { long Left = left; long Right = right; long pivot = tab[(left + right) / 2]; while (1) { while (tab[Left] < pivot) Left++; while (tab[Right] > pivot) Right--; if (Left >= Right) break ; ft_swap(&tab[Left], &tab[Right]); Left++; Right--; } if (Left - 1 > left) a_qsort(tab, left, Left - 1); if (Right + 1 < right) a_qsort(tab, Right + 1, right); } void d_qsort(long *tab, long left, long right) { long Left = left; long Right = right; long pivot = tab[(left + right) / 2]; while (1) { while (tab[Left] > pivot) Left++; while (tab[Right] < pivot) Right--; if (Left >= Right) break ; ft_swap(&tab[Left], &tab[Right]); Left++; Right--; } if (Left - 1 > left) d_qsort(tab, left, Left - 1); if (Right + 1 < right) d_qsort(tab, Right + 1, right); } int main(void) { long N; long x; long i; scanf("%ld", &N); scanf("%ld", &x); long a[N + 1]; long sum = 0; long count = 0; i = 1; while (i <= N) { scanf("%ld", &a[i]); sum += a[i]; i++; } if (sum == x) { printf("%ld", N); return 0; } else if (sum < x) { d_qsort(a, 1, N); i = 1; while (i <= N) { if (i != N && x >= a[i]) { x -= a[i]; count++; } if (i == N) break ; i++; } } else if (sum > x) { a_qsort(a, 1, N); i = 1; while (i <= N) { if (x >= a[i]) { x -= a[i]; count++; } i++; } } printf("%ld", count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211610/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211610/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @ft_swap(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #0 { entry: %0 = load i64, ptr %a, align 8, !tbaa !5 %1 = load i64, ptr %b, align 8, !tbaa !5 store i64 %1, ptr %a, align 8, !tbaa !5 store i64 %0, ptr %b, align 8, !tbaa !5 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @a_qsort(ptr nocapture noundef %tab, i64 noundef %left, i64 noundef %right) local_unnamed_addr #2 { entry: br label %tailrecurse tailrecurse: ; preds = %if.end18, %entry %left.tr = phi i64 [ %left, %entry ], [ %add19, %if.end18 ] %add = add nsw i64 %left.tr, %right %div = sdiv i64 %add, 2 %arrayidx = getelementptr inbounds i64, ptr %tab, i64 %div %0 = load i64, ptr %arrayidx, align 8, !tbaa !5 br label %while.cond while.cond: ; preds = %if.end, %tailrecurse %Right.0 = phi i64 [ %right, %tailrecurse ], [ %dec, %if.end ] %Left.0 = phi i64 [ %left.tr, %tailrecurse ], [ %inc, %if.end ] br label %while.cond1 while.cond1: ; preds = %while.cond1, %while.cond %Left.1 = phi i64 [ %Left.0, %while.cond ], [ %inc, %while.cond1 ] %arrayidx2 = getelementptr inbounds i64, ptr %tab, i64 %Left.1 %1 = load i64, ptr %arrayidx2, align 8, !tbaa !5 %cmp = icmp slt i64 %1, %0 %inc = add nsw i64 %Left.1, 1 br i1 %cmp, label %while.cond1, label %while.cond4.preheader, !llvm.loop !9 while.cond4.preheader: ; preds = %while.cond1 %arrayidx2.le = getelementptr inbounds i64, ptr %tab, i64 %Left.1 br label %while.cond4 while.cond4: ; preds = %while.cond4, %while.cond4.preheader %Right.1 = phi i64 [ %dec, %while.cond4 ], [ %Right.0, %while.cond4.preheader ] %arrayidx5 = getelementptr inbounds i64, ptr %tab, i64 %Right.1 %2 = load i64, ptr %arrayidx5, align 8, !tbaa !5 %cmp6 = icmp sgt i64 %2, %0 %dec = add nsw i64 %Right.1, -1 br i1 %cmp6, label %while.cond4, label %while.end8, !llvm.loop !11 while.end8: ; preds = %while.cond4 %cmp9.not = icmp slt i64 %Left.1, %Right.1 br i1 %cmp9.not, label %if.end, label %while.end14 if.end: ; preds = %while.end8 %arrayidx5.le = getelementptr inbounds i64, ptr %tab, i64 %Right.1 store i64 %2, ptr %arrayidx2.le, align 8, !tbaa !5 store i64 %1, ptr %arrayidx5.le, align 8, !tbaa !5 br label %while.cond while.end14: ; preds = %while.end8 %sub = add nsw i64 %Left.1, -1 %cmp15 = icmp sgt i64 %sub, %left.tr br i1 %cmp15, label %if.then16, label %if.end18 if.then16: ; preds = %while.end14 tail call void @a_qsort(ptr noundef nonnull %tab, i64 noundef %left.tr, i64 noundef %sub) br label %if.end18 if.end18: ; preds = %if.then16, %while.end14 %add19 = add nsw i64 %Right.1, 1 %cmp20 = icmp slt i64 %add19, %right br i1 %cmp20, label %tailrecurse, label %if.end23 if.end23: ; preds = %if.end18 ret void } ; Function Attrs: nofree nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @d_qsort(ptr nocapture noundef %tab, i64 noundef %left, i64 noundef %right) local_unnamed_addr #2 { entry: br label %tailrecurse tailrecurse: ; preds = %if.end18, %entry %left.tr = phi i64 [ %left, %entry ], [ %add19, %if.end18 ] %add = add nsw i64 %left.tr, %right %div = sdiv i64 %add, 2 %arrayidx = getelementptr inbounds i64, ptr %tab, i64 %div %0 = load i64, ptr %arrayidx, align 8, !tbaa !5 br label %while.cond while.cond: ; preds = %if.end, %tailrecurse %Right.0 = phi i64 [ %right, %tailrecurse ], [ %dec, %if.end ] %Left.0 = phi i64 [ %left.tr, %tailrecurse ], [ %inc, %if.end ] br label %while.cond1 while.cond1: ; preds = %while.cond1, %while.cond %Left.1 = phi i64 [ %Left.0, %while.cond ], [ %inc, %while.cond1 ] %arrayidx2 = getelementptr inbounds i64, ptr %tab, i64 %Left.1 %1 = load i64, ptr %arrayidx2, align 8, !tbaa !5 %cmp = icmp sgt i64 %1, %0 %inc = add nsw i64 %Left.1, 1 br i1 %cmp, label %while.cond1, label %while.cond4.preheader, !llvm.loop !12 while.cond4.preheader: ; preds = %while.cond1 %arrayidx2.le = getelementptr inbounds i64, ptr %tab, i64 %Left.1 br label %while.cond4 while.cond4: ; preds = %while.cond4, %while.cond4.preheader %Right.1 = phi i64 [ %dec, %while.cond4 ], [ %Right.0, %while.cond4.preheader ] %arrayidx5 = getelementptr inbounds i64, ptr %tab, i64 %Right.1 %2 = load i64, ptr %arrayidx5, align 8, !tbaa !5 %cmp6 = icmp slt i64 %2, %0 %dec = add nsw i64 %Right.1, -1 br i1 %cmp6, label %while.cond4, label %while.end8, !llvm.loop !13 while.end8: ; preds = %while.cond4 %cmp9.not = icmp slt i64 %Left.1, %Right.1 br i1 %cmp9.not, label %if.end, label %while.end14 if.end: ; preds = %while.end8 %arrayidx5.le = getelementptr inbounds i64, ptr %tab, i64 %Right.1 store i64 %2, ptr %arrayidx2.le, align 8, !tbaa !5 store i64 %1, ptr %arrayidx5.le, align 8, !tbaa !5 br label %while.cond while.end14: ; preds = %while.end8 %sub = add nsw i64 %Left.1, -1 %cmp15 = icmp sgt i64 %sub, %left.tr br i1 %cmp15, label %if.then16, label %if.end18 if.then16: ; preds = %while.end14 tail call void @d_qsort(ptr noundef nonnull %tab, i64 noundef %left.tr, i64 noundef %sub) br label %if.end18 if.end18: ; preds = %if.then16, %while.end14 %add19 = add nsw i64 %Right.1, 1 %cmp20 = icmp slt i64 %add19, %right br i1 %cmp20, label %tailrecurse, label %if.end23 if.end23: ; preds = %if.end18 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %N = alloca i64, align 8 %x = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %N) #6 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %0 = load i64, ptr %N, align 8, !tbaa !5 %add = add nsw i64 %0, 1 %1 = call ptr @llvm.stacksave.p0() %vla = alloca i64, i64 %add, align 16 %2 = load i64, ptr %N, align 8, !tbaa !5 %cmp.not74 = icmp slt i64 %2, 1 br i1 %cmp.not74, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %sum.076 = phi i64 [ %add4, %while.body ], [ 0, %entry ] %i.075 = phi i64 [ %inc, %while.body ], [ 1, %entry ] %arrayidx = getelementptr inbounds i64, ptr %vla, i64 %i.075 %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %3 = load i64, ptr %arrayidx, align 8, !tbaa !5 %add4 = add nsw i64 %3, %sum.076 %inc = add nuw nsw i64 %i.075, 1 %4 = load i64, ptr %N, align 8, !tbaa !5 %cmp.not.not = icmp slt i64 %i.075, %4 br i1 %cmp.not.not, label %while.body, label %while.end, !llvm.loop !14 while.end: ; preds = %while.body, %entry %sum.0.lcssa = phi i64 [ 0, %entry ], [ %add4, %while.body ] %.lcssa = phi i64 [ %2, %entry ], [ %4, %while.body ] %5 = load i64, ptr %x, align 8, !tbaa !5 %cmp5 = icmp eq i64 %sum.0.lcssa, %5 br i1 %cmp5, label %cleanup, label %if.else if.else: ; preds = %while.end %cmp7 = icmp slt i64 %sum.0.lcssa, %5 br i1 %cmp7, label %if.then8, label %if.else23 if.then8: ; preds = %if.else call void @d_qsort(ptr noundef nonnull %vla, i64 noundef 1, i64 noundef %.lcssa) %or.cond.not88 = icmp sgt i64 %.lcssa, 1 br i1 %or.cond.not88, label %land.lhs.true.preheader, label %cleanup land.lhs.true.preheader: ; preds = %if.then8 %6 = add i64 %.lcssa, -1 %xtraiter103 = and i64 %6, 1 %7 = icmp eq i64 %.lcssa, 2 br i1 %7, label %cleanup.loopexit.unr-lcssa, label %land.lhs.true.preheader.new land.lhs.true.preheader.new: ; preds = %land.lhs.true.preheader %unroll_iter106 = and i64 %6, -2 %invariant.gep109 = getelementptr i64, ptr %vla, i64 1 br label %land.lhs.true land.lhs.true: ; preds = %if.end20.1, %land.lhs.true.preheader.new %count.091 = phi i64 [ 0, %land.lhs.true.preheader.new ], [ %count.1.ph.1, %if.end20.1 ] %i.190 = phi i64 [ 1, %land.lhs.true.preheader.new ], [ %inc21.1, %if.end20.1 ] %sub8789 = phi i64 [ %5, %land.lhs.true.preheader.new ], [ %sub86.1, %if.end20.1 ] %niter107 = phi i64 [ 0, %land.lhs.true.preheader.new ], [ %niter107.next.1, %if.end20.1 ] %arrayidx13 = getelementptr inbounds i64, ptr %vla, i64 %i.190 %8 = load i64, ptr %arrayidx13, align 8, !tbaa !5 %cmp14.not = icmp slt i64 %sub8789, %8 br i1 %cmp14.not, label %if.end20, label %if.then15 if.then15: ; preds = %land.lhs.true %sub = sub nsw i64 %sub8789, %8 store i64 %sub, ptr %x, align 8, !tbaa !5 %inc17 = add nsw i64 %count.091, 1 br label %if.end20 if.end20: ; preds = %if.then15, %land.lhs.true %sub86 = phi i64 [ %sub8789, %land.lhs.true ], [ %sub, %if.then15 ] %count.1.ph = phi i64 [ %count.091, %land.lhs.true ], [ %inc17, %if.then15 ] %gep110 = getelementptr i64, ptr %invariant.gep109, i64 %i.190 %9 = load i64, ptr %gep110, align 8, !tbaa !5 %cmp14.not.1 = icmp slt i64 %sub86, %9 br i1 %cmp14.not.1, label %if.end20.1, label %if.then15.1 if.then15.1: ; preds = %if.end20 %sub.1 = sub nsw i64 %sub86, %9 store i64 %sub.1, ptr %x, align 8, !tbaa !5 %inc17.1 = add nsw i64 %count.1.ph, 1 br label %if.end20.1 if.end20.1: ; preds = %if.then15.1, %if.end20 %sub86.1 = phi i64 [ %sub86, %if.end20 ], [ %sub.1, %if.then15.1 ] %count.1.ph.1 = phi i64 [ %count.1.ph, %if.end20 ], [ %inc17.1, %if.then15.1 ] %inc21.1 = add nuw nsw i64 %i.190, 2 %niter107.next.1 = add i64 %niter107, 2 %niter107.ncmp.1 = icmp eq i64 %niter107.next.1, %unroll_iter106 br i1 %niter107.ncmp.1, label %cleanup.loopexit.unr-lcssa, label %land.lhs.true, !llvm.loop !15 if.else23: ; preds = %if.else %cmp24 = icmp sgt i64 %sum.0.lcssa, %5 br i1 %cmp24, label %if.then25, label %cleanup if.then25: ; preds = %if.else23 call void @a_qsort(ptr noundef nonnull %vla, i64 noundef 1, i64 noundef %.lcssa) %cmp27.not80 = icmp slt i64 %.lcssa, 1 br i1 %cmp27.not80, label %cleanup, label %while.body28.preheader while.body28.preheader: ; preds = %if.then25 %xtraiter = and i64 %.lcssa, 1 %10 = icmp eq i64 %.lcssa, 1 br i1 %10, label %cleanup.loopexit100.unr-lcssa, label %while.body28.preheader.new while.body28.preheader.new: ; preds = %while.body28.preheader %unroll_iter = and i64 %.lcssa, -2 %invariant.gep = getelementptr i64, ptr %vla, i64 1 br label %while.body28 while.body28: ; preds = %if.end35.1, %while.body28.preheader.new %count.283 = phi i64 [ 0, %while.body28.preheader.new ], [ %count.3.1, %if.end35.1 ] %i.282 = phi i64 [ 1, %while.body28.preheader.new ], [ %inc36.1, %if.end35.1 ] %sub337981 = phi i64 [ %5, %while.body28.preheader.new ], [ %sub3378.1, %if.end35.1 ] %niter = phi i64 [ 0, %while.body28.preheader.new ], [ %niter.next.1, %if.end35.1 ] %arrayidx29 = getelementptr inbounds i64, ptr %vla, i64 %i.282 %11 = load i64, ptr %arrayidx29, align 8, !tbaa !5 %cmp30.not = icmp slt i64 %sub337981, %11 br i1 %cmp30.not, label %if.end35, label %if.then31 if.then31: ; preds = %while.body28 %sub33 = sub nsw i64 %sub337981, %11 store i64 %sub33, ptr %x, align 8, !tbaa !5 %inc34 = add nsw i64 %count.283, 1 br label %if.end35 if.end35: ; preds = %if.then31, %while.body28 %sub3378 = phi i64 [ %sub33, %if.then31 ], [ %sub337981, %while.body28 ] %count.3 = phi i64 [ %inc34, %if.then31 ], [ %count.283, %while.body28 ] %gep = getelementptr i64, ptr %invariant.gep, i64 %i.282 %12 = load i64, ptr %gep, align 8, !tbaa !5 %cmp30.not.1 = icmp slt i64 %sub3378, %12 br i1 %cmp30.not.1, label %if.end35.1, label %if.then31.1 if.then31.1: ; preds = %if.end35 %sub33.1 = sub nsw i64 %sub3378, %12 store i64 %sub33.1, ptr %x, align 8, !tbaa !5 %inc34.1 = add nsw i64 %count.3, 1 br label %if.end35.1 if.end35.1: ; preds = %if.then31.1, %if.end35 %sub3378.1 = phi i64 [ %sub33.1, %if.then31.1 ], [ %sub3378, %if.end35 ] %count.3.1 = phi i64 [ %inc34.1, %if.then31.1 ], [ %count.3, %if.end35 ] %inc36.1 = add nuw i64 %i.282, 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 %cleanup.loopexit100.unr-lcssa, label %while.body28, !llvm.loop !16 cleanup.loopexit.unr-lcssa: ; preds = %if.end20.1, %land.lhs.true.preheader %count.1.ph.lcssa.ph = phi i64 [ undef, %land.lhs.true.preheader ], [ %count.1.ph.1, %if.end20.1 ] %count.091.unr = phi i64 [ 0, %land.lhs.true.preheader ], [ %count.1.ph.1, %if.end20.1 ] %i.190.unr = phi i64 [ 1, %land.lhs.true.preheader ], [ %inc21.1, %if.end20.1 ] %sub8789.unr = phi i64 [ %5, %land.lhs.true.preheader ], [ %sub86.1, %if.end20.1 ] %lcmp.mod104.not = icmp eq i64 %xtraiter103, 0 br i1 %lcmp.mod104.not, label %cleanup, label %land.lhs.true.epil land.lhs.true.epil: ; preds = %cleanup.loopexit.unr-lcssa %arrayidx13.epil = getelementptr inbounds i64, ptr %vla, i64 %i.190.unr %13 = load i64, ptr %arrayidx13.epil, align 8, !tbaa !5 %cmp14.not.epil = icmp slt i64 %sub8789.unr, %13 br i1 %cmp14.not.epil, label %cleanup, label %if.then15.epil if.then15.epil: ; preds = %land.lhs.true.epil %sub.epil = sub nsw i64 %sub8789.unr, %13 store i64 %sub.epil, ptr %x, align 8, !tbaa !5 %inc17.epil = add nsw i64 %count.091.unr, 1 br label %cleanup cleanup.loopexit100.unr-lcssa: ; preds = %if.end35.1, %while.body28.preheader %count.3.lcssa.ph = phi i64 [ undef, %while.body28.preheader ], [ %count.3.1, %if.end35.1 ] %count.283.unr = phi i64 [ 0, %while.body28.preheader ], [ %count.3.1, %if.end35.1 ] %i.282.unr = phi i64 [ 1, %while.body28.preheader ], [ %inc36.1, %if.end35.1 ] %sub337981.unr = phi i64 [ %5, %while.body28.preheader ], [ %sub3378.1, %if.end35.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %cleanup, label %while.body28.epil while.body28.epil: ; preds = %cleanup.loopexit100.unr-lcssa %arrayidx29.epil = getelementptr inbounds i64, ptr %vla, i64 %i.282.unr %14 = load i64, ptr %arrayidx29.epil, align 8, !tbaa !5 %cmp30.not.epil = icmp slt i64 %sub337981.unr, %14 br i1 %cmp30.not.epil, label %cleanup, label %if.then31.epil if.then31.epil: ; preds = %while.body28.epil %sub33.epil = sub nsw i64 %sub337981.unr, %14 store i64 %sub33.epil, ptr %x, align 8, !tbaa !5 %inc34.epil = add nsw i64 %count.283.unr, 1 br label %cleanup cleanup: ; preds = %cleanup.loopexit100.unr-lcssa, %if.then31.epil, %while.body28.epil, %cleanup.loopexit.unr-lcssa, %if.then15.epil, %land.lhs.true.epil, %if.else23, %if.then8, %if.then25, %while.end %count.4.sink = phi i64 [ %.lcssa, %while.end ], [ 0, %if.else23 ], [ 0, %if.then8 ], [ 0, %if.then25 ], [ %count.1.ph.lcssa.ph, %cleanup.loopexit.unr-lcssa ], [ %count.091.unr, %land.lhs.true.epil ], [ %inc17.epil, %if.then15.epil ], [ %count.3.lcssa.ph, %cleanup.loopexit100.unr-lcssa ], [ %inc34.epil, %if.then31.epil ], [ %count.283.unr, %while.body28.epil ] %call41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %count.4.sink) call void @llvm.stackrestore.p0(ptr %1) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %x) #6 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %N) #6 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #5 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #5 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !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 <stdbool.h> int main(void){ int N,x,i,j,tmp; //input scanf("%d %d",&N,&x); int a[N]; for(i=0; i<N; i++){ scanf("%d",&a[i]); } //sorting for(i=0; i<N; i++){ for(j=i+1; j<N; j++){ if(a[i]>a[j]){ tmp=a[i]; a[i]=a[j]; a[j]=tmp; } } } //baramaki int ans=0; i=0; while(x>=a[i]){ if(i==N-1){ if(x==a[i]) { ans++; } break; } else{ ans++; x= x-a[i]; i++; } } printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211661/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211661/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %x = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %x) %0 = load i32, ptr %N, align 4, !tbaa !5 %1 = zext i32 %0 to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %N, align 4, !tbaa !5 %cmp71 = icmp sgt i32 %3, 0 br i1 %cmp71, label %for.body, label %while.cond.preheader for.cond2.preheader: ; preds = %for.body %cmp375 = icmp sgt i32 %5, 0 br i1 %cmp375, label %for.body4.preheader, label %while.cond.preheader for.body4.preheader: ; preds = %for.cond2.preheader %4 = zext i32 %5 to i64 %wide.trip.count97 = zext i32 %5 to i64 br label %for.body4 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %5 = load i32, ptr %N, align 4, !tbaa !5 %6 = sext i32 %5 to i64 %cmp = icmp slt i64 %indvars.iv.next, %6 br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !9 for.cond2.loopexit: ; preds = %for.inc21, %for.body4 %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1 %exitcond98.not = icmp eq i64 %indvars.iv.next95, %wide.trip.count97 br i1 %exitcond98.not, label %while.cond.preheader, label %for.body4, !llvm.loop !11 while.cond.preheader: ; preds = %for.cond2.loopexit, %entry, %for.cond2.preheader %.lcssa106 = phi i32 [ %5, %for.cond2.preheader ], [ %3, %entry ], [ %5, %for.cond2.loopexit ] %x.promoted = load i32, ptr %x, align 4, !tbaa !5 %7 = load i32, ptr %vla, align 16, !tbaa !5 %cmp29.not78 = icmp slt i32 %x.promoted, %7 br i1 %cmp29.not78, label %while.end, label %while.body.lr.ph while.body.lr.ph: ; preds = %while.cond.preheader %sub = add nsw i32 %.lcssa106, -1 %8 = zext i32 %sub to i64 br label %while.body for.body4: ; preds = %for.body4.preheader, %for.cond2.loopexit %indvars.iv94 = phi i64 [ 0, %for.body4.preheader ], [ %indvars.iv.next95, %for.cond2.loopexit ] %indvars.iv89 = phi i64 [ 1, %for.body4.preheader ], [ %indvars.iv.next90, %for.cond2.loopexit ] %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1 %cmp673 = icmp ult i64 %indvars.iv.next95, %4 br i1 %cmp673, label %for.body7.lr.ph, label %for.cond2.loopexit for.body7.lr.ph: ; preds = %for.body4 %arrayidx9 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv94 br label %for.body7 for.body7: ; preds = %for.body7.lr.ph, %for.inc21 %indvars.iv91 = phi i64 [ %indvars.iv89, %for.body7.lr.ph ], [ %indvars.iv.next92, %for.inc21 ] %9 = load i32, ptr %arrayidx9, align 4, !tbaa !5 %arrayidx11 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv91 %10 = load i32, ptr %arrayidx11, align 4, !tbaa !5 %cmp12 = icmp sgt i32 %9, %10 br i1 %cmp12, label %if.then, label %for.inc21 if.then: ; preds = %for.body7 store i32 %10, ptr %arrayidx9, align 4, !tbaa !5 store i32 %9, ptr %arrayidx11, align 4, !tbaa !5 br label %for.inc21 for.inc21: ; preds = %for.body7, %if.then %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1 %exitcond.not = icmp eq i64 %indvars.iv.next92, %wide.trip.count97 br i1 %exitcond.not, label %for.cond2.loopexit, label %for.body7, !llvm.loop !12 while.body: ; preds = %while.body.lr.ph, %if.else %indvars.iv99 = phi i64 [ 0, %while.body.lr.ph ], [ %indvars.iv.next100, %if.else ] %11 = phi i32 [ %7, %while.body.lr.ph ], [ %12, %if.else ] %sub417779 = phi i32 [ %x.promoted, %while.body.lr.ph ], [ %sub41, %if.else ] %cmp30 = icmp eq i64 %indvars.iv99, %8 br i1 %cmp30, label %if.then31, label %if.else if.then31: ; preds = %while.body %cmp34 = icmp eq i32 %sub417779, %11 %inc36 = zext i1 %cmp34 to i32 %spec.select = add nuw nsw i32 %sub, %inc36 br label %while.end if.else: ; preds = %while.body %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1 %sub41 = sub nsw i32 %sub417779, %11 store i32 %sub41, ptr %x, align 4, !tbaa !5 %arrayidx28 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.next100 %12 = load i32, ptr %arrayidx28, align 4, !tbaa !5 %cmp29.not = icmp slt i32 %sub41, %12 br i1 %cmp29.not, label %while.end.loopexit, label %while.body, !llvm.loop !13 while.end.loopexit: ; preds = %if.else %indvars = trunc i64 %indvars.iv.next100 to i32 br label %while.end while.end: ; preds = %while.end.loopexit, %while.cond.preheader, %if.then31 %ans.1 = phi i32 [ %spec.select, %if.then31 ], [ 0, %while.cond.preheader ], [ %indvars, %while.end.loopexit ] %call44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ans.1) call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include <stdio.h> #include <stdlib.h> #define M 500000 #define P 10 #define NIL NULL struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; Node root; void insert(int); void inorder(Node); void preorder(Node); int main() { int m,k,i; char s[10]; scanf("%d",&m); for (i=0 ; i<m ; i++){ scanf("%s",s); if(s[0]=='i'){ scanf("%d",&k); insert(k); } else { inorder(root); printf("\n"); preorder(root); printf("\n"); } } return 0; } void insert(int k){ Node x = root; Node y = NIL; Node z; z = malloc(sizeof(struct node)); z->key = k; z->left = NIL; z->right = NIL; while(x!=NIL){ y=x; if(z->key < x->key) x=x->left; else x=x->right; } z->parent=y; if(y==NIL) root=z; else if(z->key < y->key) y->left=z; else y->right=z; } void inorder(Node r){ if(r->left!=NIL) inorder(r->left); printf(" %d",r->key); if(r->right!=NIL)inorder(r->right); } void preorder(Node r){ printf(" %d",r->key); if(r->left!=NIL) preorder(r->left); if(r->right!=NIL)preorder(r->right); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211719/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211719/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ptr, ptr, i32 } @.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 @root = dso_local local_unnamed_addr global ptr null, align 8 @.str.3 = private unnamed_addr constant [4 x i8] c" %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %m = alloca i32, align 4 %k = alloca i32, align 4 %s = alloca [10 x i8], align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #6 call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %s) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %m) %0 = load i32, ptr %m, align 4, !tbaa !5 %cmp9 = icmp sgt i32 %0, 0 br i1 %cmp9, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.010 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s) %1 = load i8, ptr %s, align 1, !tbaa !9 %cmp2 = icmp eq i8 %1, 105 br i1 %cmp2, label %if.then, label %if.else if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k) %2 = load i32, ptr %k, align 4, !tbaa !5 %3 = load ptr, ptr @root, align 8, !tbaa !10 %call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7 %key.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 3 store i32 %2, ptr %key.i, align 8, !tbaa !12 %cmp.not34.i = icmp eq ptr %3, null call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call.i, i8 0, i64 16, i1 false) br i1 %cmp.not34.i, label %insert.exit, label %while.body.i while.body.i: ; preds = %if.then, %while.body.i %x.035.i = phi ptr [ %x.1.i, %while.body.i ], [ %3, %if.then ] %key2.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 3 %4 = load i32, ptr %key2.i, align 8, !tbaa !12 %cmp3.i = icmp sgt i32 %4, %2 %left4.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 1 %x.1.in.i = select i1 %cmp3.i, ptr %left4.i, ptr %x.035.i %x.1.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !10 %cmp.not.i = icmp eq ptr %x.1.i, null br i1 %cmp.not.i, label %insert.exit, label %while.body.i, !llvm.loop !14 insert.exit: ; preds = %while.body.i, %if.then %.sink = phi ptr [ null, %if.then ], [ %x.035.i, %while.body.i ] %left13.sink.i = phi ptr [ @root, %if.then ], [ %x.1.in.i, %while.body.i ] %parent37.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2 store ptr %.sink, ptr %parent37.i, align 8, !tbaa !16 store ptr %call.i, ptr %left13.sink.i, align 8, !tbaa !10 br label %for.inc if.else: ; preds = %for.body %5 = load ptr, ptr @root, align 8, !tbaa !10 call void @inorder(ptr noundef %5) %putchar = call i32 @putchar(i32 10) %6 = load ptr, ptr @root, align 8, !tbaa !10 call void @preorder(ptr noundef %6) %putchar8 = call i32 @putchar(i32 10) br label %for.inc for.inc: ; preds = %insert.exit, %if.else %inc = add nuw nsw i32 %i.010, 1 %7 = load i32, ptr %m, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %7 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !17 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %s) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local void @insert(i32 noundef %k) local_unnamed_addr #0 { entry: %0 = load ptr, ptr @root, align 8, !tbaa !10 %call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7 %key = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 3 store i32 %k, ptr %key, align 8, !tbaa !12 %cmp.not34 = icmp eq ptr %0, null tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call, i8 0, i64 16, i1 false) br i1 %cmp.not34, label %if.then7, label %while.body while.body: ; preds = %entry, %while.body %x.035 = phi ptr [ %x.1, %while.body ], [ %0, %entry ] %key2 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %1 = load i32, ptr %key2, align 8, !tbaa !12 %cmp3 = icmp sgt i32 %1, %k %left4 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %x.1.in = select i1 %cmp3, ptr %left4, ptr %x.035 %x.1 = load ptr, ptr %x.1.in, align 8, !tbaa !10 %cmp.not = icmp eq ptr %x.1, null br i1 %cmp.not, label %if.else8, label %while.body, !llvm.loop !14 if.then7: ; preds = %entry %parent37 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr null, ptr %parent37, align 8, !tbaa !16 br label %if.end17 if.else8: ; preds = %while.body %parent = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr %x.035, ptr %parent, align 8, !tbaa !16 %key10 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %2 = load i32, ptr %key10, align 8, !tbaa !12 %cmp11 = icmp sgt i32 %2, %k %left13 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %spec.select = select i1 %cmp11, ptr %left13, ptr %x.035 br label %if.end17 if.end17: ; preds = %if.else8, %if.then7 %left13.sink = phi ptr [ @root, %if.then7 ], [ %spec.select, %if.else8 ] store ptr %call, ptr %left13.sink, align 8, !tbaa !10 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @inorder(ptr nocapture noundef readonly %r) local_unnamed_addr #0 { entry: br label %tailrecurse tailrecurse: ; preds = %if.end, %entry %r.tr = phi ptr [ %r, %entry ], [ %2, %if.end ] %left = getelementptr inbounds %struct.node, ptr %r.tr, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !18 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %if.end, label %if.then if.then: ; preds = %tailrecurse tail call void @inorder(ptr noundef nonnull %0) br label %if.end if.end: ; preds = %if.then, %tailrecurse %key = getelementptr inbounds %struct.node, ptr %r.tr, i64 0, i32 3 %1 = load i32, ptr %key, align 8, !tbaa !12 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %1) %2 = load ptr, ptr %r.tr, align 8, !tbaa !19 %cmp2.not = icmp eq ptr %2, null br i1 %cmp2.not, label %if.end5, label %tailrecurse if.end5: ; preds = %if.end ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local void @preorder(ptr nocapture noundef readonly %r) local_unnamed_addr #0 { entry: br label %tailrecurse tailrecurse: ; preds = %if.end, %entry %r.tr = phi ptr [ %r, %entry ], [ %2, %if.end ] %key = getelementptr inbounds %struct.node, ptr %r.tr, i64 0, i32 3 %0 = load i32, ptr %key, align 8, !tbaa !12 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %0) %left = getelementptr inbounds %struct.node, ptr %r.tr, i64 0, i32 1 %1 = load ptr, ptr %left, align 8, !tbaa !18 %cmp.not = icmp eq ptr %1, null br i1 %cmp.not, label %if.end, label %if.then if.then: ; preds = %tailrecurse tail call void @preorder(ptr noundef nonnull %1) br label %if.end if.end: ; preds = %if.then, %tailrecurse %2 = load ptr, ptr %r.tr, align 8, !tbaa !19 %cmp2.not = icmp eq ptr %2, null br i1 %cmp2.not, label %if.end5, label %tailrecurse if.end5: ; preds = %if.end ret void } ; 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 allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #6 = { nounwind } attributes #7 = { nounwind allocsize(0) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = !{!11, !11, i64 0} !11 = !{!"any pointer", !7, i64 0} !12 = !{!13, !6, i64 24} !13 = !{!"node", !11, i64 0, !11, i64 8, !11, i64 16, !6, i64 24} !14 = distinct !{!14, !15} !15 = !{!"llvm.loop.mustprogress"} !16 = !{!13, !11, i64 16} !17 = distinct !{!17, !15} !18 = !{!13, !11, i64 8} !19 = !{!13, !11, i64 0}
#include <stdio.h> #include <stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeMinimum(Node x){ while(x->left != NIL){ x= x->left;} return x; } Node treeMaximum(Node x){ while(x->right != NIL){ x= x->right;} return x; } Node treeSearch(Node u, int k){ while(u!=NIL&&k!=u->key){ if(k < u->key){ u = u->left;} else u = u->right; } return u; } Node treeSuccessor(Node x){ if(x->right!=NIL) return treeMinimum(x->right); Node y = x->parent; while(y!=NIL&&x == y->right){ x=y; y=y->parent; } return y; } void treeDelete(Node z){ Node y; // node to be deleted Node x; // child of y if(z->left == NIL || z->right==NIL){ y=z;} else y = treeSuccessor(z); if(y->left!=NIL){ x=y->left; }else{ x=y->right;} if(x!=NIL){ x->parent = y->parent; } if(y->parent == NIL){ root = x; }else{ if(y==y->parent->left){ y->parent->left=x; }else{ y->parent->right=x; } } if(y!=z){ z->key = y->key; } free(y); } void insert(int k){ Node y = NIL; Node x = root; Node z; z = malloc(sizeof(struct node)); z->key = k; z->left = NIL; z->right = NIL; while(x!=NIL){ y=x; if(z->key < x->key){ x = x->left; }else{ x = x->right; } } z->parent = y; if(y==NIL){ root = z; }else{ if(z->key < y->key){ y->left = z; }else{ y->right=z; } } } void inorder(Node u){ if(u==NIL) return; inorder(u->left); printf(" %d",u->key); inorder(u->right); } void preorder(Node u){ if(u==NIL) return; printf(" %d",u->key); preorder(u->left); preorder(u->right); } int main(){ int n, i, x; char com[20]; scanf("%d", &n); for ( i = 0; i < n; i++ ){ scanf("%s", com); if ( com[0] == 'f' ){ scanf("%d", &x); Node t = treeSearch(root, x); if ( t != NIL ) printf("yes\n"); else printf("no\n"); } else if ( com[0] == 'i' ){ scanf("%d", &x); insert(x); } else if ( com[0] == 'p' ){ inorder(root); printf("\n"); preorder(root); printf("\n"); } else if ( com[0] == 'd' ){ scanf("%d", &x); treeDelete(treeSearch(root, x)); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211762/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211762/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ptr, ptr, i32 } @root = dso_local local_unnamed_addr global ptr null, align 8 @.str = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @str = private unnamed_addr constant [3 x i8] c"no\00", align 1 @str.6 = private unnamed_addr constant [4 x i8] c"yes\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeMinimum(ptr noundef readonly %x) local_unnamed_addr #0 { entry: br label %while.cond while.cond: ; preds = %while.cond, %entry %x.addr.0 = phi ptr [ %x, %entry ], [ %0, %while.cond ] %left = getelementptr inbounds %struct.node, ptr %x.addr.0, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !5 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %while.end, label %while.cond, !llvm.loop !11 while.end: ; preds = %while.cond ret ptr %x.addr.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeMaximum(ptr noundef readonly %x) local_unnamed_addr #0 { entry: br label %while.cond while.cond: ; preds = %while.cond, %entry %x.addr.0 = phi ptr [ %x, %entry ], [ %0, %while.cond ] %0 = load ptr, ptr %x.addr.0, align 8, !tbaa !13 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %while.end, label %while.cond, !llvm.loop !14 while.end: ; preds = %while.cond ret ptr %x.addr.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeSearch(ptr noundef readonly %u, i32 noundef %k) local_unnamed_addr #0 { entry: %cmp.not10 = icmp eq ptr %u, null br i1 %cmp.not10, label %while.end, label %land.rhs land.rhs: ; preds = %entry, %while.body %u.addr.011 = phi ptr [ %u.addr.1, %while.body ], [ %u, %entry ] %key = getelementptr inbounds %struct.node, ptr %u.addr.011, i64 0, i32 3 %0 = load i32, ptr %key, align 8, !tbaa !15 %cmp1.not = icmp eq i32 %0, %k br i1 %cmp1.not, label %while.end, label %while.body while.body: ; preds = %land.rhs %cmp3 = icmp sgt i32 %0, %k %left = getelementptr inbounds %struct.node, ptr %u.addr.011, i64 0, i32 1 %u.addr.1.in = select i1 %cmp3, ptr %left, ptr %u.addr.011 %u.addr.1 = load ptr, ptr %u.addr.1.in, align 8, !tbaa !16 %cmp.not = icmp eq ptr %u.addr.1, null br i1 %cmp.not, label %while.end, label %land.rhs, !llvm.loop !17 while.end: ; preds = %land.rhs, %while.body, %entry %u.addr.0.lcssa = phi ptr [ null, %entry ], [ null, %while.body ], [ %u.addr.011, %land.rhs ] ret ptr %u.addr.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeSuccessor(ptr noundef readonly %x) local_unnamed_addr #0 { entry: %0 = load ptr, ptr %x, align 8, !tbaa !13 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %while.cond, label %while.cond.i while.cond.i: ; preds = %entry, %while.cond.i %x.addr.0.i = phi ptr [ %1, %while.cond.i ], [ %0, %entry ] %left.i = getelementptr inbounds %struct.node, ptr %x.addr.0.i, i64 0, i32 1 %1 = load ptr, ptr %left.i, align 8, !tbaa !5 %cmp.not.i = icmp eq ptr %1, null br i1 %cmp.not.i, label %return, label %while.cond.i, !llvm.loop !11 while.cond: ; preds = %entry, %land.rhs %x.addr.0 = phi ptr [ %y.0, %land.rhs ], [ %x, %entry ] %y.0.in = getelementptr inbounds %struct.node, ptr %x.addr.0, i64 0, i32 2 %y.0 = load ptr, ptr %y.0.in, align 8, !tbaa !18 %cmp2.not = icmp eq ptr %y.0, null br i1 %cmp2.not, label %return, label %land.rhs land.rhs: ; preds = %while.cond %2 = load ptr, ptr %y.0, align 8, !tbaa !13 %cmp4 = icmp eq ptr %x.addr.0, %2 br i1 %cmp4, label %while.cond, label %return, !llvm.loop !19 return: ; preds = %while.cond.i, %land.rhs, %while.cond %retval.0 = phi ptr [ %y.0, %land.rhs ], [ null, %while.cond ], [ %x.addr.0.i, %while.cond.i ] ret ptr %retval.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nounwind uwtable define dso_local void @treeDelete(ptr noundef %z) local_unnamed_addr #2 { entry: %left = getelementptr inbounds %struct.node, ptr %z, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !5 %cmp = icmp eq ptr %0, null br i1 %cmp, label %if.end8, label %lor.lhs.false lor.lhs.false: ; preds = %entry %1 = load ptr, ptr %z, align 8, !tbaa !13 %cmp1 = icmp eq ptr %1, null br i1 %cmp1, label %if.then10, label %while.cond.i.i while.cond.i.i: ; preds = %lor.lhs.false, %while.cond.i.i %x.addr.0.i.i = phi ptr [ %2, %while.cond.i.i ], [ %1, %lor.lhs.false ] %left.i.i = getelementptr inbounds %struct.node, ptr %x.addr.0.i.i, i64 0, i32 1 %2 = load ptr, ptr %left.i.i, align 8, !tbaa !5 %cmp.not.i.i = icmp eq ptr %2, null br i1 %cmp.not.i.i, label %if.end8, label %while.cond.i.i, !llvm.loop !11 if.end8: ; preds = %while.cond.i.i, %entry %y.0.ph = phi ptr [ %z, %entry ], [ %x.addr.0.i.i, %while.cond.i.i ] %3 = load ptr, ptr %y.0.ph, align 8, !tbaa !13 %cmp9.not = icmp eq ptr %3, null br i1 %cmp9.not, label %if.end12, label %if.then10 if.then10: ; preds = %lor.lhs.false, %if.end8 %y.059 = phi ptr [ %y.0.ph, %if.end8 ], [ %z, %lor.lhs.false ] %x.055 = phi ptr [ %3, %if.end8 ], [ %0, %lor.lhs.false ] %parent = getelementptr inbounds %struct.node, ptr %y.059, i64 0, i32 2 %4 = load ptr, ptr %parent, align 8, !tbaa !18 %parent11 = getelementptr inbounds %struct.node, ptr %x.055, i64 0, i32 2 store ptr %4, ptr %parent11, align 8, !tbaa !18 br label %if.end12 if.end12: ; preds = %if.then10, %if.end8 %y.061 = phi ptr [ %y.059, %if.then10 ], [ %y.0.ph, %if.end8 ] %x.056 = phi ptr [ %x.055, %if.then10 ], [ null, %if.end8 ] %parent13 = getelementptr inbounds %struct.node, ptr %y.061, i64 0, i32 2 %5 = load ptr, ptr %parent13, align 8, !tbaa !18 %cmp14 = icmp eq ptr %5, null br i1 %cmp14, label %if.end27, label %if.else16 if.else16: ; preds = %if.end12 %left18 = getelementptr inbounds %struct.node, ptr %5, i64 0, i32 1 %6 = load ptr, ptr %left18, align 8, !tbaa !5 %cmp19 = icmp eq ptr %y.061, %6 %left18. = select i1 %cmp19, ptr %left18, ptr %5 br label %if.end27 if.end27: ; preds = %if.else16, %if.end12 %left18.sink = phi ptr [ @root, %if.end12 ], [ %left18., %if.else16 ] store ptr %x.056, ptr %left18.sink, align 8, !tbaa !16 %cmp28.not = icmp eq ptr %y.061, %z br i1 %cmp28.not, label %if.end31, label %if.then29 if.then29: ; preds = %if.end27 %key = getelementptr inbounds %struct.node, ptr %y.061, i64 0, i32 3 %7 = load i32, ptr %key, align 8, !tbaa !15 %key30 = getelementptr inbounds %struct.node, ptr %z, i64 0, i32 3 store i32 %7, ptr %key30, align 8, !tbaa !15 br label %if.end31 if.end31: ; preds = %if.then29, %if.end27 tail call void @free(ptr noundef nonnull %y.061) #9 ret void } ; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind uwtable define dso_local void @insert(i32 noundef %k) local_unnamed_addr #4 { entry: %0 = load ptr, ptr @root, align 8, !tbaa !16 %call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #10 %key = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 3 store i32 %k, ptr %key, align 8, !tbaa !15 %cmp.not34 = icmp eq ptr %0, null tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call, i8 0, i64 16, i1 false) br i1 %cmp.not34, label %if.then7, label %while.body while.body: ; preds = %entry, %while.body %x.035 = phi ptr [ %x.1, %while.body ], [ %0, %entry ] %key2 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %1 = load i32, ptr %key2, align 8, !tbaa !15 %cmp3 = icmp sgt i32 %1, %k %left4 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %x.1.in = select i1 %cmp3, ptr %left4, ptr %x.035 %x.1 = load ptr, ptr %x.1.in, align 8, !tbaa !16 %cmp.not = icmp eq ptr %x.1, null br i1 %cmp.not, label %if.else8, label %while.body, !llvm.loop !20 if.then7: ; preds = %entry %parent37 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr null, ptr %parent37, align 8, !tbaa !18 br label %if.end17 if.else8: ; preds = %while.body %parent = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr %x.035, ptr %parent, align 8, !tbaa !18 %key10 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %2 = load i32, ptr %key10, align 8, !tbaa !15 %cmp11 = icmp sgt i32 %2, %k %left13 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %spec.select = select i1 %cmp11, ptr %left13, ptr %x.035 br label %if.end17 if.end17: ; preds = %if.else8, %if.then7 %left13.sink = phi ptr [ @root, %if.then7 ], [ %spec.select, %if.else8 ] store ptr %call, ptr %left13.sink, align 8, !tbaa !16 ret void } ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #5 ; Function Attrs: nofree nounwind uwtable define dso_local void @inorder(ptr noundef readonly %u) local_unnamed_addr #4 { entry: %cmp4 = icmp eq ptr %u, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %u.tr5 = phi ptr [ %2, %if.end ], [ %u, %entry ] %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !5 tail call void @inorder(ptr noundef %0) %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %1 = load i32, ptr %key, align 8, !tbaa !15 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !13 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #6 ; Function Attrs: nofree nounwind uwtable define dso_local void @preorder(ptr noundef readonly %u) local_unnamed_addr #4 { entry: %cmp4 = icmp eq ptr %u, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %u.tr5 = phi ptr [ %2, %if.end ], [ %u, %entry ] %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %0 = load i32, ptr %key, align 8, !tbaa !15 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %1 = load ptr, ptr %left, align 8, !tbaa !5 tail call void @preorder(ptr noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !13 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %com = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #9 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #9 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %com) #9 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !21 %cmp63 = icmp sgt i32 %0, 0 br i1 %cmp63, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.064 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %com) %1 = load i8, ptr %com, align 16, !tbaa !22 switch i8 %1, label %for.inc [ i8 102, label %if.then i8 105, label %if.then16 i8 112, label %if.then23 i8 100, label %if.then31 ] if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %2 = load ptr, ptr @root, align 8, !tbaa !16 %3 = load i32, ptr %x, align 4, !tbaa !21 %cmp.not10.i = icmp eq ptr %2, null br i1 %cmp.not10.i, label %if.else, label %land.rhs.i land.rhs.i: ; preds = %if.then, %while.body.i %u.addr.011.i = phi ptr [ %u.addr.1.i, %while.body.i ], [ %2, %if.then ] %key.i = getelementptr inbounds %struct.node, ptr %u.addr.011.i, i64 0, i32 3 %4 = load i32, ptr %key.i, align 8, !tbaa !15 %cmp1.not.i = icmp eq i32 %4, %3 br i1 %cmp1.not.i, label %if.then8, label %while.body.i while.body.i: ; preds = %land.rhs.i %cmp3.i = icmp sgt i32 %4, %3 %left.i = getelementptr inbounds %struct.node, ptr %u.addr.011.i, i64 0, i32 1 %u.addr.1.in.i = select i1 %cmp3.i, ptr %left.i, ptr %u.addr.011.i %u.addr.1.i = load ptr, ptr %u.addr.1.in.i, align 8, !tbaa !16 %cmp.not.i = icmp eq ptr %u.addr.1.i, null br i1 %cmp.not.i, label %if.else, label %land.rhs.i, !llvm.loop !17 if.then8: ; preds = %land.rhs.i %puts40 = call i32 @puts(ptr nonnull dereferenceable(1) @str.6) br label %for.inc if.else: ; preds = %while.body.i, %if.then %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %for.inc if.then16: ; preds = %for.body %call17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %5 = load i32, ptr %x, align 4, !tbaa !21 %6 = load ptr, ptr @root, align 8, !tbaa !16 %call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #10 %key.i41 = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 3 store i32 %5, ptr %key.i41, align 8, !tbaa !15 %cmp.not34.i = icmp eq ptr %6, null call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call.i, i8 0, i64 16, i1 false) br i1 %cmp.not34.i, label %insert.exit, label %while.body.i42 while.body.i42: ; preds = %if.then16, %while.body.i42 %x.035.i = phi ptr [ %x.1.i, %while.body.i42 ], [ %6, %if.then16 ] %key2.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 3 %7 = load i32, ptr %key2.i, align 8, !tbaa !15 %cmp3.i43 = icmp sgt i32 %7, %5 %left4.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 1 %x.1.in.i = select i1 %cmp3.i43, ptr %left4.i, ptr %x.035.i %x.1.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !16 %cmp.not.i44 = icmp eq ptr %x.1.i, null br i1 %cmp.not.i44, label %insert.exit, label %while.body.i42, !llvm.loop !20 insert.exit: ; preds = %while.body.i42, %if.then16 %.sink = phi ptr [ null, %if.then16 ], [ %x.035.i, %while.body.i42 ] %left13.sink.i = phi ptr [ @root, %if.then16 ], [ %x.1.in.i, %while.body.i42 ] %parent37.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2 store ptr %.sink, ptr %parent37.i, align 8, !tbaa !18 store ptr %call.i, ptr %left13.sink.i, align 8, !tbaa !16 br label %for.inc if.then23: ; preds = %for.body %8 = load ptr, ptr @root, align 8, !tbaa !16 call void @inorder(ptr noundef %8) %putchar = call i32 @putchar(i32 10) %9 = load ptr, ptr @root, align 8, !tbaa !16 call void @preorder(ptr noundef %9) %putchar39 = call i32 @putchar(i32 10) br label %for.inc if.then31: ; preds = %for.body %call32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %10 = load ptr, ptr @root, align 8, !tbaa !16 %11 = load i32, ptr %x, align 4, !tbaa !21 %cmp.not10.i45 = icmp eq ptr %10, null br i1 %cmp.not10.i45, label %treeSearch.exit57, label %land.rhs.i46 land.rhs.i46: ; preds = %if.then31, %while.body.i50 %u.addr.011.i47 = phi ptr [ %u.addr.1.i54, %while.body.i50 ], [ %10, %if.then31 ] %key.i48 = getelementptr inbounds %struct.node, ptr %u.addr.011.i47, i64 0, i32 3 %12 = load i32, ptr %key.i48, align 8, !tbaa !15 %cmp1.not.i49 = icmp eq i32 %12, %11 br i1 %cmp1.not.i49, label %treeSearch.exit57, label %while.body.i50 while.body.i50: ; preds = %land.rhs.i46 %cmp3.i51 = icmp sgt i32 %12, %11 %left.i52 = getelementptr inbounds %struct.node, ptr %u.addr.011.i47, i64 0, i32 1 %u.addr.1.in.i53 = select i1 %cmp3.i51, ptr %left.i52, ptr %u.addr.011.i47 %u.addr.1.i54 = load ptr, ptr %u.addr.1.in.i53, align 8, !tbaa !16 %cmp.not.i55 = icmp eq ptr %u.addr.1.i54, null br i1 %cmp.not.i55, label %treeSearch.exit57, label %land.rhs.i46, !llvm.loop !17 treeSearch.exit57: ; preds = %land.rhs.i46, %while.body.i50, %if.then31 %u.addr.0.lcssa.i56 = phi ptr [ null, %if.then31 ], [ %u.addr.011.i47, %land.rhs.i46 ], [ null, %while.body.i50 ] %left.i58 = getelementptr inbounds %struct.node, ptr %u.addr.0.lcssa.i56, i64 0, i32 1 %13 = load ptr, ptr %left.i58, align 8, !tbaa !5 %cmp.i = icmp eq ptr %13, null br i1 %cmp.i, label %if.end8.i, label %lor.lhs.false.i lor.lhs.false.i: ; preds = %treeSearch.exit57 %14 = load ptr, ptr %u.addr.0.lcssa.i56, align 8, !tbaa !13 %cmp1.i = icmp eq ptr %14, null br i1 %cmp1.i, label %if.then10.i, label %while.cond.i.i.i while.cond.i.i.i: ; preds = %lor.lhs.false.i, %while.cond.i.i.i %x.addr.0.i.i.i = phi ptr [ %15, %while.cond.i.i.i ], [ %14, %lor.lhs.false.i ] %left.i.i.i = getelementptr inbounds %struct.node, ptr %x.addr.0.i.i.i, i64 0, i32 1 %15 = load ptr, ptr %left.i.i.i, align 8, !tbaa !5 %cmp.not.i.i.i = icmp eq ptr %15, null br i1 %cmp.not.i.i.i, label %if.end8.i, label %while.cond.i.i.i, !llvm.loop !11 if.end8.i: ; preds = %while.cond.i.i.i, %treeSearch.exit57 %y.0.ph.i = phi ptr [ %u.addr.0.lcssa.i56, %treeSearch.exit57 ], [ %x.addr.0.i.i.i, %while.cond.i.i.i ] %16 = load ptr, ptr %y.0.ph.i, align 8, !tbaa !13 %cmp9.not.i = icmp eq ptr %16, null br i1 %cmp9.not.i, label %if.end12.i, label %if.then10.i if.then10.i: ; preds = %if.end8.i, %lor.lhs.false.i %y.059.i = phi ptr [ %y.0.ph.i, %if.end8.i ], [ %u.addr.0.lcssa.i56, %lor.lhs.false.i ] %x.055.i = phi ptr [ %16, %if.end8.i ], [ %13, %lor.lhs.false.i ] %parent.i59 = getelementptr inbounds %struct.node, ptr %y.059.i, i64 0, i32 2 %17 = load ptr, ptr %parent.i59, align 8, !tbaa !18 %parent11.i = getelementptr inbounds %struct.node, ptr %x.055.i, i64 0, i32 2 store ptr %17, ptr %parent11.i, align 8, !tbaa !18 br label %if.end12.i if.end12.i: ; preds = %if.then10.i, %if.end8.i %y.061.i = phi ptr [ %y.059.i, %if.then10.i ], [ %y.0.ph.i, %if.end8.i ] %x.056.i = phi ptr [ %x.055.i, %if.then10.i ], [ null, %if.end8.i ] %parent13.i = getelementptr inbounds %struct.node, ptr %y.061.i, i64 0, i32 2 %18 = load ptr, ptr %parent13.i, align 8, !tbaa !18 %cmp14.i = icmp eq ptr %18, null br i1 %cmp14.i, label %if.end27.i, label %if.else16.i if.else16.i: ; preds = %if.end12.i %left18.i = getelementptr inbounds %struct.node, ptr %18, i64 0, i32 1 %19 = load ptr, ptr %left18.i, align 8, !tbaa !5 %cmp19.i = icmp eq ptr %y.061.i, %19 %left18..i = select i1 %cmp19.i, ptr %left18.i, ptr %18 br label %if.end27.i if.end27.i: ; preds = %if.else16.i, %if.end12.i %left18.sink.i = phi ptr [ @root, %if.end12.i ], [ %left18..i, %if.else16.i ] store ptr %x.056.i, ptr %left18.sink.i, align 8, !tbaa !16 %cmp28.not.i = icmp eq ptr %y.061.i, %u.addr.0.lcssa.i56 br i1 %cmp28.not.i, label %treeDelete.exit, label %if.then29.i if.then29.i: ; preds = %if.end27.i %key.i60 = getelementptr inbounds %struct.node, ptr %y.061.i, i64 0, i32 3 %20 = load i32, ptr %key.i60, align 8, !tbaa !15 %key30.i = getelementptr inbounds %struct.node, ptr %u.addr.0.lcssa.i56, i64 0, i32 3 store i32 %20, ptr %key30.i, align 8, !tbaa !15 br label %treeDelete.exit treeDelete.exit: ; preds = %if.end27.i, %if.then29.i call void @free(ptr noundef nonnull %y.061.i) #9 br label %for.inc for.inc: ; preds = %for.body, %if.then8, %if.else, %if.then23, %treeDelete.exit, %insert.exit %inc = add nuw nsw i32 %i.064, 1 %21 = load i32, ptr %n, align 4, !tbaa !21 %cmp = icmp slt i32 %inc, %21 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !23 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %com) #9 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #9 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #9 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #6 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #7 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #7 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #8 attributes #0 = { nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { nofree nounwind } attributes #8 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #9 = { nounwind } attributes #10 = { nounwind allocsize(0) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !7, i64 8} !6 = !{!"node", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24} !7 = !{!"any pointer", !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{!"int", !8, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = !{!6, !7, i64 0} !14 = distinct !{!14, !12} !15 = !{!6, !10, i64 24} !16 = !{!7, !7, i64 0} !17 = distinct !{!17, !12} !18 = !{!6, !7, i64 16} !19 = distinct !{!19, !12} !20 = distinct !{!20, !12} !21 = !{!10, !10, i64 0} !22 = !{!8, !8, i64 0} !23 = distinct !{!23, !12}
#include<stdio.h> #define MAX 500001 #define NIL -1 typedef struct node{ int left; int right; int key; int p; int leftid; int rightid; }Node; Node node[MAX]; int root=NIL; void inorder(int); void preorder(int); void addTree(int n,int num){ int tmp; //rootが空の場合 if(node[n].key==root){ root=n; node[root].key=num; } else{ tmp=root; while(1){ if(node[tmp].key>num){ if(node[tmp].left!=NIL){ tmp=node[tmp].leftid; } else{ node[tmp].left=num; node[tmp].leftid=n+1; node[n+1].key=num; break; } } else{ if(node[tmp].right!=NIL){ tmp=node[tmp].rightid; } else{ node[tmp].right=num; node[n+1].key=num; node[tmp].rightid=n+1; break; } } } node[n].p=tmp; } } int main(){ int num,i,n,l=0,tmp; char name[100]; scanf("%d",&n); for(i=0;i<MAX;i++){//初期化 node[i].p=NIL; node[i].left=NIL; node[i].right=NIL; node[i].key=NIL; } for(i=0;i<n;i++){ scanf("%s",name); if(name[0]=='i'){ scanf("%d",&num); addTree(l,num); l++; } else if(name[0]=='p'){ inorder(root); printf("\n"); preorder(root); printf("\n"); } } return 0; } void inorder(int t){ if(node[t].left!=NIL){ inorder(node[t].leftid); } printf(" %d",node[t].key); if(node[t].right!=NIL){ inorder(node[t].rightid); } } void preorder(int t){ printf(" %d",node[t].key); if(node[t].left!=NIL){ preorder(node[t].leftid); } if(node[t].right!=NIL){ preorder(node[t].rightid); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211805/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211805/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { i32, i32, i32, i32, i32, i32 } @root = dso_local local_unnamed_addr global i32 -1, align 4 @node = dso_local local_unnamed_addr global [500001 x %struct.node] zeroinitializer, align 16 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c" %d\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, argmem: read, inaccessiblemem: none) uwtable define dso_local void @addTree(i32 noundef %n, i32 noundef %num) local_unnamed_addr #0 { entry: %idxprom = sext i32 %n to i64 %key = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom, i32 2 %0 = load i32, ptr %key, align 8, !tbaa !5 %1 = load i32, ptr @root, align 4, !tbaa !10 %cmp = icmp eq i32 %0, %1 br i1 %cmp, label %if.then, label %while.cond if.then: ; preds = %entry store i32 %n, ptr @root, align 4, !tbaa !10 store i32 %num, ptr %key, align 8, !tbaa !5 br label %if.end49 while.cond: ; preds = %entry, %if.end46 %tmp.0 = phi i32 [ %tmp.1, %if.end46 ], [ %1, %entry ] %idxprom4 = sext i32 %tmp.0 to i64 %key6 = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom4, i32 2 %2 = load i32, ptr %key6, align 8, !tbaa !5 %cmp7 = icmp sgt i32 %2, %num br i1 %cmp7, label %if.then8, label %if.else26 if.then8: ; preds = %while.cond %arrayidx5 = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom4 %3 = load i32, ptr %arrayidx5, align 8, !tbaa !11 %cmp11.not = icmp eq i32 %3, -1 br i1 %cmp11.not, label %if.else15, label %if.then12 if.then12: ; preds = %if.then8 %leftid = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom4, i32 4 br label %if.end46 if.else15: ; preds = %if.then8 store i32 %num, ptr %arrayidx5, align 8, !tbaa !11 %add = add nsw i32 %n, 1 %leftid21 = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom4, i32 4 store i32 %add, ptr %leftid21, align 8, !tbaa !12 %idxprom23 = sext i32 %add to i64 %key25 = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom23, i32 2 store i32 %num, ptr %key25, align 8, !tbaa !5 br label %while.end if.else26: ; preds = %while.cond %right = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom4, i32 1 %4 = load i32, ptr %right, align 4, !tbaa !13 %cmp29.not = icmp eq i32 %4, -1 br i1 %cmp29.not, label %if.else33, label %if.then30 if.then30: ; preds = %if.else26 %rightid = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom4, i32 5 br label %if.end46 if.else33: ; preds = %if.else26 store i32 %num, ptr %right, align 4, !tbaa !13 %add37 = add nsw i32 %n, 1 %idxprom38 = sext i32 %add37 to i64 %key40 = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom38, i32 2 store i32 %num, ptr %key40, align 8, !tbaa !5 %rightid44 = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom4, i32 5 store i32 %add37, ptr %rightid44, align 4, !tbaa !14 br label %while.end if.end46: ; preds = %if.then30, %if.then12 %tmp.1.in = phi ptr [ %leftid, %if.then12 ], [ %rightid, %if.then30 ] %tmp.1 = load i32, ptr %tmp.1.in, align 4, !tbaa !10 br label %while.cond while.end: ; preds = %if.else33, %if.else15 %p = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom, i32 3 store i32 %tmp.0, ptr %p, align 4, !tbaa !15 br label %if.end49 if.end49: ; preds = %while.end, %if.then 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: %num = alloca i32, align 4 %n = alloca i32, align 4 %name = alloca [100 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %name) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) br label %for.body for.cond7.preheader: ; preds = %for.body %0 = load i32, ptr %n, align 4, !tbaa !10 %cmp840 = icmp sgt i32 %0, 0 br i1 %cmp840, label %for.body9, label %for.end26 for.body: ; preds = %for.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next.2, %for.body ] %arrayidx = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %indvars.iv %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %arrayidx, i8 -1, i64 16, i1 false) %arrayidx.1 = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %indvars.iv.next %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %arrayidx.1, i8 -1, i64 16, i1 false) %arrayidx.2 = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %indvars.iv.next.1 %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3 %exitcond.not.2 = icmp eq i64 %indvars.iv.next.2, 500001 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %arrayidx.2, i8 -1, i64 16, i1 false) br i1 %exitcond.not.2, label %for.cond7.preheader, label %for.body, !llvm.loop !16 for.body9: ; preds = %for.cond7.preheader, %for.inc24 %i.143 = phi i32 [ %inc25, %for.inc24 ], [ 0, %for.cond7.preheader ] %l.041 = phi i32 [ %l.1, %for.inc24 ], [ 0, %for.cond7.preheader ] %call10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %name) %1 = load i8, ptr %name, align 16, !tbaa !18 switch i8 %1, label %for.inc24 [ i8 105, label %if.then i8 112, label %if.then20 ] if.then: ; preds = %for.body9 %call14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %num) %2 = load i32, ptr %num, align 4, !tbaa !10 %idxprom.i = sext i32 %l.041 to i64 %key.i = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom.i, i32 2 %3 = load i32, ptr %key.i, align 8, !tbaa !5 %4 = load i32, ptr @root, align 4, !tbaa !10 %cmp.i = icmp eq i32 %3, %4 br i1 %cmp.i, label %if.then.i, label %while.cond.i if.then.i: ; preds = %if.then store i32 %l.041, ptr @root, align 4, !tbaa !10 store i32 %2, ptr %key.i, align 8, !tbaa !5 br label %addTree.exit while.cond.i: ; preds = %if.then, %if.end46.i %tmp.0.i = phi i32 [ %tmp.1.i, %if.end46.i ], [ %4, %if.then ] %idxprom4.i = sext i32 %tmp.0.i to i64 %key6.i = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom4.i, i32 2 %5 = load i32, ptr %key6.i, align 8, !tbaa !5 %cmp7.i = icmp sgt i32 %5, %2 br i1 %cmp7.i, label %if.then8.i, label %if.else26.i if.then8.i: ; preds = %while.cond.i %arrayidx5.i = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom4.i %6 = load i32, ptr %arrayidx5.i, align 8, !tbaa !11 %cmp11.not.i = icmp eq i32 %6, -1 br i1 %cmp11.not.i, label %if.else15.i, label %if.then12.i if.then12.i: ; preds = %if.then8.i %leftid.i = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom4.i, i32 4 br label %if.end46.i if.else15.i: ; preds = %if.then8.i store i32 %2, ptr %arrayidx5.i, align 8, !tbaa !11 %add.i = add nsw i32 %l.041, 1 %leftid21.i = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom4.i, i32 4 store i32 %add.i, ptr %leftid21.i, align 8, !tbaa !12 %idxprom23.i = sext i32 %add.i to i64 %key25.i = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom23.i, i32 2 store i32 %2, ptr %key25.i, align 8, !tbaa !5 br label %while.end.i if.else26.i: ; preds = %while.cond.i %right.i = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom4.i, i32 1 %7 = load i32, ptr %right.i, align 4, !tbaa !13 %cmp29.not.i = icmp eq i32 %7, -1 br i1 %cmp29.not.i, label %if.else33.i, label %if.then30.i if.then30.i: ; preds = %if.else26.i %rightid.i = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom4.i, i32 5 br label %if.end46.i if.else33.i: ; preds = %if.else26.i store i32 %2, ptr %right.i, align 4, !tbaa !13 %add37.i = add nsw i32 %l.041, 1 %idxprom38.i = sext i32 %add37.i to i64 %key40.i = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom38.i, i32 2 store i32 %2, ptr %key40.i, align 8, !tbaa !5 %rightid44.i = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom4.i, i32 5 store i32 %add37.i, ptr %rightid44.i, align 4, !tbaa !14 br label %while.end.i if.end46.i: ; preds = %if.then30.i, %if.then12.i %tmp.1.in.i = phi ptr [ %leftid.i, %if.then12.i ], [ %rightid.i, %if.then30.i ] %tmp.1.i = load i32, ptr %tmp.1.in.i, align 4, !tbaa !10 br label %while.cond.i while.end.i: ; preds = %if.else33.i, %if.else15.i %p.i = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom.i, i32 3 store i32 %tmp.0.i, ptr %p.i, align 4, !tbaa !15 br label %addTree.exit addTree.exit: ; preds = %if.then.i, %while.end.i %inc15 = add nsw i32 %l.041, 1 br label %for.inc24 if.then20: ; preds = %for.body9 %8 = load i32, ptr @root, align 4, !tbaa !10 call void @inorder(i32 noundef %8) %putchar = call i32 @putchar(i32 10) %9 = load i32, ptr @root, align 4, !tbaa !10 call void @preorder(i32 noundef %9) %putchar35 = call i32 @putchar(i32 10) br label %for.inc24 for.inc24: ; preds = %for.body9, %addTree.exit, %if.then20 %l.1 = phi i32 [ %inc15, %addTree.exit ], [ %l.041, %if.then20 ], [ %l.041, %for.body9 ] %inc25 = add nuw nsw i32 %i.143, 1 %10 = load i32, ptr %n, align 4, !tbaa !10 %cmp8 = icmp slt i32 %inc25, %10 br i1 %cmp8, label %for.body9, label %for.end26, !llvm.loop !19 for.end26: ; preds = %for.inc24, %for.cond7.preheader call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %name) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #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 uwtable define dso_local void @inorder(i32 noundef %t) local_unnamed_addr #2 { entry: br label %tailrecurse tailrecurse: ; preds = %if.then8, %entry %t.tr = phi i32 [ %t, %entry ], [ %4, %if.then8 ] %idxprom = sext i32 %t.tr to i64 %arrayidx = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom %0 = load i32, ptr %arrayidx, align 8, !tbaa !11 %cmp.not = icmp eq i32 %0, -1 br i1 %cmp.not, label %if.end, label %if.then if.then: ; preds = %tailrecurse %leftid = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom, i32 4 %1 = load i32, ptr %leftid, align 8, !tbaa !12 tail call void @inorder(i32 noundef %1) br label %if.end if.end: ; preds = %if.then, %tailrecurse %key = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom, i32 2 %2 = load i32, ptr %key, align 8, !tbaa !5 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %2) %right = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom, i32 1 %3 = load i32, ptr %right, align 4, !tbaa !13 %cmp7.not = icmp eq i32 %3, -1 br i1 %cmp7.not, label %if.end11, label %if.then8 if.then8: ; preds = %if.end %rightid = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom, i32 5 %4 = load i32, ptr %rightid, align 4, !tbaa !14 br label %tailrecurse if.end11: ; preds = %if.end ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind uwtable define dso_local void @preorder(i32 noundef %t) local_unnamed_addr #2 { entry: br label %tailrecurse tailrecurse: ; preds = %if.then8, %entry %t.tr = phi i32 [ %t, %entry ], [ %4, %if.then8 ] %idxprom = sext i32 %t.tr to i64 %arrayidx = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom %key = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom, i32 2 %0 = load i32, ptr %key, align 8, !tbaa !5 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %0) %1 = load i32, ptr %arrayidx, align 8, !tbaa !11 %cmp.not = icmp eq i32 %1, -1 br i1 %cmp.not, label %if.end, label %if.then if.then: ; preds = %tailrecurse %leftid = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom, i32 4 %2 = load i32, ptr %leftid, align 8, !tbaa !12 tail call void @preorder(i32 noundef %2) br label %if.end if.end: ; preds = %if.then, %tailrecurse %right = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom, i32 1 %3 = load i32, ptr %right, align 4, !tbaa !13 %cmp7.not = icmp eq i32 %3, -1 br i1 %cmp7.not, label %if.end11, label %if.then8 if.then8: ; preds = %if.end %rightid = getelementptr inbounds [500001 x %struct.node], ptr @node, i64 0, i64 %idxprom, i32 5 %4 = load i32, ptr %rightid, align 4, !tbaa !14 br label %tailrecurse if.end11: ; preds = %if.end ret void } ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #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 norecurse 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nocallback nofree 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, !7, i64 8} !6 = !{!"node", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20} !7 = !{!"int", !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{!7, !7, i64 0} !11 = !{!6, !7, i64 0} !12 = !{!6, !7, i64 16} !13 = !{!6, !7, i64 4} !14 = !{!6, !7, i64 20} !15 = !{!6, !7, i64 12} !16 = distinct !{!16, !17} !17 = !{!"llvm.loop.mustprogress"} !18 = !{!8, !8, i64 0} !19 = distinct !{!19, !17}
// Bibary search tree #include <stdio.h> #include <string.h> #define N 500001 typedef struct node { int key; struct node* left; struct node* right; } NODE; void insert(NODE*, NODE*); void printInorder(NODE*); void printPreorder(NODE*); int main() { int i, j; char order[10]; int m, key; NODE node[N]; NODE *z; // input scanf("%d", &m); for(i = 0; i < m; i++) { scanf("%s", order); if(strcmp(order, "insert") == 0) { scanf("%d", &key); if(i == 0) { node[i].key = key; node[i].left = NULL; node[i].right = NULL; } else { node[i].key = key; node[i].left = NULL; node[i].right = NULL; insert(node, &node[i]); } } else if (strcmp(order, "print") == 0) { printInorder(&node[0]); printf("\n"); printPreorder(&node[0]); printf("\n"); } else printf("error\n"); } return 0; } void insert(NODE* tree, NODE* node) { int i = 0; NODE *x; NODE *y; y = NULL; x = &tree[0]; while(x != NULL) { y = x; if(node->key < x->key) x = x->left; else x = x->right; } if(node->key < y->key){ y->left = node; } else{ y->right = node; } } void printInorder(NODE* node) { if(node != NULL) { printInorder(node->left); printf(" %d", node->key); printInorder(node->right); } } void printPreorder(NODE* node) { if(node != NULL) { printf(" %d", node->key); printPreorder(node->left); printPreorder(node->right); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211849/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211849/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { i32, ptr, ptr } @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"insert\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"print\00", align 1 @.str.6 = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @str = private unnamed_addr constant [6 x i8] c"error\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %order = alloca [10 x i8], align 1 %m = alloca i32, align 4 %key = alloca i32, align 4 %node = alloca [500001 x %struct.node], align 16 %node.sroa.gep51 = getelementptr inbounds %struct.node, ptr %node, i64 0, i32 2 %node.sroa.gep = getelementptr inbounds %struct.node, ptr %node, i64 0, i32 1 call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %order) #8 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #8 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %key) #8 call void @llvm.lifetime.start.p0(i64 12000024, ptr nonnull %node) #8 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %m) %0 = load i32, ptr %m, align 4, !tbaa !5 %cmp52 = icmp sgt i32 %0, 0 br i1 %cmp52, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %order) %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(7) %order, ptr noundef nonnull dereferenceable(7) @.str.2, i64 7) %cmp4 = icmp eq i32 %bcmp, 0 br i1 %cmp4, label %if.then, label %if.else25 if.then: ; preds = %for.body %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %key) %cmp6 = icmp eq i64 %indvars.iv, 0 %1 = load i32, ptr %key, align 4, !tbaa !5 br i1 %cmp6, label %if.then7, label %if.else if.then7: ; preds = %if.then store i32 %1, ptr %node, align 16, !tbaa !9 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %node.sroa.gep, i8 0, i64 16, i1 false) br label %for.inc if.else: ; preds = %if.then %arrayidx14 = getelementptr inbounds [500001 x %struct.node], ptr %node, i64 0, i64 %indvars.iv store i32 %1, ptr %arrayidx14, align 8, !tbaa !9 %left18 = getelementptr inbounds [500001 x %struct.node], ptr %node, i64 0, i64 %indvars.iv, i32 1 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %left18, i8 0, i64 16, i1 false) br label %while.body.i while.body.i: ; preds = %while.body.i, %if.else %x.021.i = phi ptr [ %x.1.i, %while.body.i ], [ %node, %if.else ] %x.021.i.sroa.phi = phi ptr [ %x.1.i.sroa.gep, %while.body.i ], [ %node.sroa.gep, %if.else ] %x.021.i.sroa.phi49 = phi ptr [ %x.1.i.sroa.gep50, %while.body.i ], [ %node.sroa.gep51, %if.else ] %2 = load i32, ptr %x.021.i, align 8, !tbaa !9 %cmp2.i = icmp slt i32 %1, %2 %x.1.in.i = select i1 %cmp2.i, ptr %x.021.i.sroa.phi, ptr %x.021.i.sroa.phi49 %x.1.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !12 %x.1.i.sroa.gep50 = getelementptr inbounds %struct.node, ptr %x.1.i, i64 0, i32 2 %x.1.i.sroa.gep = getelementptr inbounds %struct.node, ptr %x.1.i, i64 0, i32 1 %cmp.not.i = icmp eq ptr %x.1.i, null br i1 %cmp.not.i, label %insert.exit, label %while.body.i, !llvm.loop !13 insert.exit: ; preds = %while.body.i %right9.i = getelementptr inbounds %struct.node, ptr %x.021.i, i64 0, i32 2 %left7.i = getelementptr inbounds %struct.node, ptr %x.021.i, i64 0, i32 1 %right9.sink.i = select i1 %cmp2.i, ptr %left7.i, ptr %right9.i store ptr %arrayidx14, ptr %right9.sink.i, align 8, !tbaa !12 br label %for.inc if.else25: ; preds = %for.body %bcmp47 = call i32 @bcmp(ptr noundef nonnull dereferenceable(6) %order, ptr noundef nonnull dereferenceable(6) @.str.3, i64 6) %cmp28 = icmp eq i32 %bcmp47, 0 br i1 %cmp28, label %if.then29, label %if.else34 if.then29: ; preds = %if.else25 call void @printInorder(ptr noundef nonnull %node) %putchar = call i32 @putchar(i32 10) call void @printPreorder(ptr noundef nonnull %node) %putchar48 = call i32 @putchar(i32 10) br label %for.inc if.else34: ; preds = %if.else25 %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %for.inc for.inc: ; preds = %insert.exit, %if.then7, %if.else34, %if.then29 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %3 = load i32, ptr %m, align 4, !tbaa !5 %4 = sext i32 %3 to i64 %cmp = icmp slt i64 %indvars.iv.next, %4 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !15 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 12000024, ptr nonnull %node) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %key) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #8 call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %order) #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) #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, inaccessiblemem: write) uwtable define dso_local void @insert(ptr noundef %tree, ptr noundef %node) local_unnamed_addr #3 { entry: %cmp.not20 = icmp ne ptr %tree, null %.pre = load i32, ptr %node, align 8, !tbaa !9 tail call void @llvm.assume(i1 %cmp.not20) br label %while.body while.body: ; preds = %entry, %while.body %x.021 = phi ptr [ %x.1, %while.body ], [ %tree, %entry ] %0 = load i32, ptr %x.021, align 8, !tbaa !9 %cmp2 = icmp slt i32 %.pre, %0 %left = getelementptr inbounds %struct.node, ptr %x.021, i64 0, i32 1 %right = getelementptr inbounds %struct.node, ptr %x.021, i64 0, i32 2 %x.1.in = select i1 %cmp2, ptr %left, ptr %right %x.1 = load ptr, ptr %x.1.in, align 8, !tbaa !12 %cmp.not = icmp eq ptr %x.1, null br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !13 while.end: ; preds = %while.body %cmp5 = icmp slt i32 %.pre, %0 %right9 = getelementptr inbounds %struct.node, ptr %x.021, i64 0, i32 2 %left7 = getelementptr inbounds %struct.node, ptr %x.021, i64 0, i32 1 %right9.sink = select i1 %cmp5, ptr %left7, ptr %right9 store ptr %node, ptr %right9.sink, align 8, !tbaa !12 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @printInorder(ptr noundef readonly %node) local_unnamed_addr #0 { entry: %cmp.not4 = icmp eq ptr %node, null br i1 %cmp.not4, label %if.end, label %if.then if.then: ; preds = %entry, %if.then %node.tr5 = phi ptr [ %2, %if.then ], [ %node, %entry ] %left = getelementptr inbounds %struct.node, ptr %node.tr5, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !16 tail call void @printInorder(ptr noundef %0) %1 = load i32, ptr %node.tr5, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %1) %right = getelementptr inbounds %struct.node, ptr %node.tr5, i64 0, i32 2 %2 = load ptr, ptr %right, align 8, !tbaa !17 %cmp.not = icmp eq ptr %2, null br i1 %cmp.not, label %if.end, label %if.then if.end: ; preds = %if.then, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local void @printPreorder(ptr noundef readonly %node) local_unnamed_addr #0 { entry: %cmp.not4 = icmp eq ptr %node, null br i1 %cmp.not4, label %if.end, label %if.then if.then: ; preds = %entry, %if.then %node.tr5 = phi ptr [ %2, %if.then ], [ %node, %entry ] %0 = load i32, ptr %node.tr5, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %0) %left = getelementptr inbounds %struct.node, ptr %node.tr5, i64 0, i32 1 %1 = load ptr, ptr %left, align 8, !tbaa !16 tail call void @printPreorder(ptr noundef %1) %right = getelementptr inbounds %struct.node, ptr %node.tr5, i64 0, i32 2 %2 = load ptr, ptr %right, align 8, !tbaa !17 %cmp.not = icmp eq ptr %2, null br i1 %cmp.not, label %if.end, label %if.then if.end: ; preds = %if.then, %entry ret void } ; 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 willreturn memory(argmem: read) declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #5 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #6 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="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, inaccessiblemem: write) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind willreturn memory(argmem: read) } attributes #5 = { nofree nounwind } attributes #6 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #8 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !6, i64 0} !10 = !{!"node", !6, i64 0, !11, i64 8, !11, i64 16} !11 = !{!"any pointer", !7, i64 0} !12 = !{!11, !11, i64 0} !13 = distinct !{!13, !14} !14 = !{!"llvm.loop.mustprogress"} !15 = distinct !{!15, !14} !16 = !{!10, !11, i64 8} !17 = !{!10, !11, i64 16}
#include <stdio.h> #include <stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeMinimum(Node x){ while(x->left != NIL){ x=x->left; } return x; } Node treeMaximum(Node x){ while(x->right != NIL){ x=x->right; } return x; } Node treeSearch(Node u, int k){ if(u==NIL||k==u->key){ return u; } if(k<u->key){ return treeSearch(u->right,k); } } Node treeSuccessor(Node x){ Node y; if(x->right !=NIL){ return (Node)treeMinimum(x->right); } y=x->parent; while(y !=NIL && x==y->right){ x=y; y=y->parent; } return y; } void treeDelete(Node z){ Node y; // node to be deleted Node x; // child of y if(z->left ==NIL || z->right ==NIL){ y=z; } else{ y=(Node)treeSuccessor(z); } if(y->left !=NIL){ x=y->left; } else{ x=y->right; } if(x !=NIL){ x->parent=y->parent; } if(y->parent ==NIL){ root=x; } else if(y==y->parent->left){ y->parent->left; } else{ y->parent->right=x; } if(y != z){ z->key=y->key; } } void insert(int k){ Node y = NIL; Node x = root; Node z; z = malloc(sizeof(struct node)); z->key = k; z->left = NIL; z->right = NIL; while(x !=NIL){ y=x; if(z->key <x->key){ x=x->left; } else{ x=x->right; } } z->parent=y; if(y==NIL){ root=z; } else if(z->key < y->key){ y->left=z; } else{ y->right=z; } } void inorder(Node u){ if(u->left !=NIL){ inorder(u->left); } printf(" %d",u->key); if(u->right !=NIL){ inorder(u->right); } } void preorder(Node u){ printf(" %d",u->key); if(u->left !=NIL){ preorder(u->left); } if(u->right !=NIL){ preorder(u->right); } } int main(){ int n, i, x; char com[20]; scanf("%d", &n); for ( i = 0; i < n; i++ ){ scanf("%s", com); if ( com[0] == 'f' ){ scanf("%d", &x); Node t = treeSearch(root, x); if ( t != NIL ) printf("yes\n"); else printf("no\n"); } else if ( com[0] == 'i' ){ scanf("%d", &x); insert(x); } else if ( com[0] == 'p' ){ inorder(root); printf("\n"); preorder(root); printf("\n"); } else if ( com[0] == 'd' ){ scanf("%d", &x); treeDelete(treeSearch(root, x)); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211906/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211906/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ptr, ptr, i32 } @root = dso_local local_unnamed_addr global ptr null, align 8 @.str = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @str = private unnamed_addr constant [3 x i8] c"no\00", align 1 @str.6 = private unnamed_addr constant [4 x i8] c"yes\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeMinimum(ptr noundef readonly %x) local_unnamed_addr #0 { entry: br label %while.cond while.cond: ; preds = %while.cond, %entry %x.addr.0 = phi ptr [ %x, %entry ], [ %0, %while.cond ] %left = getelementptr inbounds %struct.node, ptr %x.addr.0, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !5 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %while.end, label %while.cond, !llvm.loop !11 while.end: ; preds = %while.cond ret ptr %x.addr.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeMaximum(ptr noundef readonly %x) local_unnamed_addr #0 { entry: br label %while.cond while.cond: ; preds = %while.cond, %entry %x.addr.0 = phi ptr [ %x, %entry ], [ %0, %while.cond ] %0 = load ptr, ptr %x.addr.0, align 8, !tbaa !13 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %while.end, label %while.cond, !llvm.loop !14 while.end: ; preds = %while.cond ret ptr %x.addr.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeSearch(ptr noundef readonly %u, i32 noundef %k) local_unnamed_addr #0 { entry: %cmp12 = icmp eq ptr %u, null br i1 %cmp12, label %if.end5, label %lor.lhs.false lor.lhs.false: ; preds = %entry, %if.then4 %u.tr13 = phi ptr [ %1, %if.then4 ], [ %u, %entry ] %key = getelementptr inbounds %struct.node, ptr %u.tr13, i64 0, i32 3 %0 = load i32, ptr %key, align 8, !tbaa !15 %cmp1 = icmp eq i32 %0, %k br i1 %cmp1, label %if.end5, label %if.end if.end: ; preds = %lor.lhs.false %cmp3 = icmp sgt i32 %0, %k br i1 %cmp3, label %if.then4, label %if.end5 if.then4: ; preds = %if.end %1 = load ptr, ptr %u.tr13, align 8, !tbaa !13 %cmp = icmp eq ptr %1, null br i1 %cmp, label %if.end5, label %lor.lhs.false if.end5: ; preds = %if.end, %lor.lhs.false, %if.then4, %entry %retval.0 = phi ptr [ null, %entry ], [ null, %if.then4 ], [ %u.tr13, %lor.lhs.false ], [ undef, %if.end ] ret ptr %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeSuccessor(ptr noundef readonly %x) local_unnamed_addr #0 { entry: %0 = load ptr, ptr %x, align 8, !tbaa !13 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %while.cond, label %while.cond.i while.cond.i: ; preds = %entry, %while.cond.i %x.addr.0.i = phi ptr [ %1, %while.cond.i ], [ %0, %entry ] %left.i = getelementptr inbounds %struct.node, ptr %x.addr.0.i, i64 0, i32 1 %1 = load ptr, ptr %left.i, align 8, !tbaa !5 %cmp.not.i = icmp eq ptr %1, null br i1 %cmp.not.i, label %cleanup, label %while.cond.i, !llvm.loop !11 while.cond: ; preds = %entry, %land.rhs %x.addr.0 = phi ptr [ %y.0, %land.rhs ], [ %x, %entry ] %y.0.in = getelementptr inbounds %struct.node, ptr %x.addr.0, i64 0, i32 2 %y.0 = load ptr, ptr %y.0.in, align 8, !tbaa !16 %cmp2.not = icmp eq ptr %y.0, null br i1 %cmp2.not, label %cleanup, label %land.rhs land.rhs: ; preds = %while.cond %2 = load ptr, ptr %y.0, align 8, !tbaa !13 %cmp4 = icmp eq ptr %x.addr.0, %2 br i1 %cmp4, label %while.cond, label %cleanup, !llvm.loop !17 cleanup: ; preds = %while.cond.i, %land.rhs, %while.cond %retval.0 = phi ptr [ %y.0, %land.rhs ], [ null, %while.cond ], [ %x.addr.0.i, %while.cond.i ] ret ptr %retval.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable define dso_local void @treeDelete(ptr noundef %z) local_unnamed_addr #2 { entry: %left = getelementptr inbounds %struct.node, ptr %z, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !5 %cmp = icmp eq ptr %0, null br i1 %cmp, label %if.end8, label %lor.lhs.false lor.lhs.false: ; preds = %entry %1 = load ptr, ptr %z, align 8, !tbaa !13 %cmp1 = icmp eq ptr %1, null br i1 %cmp1, label %if.then10, label %while.cond.i.i while.cond.i.i: ; preds = %lor.lhs.false, %while.cond.i.i %x.addr.0.i.i = phi ptr [ %2, %while.cond.i.i ], [ %1, %lor.lhs.false ] %left.i.i = getelementptr inbounds %struct.node, ptr %x.addr.0.i.i, i64 0, i32 1 %2 = load ptr, ptr %left.i.i, align 8, !tbaa !5 %cmp.not.i.i = icmp eq ptr %2, null br i1 %cmp.not.i.i, label %if.end8, label %while.cond.i.i, !llvm.loop !11 if.end8: ; preds = %while.cond.i.i, %entry %y.0.ph = phi ptr [ %z, %entry ], [ %x.addr.0.i.i, %while.cond.i.i ] %3 = load ptr, ptr %y.0.ph, align 8, !tbaa !13 %cmp9.not = icmp eq ptr %3, null br i1 %cmp9.not, label %if.end12, label %if.then10 if.then10: ; preds = %lor.lhs.false, %if.end8 %y.057 = phi ptr [ %y.0.ph, %if.end8 ], [ %z, %lor.lhs.false ] %x.053 = phi ptr [ %3, %if.end8 ], [ %0, %lor.lhs.false ] %parent = getelementptr inbounds %struct.node, ptr %y.057, i64 0, i32 2 %4 = load ptr, ptr %parent, align 8, !tbaa !16 %parent11 = getelementptr inbounds %struct.node, ptr %x.053, i64 0, i32 2 store ptr %4, ptr %parent11, align 8, !tbaa !16 br label %if.end12 if.end12: ; preds = %if.then10, %if.end8 %y.059 = phi ptr [ %y.057, %if.then10 ], [ %y.0.ph, %if.end8 ] %x.054 = phi ptr [ %x.053, %if.then10 ], [ null, %if.end8 ] %parent13 = getelementptr inbounds %struct.node, ptr %y.059, i64 0, i32 2 %5 = load ptr, ptr %parent13, align 8, !tbaa !16 %cmp14 = icmp eq ptr %5, null br i1 %cmp14, label %if.end27.sink.split, label %if.else16 if.else16: ; preds = %if.end12 %left18 = getelementptr inbounds %struct.node, ptr %5, i64 0, i32 1 %6 = load ptr, ptr %left18, align 8, !tbaa !5 %cmp19 = icmp eq ptr %y.059, %6 br i1 %cmp19, label %if.end27, label %if.end27.sink.split if.end27.sink.split: ; preds = %if.else16, %if.end12 %.sink = phi ptr [ @root, %if.end12 ], [ %5, %if.else16 ] store ptr %x.054, ptr %.sink, align 8, !tbaa !18 br label %if.end27 if.end27: ; preds = %if.end27.sink.split, %if.else16 %cmp28.not = icmp eq ptr %y.059, %z br i1 %cmp28.not, label %if.end31, label %if.then29 if.then29: ; preds = %if.end27 %key = getelementptr inbounds %struct.node, ptr %y.059, i64 0, i32 3 %7 = load i32, ptr %key, align 8, !tbaa !15 %key30 = getelementptr inbounds %struct.node, ptr %z, i64 0, i32 3 store i32 %7, ptr %key30, align 8, !tbaa !15 br label %if.end31 if.end31: ; preds = %if.then29, %if.end27 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @insert(i32 noundef %k) local_unnamed_addr #3 { entry: %0 = load ptr, ptr @root, align 8, !tbaa !18 %call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #8 %key = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 3 store i32 %k, ptr %key, align 8, !tbaa !15 %cmp.not34 = icmp eq ptr %0, null tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call, i8 0, i64 16, i1 false) br i1 %cmp.not34, label %if.then7, label %while.body while.body: ; preds = %entry, %while.body %x.035 = phi ptr [ %x.1, %while.body ], [ %0, %entry ] %key2 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %1 = load i32, ptr %key2, align 8, !tbaa !15 %cmp3 = icmp sgt i32 %1, %k %left4 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %x.1.in = select i1 %cmp3, ptr %left4, ptr %x.035 %x.1 = load ptr, ptr %x.1.in, align 8, !tbaa !18 %cmp.not = icmp eq ptr %x.1, null br i1 %cmp.not, label %if.else8, label %while.body, !llvm.loop !19 if.then7: ; preds = %entry %parent37 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr null, ptr %parent37, align 8, !tbaa !16 br label %if.end17 if.else8: ; preds = %while.body %parent = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr %x.035, ptr %parent, align 8, !tbaa !16 %key10 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %2 = load i32, ptr %key10, align 8, !tbaa !15 %cmp11 = icmp sgt i32 %2, %k %left13 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %spec.select = select i1 %cmp11, ptr %left13, ptr %x.035 br label %if.end17 if.end17: ; preds = %if.else8, %if.then7 %left13.sink = phi ptr [ @root, %if.then7 ], [ %spec.select, %if.else8 ] store ptr %call, ptr %left13.sink, align 8, !tbaa !18 ret void } ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #4 ; Function Attrs: nofree nounwind uwtable define dso_local void @inorder(ptr nocapture noundef readonly %u) local_unnamed_addr #3 { entry: br label %tailrecurse tailrecurse: ; preds = %if.end, %entry %u.tr = phi ptr [ %u, %entry ], [ %2, %if.end ] %left = getelementptr inbounds %struct.node, ptr %u.tr, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !5 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %if.end, label %if.then if.then: ; preds = %tailrecurse tail call void @inorder(ptr noundef nonnull %0) br label %if.end if.end: ; preds = %if.then, %tailrecurse %key = getelementptr inbounds %struct.node, ptr %u.tr, i64 0, i32 3 %1 = load i32, ptr %key, align 8, !tbaa !15 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %1) %2 = load ptr, ptr %u.tr, align 8, !tbaa !13 %cmp2.not = icmp eq ptr %2, null br i1 %cmp2.not, label %if.end5, label %tailrecurse if.end5: ; preds = %if.end ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: nofree nounwind uwtable define dso_local void @preorder(ptr nocapture noundef readonly %u) local_unnamed_addr #3 { entry: br label %tailrecurse tailrecurse: ; preds = %if.end, %entry %u.tr = phi ptr [ %u, %entry ], [ %2, %if.end ] %key = getelementptr inbounds %struct.node, ptr %u.tr, i64 0, i32 3 %0 = load i32, ptr %key, align 8, !tbaa !15 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) %left = getelementptr inbounds %struct.node, ptr %u.tr, i64 0, i32 1 %1 = load ptr, ptr %left, align 8, !tbaa !5 %cmp.not = icmp eq ptr %1, null br i1 %cmp.not, label %if.end, label %if.then if.then: ; preds = %tailrecurse tail call void @preorder(ptr noundef nonnull %1) br label %if.end if.end: ; preds = %if.then, %tailrecurse %2 = load ptr, ptr %u.tr, align 8, !tbaa !13 %cmp2.not = icmp eq ptr %2, null br i1 %cmp2.not, label %if.end5, label %tailrecurse if.end5: ; preds = %if.end ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %com = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #9 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #9 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %com) #9 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !20 %cmp67 = icmp sgt i32 %0, 0 br i1 %cmp67, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.068 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %com) %1 = load i8, ptr %com, align 16, !tbaa !21 switch i8 %1, label %for.inc [ i8 102, label %if.then i8 105, label %if.then16 i8 112, label %if.then23 i8 100, label %if.then31 ] if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %2 = load ptr, ptr @root, align 8, !tbaa !18 %3 = load i32, ptr %x, align 4, !tbaa !20 %cmp12.i = icmp eq ptr %2, null br i1 %cmp12.i, label %if.else, label %lor.lhs.false.i lor.lhs.false.i: ; preds = %if.then, %if.then4.i %u.tr13.i = phi ptr [ %5, %if.then4.i ], [ %2, %if.then ] %key.i = getelementptr inbounds %struct.node, ptr %u.tr13.i, i64 0, i32 3 %4 = load i32, ptr %key.i, align 8, !tbaa !15 %cmp1.i = icmp eq i32 %4, %3 br i1 %cmp1.i, label %if.then8, label %if.end.i if.end.i: ; preds = %lor.lhs.false.i %cmp3.i = icmp sgt i32 %4, %3 br i1 %cmp3.i, label %if.then4.i, label %if.else if.then4.i: ; preds = %if.end.i %5 = load ptr, ptr %u.tr13.i, align 8, !tbaa !13 %cmp.i = icmp eq ptr %5, null br i1 %cmp.i, label %if.else, label %lor.lhs.false.i if.then8: ; preds = %lor.lhs.false.i %puts40 = call i32 @puts(ptr nonnull dereferenceable(1) @str.6) br label %for.inc if.else: ; preds = %if.then4.i, %if.end.i, %if.then %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %for.inc if.then16: ; preds = %for.body %call17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %6 = load i32, ptr %x, align 4, !tbaa !20 %7 = load ptr, ptr @root, align 8, !tbaa !18 %call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #8 %key.i41 = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 3 store i32 %6, ptr %key.i41, align 8, !tbaa !15 %cmp.not34.i = icmp eq ptr %7, null call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call.i, i8 0, i64 16, i1 false) br i1 %cmp.not34.i, label %insert.exit, label %while.body.i while.body.i: ; preds = %if.then16, %while.body.i %x.035.i = phi ptr [ %x.1.i, %while.body.i ], [ %7, %if.then16 ] %key2.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 3 %8 = load i32, ptr %key2.i, align 8, !tbaa !15 %cmp3.i42 = icmp sgt i32 %8, %6 %left4.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 1 %x.1.in.i = select i1 %cmp3.i42, ptr %left4.i, ptr %x.035.i %x.1.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !18 %cmp.not.i = icmp eq ptr %x.1.i, null br i1 %cmp.not.i, label %insert.exit, label %while.body.i, !llvm.loop !19 insert.exit: ; preds = %while.body.i, %if.then16 %.sink = phi ptr [ null, %if.then16 ], [ %x.035.i, %while.body.i ] %left13.sink.i = phi ptr [ @root, %if.then16 ], [ %x.1.in.i, %while.body.i ] %parent37.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2 store ptr %.sink, ptr %parent37.i, align 8, !tbaa !16 store ptr %call.i, ptr %left13.sink.i, align 8, !tbaa !18 br label %for.inc if.then23: ; preds = %for.body %9 = load ptr, ptr @root, align 8, !tbaa !18 call void @inorder(ptr noundef %9) %putchar = call i32 @putchar(i32 10) %10 = load ptr, ptr @root, align 8, !tbaa !18 call void @preorder(ptr noundef %10) %putchar39 = call i32 @putchar(i32 10) br label %for.inc if.then31: ; preds = %for.body %call32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %11 = load ptr, ptr @root, align 8, !tbaa !18 %12 = load i32, ptr %x, align 4, !tbaa !20 %cmp12.i43 = icmp eq ptr %11, null br i1 %cmp12.i43, label %treeSearch.exit53, label %lor.lhs.false.i44 lor.lhs.false.i44: ; preds = %if.then31, %if.then4.i51 %u.tr13.i45 = phi ptr [ %14, %if.then4.i51 ], [ %11, %if.then31 ] %key.i46 = getelementptr inbounds %struct.node, ptr %u.tr13.i45, i64 0, i32 3 %13 = load i32, ptr %key.i46, align 8, !tbaa !15 %cmp1.i47 = icmp eq i32 %13, %12 br i1 %cmp1.i47, label %treeSearch.exit53, label %if.end.i48 if.end.i48: ; preds = %lor.lhs.false.i44 %cmp3.i49 = icmp sgt i32 %13, %12 br i1 %cmp3.i49, label %if.then4.i51, label %treeSearch.exit53 if.then4.i51: ; preds = %if.end.i48 %14 = load ptr, ptr %u.tr13.i45, align 8, !tbaa !13 %cmp.i52 = icmp eq ptr %14, null br i1 %cmp.i52, label %treeSearch.exit53, label %lor.lhs.false.i44 treeSearch.exit53: ; preds = %lor.lhs.false.i44, %if.end.i48, %if.then4.i51, %if.then31 %retval.0.i50 = phi ptr [ null, %if.then31 ], [ undef, %if.end.i48 ], [ %u.tr13.i45, %lor.lhs.false.i44 ], [ null, %if.then4.i51 ] %left.i = getelementptr inbounds %struct.node, ptr %retval.0.i50, i64 0, i32 1 %15 = load ptr, ptr %left.i, align 8, !tbaa !5 %cmp.i54 = icmp eq ptr %15, null br i1 %cmp.i54, label %if.end8.i, label %lor.lhs.false.i55 lor.lhs.false.i55: ; preds = %treeSearch.exit53 %16 = load ptr, ptr %retval.0.i50, align 8, !tbaa !13 %cmp1.i56 = icmp eq ptr %16, null br i1 %cmp1.i56, label %if.then10.i, label %while.cond.i.i.i while.cond.i.i.i: ; preds = %lor.lhs.false.i55, %while.cond.i.i.i %x.addr.0.i.i.i = phi ptr [ %17, %while.cond.i.i.i ], [ %16, %lor.lhs.false.i55 ] %left.i.i.i = getelementptr inbounds %struct.node, ptr %x.addr.0.i.i.i, i64 0, i32 1 %17 = load ptr, ptr %left.i.i.i, align 8, !tbaa !5 %cmp.not.i.i.i = icmp eq ptr %17, null br i1 %cmp.not.i.i.i, label %if.end8.i, label %while.cond.i.i.i, !llvm.loop !11 if.end8.i: ; preds = %while.cond.i.i.i, %treeSearch.exit53 %y.0.ph.i = phi ptr [ %retval.0.i50, %treeSearch.exit53 ], [ %x.addr.0.i.i.i, %while.cond.i.i.i ] %18 = load ptr, ptr %y.0.ph.i, align 8, !tbaa !13 %cmp9.not.i = icmp eq ptr %18, null br i1 %cmp9.not.i, label %if.end12.i, label %if.then10.i if.then10.i: ; preds = %if.end8.i, %lor.lhs.false.i55 %y.057.i = phi ptr [ %y.0.ph.i, %if.end8.i ], [ %retval.0.i50, %lor.lhs.false.i55 ] %x.053.i = phi ptr [ %18, %if.end8.i ], [ %15, %lor.lhs.false.i55 ] %parent.i57 = getelementptr inbounds %struct.node, ptr %y.057.i, i64 0, i32 2 %19 = load ptr, ptr %parent.i57, align 8, !tbaa !16 %parent11.i = getelementptr inbounds %struct.node, ptr %x.053.i, i64 0, i32 2 store ptr %19, ptr %parent11.i, align 8, !tbaa !16 br label %if.end12.i if.end12.i: ; preds = %if.then10.i, %if.end8.i %y.059.i = phi ptr [ %y.057.i, %if.then10.i ], [ %y.0.ph.i, %if.end8.i ] %x.054.i = phi ptr [ %x.053.i, %if.then10.i ], [ null, %if.end8.i ] %parent13.i = getelementptr inbounds %struct.node, ptr %y.059.i, i64 0, i32 2 %20 = load ptr, ptr %parent13.i, align 8, !tbaa !16 %cmp14.i = icmp eq ptr %20, null br i1 %cmp14.i, label %if.end27.sink.split.i, label %if.else16.i if.else16.i: ; preds = %if.end12.i %left18.i = getelementptr inbounds %struct.node, ptr %20, i64 0, i32 1 %21 = load ptr, ptr %left18.i, align 8, !tbaa !5 %cmp19.i = icmp eq ptr %y.059.i, %21 br i1 %cmp19.i, label %if.end27.i, label %if.end27.sink.split.i if.end27.sink.split.i: ; preds = %if.else16.i, %if.end12.i %.sink.i = phi ptr [ @root, %if.end12.i ], [ %20, %if.else16.i ] store ptr %x.054.i, ptr %.sink.i, align 8, !tbaa !18 br label %if.end27.i if.end27.i: ; preds = %if.end27.sink.split.i, %if.else16.i %cmp28.not.i = icmp eq ptr %y.059.i, %retval.0.i50 br i1 %cmp28.not.i, label %for.inc, label %if.then29.i if.then29.i: ; preds = %if.end27.i %key.i58 = getelementptr inbounds %struct.node, ptr %y.059.i, i64 0, i32 3 %22 = load i32, ptr %key.i58, align 8, !tbaa !15 %key30.i = getelementptr inbounds %struct.node, ptr %retval.0.i50, i64 0, i32 3 store i32 %22, ptr %key30.i, align 8, !tbaa !15 br label %for.inc for.inc: ; preds = %if.then29.i, %if.end27.i, %for.body, %if.then8, %if.else, %if.then23, %insert.exit %inc = add nuw nsw i32 %i.068, 1 %23 = load i32, ptr %n, align 4, !tbaa !20 %cmp = icmp slt i32 %inc, %23 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !22 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %com) #9 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #9 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #9 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #6 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #6 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7 attributes #0 = { nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree nounwind } attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #8 = { nounwind allocsize(0) } attributes #9 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !7, i64 8} !6 = !{!"node", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24} !7 = !{!"any pointer", !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{!"int", !8, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = !{!6, !7, i64 0} !14 = distinct !{!14, !12} !15 = !{!6, !10, i64 24} !16 = !{!6, !7, i64 16} !17 = distinct !{!17, !12} !18 = !{!7, !7, i64 0} !19 = distinct !{!19, !12} !20 = !{!10, !10, i64 0} !21 = !{!8, !8, i64 0} !22 = distinct !{!22, !12}
#include <stdio.h> int main(void) { int t; int n; scanf("%d", &t); while (t--) { int a[100]; int ans = 0; int first = 0; int last = 0; scanf("%d", &n); for (int i = 0; i < n; ++i) { scanf("%d", &a[i]); if (a[i] != i + 1) { ans = 1; } if (a[i] == 1) { first = i; } else if (a[i] == n) { last = i; } } if (ans == 0) { printf("0\n"); } else { int x = 0; if (a[0] != 1) { ++x; } if (a[n - 1] != n) { ++x; } if (x == 1 || x == 0) { printf("1\n"); } else { if (first < last) { printf("2\n"); } else { if (a[0] == n && a[n - 1] == 1) { printf("3\n"); } else { printf("2\n"); } } } } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21195/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21195/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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.5 = private unnamed_addr constant [2 x i8] c"3\00", align 1 @str.6 = private unnamed_addr constant [2 x i8] c"2\00", align 1 @str.7 = private unnamed_addr constant [2 x i8] c"1\00", align 1 @str.8 = private unnamed_addr constant [2 x i8] c"0\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 %n = alloca i32, align 4 %a = alloca [100 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #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 %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %dec81 = add nsw i32 %0, -1 store i32 %dec81, ptr %t, align 4, !tbaa !5 %tobool.not82 = icmp eq i32 %0, 0 br i1 %tobool.not82, label %while.end, label %while.body while.body: ; preds = %entry, %if.end53 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %a) #4 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp73 = icmp sgt i32 %1, 0 br i1 %cmp73, label %for.body, label %if.end53 for.cond.cleanup: ; preds = %for.body %cmp16 = icmp eq i32 %spec.select, 0 br i1 %cmp16, label %if.end53, label %if.else19 for.body: ; preds = %while.body, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %while.body ] %last.076 = phi i32 [ %last.1, %for.body ], [ 0, %while.body ] %first.075 = phi i32 [ %first.1, %for.body ], [ 0, %while.body ] %ans.074 = phi i32 [ %spec.select, %for.body ], [ 0, %while.body ] %arrayidx = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 %indvars.iv %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %2 = load i32, ptr %arrayidx, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %3 = zext i32 %2 to i64 %cmp5.not = icmp eq i64 %indvars.iv.next, %3 %spec.select = select i1 %cmp5.not, i32 %ans.074, i32 1 %cmp8 = icmp eq i32 %2, 1 %4 = load i32, ptr %n, align 4 %cmp12 = icmp eq i32 %2, %4 %5 = trunc i64 %indvars.iv to i32 %spec.select70 = select i1 %cmp12, i32 %5, i32 %last.076 %first.1 = select i1 %cmp8, i32 %5, i32 %first.075 %last.1 = select i1 %cmp8, i32 %last.076, i32 %spec.select70 %6 = sext i32 %4 to i64 %cmp = icmp slt i64 %indvars.iv.next, %6 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !9 if.else19: ; preds = %for.cond.cleanup %7 = load i32, ptr %a, align 16, !tbaa !5 %cmp21.not.not = icmp eq i32 %7, 1 %sub = add nsw i32 %4, -1 %idxprom25 = sext i32 %sub to i64 %arrayidx26 = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 %idxprom25 %8 = load i32, ptr %arrayidx26, align 4, !tbaa !5 %cmp27.not = icmp eq i32 %8, %4 %or.cond = select i1 %cmp27.not, i1 true, i1 %cmp21.not.not br i1 %or.cond, label %if.end53, label %if.else35 if.else35: ; preds = %if.else19 %cmp36 = icmp slt i32 %first.1, %last.1 br i1 %cmp36, label %if.end53, label %if.else39 if.else39: ; preds = %if.else35 %cmp41 = icmp eq i32 %7, %4 %cmp45 = icmp eq i32 %8, 1 %or.cond72 = and i1 %cmp41, %cmp45 %str.5.str = select i1 %or.cond72, ptr @str.5, ptr @str.6 br label %if.end53 if.end53: ; preds = %if.else39, %if.else35, %if.else19, %for.cond.cleanup, %while.body %str.7.sink = phi ptr [ @str.8, %while.body ], [ @str.8, %for.cond.cleanup ], [ @str.7, %if.else19 ], [ @str.6, %if.else35 ], [ %str.5.str, %if.else39 ] %puts68 = call i32 @puts(ptr nonnull dereferenceable(1) %str.7.sink) call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %a) #4 %9 = load i32, ptr %t, align 4, !tbaa !5 %dec = add nsw i32 %9, -1 store i32 %dec, ptr %t, align 4, !tbaa !5 %tobool.not = icmp eq i32 %9, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !11 while.end: ; preds = %if.end53, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include<stdio.h> #include<stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeMinimum(Node x){ while(x->left!=NIL){ x=x->left; } return x; } Node treeSearch(Node u, int k){ if(u==NIL || k==u->key) return u; if(k < u->key){ return treeSearch(u->left,k);} else { return treeSearch(u->right,k);} } Node treeSuccessor(Node x){ Node y; if(x->right!=NIL) return treeMinimum(x->right); y=x->parent; while(y!=NIL && x==y->right){ x=y; y=y->parent; } return y; } Node treeDelete(Node z){ Node y; // node to be deleted Node x; // child of y if(z->left==NIL || z->right==NIL){ y=z;} else {y= treeSuccessor(z);} if(y->left!=NIL){ x=y->left;} else {x=y->right;} if(x!=NIL){ x->parent=y->parent;} if(y->parent==NIL){ root=x;} else if(y==y->parent->left){ y->parent->left=x;} else {y->parent->right=x;} if(y!=z){ z->key=y->key; /*z->left=y->left; z->right=y->right; z->parent=y->parent;*/ } return y; } void insert(int k){ Node y = NIL; Node x = root; Node z; z = malloc(sizeof(struct node)); z->key = k; z->left = NIL; z->right = NIL; //printf("%d\n",x->key); while(x!=NIL){ y=x; if(z->key < x->key){ x=x->left;} else{x=x->right;} } z->parent=y; if(y==NIL){ root = z;} else if(z->key < y->key){y->left=z;} else y->right=z; } void inorder(Node u){ if(u!=NIL){ inorder(u->left); printf(" %d",u->key); inorder(u->right); } } void preorder(Node u){ if(u!=NIL){ printf(" %d",u->key); preorder(u->left); preorder(u->right); } } int main(){ int n, i, x; char com[20]; scanf("%d", &n); root=NIL; for ( i = 0; i < n; i++ ){ scanf("%s", com); if ( com[0] == 'f' ){ scanf("%d", &x); Node t = treeSearch(root, x); if ( t != NIL ) printf("yes\n"); else printf("no\n"); } else if ( com[0] == 'i' ){ scanf("%d", &x); insert(x); } else if ( com[0] == 'p' ){ inorder(root); printf("\n"); preorder(root); printf("\n"); } else if ( com[0] == 'd' ){ scanf("%d", &x); treeDelete(treeSearch(root, x)); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212013/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212013/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ptr, ptr, i32 } @root = dso_local local_unnamed_addr global ptr null, align 8 @.str = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @str = private unnamed_addr constant [3 x i8] c"no\00", align 1 @str.6 = private unnamed_addr constant [4 x i8] c"yes\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeMinimum(ptr noundef readonly %x) local_unnamed_addr #0 { entry: br label %while.cond while.cond: ; preds = %while.cond, %entry %x.addr.0 = phi ptr [ %x, %entry ], [ %0, %while.cond ] %left = getelementptr inbounds %struct.node, ptr %x.addr.0, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !5 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %while.end, label %while.cond, !llvm.loop !11 while.end: ; preds = %while.cond ret ptr %x.addr.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeSearch(ptr noundef readonly %u, i32 noundef %k) local_unnamed_addr #0 { entry: %cmp14 = icmp eq ptr %u, null br i1 %cmp14, label %return, label %lor.lhs.false lor.lhs.false: ; preds = %entry, %if.end %u.tr15 = phi ptr [ %u.tr.be, %if.end ], [ %u, %entry ] %key = getelementptr inbounds %struct.node, ptr %u.tr15, i64 0, i32 3 %0 = load i32, ptr %key, align 8, !tbaa !13 %cmp1 = icmp eq i32 %0, %k br i1 %cmp1, label %return, label %if.end if.end: ; preds = %lor.lhs.false %cmp3 = icmp sgt i32 %0, %k %left = getelementptr inbounds %struct.node, ptr %u.tr15, i64 0, i32 1 %spec.select = select i1 %cmp3, ptr %left, ptr %u.tr15 %u.tr.be = load ptr, ptr %spec.select, align 8, !tbaa !14 %cmp = icmp eq ptr %u.tr.be, null br i1 %cmp, label %return, label %lor.lhs.false return: ; preds = %lor.lhs.false, %if.end, %entry %retval.0 = phi ptr [ null, %entry ], [ null, %if.end ], [ %u.tr15, %lor.lhs.false ] ret ptr %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeSuccessor(ptr noundef readonly %x) local_unnamed_addr #0 { entry: %0 = load ptr, ptr %x, align 8, !tbaa !15 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %while.cond, label %while.cond.i while.cond.i: ; preds = %entry, %while.cond.i %x.addr.0.i = phi ptr [ %1, %while.cond.i ], [ %0, %entry ] %left.i = getelementptr inbounds %struct.node, ptr %x.addr.0.i, i64 0, i32 1 %1 = load ptr, ptr %left.i, align 8, !tbaa !5 %cmp.not.i = icmp eq ptr %1, null br i1 %cmp.not.i, label %cleanup, label %while.cond.i, !llvm.loop !11 while.cond: ; preds = %entry, %land.rhs %x.addr.0 = phi ptr [ %y.0, %land.rhs ], [ %x, %entry ] %y.0.in = getelementptr inbounds %struct.node, ptr %x.addr.0, i64 0, i32 2 %y.0 = load ptr, ptr %y.0.in, align 8, !tbaa !16 %cmp2.not = icmp eq ptr %y.0, null br i1 %cmp2.not, label %cleanup, label %land.rhs land.rhs: ; preds = %while.cond %2 = load ptr, ptr %y.0, align 8, !tbaa !15 %cmp4 = icmp eq ptr %x.addr.0, %2 br i1 %cmp4, label %while.cond, label %cleanup, !llvm.loop !17 cleanup: ; preds = %while.cond.i, %land.rhs, %while.cond %retval.0 = phi ptr [ %y.0, %land.rhs ], [ null, %while.cond ], [ %x.addr.0.i, %while.cond.i ] ret ptr %retval.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable define dso_local ptr @treeDelete(ptr noundef %z) local_unnamed_addr #2 { entry: %left = getelementptr inbounds %struct.node, ptr %z, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !5 %cmp = icmp eq ptr %0, null br i1 %cmp, label %if.end8, label %lor.lhs.false lor.lhs.false: ; preds = %entry %1 = load ptr, ptr %z, align 8, !tbaa !15 %cmp1 = icmp eq ptr %1, null br i1 %cmp1, label %if.then10, label %while.cond.i.i while.cond.i.i: ; preds = %lor.lhs.false, %while.cond.i.i %x.addr.0.i.i = phi ptr [ %2, %while.cond.i.i ], [ %1, %lor.lhs.false ] %left.i.i = getelementptr inbounds %struct.node, ptr %x.addr.0.i.i, i64 0, i32 1 %2 = load ptr, ptr %left.i.i, align 8, !tbaa !5 %cmp.not.i.i = icmp eq ptr %2, null br i1 %cmp.not.i.i, label %if.end8, label %while.cond.i.i, !llvm.loop !11 if.end8: ; preds = %while.cond.i.i, %entry %y.0.ph = phi ptr [ %z, %entry ], [ %x.addr.0.i.i, %while.cond.i.i ] %3 = load ptr, ptr %y.0.ph, align 8, !tbaa !15 %cmp9.not = icmp eq ptr %3, null br i1 %cmp9.not, label %if.end12, label %if.then10 if.then10: ; preds = %lor.lhs.false, %if.end8 %y.059 = phi ptr [ %y.0.ph, %if.end8 ], [ %z, %lor.lhs.false ] %x.055 = phi ptr [ %3, %if.end8 ], [ %0, %lor.lhs.false ] %parent = getelementptr inbounds %struct.node, ptr %y.059, i64 0, i32 2 %4 = load ptr, ptr %parent, align 8, !tbaa !16 %parent11 = getelementptr inbounds %struct.node, ptr %x.055, i64 0, i32 2 store ptr %4, ptr %parent11, align 8, !tbaa !16 br label %if.end12 if.end12: ; preds = %if.then10, %if.end8 %y.061 = phi ptr [ %y.059, %if.then10 ], [ %y.0.ph, %if.end8 ] %x.056 = phi ptr [ %x.055, %if.then10 ], [ null, %if.end8 ] %parent13 = getelementptr inbounds %struct.node, ptr %y.061, i64 0, i32 2 %5 = load ptr, ptr %parent13, align 8, !tbaa !16 %cmp14 = icmp eq ptr %5, null br i1 %cmp14, label %if.end27, label %if.else16 if.else16: ; preds = %if.end12 %left18 = getelementptr inbounds %struct.node, ptr %5, i64 0, i32 1 %6 = load ptr, ptr %left18, align 8, !tbaa !5 %cmp19 = icmp eq ptr %y.061, %6 %left18. = select i1 %cmp19, ptr %left18, ptr %5 br label %if.end27 if.end27: ; preds = %if.else16, %if.end12 %left18.sink = phi ptr [ @root, %if.end12 ], [ %left18., %if.else16 ] store ptr %x.056, ptr %left18.sink, align 8, !tbaa !14 %cmp28.not = icmp eq ptr %y.061, %z br i1 %cmp28.not, label %if.end31, label %if.then29 if.then29: ; preds = %if.end27 %key = getelementptr inbounds %struct.node, ptr %y.061, i64 0, i32 3 %7 = load i32, ptr %key, align 8, !tbaa !13 %key30 = getelementptr inbounds %struct.node, ptr %z, i64 0, i32 3 store i32 %7, ptr %key30, align 8, !tbaa !13 br label %if.end31 if.end31: ; preds = %if.then29, %if.end27 ret ptr %y.061 } ; Function Attrs: nofree nounwind uwtable define dso_local void @insert(i32 noundef %k) local_unnamed_addr #3 { entry: %0 = load ptr, ptr @root, align 8, !tbaa !14 %call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #8 %key = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 3 store i32 %k, ptr %key, align 8, !tbaa !13 %cmp.not34 = icmp eq ptr %0, null tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call, i8 0, i64 16, i1 false) br i1 %cmp.not34, label %if.then7, label %while.body while.body: ; preds = %entry, %while.body %x.035 = phi ptr [ %x.1, %while.body ], [ %0, %entry ] %key2 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %1 = load i32, ptr %key2, align 8, !tbaa !13 %cmp3 = icmp sgt i32 %1, %k %left4 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %x.1.in = select i1 %cmp3, ptr %left4, ptr %x.035 %x.1 = load ptr, ptr %x.1.in, align 8, !tbaa !14 %cmp.not = icmp eq ptr %x.1, null br i1 %cmp.not, label %if.else8, label %while.body, !llvm.loop !18 if.then7: ; preds = %entry %parent37 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr null, ptr %parent37, align 8, !tbaa !16 br label %if.end17 if.else8: ; preds = %while.body %parent = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr %x.035, ptr %parent, align 8, !tbaa !16 %key10 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %2 = load i32, ptr %key10, align 8, !tbaa !13 %cmp11 = icmp sgt i32 %2, %k %left13 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %spec.select = select i1 %cmp11, ptr %left13, ptr %x.035 br label %if.end17 if.end17: ; preds = %if.else8, %if.then7 %left13.sink = phi ptr [ @root, %if.then7 ], [ %spec.select, %if.else8 ] store ptr %call, ptr %left13.sink, align 8, !tbaa !14 ret void } ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #4 ; Function Attrs: nofree nounwind uwtable define dso_local void @inorder(ptr noundef readonly %u) local_unnamed_addr #3 { entry: %cmp.not4 = icmp eq ptr %u, null br i1 %cmp.not4, label %if.end, label %if.then if.then: ; preds = %entry, %if.then %u.tr5 = phi ptr [ %2, %if.then ], [ %u, %entry ] %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !5 tail call void @inorder(ptr noundef %0) %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %1 = load i32, ptr %key, align 8, !tbaa !13 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !15 %cmp.not = icmp eq ptr %2, null br i1 %cmp.not, label %if.end, label %if.then if.end: ; preds = %if.then, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: nofree nounwind uwtable define dso_local void @preorder(ptr noundef readonly %u) local_unnamed_addr #3 { entry: %cmp.not4 = icmp eq ptr %u, null br i1 %cmp.not4, label %if.end, label %if.then if.then: ; preds = %entry, %if.then %u.tr5 = phi ptr [ %2, %if.then ], [ %u, %entry ] %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %0 = load i32, ptr %key, align 8, !tbaa !13 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %1 = load ptr, ptr %left, align 8, !tbaa !5 tail call void @preorder(ptr noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !15 %cmp.not = icmp eq ptr %2, null br i1 %cmp.not, label %if.end, label %if.then if.end: ; preds = %if.then, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %com = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #9 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #9 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %com) #9 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) store ptr null, ptr @root, align 8, !tbaa !14 %0 = load i32, ptr %n, align 4, !tbaa !19 %cmp67 = icmp sgt i32 %0, 0 br i1 %cmp67, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.068 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %com) %1 = load i8, ptr %com, align 16, !tbaa !20 switch i8 %1, label %for.inc [ i8 102, label %if.then i8 105, label %if.then16 i8 112, label %if.then23 i8 100, label %if.then31 ] if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %2 = load ptr, ptr @root, align 8, !tbaa !14 %3 = load i32, ptr %x, align 4, !tbaa !19 %cmp14.i = icmp eq ptr %2, null br i1 %cmp14.i, label %if.else, label %lor.lhs.false.i lor.lhs.false.i: ; preds = %if.then, %if.end.i %u.tr15.i = phi ptr [ %u.tr.be.i, %if.end.i ], [ %2, %if.then ] %key.i = getelementptr inbounds %struct.node, ptr %u.tr15.i, i64 0, i32 3 %4 = load i32, ptr %key.i, align 8, !tbaa !13 %cmp1.i = icmp eq i32 %4, %3 br i1 %cmp1.i, label %if.then8, label %if.end.i if.end.i: ; preds = %lor.lhs.false.i %cmp3.i = icmp sgt i32 %4, %3 %left.i = getelementptr inbounds %struct.node, ptr %u.tr15.i, i64 0, i32 1 %spec.select.i = select i1 %cmp3.i, ptr %left.i, ptr %u.tr15.i %u.tr.be.i = load ptr, ptr %spec.select.i, align 8, !tbaa !14 %cmp.i = icmp eq ptr %u.tr.be.i, null br i1 %cmp.i, label %if.else, label %lor.lhs.false.i if.then8: ; preds = %lor.lhs.false.i %puts41 = call i32 @puts(ptr nonnull dereferenceable(1) @str.6) br label %for.inc if.else: ; preds = %if.end.i, %if.then %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %for.inc if.then16: ; preds = %for.body %call17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %5 = load i32, ptr %x, align 4, !tbaa !19 %6 = load ptr, ptr @root, align 8, !tbaa !14 %call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #8 %key.i42 = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 3 store i32 %5, ptr %key.i42, align 8, !tbaa !13 %cmp.not34.i = icmp eq ptr %6, null call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call.i, i8 0, i64 16, i1 false) br i1 %cmp.not34.i, label %insert.exit, label %while.body.i while.body.i: ; preds = %if.then16, %while.body.i %x.035.i = phi ptr [ %x.1.i, %while.body.i ], [ %6, %if.then16 ] %key2.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 3 %7 = load i32, ptr %key2.i, align 8, !tbaa !13 %cmp3.i43 = icmp sgt i32 %7, %5 %left4.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 1 %x.1.in.i = select i1 %cmp3.i43, ptr %left4.i, ptr %x.035.i %x.1.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !14 %cmp.not.i = icmp eq ptr %x.1.i, null br i1 %cmp.not.i, label %insert.exit, label %while.body.i, !llvm.loop !18 insert.exit: ; preds = %while.body.i, %if.then16 %.sink = phi ptr [ null, %if.then16 ], [ %x.035.i, %while.body.i ] %left13.sink.i = phi ptr [ @root, %if.then16 ], [ %x.1.in.i, %while.body.i ] %parent37.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2 store ptr %.sink, ptr %parent37.i, align 8, !tbaa !16 store ptr %call.i, ptr %left13.sink.i, align 8, !tbaa !14 br label %for.inc if.then23: ; preds = %for.body %8 = load ptr, ptr @root, align 8, !tbaa !14 call void @inorder(ptr noundef %8) %putchar = call i32 @putchar(i32 10) %9 = load ptr, ptr @root, align 8, !tbaa !14 call void @preorder(ptr noundef %9) %putchar40 = call i32 @putchar(i32 10) br label %for.inc if.then31: ; preds = %for.body %call32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %10 = load ptr, ptr @root, align 8, !tbaa !14 %11 = load i32, ptr %x, align 4, !tbaa !19 %cmp14.i45 = icmp eq ptr %10, null br i1 %cmp14.i45, label %treeSearch.exit57, label %lor.lhs.false.i46 lor.lhs.false.i46: ; preds = %if.then31, %if.end.i50 %u.tr15.i47 = phi ptr [ %u.tr.be.i54, %if.end.i50 ], [ %10, %if.then31 ] %key.i48 = getelementptr inbounds %struct.node, ptr %u.tr15.i47, i64 0, i32 3 %12 = load i32, ptr %key.i48, align 8, !tbaa !13 %cmp1.i49 = icmp eq i32 %12, %11 br i1 %cmp1.i49, label %treeSearch.exit57, label %if.end.i50 if.end.i50: ; preds = %lor.lhs.false.i46 %cmp3.i51 = icmp sgt i32 %12, %11 %left.i52 = getelementptr inbounds %struct.node, ptr %u.tr15.i47, i64 0, i32 1 %spec.select.i53 = select i1 %cmp3.i51, ptr %left.i52, ptr %u.tr15.i47 %u.tr.be.i54 = load ptr, ptr %spec.select.i53, align 8, !tbaa !14 %cmp.i55 = icmp eq ptr %u.tr.be.i54, null br i1 %cmp.i55, label %treeSearch.exit57, label %lor.lhs.false.i46 treeSearch.exit57: ; preds = %lor.lhs.false.i46, %if.end.i50, %if.then31 %retval.0.i56 = phi ptr [ null, %if.then31 ], [ %u.tr15.i47, %lor.lhs.false.i46 ], [ null, %if.end.i50 ] %left.i58 = getelementptr inbounds %struct.node, ptr %retval.0.i56, i64 0, i32 1 %13 = load ptr, ptr %left.i58, align 8, !tbaa !5 %cmp.i59 = icmp eq ptr %13, null br i1 %cmp.i59, label %if.end8.i, label %lor.lhs.false.i60 lor.lhs.false.i60: ; preds = %treeSearch.exit57 %14 = load ptr, ptr %retval.0.i56, align 8, !tbaa !15 %cmp1.i61 = icmp eq ptr %14, null br i1 %cmp1.i61, label %if.then10.i, label %while.cond.i.i.i while.cond.i.i.i: ; preds = %lor.lhs.false.i60, %while.cond.i.i.i %x.addr.0.i.i.i = phi ptr [ %15, %while.cond.i.i.i ], [ %14, %lor.lhs.false.i60 ] %left.i.i.i = getelementptr inbounds %struct.node, ptr %x.addr.0.i.i.i, i64 0, i32 1 %15 = load ptr, ptr %left.i.i.i, align 8, !tbaa !5 %cmp.not.i.i.i = icmp eq ptr %15, null br i1 %cmp.not.i.i.i, label %if.end8.i, label %while.cond.i.i.i, !llvm.loop !11 if.end8.i: ; preds = %while.cond.i.i.i, %treeSearch.exit57 %y.0.ph.i = phi ptr [ %retval.0.i56, %treeSearch.exit57 ], [ %x.addr.0.i.i.i, %while.cond.i.i.i ] %16 = load ptr, ptr %y.0.ph.i, align 8, !tbaa !15 %cmp9.not.i = icmp eq ptr %16, null br i1 %cmp9.not.i, label %if.end12.i, label %if.then10.i if.then10.i: ; preds = %if.end8.i, %lor.lhs.false.i60 %y.059.i = phi ptr [ %y.0.ph.i, %if.end8.i ], [ %retval.0.i56, %lor.lhs.false.i60 ] %x.055.i = phi ptr [ %16, %if.end8.i ], [ %13, %lor.lhs.false.i60 ] %parent.i62 = getelementptr inbounds %struct.node, ptr %y.059.i, i64 0, i32 2 %17 = load ptr, ptr %parent.i62, align 8, !tbaa !16 %parent11.i = getelementptr inbounds %struct.node, ptr %x.055.i, i64 0, i32 2 store ptr %17, ptr %parent11.i, align 8, !tbaa !16 br label %if.end12.i if.end12.i: ; preds = %if.then10.i, %if.end8.i %y.061.i = phi ptr [ %y.059.i, %if.then10.i ], [ %y.0.ph.i, %if.end8.i ] %x.056.i = phi ptr [ %x.055.i, %if.then10.i ], [ null, %if.end8.i ] %parent13.i = getelementptr inbounds %struct.node, ptr %y.061.i, i64 0, i32 2 %18 = load ptr, ptr %parent13.i, align 8, !tbaa !16 %cmp14.i63 = icmp eq ptr %18, null br i1 %cmp14.i63, label %if.end27.i, label %if.else16.i if.else16.i: ; preds = %if.end12.i %left18.i = getelementptr inbounds %struct.node, ptr %18, i64 0, i32 1 %19 = load ptr, ptr %left18.i, align 8, !tbaa !5 %cmp19.i = icmp eq ptr %y.061.i, %19 %left18..i = select i1 %cmp19.i, ptr %left18.i, ptr %18 br label %if.end27.i if.end27.i: ; preds = %if.else16.i, %if.end12.i %left18.sink.i = phi ptr [ @root, %if.end12.i ], [ %left18..i, %if.else16.i ] store ptr %x.056.i, ptr %left18.sink.i, align 8, !tbaa !14 %cmp28.not.i = icmp eq ptr %y.061.i, %retval.0.i56 br i1 %cmp28.not.i, label %for.inc, label %if.then29.i if.then29.i: ; preds = %if.end27.i %key.i64 = getelementptr inbounds %struct.node, ptr %y.061.i, i64 0, i32 3 %20 = load i32, ptr %key.i64, align 8, !tbaa !13 %key30.i = getelementptr inbounds %struct.node, ptr %retval.0.i56, i64 0, i32 3 store i32 %20, ptr %key30.i, align 8, !tbaa !13 br label %for.inc for.inc: ; preds = %if.then29.i, %if.end27.i, %for.body, %if.then8, %if.else, %if.then23, %insert.exit %inc = add nuw nsw i32 %i.068, 1 %21 = load i32, ptr %n, align 4, !tbaa !19 %cmp = icmp slt i32 %inc, %21 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !21 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %com) #9 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #9 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #9 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #6 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #6 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7 attributes #0 = { nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree nounwind } attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #8 = { nounwind allocsize(0) } attributes #9 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !7, i64 8} !6 = !{!"node", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24} !7 = !{!"any pointer", !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{!"int", !8, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = !{!6, !10, i64 24} !14 = !{!7, !7, i64 0} !15 = !{!6, !7, i64 0} !16 = !{!6, !7, i64 16} !17 = distinct !{!17, !12} !18 = distinct !{!18, !12} !19 = !{!10, !10, i64 0} !20 = !{!8, !8, i64 0} !21 = distinct !{!21, !12}
#include<stdio.h> #include<stdlib.h> #define NIL NULL struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; Node root; Node treeMinimum(Node); Node treeSearch(Node, int); Node treeSuccessor(Node); void treeDelete(Node); void insert(int); void inorder(Node); void preorder(Node); int main(){ int n, i, x; char com[20]; scanf("%d",&n); for ( i = 0; i < n; i++ ){ scanf("%s", com); if(com[0] == 'i'){ scanf("%d",&x); insert(x); } else{ inorder(root); printf("\n"); preorder(root); printf("\n"); } } return 0; } Node treeMinimum(Node x){ while(x->left != NIL){ x = x->left; } return x; } Node treeSearch(Node u, int k){ if(u == NIL || k == u->key)return u; if(k < u->key)return treeSearch(u->left, k); else return treeSearch(u->right, k); } Node treeSuccessor(Node x){ Node y; if(x->right != NIL){ return treeMinimum(x->right); } y = x->parent; while(y != NIL && x == y->right){ x = y; y = y->parent; } return y; } void treeDelete(Node z){ Node y; // node to be deleted Node x; // child of y if(z->left == NIL || z->right == NIL)y = z; else y = treeSuccessor(z); if(y->left != NIL)x = y->left; else x = y->right; if(x != NIL)x->parent = y->parent; if(y->parent == NIL)root = x; else if(y == y->parent->left)y->parent->left = x; else y->parent->right = x; if(y != z){ z->key =y->key; } } void insert(int k){ Node y = NIL; Node x = root; Node z; z = malloc(sizeof(struct node)); z->key = k; z->left = NIL; z->right = NIL; while(x != NIL){ y = x; if(z->key < x->key)x = x->left; else x = x->right; } z->parent = y; if(y == NIL)root = z; else if(z->key < y->key)y->left = z; else y->right = z; } void inorder(Node u){ if(u == NIL)return ; inorder(u->left); printf(" %d",u->key); inorder(u->right); } void preorder(Node u){ if(u == NIL)return ; printf(" %d",u->key); preorder(u->left); preorder(u->right); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212057/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212057/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ptr, ptr, i32 } @.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 @root = dso_local local_unnamed_addr global ptr null, align 8 @.str.3 = private unnamed_addr constant [4 x i8] c" %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %com = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #8 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #8 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %com) #8 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp9 = icmp sgt i32 %0, 0 br i1 %cmp9, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.010 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %com) %1 = load i8, ptr %com, align 16, !tbaa !9 %cmp2 = icmp eq i8 %1, 105 br i1 %cmp2, label %if.then, label %if.else if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %2 = load i32, ptr %x, align 4, !tbaa !5 %3 = load ptr, ptr @root, align 8, !tbaa !10 %call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #9 %key.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 3 store i32 %2, ptr %key.i, align 8, !tbaa !12 %cmp.not34.i = icmp eq ptr %3, null call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call.i, i8 0, i64 16, i1 false) br i1 %cmp.not34.i, label %insert.exit, label %while.body.i while.body.i: ; preds = %if.then, %while.body.i %x.035.i = phi ptr [ %x.1.i, %while.body.i ], [ %3, %if.then ] %key2.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 3 %4 = load i32, ptr %key2.i, align 8, !tbaa !12 %cmp3.i = icmp sgt i32 %4, %2 %left4.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 1 %x.1.in.i = select i1 %cmp3.i, ptr %left4.i, ptr %x.035.i %x.1.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !10 %cmp.not.i = icmp eq ptr %x.1.i, null br i1 %cmp.not.i, label %insert.exit, label %while.body.i, !llvm.loop !14 insert.exit: ; preds = %while.body.i, %if.then %.sink = phi ptr [ null, %if.then ], [ %x.035.i, %while.body.i ] %left13.sink.i = phi ptr [ @root, %if.then ], [ %x.1.in.i, %while.body.i ] %parent37.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2 store ptr %.sink, ptr %parent37.i, align 8, !tbaa !16 store ptr %call.i, ptr %left13.sink.i, align 8, !tbaa !10 br label %for.inc if.else: ; preds = %for.body %5 = load ptr, ptr @root, align 8, !tbaa !10 call void @inorder(ptr noundef %5) %putchar = call i32 @putchar(i32 10) %6 = load ptr, ptr @root, align 8, !tbaa !10 call void @preorder(ptr noundef %6) %putchar8 = call i32 @putchar(i32 10) br label %for.inc for.inc: ; preds = %insert.exit, %if.else %inc = add nuw nsw i32 %i.010, 1 %7 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %7 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !17 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %com) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #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) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local void @insert(i32 noundef %k) local_unnamed_addr #0 { entry: %0 = load ptr, ptr @root, align 8, !tbaa !10 %call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #9 %key = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 3 store i32 %k, ptr %key, align 8, !tbaa !12 %cmp.not34 = icmp eq ptr %0, null tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call, i8 0, i64 16, i1 false) br i1 %cmp.not34, label %if.then7, label %while.body while.body: ; preds = %entry, %while.body %x.035 = phi ptr [ %x.1, %while.body ], [ %0, %entry ] %key2 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %1 = load i32, ptr %key2, align 8, !tbaa !12 %cmp3 = icmp sgt i32 %1, %k %left4 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %x.1.in = select i1 %cmp3, ptr %left4, ptr %x.035 %x.1 = load ptr, ptr %x.1.in, align 8, !tbaa !10 %cmp.not = icmp eq ptr %x.1, null br i1 %cmp.not, label %if.else8, label %while.body, !llvm.loop !14 if.then7: ; preds = %entry %parent37 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr null, ptr %parent37, align 8, !tbaa !16 br label %if.end17 if.else8: ; preds = %while.body %parent = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr %x.035, ptr %parent, align 8, !tbaa !16 %key10 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %2 = load i32, ptr %key10, align 8, !tbaa !12 %cmp11 = icmp sgt i32 %2, %k %left13 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %spec.select = select i1 %cmp11, ptr %left13, ptr %x.035 br label %if.end17 if.end17: ; preds = %if.else8, %if.then7 %left13.sink = phi ptr [ @root, %if.then7 ], [ %spec.select, %if.else8 ] store ptr %call, ptr %left13.sink, align 8, !tbaa !10 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @inorder(ptr noundef readonly %u) local_unnamed_addr #0 { entry: %cmp4 = icmp eq ptr %u, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %u.tr5 = phi ptr [ %2, %if.end ], [ %u, %entry ] %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !18 tail call void @inorder(ptr noundef %0) %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %1 = load i32, ptr %key, align 8, !tbaa !12 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !19 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local void @preorder(ptr noundef readonly %u) local_unnamed_addr #0 { entry: %cmp4 = icmp eq ptr %u, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %u.tr5 = phi ptr [ %2, %if.end ], [ %u, %entry ] %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %0 = load i32, ptr %key, align 8, !tbaa !12 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %0) %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %1 = load ptr, ptr %left, align 8, !tbaa !18 tail call void @preorder(ptr noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !19 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeMinimum(ptr noundef readonly %x) local_unnamed_addr #3 { entry: br label %while.cond while.cond: ; preds = %while.cond, %entry %x.addr.0 = phi ptr [ %x, %entry ], [ %0, %while.cond ] %left = getelementptr inbounds %struct.node, ptr %x.addr.0, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !18 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %while.end, label %while.cond, !llvm.loop !20 while.end: ; preds = %while.cond ret ptr %x.addr.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeSearch(ptr noundef readonly %u, i32 noundef %k) local_unnamed_addr #3 { entry: %cmp14 = icmp eq ptr %u, null br i1 %cmp14, label %return, label %lor.lhs.false lor.lhs.false: ; preds = %entry, %if.end %u.tr15 = phi ptr [ %u.tr.be, %if.end ], [ %u, %entry ] %key = getelementptr inbounds %struct.node, ptr %u.tr15, i64 0, i32 3 %0 = load i32, ptr %key, align 8, !tbaa !12 %cmp1 = icmp eq i32 %0, %k br i1 %cmp1, label %return, label %if.end if.end: ; preds = %lor.lhs.false %cmp3 = icmp sgt i32 %0, %k %left = getelementptr inbounds %struct.node, ptr %u.tr15, i64 0, i32 1 %spec.select = select i1 %cmp3, ptr %left, ptr %u.tr15 %u.tr.be = load ptr, ptr %spec.select, align 8, !tbaa !10 %cmp = icmp eq ptr %u.tr.be, null br i1 %cmp, label %return, label %lor.lhs.false return: ; preds = %lor.lhs.false, %if.end, %entry %retval.0 = phi ptr [ null, %entry ], [ null, %if.end ], [ %u.tr15, %lor.lhs.false ] ret ptr %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeSuccessor(ptr noundef readonly %x) local_unnamed_addr #3 { entry: %0 = load ptr, ptr %x, align 8, !tbaa !19 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %while.cond, label %while.cond.i while.cond.i: ; preds = %entry, %while.cond.i %x.addr.0.i = phi ptr [ %1, %while.cond.i ], [ %0, %entry ] %left.i = getelementptr inbounds %struct.node, ptr %x.addr.0.i, i64 0, i32 1 %1 = load ptr, ptr %left.i, align 8, !tbaa !18 %cmp.not.i = icmp eq ptr %1, null br i1 %cmp.not.i, label %cleanup, label %while.cond.i, !llvm.loop !20 while.cond: ; preds = %entry, %land.rhs %x.addr.0 = phi ptr [ %y.0, %land.rhs ], [ %x, %entry ] %y.0.in = getelementptr inbounds %struct.node, ptr %x.addr.0, i64 0, i32 2 %y.0 = load ptr, ptr %y.0.in, align 8, !tbaa !16 %cmp2.not = icmp eq ptr %y.0, null br i1 %cmp2.not, label %cleanup, label %land.rhs land.rhs: ; preds = %while.cond %2 = load ptr, ptr %y.0, align 8, !tbaa !19 %cmp4 = icmp eq ptr %x.addr.0, %2 br i1 %cmp4, label %while.cond, label %cleanup, !llvm.loop !21 cleanup: ; preds = %while.cond.i, %land.rhs, %while.cond %retval.0 = phi ptr [ %y.0, %land.rhs ], [ null, %while.cond ], [ %x.addr.0.i, %while.cond.i ] ret ptr %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable define dso_local void @treeDelete(ptr noundef %z) local_unnamed_addr #4 { entry: %left = getelementptr inbounds %struct.node, ptr %z, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !18 %cmp = icmp eq ptr %0, null br i1 %cmp, label %if.end8, label %lor.lhs.false lor.lhs.false: ; preds = %entry %1 = load ptr, ptr %z, align 8, !tbaa !19 %cmp1 = icmp eq ptr %1, null br i1 %cmp1, label %if.then10, label %while.cond.i.i while.cond.i.i: ; preds = %lor.lhs.false, %while.cond.i.i %x.addr.0.i.i = phi ptr [ %2, %while.cond.i.i ], [ %1, %lor.lhs.false ] %left.i.i = getelementptr inbounds %struct.node, ptr %x.addr.0.i.i, i64 0, i32 1 %2 = load ptr, ptr %left.i.i, align 8, !tbaa !18 %cmp.not.i.i = icmp eq ptr %2, null br i1 %cmp.not.i.i, label %if.end8, label %while.cond.i.i, !llvm.loop !20 if.end8: ; preds = %while.cond.i.i, %entry %y.0.ph = phi ptr [ %z, %entry ], [ %x.addr.0.i.i, %while.cond.i.i ] %3 = load ptr, ptr %y.0.ph, align 8, !tbaa !19 %cmp9.not = icmp eq ptr %3, null br i1 %cmp9.not, label %if.end12, label %if.then10 if.then10: ; preds = %lor.lhs.false, %if.end8 %y.058 = phi ptr [ %y.0.ph, %if.end8 ], [ %z, %lor.lhs.false ] %x.054 = phi ptr [ %3, %if.end8 ], [ %0, %lor.lhs.false ] %parent = getelementptr inbounds %struct.node, ptr %y.058, i64 0, i32 2 %4 = load ptr, ptr %parent, align 8, !tbaa !16 %parent11 = getelementptr inbounds %struct.node, ptr %x.054, i64 0, i32 2 store ptr %4, ptr %parent11, align 8, !tbaa !16 br label %if.end12 if.end12: ; preds = %if.then10, %if.end8 %y.060 = phi ptr [ %y.058, %if.then10 ], [ %y.0.ph, %if.end8 ] %x.055 = phi ptr [ %x.054, %if.then10 ], [ null, %if.end8 ] %parent13 = getelementptr inbounds %struct.node, ptr %y.060, i64 0, i32 2 %5 = load ptr, ptr %parent13, align 8, !tbaa !16 %cmp14 = icmp eq ptr %5, null br i1 %cmp14, label %if.end27, label %if.else16 if.else16: ; preds = %if.end12 %left18 = getelementptr inbounds %struct.node, ptr %5, i64 0, i32 1 %6 = load ptr, ptr %left18, align 8, !tbaa !18 %cmp19 = icmp eq ptr %y.060, %6 %left18. = select i1 %cmp19, ptr %left18, ptr %5 br label %if.end27 if.end27: ; preds = %if.else16, %if.end12 %left18.sink = phi ptr [ @root, %if.end12 ], [ %left18., %if.else16 ] store ptr %x.055, ptr %left18.sink, align 8, !tbaa !10 %cmp28.not = icmp eq ptr %y.060, %z br i1 %cmp28.not, label %if.end31, label %if.then29 if.then29: ; preds = %if.end27 %key = getelementptr inbounds %struct.node, ptr %y.060, i64 0, i32 3 %7 = load i32, ptr %key, align 8, !tbaa !12 %key30 = getelementptr inbounds %struct.node, ptr %z, i64 0, i32 3 store i32 %7, ptr %key30, align 8, !tbaa !12 br label %if.end31 if.end31: ; preds = %if.then29, %if.end27 ret void } ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #6 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree norecurse nosync nounwind memory(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 = { nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree nounwind } attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #8 = { nounwind } attributes #9 = { nounwind allocsize(0) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = !{!11, !11, i64 0} !11 = !{!"any pointer", !7, i64 0} !12 = !{!13, !6, i64 24} !13 = !{!"node", !11, i64 0, !11, i64 8, !11, i64 16, !6, i64 24} !14 = distinct !{!14, !15} !15 = !{!"llvm.loop.mustprogress"} !16 = !{!13, !11, i64 16} !17 = distinct !{!17, !15} !18 = !{!13, !11, i64 8} !19 = !{!13, !11, i64 0} !20 = distinct !{!20, !15} !21 = distinct !{!21, !15}
#include<stdio.h> int main(){ int n,j,x,sum; double i; scanf("%d",&n); for(j=0;j<n;j++){ scanf("%d",&x); for(sum=1;;sum++){ for(i=1;i<=sum;i++){ if(i*100/sum==x) goto c; } } c:printf("%d\n",sum); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21210/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21210/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %x = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp25 = icmp sgt i32 %0, 0 br i1 %cmp25, label %for.body, label %for.end16 for.body: ; preds = %entry, %c %j.026 = phi i32 [ %inc15, %c ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %1 = load i32, ptr %x, align 4 %conv8 = sitofp i32 %1 to double br label %for.body6.preheader for.body6.preheader: ; preds = %for.body, %for.inc11 %sum.0 = phi i32 [ 1, %for.body ], [ %inc12, %for.inc11 ] %conv = sitofp i32 %sum.0 to double br label %for.body6 for.body6: ; preds = %for.body6.preheader, %for.inc %i.024 = phi double [ %inc, %for.inc ], [ 1.000000e+00, %for.body6.preheader ] %mul = fmul double %i.024, 1.000000e+02 %div = fdiv double %mul, %conv %cmp9 = fcmp oeq double %div, %conv8 br i1 %cmp9, label %c, label %for.inc for.inc: ; preds = %for.body6 %inc = fadd double %i.024, 1.000000e+00 %cmp4 = fcmp ugt double %inc, %conv br i1 %cmp4, label %for.inc11, label %for.body6, !llvm.loop !9 for.inc11: ; preds = %for.inc %inc12 = add nuw nsw i32 %sum.0, 1 br label %for.body6.preheader c: ; preds = %for.body6 %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0) %inc15 = add nuw nsw i32 %j.026, 1 %2 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc15, %2 br i1 %cmp, label %for.body, label %for.end16, !llvm.loop !11 for.end16: ; preds = %c, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> typedef struct{ int k, l, r; }node; node nodes[500001]; void insert(int index, int z) { int x = 0, y; nodes[index].k = z; nodes[index].l = -1; nodes[index].r = -1; if(index == 0) return ; while(x >= 0){ y = x; if(z < nodes[x].k){ x = nodes[x].l; }else{ x = nodes[x].r; } } if(z < nodes[y].k) nodes[y].l = index; else nodes[y].r = index; } void pre(int id) { if(id == -1) return ; printf(" %d", nodes[id].k); pre(nodes[id].l); pre(nodes[id].r); } void ino(int id) { if(id == -1) return ; ino(nodes[id].l); printf(" %d", nodes[id].k); ino(nodes[id].r); } int main(void) { int i, n; int index = 0, z; char buf[16]; scanf("%d", &n); for(i = 0; i < n; i++){ scanf("%s", buf); if(buf[0] == 'i'){ scanf("%d", &z); insert(index++, z); }else{ if(index > 0){ ino(0); printf("\n"); pre(0); printf("\n"); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212150/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212150/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { i32, i32, i32 } @nodes = dso_local local_unnamed_addr global [500001 x %struct.node] zeroinitializer, align 16 @.str = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable define dso_local void @insert(i32 noundef %index, i32 noundef %z) local_unnamed_addr #0 { entry: %idxprom = sext i32 %index to i64 %arrayidx = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom store i32 %z, ptr %arrayidx, align 4, !tbaa !5 %l = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom, i32 1 store i32 -1, ptr %l, align 4, !tbaa !10 %r = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom, i32 2 store i32 -1, ptr %r, align 4, !tbaa !11 %cmp = icmp eq i32 %index, 0 br i1 %cmp, label %cleanup, label %while.body while.body: ; preds = %entry, %while.body %x.045 = phi i32 [ %x.1, %while.body ], [ 0, %entry ] %idxprom6 = zext i32 %x.045 to i64 %arrayidx7 = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom6 %0 = load i32, ptr %arrayidx7, align 4, !tbaa !5 %cmp9 = icmp sgt i32 %0, %z %l13 = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom6, i32 1 %r16 = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom6, i32 2 %x.1.in = select i1 %cmp9, ptr %l13, ptr %r16 %x.1 = load i32, ptr %x.1.in, align 4, !tbaa !12 %cmp5 = icmp sgt i32 %x.1, -1 br i1 %cmp5, label %while.body, label %while.end, !llvm.loop !13 while.end: ; preds = %while.body %l13.r16 = select i1 %cmp9, ptr %l13, ptr %r16 store i32 %index, ptr %l13.r16, align 4, !tbaa !12 br label %cleanup cleanup: ; preds = %while.end, %entry ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local void @pre(i32 noundef %id) local_unnamed_addr #2 { entry: %cmp8 = icmp eq i32 %id, -1 br i1 %cmp8, label %return, label %if.end if.end: ; preds = %entry, %if.end %id.tr9 = phi i32 [ %2, %if.end ], [ %id, %entry ] %idxprom = sext i32 %id.tr9 to i64 %arrayidx = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) %l = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom, i32 1 %1 = load i32, ptr %l, align 4, !tbaa !10 tail call void @pre(i32 noundef %1) %r = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom, i32 2 %2 = load i32, ptr %r, align 4, !tbaa !11 %cmp = icmp eq i32 %2, -1 br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind uwtable define dso_local void @ino(i32 noundef %id) local_unnamed_addr #2 { entry: %cmp8 = icmp eq i32 %id, -1 br i1 %cmp8, label %return, label %if.end if.end: ; preds = %entry, %if.end %id.tr9 = phi i32 [ %2, %if.end ], [ %id, %entry ] %idxprom = sext i32 %id.tr9 to i64 %arrayidx = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom %l = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom, i32 1 %0 = load i32, ptr %l, align 4, !tbaa !10 tail call void @ino(i32 noundef %0) %1 = load i32, ptr %arrayidx, align 4, !tbaa !5 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %1) %r = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom, i32 2 %2 = load i32, ptr %r, align 4, !tbaa !11 %cmp = icmp eq i32 %2, -1 br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %n = alloca i32, align 4 %z = alloca i32, align 4 %buf = alloca [16 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %z) #5 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %buf) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !12 %cmp15 = icmp sgt i32 %0, 0 br i1 %cmp15, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %index.017 = phi i32 [ %index.1, %for.inc ], [ 0, %entry ] %i.016 = phi i32 [ %inc11, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %buf) %1 = load i8, ptr %buf, align 16, !tbaa !15 %cmp2 = icmp eq i8 %1, 105 br i1 %cmp2, label %if.then, label %if.else if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %z) %inc = add nsw i32 %index.017, 1 %2 = load i32, ptr %z, align 4, !tbaa !12 %idxprom.i = sext i32 %index.017 to i64 %arrayidx.i = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom.i store i32 %2, ptr %arrayidx.i, align 4, !tbaa !5 %l.i = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom.i, i32 1 store i32 -1, ptr %l.i, align 4, !tbaa !10 %r.i = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom.i, i32 2 store i32 -1, ptr %r.i, align 4, !tbaa !11 %cmp.i = icmp eq i32 %index.017, 0 br i1 %cmp.i, label %for.inc, label %while.body.i while.body.i: ; preds = %if.then, %while.body.i %x.045.i = phi i32 [ %x.1.i, %while.body.i ], [ 0, %if.then ] %idxprom6.i = zext i32 %x.045.i to i64 %arrayidx7.i = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom6.i %3 = load i32, ptr %arrayidx7.i, align 4, !tbaa !5 %cmp9.i = icmp sgt i32 %3, %2 %l13.i = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom6.i, i32 1 %r16.i = getelementptr inbounds [500001 x %struct.node], ptr @nodes, i64 0, i64 %idxprom6.i, i32 2 %x.1.in.i = select i1 %cmp9.i, ptr %l13.i, ptr %r16.i %x.1.i = load i32, ptr %x.1.in.i, align 4, !tbaa !12 %cmp5.i = icmp sgt i32 %x.1.i, -1 br i1 %cmp5.i, label %while.body.i, label %while.end.i, !llvm.loop !13 while.end.i: ; preds = %while.body.i store i32 %index.017, ptr %x.1.in.i, align 4, !tbaa !12 br label %for.inc if.else: ; preds = %for.body %cmp5 = icmp sgt i32 %index.017, 0 br i1 %cmp5, label %if.then7, label %for.inc if.then7: ; preds = %if.else call void @ino(i32 noundef 0) %putchar = call i32 @putchar(i32 10) call void @pre(i32 noundef 0) %putchar14 = call i32 @putchar(i32 10) br label %for.inc for.inc: ; preds = %while.end.i, %if.then, %if.then7, %if.else %index.1 = phi i32 [ %index.017, %if.then7 ], [ %index.017, %if.else ], [ 1, %if.then ], [ %inc, %while.end.i ] %inc11 = add nuw nsw i32 %i.016, 1 %4 = load i32, ptr %n, align 4, !tbaa !12 %cmp = icmp slt i32 %inc11, %4 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !16 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %buf) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %z) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 attributes #0 = { nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !7, i64 0} !6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8} !7 = !{!"int", !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{!6, !7, i64 4} !11 = !{!6, !7, i64 8} !12 = !{!7, !7, i64 0} !13 = distinct !{!13, !14} !14 = !{!"llvm.loop.mustprogress"} !15 = !{!8, !8, i64 0} !16 = distinct !{!16, !14}
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ struct node *left; struct node *right; struct node *parent; int key; }; struct node *T; void Insert(int); void Inorder(struct node*); void Preorder(struct node*); void Free(struct node*); int main(){ int n, i, key; char func[6]; T = (struct node *)malloc(sizeof(struct node) * 1); T->parent = T->left = T->right = NULL; T->key = -1; scanf("%d",&n); for(i=0; i<n; i++){ scanf("%s",&func); if(strcmp(func,"insert") == 0){ scanf("%d",&key); Insert(key); } else if(strcmp(func,"print") == 0){ Inorder(T); printf("\n"); Preorder(T); printf("\n"); } } Free(T); return 0; } void Inorder(struct node* X){ if(X != NULL){ Inorder(X->left); printf(" %d",X->key); Inorder(X->right); } } void Preorder(struct node* X){ if(X != NULL){ printf(" %d",X->key); Preorder(X->left); Preorder(X->right); } } void Free(struct node* X){ if(X != NULL){ Free(X->left); Free(X->right); free(X); } } void Insert(int key){ struct node *x, *y, *S; if(T->key == -1){ T->key = key; return; } S = (struct node *)malloc(sizeof(struct node) * 1); S->key = key; S->parent = S->left = S->right = NULL; x = T; while(x != NULL){ y = x; if(key < x->key) x = x->left; else x = x->right; } S->parent = y; if(S->key < y->key) y->left = S; else y->right = S; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212194/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212194/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ptr, ptr, i32 } @T = dso_local local_unnamed_addr global ptr null, align 8 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"insert\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"print\00", align 1 @.str.5 = private unnamed_addr constant [4 x i8] c" %d\00", align 1 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %key = alloca i32, align 4 %func = alloca [6 x i8], align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #10 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %key) #10 call void @llvm.lifetime.start.p0(i64 6, ptr nonnull %func) #10 %call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #11 store ptr %call, ptr @T, align 8, !tbaa !5 %key1 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 3 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %call, i8 0, i64 24, i1 false) store i32 -1, ptr %key1, align 8, !tbaa !9 %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !12 %cmp16 = icmp sgt i32 %0, 0 br i1 %cmp16, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.017 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %func) %call4 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %func, ptr noundef nonnull dereferenceable(7) @.str.2) #12 %cmp5 = icmp eq i32 %call4, 0 br i1 %cmp5, label %if.then, label %if.else if.then: ; preds = %for.body %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %key) %1 = load i32, ptr %key, align 4, !tbaa !12 %2 = load ptr, ptr @T, align 8, !tbaa !5 %key1.i = getelementptr inbounds %struct.node, ptr %2, i64 0, i32 3 %3 = load i32, ptr %key1.i, align 8, !tbaa !9 %cmp.i = icmp eq i32 %3, -1 br i1 %cmp.i, label %if.then.i, label %while.body.preheader.i if.then.i: ; preds = %if.then store i32 %1, ptr %key1.i, align 8, !tbaa !9 br label %for.inc while.body.preheader.i: ; preds = %if.then %call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #11 %key3.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 3 store i32 %1, ptr %key3.i, align 8, !tbaa !9 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call.i, i8 0, i64 16, i1 false) br label %while.body.i while.body.i: ; preds = %while.body.i, %while.body.preheader.i %x.040.i = phi ptr [ %x.0.i, %while.body.i ], [ %2, %while.body.preheader.i ] %key5.i = getelementptr inbounds %struct.node, ptr %x.040.i, i64 0, i32 3 %4 = load i32, ptr %key5.i, align 8, !tbaa !9 %cmp6.i = icmp sgt i32 %4, %1 %right9.i = getelementptr inbounds %struct.node, ptr %x.040.i, i64 0, i32 1 %x.1.in.i = select i1 %cmp6.i, ptr %x.040.i, ptr %right9.i %x.0.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !5 %cmp4.not.i = icmp eq ptr %x.0.i, null br i1 %cmp4.not.i, label %while.end.i, label %while.body.i, !llvm.loop !13 while.end.i: ; preds = %while.body.i %parent.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2 store ptr %x.040.i, ptr %parent.i, align 8, !tbaa !15 br i1 %cmp6.i, label %if.then15.i, label %if.else17.i if.then15.i: ; preds = %while.end.i store ptr %call.i, ptr %x.040.i, align 8, !tbaa !16 br label %for.inc if.else17.i: ; preds = %while.end.i store ptr %call.i, ptr %right9.i, align 8, !tbaa !17 br label %for.inc if.else: ; preds = %for.body %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(6) %func, ptr noundef nonnull dereferenceable(6) @.str.3, i64 6) %cmp9 = icmp eq i32 %bcmp, 0 br i1 %cmp9, label %if.then10, label %for.inc if.then10: ; preds = %if.else %5 = load ptr, ptr @T, align 8, !tbaa !5 call void @Inorder(ptr noundef %5) %putchar = call i32 @putchar(i32 10) %6 = load ptr, ptr @T, align 8, !tbaa !5 call void @Preorder(ptr noundef %6) %putchar15 = call i32 @putchar(i32 10) br label %for.inc for.inc: ; preds = %if.else17.i, %if.then15.i, %if.then.i, %if.then10, %if.else %inc = add nuw nsw i32 %i.017, 1 %7 = load i32, ptr %n, align 4, !tbaa !12 %cmp = icmp slt i32 %inc, %7 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !18 for.end: ; preds = %for.inc, %entry %8 = load ptr, ptr @T, align 8, !tbaa !5 call void @Free(ptr noundef %8) call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %func) #10 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %key) #10 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #10 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: nofree nounwind uwtable define dso_local void @Insert(i32 noundef %key) local_unnamed_addr #5 { entry: %0 = load ptr, ptr @T, align 8, !tbaa !5 %key1 = getelementptr inbounds %struct.node, ptr %0, i64 0, i32 3 %1 = load i32, ptr %key1, align 8, !tbaa !9 %cmp = icmp eq i32 %1, -1 br i1 %cmp, label %if.then, label %while.body.preheader if.then: ; preds = %entry store i32 %key, ptr %key1, align 8, !tbaa !9 br label %cleanup while.body.preheader: ; preds = %entry %call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #11 %key3 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 3 store i32 %key, ptr %key3, align 8, !tbaa !9 %parent = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call, i8 0, i64 16, i1 false) br label %while.body while.body: ; preds = %while.body.preheader, %while.body %x.040 = phi ptr [ %x.0, %while.body ], [ %0, %while.body.preheader ] %key5 = getelementptr inbounds %struct.node, ptr %x.040, i64 0, i32 3 %2 = load i32, ptr %key5, align 8, !tbaa !9 %cmp6 = icmp sgt i32 %2, %key %right9 = getelementptr inbounds %struct.node, ptr %x.040, i64 0, i32 1 %x.1.in = select i1 %cmp6, ptr %x.040, ptr %right9 %x.0 = load ptr, ptr %x.1.in, align 8, !tbaa !5 %cmp4.not = icmp eq ptr %x.0, null br i1 %cmp4.not, label %while.end, label %while.body, !llvm.loop !13 while.end: ; preds = %while.body store ptr %x.040, ptr %parent, align 8, !tbaa !15 %cmp14 = icmp sgt i32 %2, %key br i1 %cmp14, label %if.then15, label %if.else17 if.then15: ; preds = %while.end store ptr %call, ptr %x.040, align 8, !tbaa !16 br label %cleanup if.else17: ; preds = %while.end %right18 = getelementptr inbounds %struct.node, ptr %x.040, i64 0, i32 1 store ptr %call, ptr %right18, align 8, !tbaa !17 br label %cleanup cleanup: ; preds = %if.then15, %if.else17, %if.then ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @Inorder(ptr noundef readonly %X) local_unnamed_addr #5 { entry: %cmp.not4 = icmp eq ptr %X, null br i1 %cmp.not4, label %if.end, label %if.then if.then: ; preds = %entry, %if.then %X.tr5 = phi ptr [ %2, %if.then ], [ %X, %entry ] %0 = load ptr, ptr %X.tr5, align 8, !tbaa !16 tail call void @Inorder(ptr noundef %0) %key = getelementptr inbounds %struct.node, ptr %X.tr5, i64 0, i32 3 %1 = load i32, ptr %key, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %1) %right = getelementptr inbounds %struct.node, ptr %X.tr5, i64 0, i32 1 %2 = load ptr, ptr %right, align 8, !tbaa !17 %cmp.not = icmp eq ptr %2, null br i1 %cmp.not, label %if.end, label %if.then if.end: ; preds = %if.then, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind uwtable define dso_local void @Preorder(ptr noundef readonly %X) local_unnamed_addr #5 { entry: %cmp.not4 = icmp eq ptr %X, null br i1 %cmp.not4, label %if.end, label %if.then if.then: ; preds = %entry, %if.then %X.tr5 = phi ptr [ %2, %if.then ], [ %X, %entry ] %key = getelementptr inbounds %struct.node, ptr %X.tr5, i64 0, i32 3 %0 = load i32, ptr %key, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %0) %1 = load ptr, ptr %X.tr5, align 8, !tbaa !16 tail call void @Preorder(ptr noundef %1) %right = getelementptr inbounds %struct.node, ptr %X.tr5, i64 0, i32 1 %2 = load ptr, ptr %right, align 8, !tbaa !17 %cmp.not = icmp eq ptr %2, null br i1 %cmp.not, label %if.end, label %if.then if.end: ; preds = %if.then, %entry ret void } ; Function Attrs: nounwind uwtable define dso_local void @Free(ptr noundef %X) local_unnamed_addr #0 { entry: %cmp.not = icmp eq ptr %X, null br i1 %cmp.not, label %common.ret4, label %if.then common.ret4: ; preds = %entry, %if.then ret void if.then: ; preds = %entry %0 = load ptr, ptr %X, align 8, !tbaa !16 tail call void @Free(ptr noundef %0) %right = getelementptr inbounds %struct.node, ptr %X, i64 0, i32 1 %1 = load ptr, ptr %right, align 8, !tbaa !17 tail call void @Free(ptr noundef %1) tail call void @free(ptr noundef nonnull %X) #10 br label %common.ret4 } ; 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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #6 ; Function Attrs: nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #7 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #8 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #9 attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { nofree nounwind willreturn memory(argmem: read) } attributes #8 = { nofree nounwind } attributes #9 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #10 = { nounwind } attributes #11 = { nounwind allocsize(0) } attributes #12 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !11, i64 24} !10 = !{!"node", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24} !11 = !{!"int", !7, i64 0} !12 = !{!11, !11, i64 0} !13 = distinct !{!13, !14} !14 = !{!"llvm.loop.mustprogress"} !15 = !{!10, !6, i64 16} !16 = !{!10, !6, i64 0} !17 = !{!10, !6, i64 8} !18 = distinct !{!18, !14}
#include<stdio.h> #include<string.h> #include<stdlib.h> struct Node{ int key; struct Node *right,*left,*parent; }; struct Node *root,*NIL; void insert(int k) { struct Node *y=NIL; struct Node *x=root; struct Node *z; z=(struct Node*)malloc(sizeof(struct Node)); z->key=k; z->left=NIL; z->right=NIL; while(x!=NIL){ y=x; if(z->key<x->key){ x=x->left; } else{ x=x->right; } } z->parent=y; if(y==NIL) { root=z; } else{ if(z->key<y->key){ y->left=z; } else{ y->right=z; } } } void inorder(struct Node *u){ if(u==NIL) return; inorder(u->left); printf(" %d",u->key); inorder(u->right); } void preorder(struct Node *u){ if(u==NIL) return ; printf(" %d",u->key); preorder(u->left); preorder(u->right); } int main() { int n,i,x; char com[20]; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%s",com); if(strcmp(com,"insert")==0){ scanf("%d",&x); insert(x); } else if(strcmp(com,"print")==0){ inorder(root); printf("\n"); preorder(root); printf("\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212237/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212237/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ptr, ptr, ptr } @NIL = dso_local local_unnamed_addr global ptr null, align 8 @root = dso_local local_unnamed_addr global ptr null, align 8 @.str = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.3 = private unnamed_addr constant [7 x i8] c"insert\00", align 1 @.str.4 = private unnamed_addr constant [6 x i8] c"print\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local void @insert(i32 noundef %k) local_unnamed_addr #0 { entry: %0 = load ptr, ptr @NIL, align 8, !tbaa !5 %1 = load ptr, ptr @root, align 8, !tbaa !5 %call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #6 store i32 %k, ptr %call, align 8, !tbaa !9 %left = getelementptr inbounds %struct.Node, ptr %call, i64 0, i32 2 store ptr %0, ptr %left, align 8, !tbaa !12 %right = getelementptr inbounds %struct.Node, ptr %call, i64 0, i32 1 store ptr %0, ptr %right, align 8, !tbaa !13 %cmp.not34 = icmp eq ptr %1, %0 br i1 %cmp.not34, label %while.end.thread, label %while.body while.end.thread: ; preds = %entry %parent37 = getelementptr inbounds %struct.Node, ptr %call, i64 0, i32 3 store ptr %0, ptr %parent37, align 8, !tbaa !14 br label %if.end17 while.body: ; preds = %entry, %while.body %x.035 = phi ptr [ %x.1, %while.body ], [ %1, %entry ] %2 = load i32, ptr %x.035, align 8, !tbaa !9 %cmp3 = icmp sgt i32 %2, %k %left4 = getelementptr inbounds %struct.Node, ptr %x.035, i64 0, i32 2 %right5 = getelementptr inbounds %struct.Node, ptr %x.035, i64 0, i32 1 %x.1.in = select i1 %cmp3, ptr %left4, ptr %right5 %x.1 = load ptr, ptr %x.1.in, align 8, !tbaa !5 %cmp.not = icmp eq ptr %x.1, %0 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !15 while.end: ; preds = %while.body %parent = getelementptr inbounds %struct.Node, ptr %call, i64 0, i32 3 store ptr %x.035, ptr %parent, align 8, !tbaa !14 %cmp6 = icmp eq ptr %x.035, %0 br i1 %cmp6, label %if.end17, label %if.else8 if.else8: ; preds = %while.end %3 = load i32, ptr %x.035, align 8, !tbaa !9 %cmp11 = icmp sgt i32 %3, %k br i1 %cmp11, label %if.then12, label %if.else14 if.then12: ; preds = %if.else8 %left13 = getelementptr inbounds %struct.Node, ptr %x.035, i64 0, i32 2 br label %if.end17 if.else14: ; preds = %if.else8 %right15 = getelementptr inbounds %struct.Node, ptr %x.035, i64 0, i32 1 br label %if.end17 if.end17: ; preds = %while.end, %while.end.thread, %if.then12, %if.else14 %left13.sink = phi ptr [ %left13, %if.then12 ], [ %right15, %if.else14 ], [ @root, %while.end.thread ], [ @root, %while.end ] store ptr %call, ptr %left13.sink, align 8, !tbaa !5 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local void @inorder(ptr noundef readonly %u) local_unnamed_addr #0 { entry: %0 = load ptr, ptr @NIL, align 8, !tbaa !5 %cmp4 = icmp eq ptr %0, %u br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %u.tr5 = phi ptr [ %3, %if.end ], [ %u, %entry ] %left = getelementptr inbounds %struct.Node, ptr %u.tr5, i64 0, i32 2 %1 = load ptr, ptr %left, align 8, !tbaa !12 tail call void @inorder(ptr noundef %1) %2 = load i32, ptr %u.tr5, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %2) %right = getelementptr inbounds %struct.Node, ptr %u.tr5, i64 0, i32 1 %3 = load ptr, ptr %right, align 8, !tbaa !13 %4 = load ptr, ptr @NIL, align 8, !tbaa !5 %cmp = icmp eq ptr %4, %3 br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind uwtable define dso_local void @preorder(ptr noundef readonly %u) local_unnamed_addr #0 { entry: %0 = load ptr, ptr @NIL, align 8, !tbaa !5 %cmp4 = icmp eq ptr %0, %u br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %u.tr5 = phi ptr [ %3, %if.end ], [ %u, %entry ] %1 = load i32, ptr %u.tr5, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %1) %left = getelementptr inbounds %struct.Node, ptr %u.tr5, i64 0, i32 2 %2 = load ptr, ptr %left, align 8, !tbaa !12 tail call void @preorder(ptr noundef %2) %right = getelementptr inbounds %struct.Node, ptr %u.tr5, i64 0, i32 1 %3 = load ptr, ptr %right, align 8, !tbaa !13 %4 = load ptr, ptr @NIL, align 8, !tbaa !5 %cmp = icmp eq ptr %4, %3 br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %com = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #7 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #7 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %com) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !17 %cmp17 = icmp sgt i32 %0, 0 br i1 %cmp17, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.018 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %com) %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(7) %com, ptr noundef nonnull dereferenceable(7) @.str.3, i64 7) %cmp4 = icmp eq i32 %bcmp, 0 br i1 %cmp4, label %if.then, label %if.else if.then: ; preds = %for.body %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %1 = load i32, ptr %x, align 4, !tbaa !17 %2 = load ptr, ptr @NIL, align 8, !tbaa !5 %3 = load ptr, ptr @root, align 8, !tbaa !5 %call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #6 store i32 %1, ptr %call.i, align 8, !tbaa !9 %left.i = getelementptr inbounds %struct.Node, ptr %call.i, i64 0, i32 2 store ptr %2, ptr %left.i, align 8, !tbaa !12 %right.i = getelementptr inbounds %struct.Node, ptr %call.i, i64 0, i32 1 store ptr %2, ptr %right.i, align 8, !tbaa !13 %cmp.not34.i = icmp eq ptr %3, %2 br i1 %cmp.not34.i, label %while.end.thread.i, label %while.body.i while.end.thread.i: ; preds = %if.then %parent37.i = getelementptr inbounds %struct.Node, ptr %call.i, i64 0, i32 3 store ptr %2, ptr %parent37.i, align 8, !tbaa !14 br label %insert.exit while.body.i: ; preds = %if.then, %while.body.i %x.035.i = phi ptr [ %x.1.i, %while.body.i ], [ %3, %if.then ] %4 = load i32, ptr %x.035.i, align 8, !tbaa !9 %cmp3.i = icmp sgt i32 %4, %1 %left4.i = getelementptr inbounds %struct.Node, ptr %x.035.i, i64 0, i32 2 %right5.i = getelementptr inbounds %struct.Node, ptr %x.035.i, i64 0, i32 1 %x.1.in.i = select i1 %cmp3.i, ptr %left4.i, ptr %right5.i %x.1.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !5 %cmp.not.i = icmp eq ptr %x.1.i, %2 br i1 %cmp.not.i, label %while.end.i, label %while.body.i, !llvm.loop !15 while.end.i: ; preds = %while.body.i %parent.i = getelementptr inbounds %struct.Node, ptr %call.i, i64 0, i32 3 store ptr %x.035.i, ptr %parent.i, align 8, !tbaa !14 %cmp6.i = icmp eq ptr %x.035.i, %2 %spec.select16 = select i1 %cmp6.i, ptr @root, ptr %x.1.in.i br label %insert.exit insert.exit: ; preds = %while.end.i, %while.end.thread.i %left13.sink.i = phi ptr [ @root, %while.end.thread.i ], [ %spec.select16, %while.end.i ] store ptr %call.i, ptr %left13.sink.i, align 8, !tbaa !5 br label %for.inc if.else: ; preds = %for.body %bcmp14 = call i32 @bcmp(ptr noundef nonnull dereferenceable(6) %com, ptr noundef nonnull dereferenceable(6) @.str.4, i64 6) %cmp8 = icmp eq i32 %bcmp14, 0 br i1 %cmp8, label %if.then9, label %for.inc if.then9: ; preds = %if.else %5 = load ptr, ptr @root, align 8, !tbaa !5 call void @inorder(ptr noundef %5) %putchar = call i32 @putchar(i32 10) %6 = load ptr, ptr @root, align 8, !tbaa !5 call void @preorder(ptr noundef %6) %putchar15 = call i32 @putchar(i32 10) br label %for.inc for.inc: ; preds = %insert.exit, %if.then9, %if.else %inc = add nuw nsw i32 %i.018, 1 %7 = load i32, ptr %n, align 4, !tbaa !17 %cmp = icmp slt i32 %inc, %7 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !18 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %com) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #7 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #5 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind willreturn memory(argmem: read) } attributes #5 = { nofree nounwind } attributes #6 = { nounwind allocsize(0) } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !11, i64 0} !10 = !{!"Node", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24} !11 = !{!"int", !7, i64 0} !12 = !{!10, !6, i64 16} !13 = !{!10, !6, i64 8} !14 = !{!10, !6, i64 24} !15 = distinct !{!15, !16} !16 = !{!"llvm.loop.mustprogress"} !17 = !{!11, !11, i64 0} !18 = distinct !{!18, !16}
#include<stdio.h> #include<stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeMinimum(Node x){ } Node treeMaximum(Node x){ } Node treeSearch(Node u, int k){ } Node treeSuccessor(Node x){ } void treeDelete(Node z){ Node y; // node to be deleted Node x; // child of y } void insert(int k){ Node y = NIL; Node x = root; Node z; z = malloc(sizeof(struct node)); z->key = k; z->left = NIL; z->right = NIL; while(x!=NIL){ y=x; if(z->key<x->key) x = x->left; else x = x->right; } z->parent = y; if(y==NIL) root = z; else if(z->key<y->key) y->left = z; else y->right = z; } void inorder(Node u){ if(u==NIL) return; inorder(u->left); printf(" %d",u->key); inorder(u->right); } void preorder(Node u){ if(u==NIL) return; printf(" %d",u->key); preorder(u->left); preorder(u->right); } int main(){ int n, i, x; char com[20]; scanf("%d", &n); for ( i = 0; i < n; i++ ){ scanf("%s", com); if ( com[0] == 'f' ){ scanf("%d", &x); Node t = treeSearch(root, x); if ( t != NIL ) printf("yes\n"); else printf("no\n"); } else if ( com[0] == 'i' ){ scanf("%d", &x); insert(x); } else if ( com[0] == 'p' ){ inorder(root); printf("\n"); preorder(root); printf("\n"); } else if ( com[0] == 'd' ){ scanf("%d", &x); treeDelete(treeSearch(root, x)); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212288/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212288/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ptr, ptr, i32 } @root = dso_local local_unnamed_addr global ptr null, align 8 @.str = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local noalias ptr @treeMinimum(ptr nocapture noundef readnone %x) local_unnamed_addr #0 { entry: ret ptr undef } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local noalias ptr @treeMaximum(ptr nocapture noundef readnone %x) local_unnamed_addr #0 { entry: ret ptr undef } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local noalias ptr @treeSearch(ptr nocapture noundef readnone %u, i32 noundef %k) local_unnamed_addr #0 { entry: ret ptr undef } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local noalias ptr @treeSuccessor(ptr nocapture noundef readnone %x) local_unnamed_addr #0 { entry: ret ptr undef } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local void @treeDelete(ptr nocapture noundef readnone %z) local_unnamed_addr #0 { entry: ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local void @insert(i32 noundef %k) local_unnamed_addr #2 { entry: %0 = load ptr, ptr @root, align 8, !tbaa !5 %call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7 %key = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 3 store i32 %k, ptr %key, align 8, !tbaa !9 %cmp.not34 = icmp eq ptr %0, null tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call, i8 0, i64 16, i1 false) br i1 %cmp.not34, label %if.then7, label %while.body while.body: ; preds = %entry, %while.body %x.035 = phi ptr [ %x.1, %while.body ], [ %0, %entry ] %key2 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %1 = load i32, ptr %key2, align 8, !tbaa !9 %cmp3 = icmp sgt i32 %1, %k %left4 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %x.1.in = select i1 %cmp3, ptr %left4, ptr %x.035 %x.1 = load ptr, ptr %x.1.in, align 8, !tbaa !5 %cmp.not = icmp eq ptr %x.1, null br i1 %cmp.not, label %if.else8, label %while.body, !llvm.loop !12 if.then7: ; preds = %entry %parent37 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr null, ptr %parent37, align 8, !tbaa !14 br label %if.end17 if.else8: ; preds = %while.body %parent = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr %x.035, ptr %parent, align 8, !tbaa !14 %key10 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %2 = load i32, ptr %key10, align 8, !tbaa !9 %cmp11 = icmp sgt i32 %2, %k %left13 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %spec.select = select i1 %cmp11, ptr %left13, ptr %x.035 br label %if.end17 if.end17: ; preds = %if.else8, %if.then7 %left13.sink = phi ptr [ @root, %if.then7 ], [ %spec.select, %if.else8 ] store ptr %call, ptr %left13.sink, align 8, !tbaa !5 ret void } ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind uwtable define dso_local void @inorder(ptr noundef readonly %u) local_unnamed_addr #2 { entry: %cmp4 = icmp eq ptr %u, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %u.tr5 = phi ptr [ %2, %if.end ], [ %u, %entry ] %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !15 tail call void @inorder(ptr noundef %0) %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %1 = load i32, ptr %key, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !16 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind uwtable define dso_local void @preorder(ptr noundef readonly %u) local_unnamed_addr #2 { entry: %cmp4 = icmp eq ptr %u, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %u.tr5 = phi ptr [ %2, %if.end ], [ %u, %entry ] %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %0 = load i32, ptr %key, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %1 = load ptr, ptr %left, align 8, !tbaa !15 tail call void @preorder(ptr noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !16 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %com = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #8 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #8 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %com) #8 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !17 %cmp40 = icmp sgt i32 %0, 0 br i1 %cmp40, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.041 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %com) %1 = load i8, ptr %com, align 16, !tbaa !18 switch i8 %1, label %for.inc [ i8 102, label %if.then i8 105, label %if.then16 i8 112, label %if.then23 i8 100, label %if.then31 ] if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) br label %for.inc if.then16: ; preds = %for.body %call17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %2 = load i32, ptr %x, align 4, !tbaa !17 %3 = load ptr, ptr @root, align 8, !tbaa !5 %call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7 %key.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 3 store i32 %2, ptr %key.i, align 8, !tbaa !9 %cmp.not34.i = icmp eq ptr %3, null call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call.i, i8 0, i64 16, i1 false) br i1 %cmp.not34.i, label %insert.exit, label %while.body.i while.body.i: ; preds = %if.then16, %while.body.i %x.035.i = phi ptr [ %x.1.i, %while.body.i ], [ %3, %if.then16 ] %key2.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 3 %4 = load i32, ptr %key2.i, align 8, !tbaa !9 %cmp3.i = icmp sgt i32 %4, %2 %left4.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 1 %x.1.in.i = select i1 %cmp3.i, ptr %left4.i, ptr %x.035.i %x.1.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !5 %cmp.not.i = icmp eq ptr %x.1.i, null br i1 %cmp.not.i, label %insert.exit, label %while.body.i, !llvm.loop !12 insert.exit: ; preds = %while.body.i, %if.then16 %.sink = phi ptr [ null, %if.then16 ], [ %x.035.i, %while.body.i ] %left13.sink.i = phi ptr [ @root, %if.then16 ], [ %x.1.in.i, %while.body.i ] %parent37.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2 store ptr %.sink, ptr %parent37.i, align 8, !tbaa !14 store ptr %call.i, ptr %left13.sink.i, align 8, !tbaa !5 br label %for.inc if.then23: ; preds = %for.body %5 = load ptr, ptr @root, align 8, !tbaa !5 call void @inorder(ptr noundef %5) %putchar = call i32 @putchar(i32 10) %6 = load ptr, ptr @root, align 8, !tbaa !5 call void @preorder(ptr noundef %6) %putchar39 = call i32 @putchar(i32 10) br label %for.inc if.then31: ; preds = %for.body %call32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) br label %for.inc for.inc: ; preds = %for.body, %if.then, %if.then23, %if.then31, %insert.exit %inc = add nuw nsw i32 %i.041, 1 %7 = load i32, ptr %n, align 4, !tbaa !17 %cmp = icmp slt i32 %inc, %7 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !19 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %com) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #8 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #5 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind "no-trapping-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 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #7 = { nounwind allocsize(0) } attributes #8 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !11, i64 24} !10 = !{!"node", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24} !11 = !{!"int", !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"} !14 = !{!10, !6, i64 16} !15 = !{!10, !6, i64 8} !16 = !{!10, !6, i64 0} !17 = !{!11, !11, i64 0} !18 = !{!7, !7, i64 0} !19 = distinct !{!19, !13}
#include <stdio.h> #include <stdlib.h> typedef struct _node { struct _node *left, *right; int key; } node; node *root = NULL; void insert(int key) { node *new, **x; x = &root; while(*x != NULL) { if(key < (*x)->key) x = &(*x)->left; else if(key > (*x)->key) x = &(*x)->right; } new = (node *)malloc(sizeof(node)); new->left = NULL; new->right = NULL; new->key = key; *x = new; return; } void inorder(node *current) { if(current == NULL) return; inorder(current->left); printf(" %d", current->key); inorder(current->right); } void preorder(node *current) { if(current == NULL) return; printf(" %d", current->key); preorder(current->left); preorder(current->right); } void print() { inorder(root); printf("\n"); preorder(root); printf("\n"); } int main() { int i, n, key; char command[20]; scanf("%d", &n); for(i = 0;i < n;i++) { scanf("%s", command); switch(command[0]) { case 'i': scanf("%d", &key); insert(key); break; case 'p': print(); break; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212330/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212330/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct._node = type { ptr, ptr, i32 } @root = dso_local local_unnamed_addr global ptr null, align 8 @.str = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.3 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local void @insert(i32 noundef %key) local_unnamed_addr #0 { entry: %0 = load ptr, ptr @root, align 8, !tbaa !5 %cmp.not21 = icmp eq ptr %0, null br i1 %cmp.not21, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %1 = phi ptr [ %3, %while.body ], [ %0, %entry ] %x.022 = phi ptr [ %x.1, %while.body ], [ @root, %entry ] %key1 = getelementptr inbounds %struct._node, ptr %1, i64 0, i32 2 %2 = load i32, ptr %key1, align 8, !tbaa !9 %cmp2 = icmp sgt i32 %2, %key %cmp4 = icmp slt i32 %2, %key %right = getelementptr inbounds %struct._node, ptr %1, i64 0, i32 1 %spec.select = select i1 %cmp4, ptr %right, ptr %x.022 %x.1 = select i1 %cmp2, ptr %1, ptr %spec.select %3 = load ptr, ptr %x.1, align 8, !tbaa !5 %cmp.not = icmp eq ptr %3, null br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !12 while.end: ; preds = %while.body, %entry %x.0.lcssa = phi ptr [ @root, %entry ], [ %x.1, %while.body ] %call = tail call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #6 %key9 = getelementptr inbounds %struct._node, ptr %call, i64 0, i32 2 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call, i8 0, i64 16, i1 false) store i32 %key, ptr %key9, align 8, !tbaa !9 store ptr %call, ptr %x.0.lcssa, align 8, !tbaa !5 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local void @inorder(ptr noundef readonly %current) local_unnamed_addr #0 { entry: %cmp4 = icmp eq ptr %current, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %current.tr5 = phi ptr [ %2, %if.end ], [ %current, %entry ] %0 = load ptr, ptr %current.tr5, align 8, !tbaa !14 tail call void @inorder(ptr noundef %0) %key = getelementptr inbounds %struct._node, ptr %current.tr5, i64 0, i32 2 %1 = load i32, ptr %key, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %1) %right = getelementptr inbounds %struct._node, ptr %current.tr5, i64 0, i32 1 %2 = load ptr, ptr %right, align 8, !tbaa !15 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind uwtable define dso_local void @preorder(ptr noundef readonly %current) local_unnamed_addr #0 { entry: %cmp4 = icmp eq ptr %current, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %current.tr5 = phi ptr [ %2, %if.end ], [ %current, %entry ] %key = getelementptr inbounds %struct._node, ptr %current.tr5, i64 0, i32 2 %0 = load i32, ptr %key, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) %1 = load ptr, ptr %current.tr5, align 8, !tbaa !14 tail call void @preorder(ptr noundef %1) %right = getelementptr inbounds %struct._node, ptr %current.tr5, i64 0, i32 1 %2 = load ptr, ptr %right, align 8, !tbaa !15 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @print() local_unnamed_addr #0 { entry: %0 = load ptr, ptr @root, align 8, !tbaa !5 tail call void @inorder(ptr noundef %0) %putchar = tail call i32 @putchar(i32 10) %1 = load ptr, ptr @root, align 8, !tbaa !5 tail call void @preorder(ptr noundef %1) %putchar2 = tail call i32 @putchar(i32 10) ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %key = alloca i32, align 4 %command = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #7 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %key) #7 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %command) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !16 %cmp5 = icmp sgt i32 %0, 0 br i1 %cmp5, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.06 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %command) %1 = load i8, ptr %command, align 16, !tbaa !17 %conv = sext i8 %1 to i32 switch i32 %conv, label %for.inc [ i32 105, label %sw.bb i32 112, label %sw.bb3 ] sw.bb: ; preds = %for.body %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %key) %2 = load i32, ptr %key, align 4, !tbaa !16 %3 = load ptr, ptr @root, align 8, !tbaa !5 %cmp.not21.i = icmp eq ptr %3, null br i1 %cmp.not21.i, label %insert.exit, label %while.body.i while.body.i: ; preds = %sw.bb, %while.body.i %4 = phi ptr [ %6, %while.body.i ], [ %3, %sw.bb ] %x.022.i = phi ptr [ %x.1.i, %while.body.i ], [ @root, %sw.bb ] %key1.i = getelementptr inbounds %struct._node, ptr %4, i64 0, i32 2 %5 = load i32, ptr %key1.i, align 8, !tbaa !9 %cmp2.i = icmp sgt i32 %5, %2 %cmp4.i = icmp slt i32 %5, %2 %right.i = getelementptr inbounds %struct._node, ptr %4, i64 0, i32 1 %spec.select.i = select i1 %cmp4.i, ptr %right.i, ptr %x.022.i %x.1.i = select i1 %cmp2.i, ptr %4, ptr %spec.select.i %6 = load ptr, ptr %x.1.i, align 8, !tbaa !5 %cmp.not.i = icmp eq ptr %6, null br i1 %cmp.not.i, label %insert.exit, label %while.body.i, !llvm.loop !12 insert.exit: ; preds = %while.body.i, %sw.bb %x.0.lcssa.i = phi ptr [ @root, %sw.bb ], [ %x.1.i, %while.body.i ] %call.i = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #6 %key9.i = getelementptr inbounds %struct._node, ptr %call.i, i64 0, i32 2 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call.i, i8 0, i64 16, i1 false) store i32 %2, ptr %key9.i, align 8, !tbaa !9 store ptr %call.i, ptr %x.0.lcssa.i, align 8, !tbaa !5 br label %for.inc sw.bb3: ; preds = %for.body %7 = load ptr, ptr @root, align 8, !tbaa !5 call void @inorder(ptr noundef %7) %putchar.i = call i32 @putchar(i32 10) %8 = load ptr, ptr @root, align 8, !tbaa !5 call void @preorder(ptr noundef %8) %putchar2.i = call i32 @putchar(i32 10) br label %for.inc for.inc: ; preds = %insert.exit, %sw.bb3, %for.body %inc = add nuw nsw i32 %i.06, 1 %9 = load i32, ptr %n, align 4, !tbaa !16 %cmp = icmp slt i32 %inc, %9 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !18 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %command) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %key) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #7 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 @putchar(i32 noundef) local_unnamed_addr #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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #6 = { nounwind allocsize(0) } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !11, i64 16} !10 = !{!"_node", !6, i64 0, !6, i64 8, !11, i64 16} !11 = !{!"int", !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"} !14 = !{!10, !6, i64 0} !15 = !{!10, !6, i64 8} !16 = !{!11, !11, i64 0} !17 = !{!7, !7, i64 0} !18 = distinct !{!18, !13}
#include<stdio.h> #include<string.h> #define MAX 500000 typedef struct{ int key,le,ri; }Node; Node tree[MAX+1]; int size; void insert(int); void inorder(int); void preorder(int); int main(int argc, char *argv[]){ int n, i, first; first = 1; scanf("%d", &n); for(i=0;i<=n;i++) tree[i].key = tree[i].le = tree[i].ri = -1; size = 0; while(n--){ char str[100]; scanf("%s", str); if(!strcmp(str, "insert")){ int in; scanf("%d", &in); if(first){ tree[size++].key = in; first = 0; } else insert(in); }else{ inorder(0); printf("\n"); preorder(0); printf("\n"); } } return 0; } void insert(int x){ int p = 0; while(1){ if(x < tree[p].key){ if(tree[p].le == -1){ tree[p].le = size; tree[size++].key = x; break; }else p = tree[p].le; }else{ if(tree[p].ri == -1){ tree[p].ri = size; tree[size++].key = x; break; }else p = tree[p].ri; } } } void inorder(int p){ if(tree[p].le != -1) inorder(tree[p].le); printf(" %d", tree[p].key); if(tree[p].ri != -1) inorder(tree[p].ri); } void preorder(int p){ printf(" %d", tree[p].key); if(tree[p].le != -1) preorder(tree[p].le); if(tree[p].ri != -1) preorder(tree[p].ri); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212381/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212381/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, i32, i32 } @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @tree = dso_local local_unnamed_addr global [500001 x %struct.Node] zeroinitializer, align 16 @size = dso_local local_unnamed_addr global i32 0, align 4 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"insert\00", align 1 @.str.4 = private unnamed_addr constant [4 x i8] c" %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %str = alloca [100 x i8], align 16 %in = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not25 = icmp slt i32 %0, 0 br i1 %cmp.not25, label %for.end.thread, label %for.end for.end.thread: ; preds = %entry store i32 0, ptr @size, align 4, !tbaa !5 %dec2731 = add nsw i32 %0, -1 store i32 %dec2731, ptr %n, align 4, !tbaa !5 br label %while.body.preheader for.end: ; preds = %entry %1 = add nuw i32 %0, 1 %2 = zext i32 %1 to i64 %3 = mul nuw nsw i64 %2, 12 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) @tree, i8 -1, i64 %3, i1 false), !tbaa !5 store i32 0, ptr @size, align 4, !tbaa !5 %dec27 = add nsw i32 %0, -1 store i32 %dec27, ptr %n, align 4, !tbaa !5 %tobool.not28 = icmp eq i32 %0, 0 br i1 %tobool.not28, label %while.end, label %while.body.preheader while.body.preheader: ; preds = %for.end.thread, %for.end br label %while.body while.body: ; preds = %while.body.preheader, %if.end19 %first.029 = phi i32 [ %first.2, %if.end19 ], [ 1, %while.body.preheader ] call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %str) #7 %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %str) %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(7) %str, ptr noundef nonnull dereferenceable(7) @.str.2, i64 7) %tobool8.not = icmp eq i32 %bcmp, 0 br i1 %tobool8.not, label %if.then, label %if.else16 if.then: ; preds = %while.body call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %in) #7 %call9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %in) %tobool10.not = icmp eq i32 %first.029, 0 %4 = load i32, ptr %in, align 4, !tbaa !5 br i1 %tobool10.not, label %while.cond.i, label %if.then11 if.then11: ; preds = %if.then %5 = load i32, ptr @size, align 4, !tbaa !5 br label %if.end while.cond.i: ; preds = %if.then, %while.cond.i.backedge %p.0.i = phi i32 [ %p.0.i.be, %while.cond.i.backedge ], [ 0, %if.then ] %idxprom.i = sext i32 %p.0.i to i64 %arrayidx.i = getelementptr inbounds [500001 x %struct.Node], ptr @tree, i64 0, i64 %idxprom.i %6 = load i32, ptr %arrayidx.i, align 4, !tbaa !9 %cmp.i = icmp sgt i32 %6, %4 br i1 %cmp.i, label %if.then.i, label %if.else14.i if.then.i: ; preds = %while.cond.i %le.i = getelementptr inbounds [500001 x %struct.Node], ptr @tree, i64 0, i64 %idxprom.i, i32 1 %7 = load i32, ptr %le.i, align 4, !tbaa !11 %cmp3.i = icmp eq i32 %7, -1 br i1 %cmp3.i, label %if.then4.i, label %while.cond.i.backedge if.then4.i: ; preds = %if.then.i %8 = load i32, ptr @size, align 4, !tbaa !5 store i32 %8, ptr %le.i, align 4, !tbaa !11 br label %if.end if.else14.i: ; preds = %while.cond.i %ri.i = getelementptr inbounds [500001 x %struct.Node], ptr @tree, i64 0, i64 %idxprom.i, i32 2 %9 = load i32, ptr %ri.i, align 4, !tbaa !12 %cmp17.i = icmp eq i32 %9, -1 br i1 %cmp17.i, label %if.then18.i, label %while.cond.i.backedge while.cond.i.backedge: ; preds = %if.else14.i, %if.then.i %p.0.i.be = phi i32 [ %7, %if.then.i ], [ %9, %if.else14.i ] br label %while.cond.i if.then18.i: ; preds = %if.else14.i %10 = load i32, ptr @size, align 4, !tbaa !5 store i32 %10, ptr %ri.i, align 4, !tbaa !12 br label %if.end if.end: ; preds = %if.then18.i, %if.then4.i, %if.then11 %.sink41.i.sink33 = phi i32 [ %5, %if.then11 ], [ %10, %if.then18.i ], [ %8, %if.then4.i ] %inc22.i = add nsw i32 %.sink41.i.sink33, 1 store i32 %inc22.i, ptr @size, align 4, !tbaa !5 %idxprom23.i = sext i32 %.sink41.i.sink33 to i64 %arrayidx24.i = getelementptr inbounds [500001 x %struct.Node], ptr @tree, i64 0, i64 %idxprom23.i store i32 %4, ptr %arrayidx24.i, align 4, !tbaa !9 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %in) #7 br label %if.end19 if.else16: ; preds = %while.body call void @inorder(i32 noundef 0) %putchar = call i32 @putchar(i32 10) call void @preorder(i32 noundef 0) %putchar24 = call i32 @putchar(i32 10) br label %if.end19 if.end19: ; preds = %if.else16, %if.end %first.2 = phi i32 [ %first.029, %if.else16 ], [ 0, %if.end ] call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %str) #7 %.pr = load i32, ptr %n, align 4, !tbaa !5 %dec = add nsw i32 %.pr, -1 store i32 %dec, ptr %n, align 4, !tbaa !5 %tobool.not = icmp eq i32 %.pr, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !13 while.end: ; preds = %if.end19, %for.end call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #7 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @insert(i32 noundef %x) local_unnamed_addr #3 { entry: br label %while.cond while.cond: ; preds = %while.cond.backedge, %entry %p.0 = phi i32 [ 0, %entry ], [ %p.0.be, %while.cond.backedge ] %idxprom = sext i32 %p.0 to i64 %arrayidx = getelementptr inbounds [500001 x %struct.Node], ptr @tree, i64 0, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !9 %cmp = icmp sgt i32 %0, %x br i1 %cmp, label %if.then, label %if.else14 if.then: ; preds = %while.cond %le = getelementptr inbounds [500001 x %struct.Node], ptr @tree, i64 0, i64 %idxprom, i32 1 %1 = load i32, ptr %le, align 4, !tbaa !11 %cmp3 = icmp eq i32 %1, -1 br i1 %cmp3, label %if.then4, label %while.cond.backedge if.then4: ; preds = %if.then %2 = load i32, ptr @size, align 4, !tbaa !5 store i32 %2, ptr %le, align 4, !tbaa !11 br label %while.end if.else14: ; preds = %while.cond %ri = getelementptr inbounds [500001 x %struct.Node], ptr @tree, i64 0, i64 %idxprom, i32 2 %3 = load i32, ptr %ri, align 4, !tbaa !12 %cmp17 = icmp eq i32 %3, -1 br i1 %cmp17, label %if.then18, label %while.cond.backedge while.cond.backedge: ; preds = %if.else14, %if.then %p.0.be = phi i32 [ %1, %if.then ], [ %3, %if.else14 ] br label %while.cond if.then18: ; preds = %if.else14 %4 = load i32, ptr @size, align 4, !tbaa !5 store i32 %4, ptr %ri, align 4, !tbaa !12 br label %while.end while.end: ; preds = %if.then18, %if.then4 %.sink41 = phi i32 [ %4, %if.then18 ], [ %2, %if.then4 ] %inc22 = add nsw i32 %.sink41, 1 store i32 %inc22, ptr @size, align 4, !tbaa !5 %idxprom23 = sext i32 %.sink41 to i64 %arrayidx24 = getelementptr inbounds [500001 x %struct.Node], ptr @tree, i64 0, i64 %idxprom23 store i32 %x, ptr %arrayidx24, align 4, !tbaa !9 ret void } ; 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 @inorder(i32 noundef %p) local_unnamed_addr #0 { entry: br label %tailrecurse tailrecurse: ; preds = %if.end, %entry %p.tr = phi i32 [ %p, %entry ], [ %2, %if.end ] %idxprom = sext i32 %p.tr to i64 %arrayidx = getelementptr inbounds [500001 x %struct.Node], ptr @tree, i64 0, i64 %idxprom %le = getelementptr inbounds [500001 x %struct.Node], ptr @tree, i64 0, i64 %idxprom, i32 1 %0 = load i32, ptr %le, align 4, !tbaa !11 %cmp.not = icmp eq i32 %0, -1 br i1 %cmp.not, label %if.end, label %if.then if.then: ; preds = %tailrecurse tail call void @inorder(i32 noundef %0) br label %if.end if.end: ; preds = %if.then, %tailrecurse %1 = load i32, ptr %arrayidx, align 4, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %1) %ri = getelementptr inbounds [500001 x %struct.Node], ptr @tree, i64 0, i64 %idxprom, i32 2 %2 = load i32, ptr %ri, align 4, !tbaa !12 %cmp8.not = icmp eq i32 %2, -1 br i1 %cmp8.not, label %if.end13, label %tailrecurse if.end13: ; preds = %if.end ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local void @preorder(i32 noundef %p) local_unnamed_addr #0 { entry: br label %tailrecurse tailrecurse: ; preds = %if.end, %entry %p.tr = phi i32 [ %p, %entry ], [ %2, %if.end ] %idxprom = sext i32 %p.tr to i64 %arrayidx = getelementptr inbounds [500001 x %struct.Node], ptr @tree, i64 0, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %0) %le = getelementptr inbounds [500001 x %struct.Node], ptr @tree, i64 0, i64 %idxprom, i32 1 %1 = load i32, ptr %le, align 4, !tbaa !11 %cmp.not = icmp eq i32 %1, -1 br i1 %cmp.not, label %if.end, label %if.then if.then: ; preds = %tailrecurse tail call void @preorder(i32 noundef %1) br label %if.end if.end: ; preds = %if.then, %tailrecurse %ri = getelementptr inbounds [500001 x %struct.Node], ptr @tree, i64 0, i64 %idxprom, i32 2 %2 = load i32, ptr %ri, align 4, !tbaa !12 %cmp8.not = icmp eq i32 %2, -1 br i1 %cmp8.not, label %if.end13, label %tailrecurse if.end13: ; preds = %if.end ret void } ; Function Attrs: nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #5 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind willreturn memory(argmem: read) } attributes #5 = { nofree nounwind } attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !6, i64 0} !10 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8} !11 = !{!10, !6, i64 4} !12 = !{!10, !6, i64 8} !13 = distinct !{!13, !14} !14 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; void insert(int k){ Node y = NIL; Node x = root; Node z; z = malloc(sizeof(struct node)); z->key = k; z->left = NIL; z->right = NIL; while(x != NIL){ y=x; if(z->key < x->key) x =x->left; else x = x->right; } z->parent=y; if(y==NIL) root =z; else if(z->key < y->key){ y->left=z; } else y->right=z; } void inorder(Node u){ if(u != NIL){ inorder(u->left); printf(" %d",u->key); inorder(u->right); } } void preorder(Node u){ if(u != NIL ){ printf(" %d",u->key); preorder(u->left); preorder(u->right); } } int main(){ int n, i, x; char com[20]; scanf("%d", &n); for ( i = 0; i < n; i++ ){ scanf("%s", com); if ( com[0] == 'i' ){ scanf("%d", &x); insert(x); } else if ( com[0] == 'p' ){ inorder(root); printf("\n"); preorder(root); printf("\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212431/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212431/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ptr, ptr, i32 } @root = dso_local local_unnamed_addr global ptr null, align 8 @.str = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local void @insert(i32 noundef %k) local_unnamed_addr #0 { entry: %0 = load ptr, ptr @root, align 8, !tbaa !5 %call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #6 %key = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 3 store i32 %k, ptr %key, align 8, !tbaa !9 %cmp.not34 = icmp eq ptr %0, null tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call, i8 0, i64 16, i1 false) br i1 %cmp.not34, label %if.then7, label %while.body while.body: ; preds = %entry, %while.body %x.035 = phi ptr [ %x.1, %while.body ], [ %0, %entry ] %key2 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %1 = load i32, ptr %key2, align 8, !tbaa !9 %cmp3 = icmp sgt i32 %1, %k %left4 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %x.1.in = select i1 %cmp3, ptr %left4, ptr %x.035 %x.1 = load ptr, ptr %x.1.in, align 8, !tbaa !5 %cmp.not = icmp eq ptr %x.1, null br i1 %cmp.not, label %if.else8, label %while.body, !llvm.loop !12 if.then7: ; preds = %entry %parent37 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr null, ptr %parent37, align 8, !tbaa !14 br label %if.end17 if.else8: ; preds = %while.body %parent = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr %x.035, ptr %parent, align 8, !tbaa !14 %key10 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %2 = load i32, ptr %key10, align 8, !tbaa !9 %cmp11 = icmp sgt i32 %2, %k %left13 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %spec.select = select i1 %cmp11, ptr %left13, ptr %x.035 br label %if.end17 if.end17: ; preds = %if.else8, %if.then7 %left13.sink = phi ptr [ @root, %if.then7 ], [ %spec.select, %if.else8 ] store ptr %call, ptr %left13.sink, align 8, !tbaa !5 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local void @inorder(ptr noundef readonly %u) local_unnamed_addr #0 { entry: %cmp.not4 = icmp eq ptr %u, null br i1 %cmp.not4, label %if.end, label %if.then if.then: ; preds = %entry, %if.then %u.tr5 = phi ptr [ %2, %if.then ], [ %u, %entry ] %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !15 tail call void @inorder(ptr noundef %0) %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %1 = load i32, ptr %key, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !16 %cmp.not = icmp eq ptr %2, null br i1 %cmp.not, label %if.end, label %if.then if.end: ; preds = %if.then, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind uwtable define dso_local void @preorder(ptr noundef readonly %u) local_unnamed_addr #0 { entry: %cmp.not4 = icmp eq ptr %u, null br i1 %cmp.not4, label %if.end, label %if.then if.then: ; preds = %entry, %if.then %u.tr5 = phi ptr [ %2, %if.then ], [ %u, %entry ] %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %0 = load i32, ptr %key, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %1 = load ptr, ptr %left, align 8, !tbaa !15 tail call void @preorder(ptr noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !16 %cmp.not = icmp eq ptr %2, null br i1 %cmp.not, label %if.end, label %if.then if.end: ; preds = %if.then, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %com = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #7 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #7 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %com) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !17 %cmp15 = icmp sgt i32 %0, 0 br i1 %cmp15, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.016 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %com) %1 = load i8, ptr %com, align 16, !tbaa !18 switch i8 %1, label %for.inc [ i8 105, label %if.then i8 112, label %if.then9 ] if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %2 = load i32, ptr %x, align 4, !tbaa !17 %3 = load ptr, ptr @root, align 8, !tbaa !5 %call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #6 %key.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 3 store i32 %2, ptr %key.i, align 8, !tbaa !9 %cmp.not34.i = icmp eq ptr %3, null call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call.i, i8 0, i64 16, i1 false) br i1 %cmp.not34.i, label %insert.exit, label %while.body.i while.body.i: ; preds = %if.then, %while.body.i %x.035.i = phi ptr [ %x.1.i, %while.body.i ], [ %3, %if.then ] %key2.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 3 %4 = load i32, ptr %key2.i, align 8, !tbaa !9 %cmp3.i = icmp sgt i32 %4, %2 %left4.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 1 %x.1.in.i = select i1 %cmp3.i, ptr %left4.i, ptr %x.035.i %x.1.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !5 %cmp.not.i = icmp eq ptr %x.1.i, null br i1 %cmp.not.i, label %insert.exit, label %while.body.i, !llvm.loop !12 insert.exit: ; preds = %while.body.i, %if.then %.sink = phi ptr [ null, %if.then ], [ %x.035.i, %while.body.i ] %left13.sink.i = phi ptr [ @root, %if.then ], [ %x.1.in.i, %while.body.i ] %parent37.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2 store ptr %.sink, ptr %parent37.i, align 8, !tbaa !14 store ptr %call.i, ptr %left13.sink.i, align 8, !tbaa !5 br label %for.inc if.then9: ; preds = %for.body %5 = load ptr, ptr @root, align 8, !tbaa !5 call void @inorder(ptr noundef %5) %putchar = call i32 @putchar(i32 10) %6 = load ptr, ptr @root, align 8, !tbaa !5 call void @preorder(ptr noundef %6) %putchar14 = call i32 @putchar(i32 10) br label %for.inc for.inc: ; preds = %for.body, %insert.exit, %if.then9 %inc = add nuw nsw i32 %i.016, 1 %7 = load i32, ptr %n, align 4, !tbaa !17 %cmp = icmp slt i32 %inc, %7 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !19 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %com) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #7 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 @putchar(i32 noundef) local_unnamed_addr #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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #6 = { nounwind allocsize(0) } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !11, i64 24} !10 = !{!"node", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24} !11 = !{!"int", !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"} !14 = !{!10, !6, i64 16} !15 = !{!10, !6, i64 8} !16 = !{!10, !6, i64 0} !17 = !{!11, !11, i64 0} !18 = !{!7, !7, i64 0} !19 = distinct !{!19, !13}
#include<stdio.h> #include<stdlib.h> #define NIL NULL struct node{ struct node *right; struct node *left; struct node *parent; int id; }; typedef struct node * Node; Node root; void insert(int k){//入力したい値 Node x = root; Node parent = NIL; Node z;//新しいノード z = malloc(sizeof(struct node));//初期化 z->id = k; z->left = NIL; z->right = NIL; while (x != NIL){//子供のいち 左右 決定、 ついでにその時の親も parent = x; if (z->id < x->id)x = x->left; else x = x->right; } z->parent = parent; if (parent == NIL)root=z; else if (z->id < parent->id)parent->left = z; // z を y の左の子にする//親の設定 else parent->right = z; // z を y の右の子にする } //=============出力 void inorder(Node u){ if(u==NIL)return; inorder(u->left); printf(" %d",u->id); inorder(u->right); } void preorder(Node u){ if(u==NIL)return; printf(" %d",u->id); preorder(u->left); preorder(u->right); } //=============== int main(){ int n, i, x; char com[20]; scanf("%d", &n); for ( i = 0; i < n; i++ ){ scanf("%s", com); if ( com[0] == 'i' ){//insert command scanf("%d", &x); insert(x); } else{//出力 print command inorder(root); printf("\n"); preorder(root); printf("\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212475/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212475/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ptr, ptr, i32 } @root = dso_local local_unnamed_addr global ptr null, align 8 @.str = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local void @insert(i32 noundef %k) local_unnamed_addr #0 { entry: %0 = load ptr, ptr @root, align 8, !tbaa !5 %call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #6 %id = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 3 store i32 %k, ptr %id, align 8, !tbaa !9 %cmp.not35 = icmp eq ptr %0, null tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call, i8 0, i64 16, i1 false) br i1 %cmp.not35, label %if.then8, label %while.body while.body: ; preds = %entry, %while.body %x.036 = phi ptr [ %x.1, %while.body ], [ %0, %entry ] %id2 = getelementptr inbounds %struct.node, ptr %x.036, i64 0, i32 3 %1 = load i32, ptr %id2, align 8, !tbaa !9 %cmp3 = icmp sgt i32 %1, %k %left4 = getelementptr inbounds %struct.node, ptr %x.036, i64 0, i32 1 %x.1.in = select i1 %cmp3, ptr %left4, ptr %x.036 %x.1 = load ptr, ptr %x.1.in, align 8, !tbaa !5 %cmp.not = icmp eq ptr %x.1, null br i1 %cmp.not, label %if.else9, label %while.body, !llvm.loop !12 if.then8: ; preds = %entry %parent638 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr null, ptr %parent638, align 8, !tbaa !14 br label %if.end18 if.else9: ; preds = %while.body %parent6 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr %x.036, ptr %parent6, align 8, !tbaa !14 %id11 = getelementptr inbounds %struct.node, ptr %x.036, i64 0, i32 3 %2 = load i32, ptr %id11, align 8, !tbaa !9 %cmp12 = icmp sgt i32 %2, %k %left14 = getelementptr inbounds %struct.node, ptr %x.036, i64 0, i32 1 %spec.select = select i1 %cmp12, ptr %left14, ptr %x.036 br label %if.end18 if.end18: ; preds = %if.else9, %if.then8 %left14.sink = phi ptr [ @root, %if.then8 ], [ %spec.select, %if.else9 ] store ptr %call, ptr %left14.sink, align 8, !tbaa !5 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local void @inorder(ptr noundef readonly %u) local_unnamed_addr #0 { entry: %cmp4 = icmp eq ptr %u, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %u.tr5 = phi ptr [ %2, %if.end ], [ %u, %entry ] %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !15 tail call void @inorder(ptr noundef %0) %id = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %1 = load i32, ptr %id, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !16 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind uwtable define dso_local void @preorder(ptr noundef readonly %u) local_unnamed_addr #0 { entry: %cmp4 = icmp eq ptr %u, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %u.tr5 = phi ptr [ %2, %if.end ], [ %u, %entry ] %id = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %0 = load i32, ptr %id, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %1 = load ptr, ptr %left, align 8, !tbaa !15 tail call void @preorder(ptr noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !16 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %com = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #7 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #7 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %com) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !17 %cmp9 = icmp sgt i32 %0, 0 br i1 %cmp9, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.010 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %com) %1 = load i8, ptr %com, align 16, !tbaa !18 %cmp2 = icmp eq i8 %1, 105 br i1 %cmp2, label %if.then, label %if.else if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %2 = load i32, ptr %x, align 4, !tbaa !17 %3 = load ptr, ptr @root, align 8, !tbaa !5 %call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #6 %id.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 3 store i32 %2, ptr %id.i, align 8, !tbaa !9 %cmp.not35.i = icmp eq ptr %3, null call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call.i, i8 0, i64 16, i1 false) br i1 %cmp.not35.i, label %insert.exit, label %while.body.i while.body.i: ; preds = %if.then, %while.body.i %x.036.i = phi ptr [ %x.1.i, %while.body.i ], [ %3, %if.then ] %id2.i = getelementptr inbounds %struct.node, ptr %x.036.i, i64 0, i32 3 %4 = load i32, ptr %id2.i, align 8, !tbaa !9 %cmp3.i = icmp sgt i32 %4, %2 %left4.i = getelementptr inbounds %struct.node, ptr %x.036.i, i64 0, i32 1 %x.1.in.i = select i1 %cmp3.i, ptr %left4.i, ptr %x.036.i %x.1.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !5 %cmp.not.i = icmp eq ptr %x.1.i, null br i1 %cmp.not.i, label %insert.exit, label %while.body.i, !llvm.loop !12 insert.exit: ; preds = %while.body.i, %if.then %.sink = phi ptr [ null, %if.then ], [ %x.036.i, %while.body.i ] %left14.sink.i = phi ptr [ @root, %if.then ], [ %x.1.in.i, %while.body.i ] %parent638.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2 store ptr %.sink, ptr %parent638.i, align 8, !tbaa !14 store ptr %call.i, ptr %left14.sink.i, align 8, !tbaa !5 br label %for.inc if.else: ; preds = %for.body %5 = load ptr, ptr @root, align 8, !tbaa !5 call void @inorder(ptr noundef %5) %putchar = call i32 @putchar(i32 10) %6 = load ptr, ptr @root, align 8, !tbaa !5 call void @preorder(ptr noundef %6) %putchar8 = call i32 @putchar(i32 10) br label %for.inc for.inc: ; preds = %insert.exit, %if.else %inc = add nuw nsw i32 %i.010, 1 %7 = load i32, ptr %n, align 4, !tbaa !17 %cmp = icmp slt i32 %inc, %7 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !19 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %com) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #7 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 @putchar(i32 noundef) local_unnamed_addr #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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #6 = { nounwind allocsize(0) } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !11, i64 24} !10 = !{!"node", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24} !11 = !{!"int", !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"} !14 = !{!10, !6, i64 16} !15 = !{!10, !6, i64 8} !16 = !{!10, !6, i64 0} !17 = !{!11, !11, i64 0} !18 = !{!7, !7, i64 0} !19 = distinct !{!19, !13}
#include <stdio.h> #include <stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node *Node; #define NIL NULL Node root; Node treeMaximam(Node x){ } Node treeMinimun(Node x){ } Node treeSearch(Node u,int k){ } Node treeDelete(Node z){ } void insert(int k){ Node y=NIL; Node x=root; Node z; z=malloc(sizeof(struct node)); z->key=k; z->left=NIL; z->right=NIL; while(x != NIL){ y=x; if(z->key < x->key){ x=x->left; }else{ x=x->right; } } z->parent=y; if(y==NIL){ root=z; }else{ if(z->key < y->key){ y->left = z; }else { y->right=z; } } } void inorder(Node u){ if(u==NIL)return; inorder(u->left); printf(" %d",u->key); inorder(u->right); } void preorder(Node u){ if(u==NIL)return; printf(" %d",u->key); preorder(u->left); preorder(u->right); } int main(){ int n,i,x; char com[20]; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%s",com); if(com[0]=='i'){ scanf("%d",&x); insert(x); }else if(com[0]=='p'){ inorder(root); printf("\n"); preorder(root); printf("\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212525/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212525/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ptr, ptr, i32 } @root = dso_local local_unnamed_addr global ptr null, align 8 @.str = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local noalias ptr @treeMaximam(ptr nocapture noundef readnone %x) local_unnamed_addr #0 { entry: ret ptr undef } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local noalias ptr @treeMinimun(ptr nocapture noundef readnone %x) local_unnamed_addr #0 { entry: ret ptr undef } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local noalias ptr @treeSearch(ptr nocapture noundef readnone %u, i32 noundef %k) local_unnamed_addr #0 { entry: ret ptr undef } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local noalias ptr @treeDelete(ptr nocapture noundef readnone %z) local_unnamed_addr #0 { entry: ret ptr undef } ; Function Attrs: nofree nounwind uwtable define dso_local void @insert(i32 noundef %k) local_unnamed_addr #1 { entry: %0 = load ptr, ptr @root, align 8, !tbaa !5 %call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7 %key = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 3 store i32 %k, ptr %key, align 8, !tbaa !9 %cmp.not34 = icmp eq ptr %0, null tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call, i8 0, i64 16, i1 false) br i1 %cmp.not34, label %if.then7, label %while.body while.body: ; preds = %entry, %while.body %x.035 = phi ptr [ %x.1, %while.body ], [ %0, %entry ] %key2 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %1 = load i32, ptr %key2, align 8, !tbaa !9 %cmp3 = icmp sgt i32 %1, %k %left4 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %x.1.in = select i1 %cmp3, ptr %left4, ptr %x.035 %x.1 = load ptr, ptr %x.1.in, align 8, !tbaa !5 %cmp.not = icmp eq ptr %x.1, null br i1 %cmp.not, label %if.else8, label %while.body, !llvm.loop !12 if.then7: ; preds = %entry %parent37 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr null, ptr %parent37, align 8, !tbaa !14 br label %if.end17 if.else8: ; preds = %while.body %parent = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr %x.035, ptr %parent, align 8, !tbaa !14 %key10 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %2 = load i32, ptr %key10, align 8, !tbaa !9 %cmp11 = icmp sgt i32 %2, %k %left13 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %spec.select = select i1 %cmp11, ptr %left13, ptr %x.035 br label %if.end17 if.end17: ; preds = %if.else8, %if.then7 %left13.sink = phi ptr [ @root, %if.then7 ], [ %spec.select, %if.else8 ] store ptr %call, ptr %left13.sink, align 8, !tbaa !5 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind uwtable define dso_local void @inorder(ptr noundef readonly %u) local_unnamed_addr #1 { entry: %cmp4 = icmp eq ptr %u, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %u.tr5 = phi ptr [ %2, %if.end ], [ %u, %entry ] %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !15 tail call void @inorder(ptr noundef %0) %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %1 = load i32, ptr %key, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !16 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind uwtable define dso_local void @preorder(ptr noundef readonly %u) local_unnamed_addr #1 { entry: %cmp4 = icmp eq ptr %u, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %u.tr5 = phi ptr [ %2, %if.end ], [ %u, %entry ] %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %0 = load i32, ptr %key, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %1 = load ptr, ptr %left, align 8, !tbaa !15 tail call void @preorder(ptr noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !16 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %com = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #8 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #8 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %com) #8 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !17 %cmp15 = icmp sgt i32 %0, 0 br i1 %cmp15, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.016 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %com) %1 = load i8, ptr %com, align 16, !tbaa !18 switch i8 %1, label %for.inc [ i8 105, label %if.then i8 112, label %if.then9 ] if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %2 = load i32, ptr %x, align 4, !tbaa !17 %3 = load ptr, ptr @root, align 8, !tbaa !5 %call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7 %key.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 3 store i32 %2, ptr %key.i, align 8, !tbaa !9 %cmp.not34.i = icmp eq ptr %3, null call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call.i, i8 0, i64 16, i1 false) br i1 %cmp.not34.i, label %insert.exit, label %while.body.i while.body.i: ; preds = %if.then, %while.body.i %x.035.i = phi ptr [ %x.1.i, %while.body.i ], [ %3, %if.then ] %key2.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 3 %4 = load i32, ptr %key2.i, align 8, !tbaa !9 %cmp3.i = icmp sgt i32 %4, %2 %left4.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 1 %x.1.in.i = select i1 %cmp3.i, ptr %left4.i, ptr %x.035.i %x.1.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !5 %cmp.not.i = icmp eq ptr %x.1.i, null br i1 %cmp.not.i, label %insert.exit, label %while.body.i, !llvm.loop !12 insert.exit: ; preds = %while.body.i, %if.then %.sink = phi ptr [ null, %if.then ], [ %x.035.i, %while.body.i ] %left13.sink.i = phi ptr [ @root, %if.then ], [ %x.1.in.i, %while.body.i ] %parent37.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2 store ptr %.sink, ptr %parent37.i, align 8, !tbaa !14 store ptr %call.i, ptr %left13.sink.i, align 8, !tbaa !5 br label %for.inc if.then9: ; preds = %for.body %5 = load ptr, ptr @root, align 8, !tbaa !5 call void @inorder(ptr noundef %5) %putchar = call i32 @putchar(i32 10) %6 = load ptr, ptr @root, align 8, !tbaa !5 call void @preorder(ptr noundef %6) %putchar14 = call i32 @putchar(i32 10) br label %for.inc for.inc: ; preds = %for.body, %insert.exit, %if.then9 %inc = add nuw nsw i32 %i.016, 1 %7 = load i32, ptr %n, align 4, !tbaa !17 %cmp = icmp slt i32 %inc, %7 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !19 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %com) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #8 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #5 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind "no-trapping-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 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #7 = { nounwind allocsize(0) } attributes #8 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !11, i64 24} !10 = !{!"node", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24} !11 = !{!"int", !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"} !14 = !{!10, !6, i64 16} !15 = !{!10, !6, i64 8} !16 = !{!10, !6, i64 0} !17 = !{!11, !11, i64 0} !18 = !{!7, !7, i64 0} !19 = distinct !{!19, !13}
#include<stdio.h> #include<stdlib.h> #define NIL NULL struct node{ struct node *right; struct node *left; struct node *parent; int key; }node; typedef struct node *Node; Node root; Node treeMinimum(Node x){ while(x -> left != NIL) x = x -> left; return x; } Node treeMaximum(Node x){ while(x -> right != NIL) x = x -> right; return x; } Node treeSearch(Node u, int k){ if(u == NIL && k == u ->key) return u; if(k < u -> key) return treeSearch(u -> left, k); if(k > u -> key) return treeSearch(u -> right, k); } Node treeSuccessor(Node x){ Node y; if(x -> right != NIL) return treeMinimum(x -> right); y = x -> parent; while(y != NIL && x == y -> right){ x = y; y = y -> parent; } return y; } void treeDelete(Node z){ Node x; Node y; if(z -> left == NIL || z -> right == NIL) y = z; else y = treeSuccessor(z); if(y -> left != NIL) x = y -> left; else x = y -> right; if(x != NIL) x -> parent = y -> parent; if(y -> parent == NIL) root = x; else if(y == y -> parent -> left) y -> parent -> left = x; else y -> parent -> right = x; if(y != z) z -> key = y -> key; } void insert(int k){ Node x = root; Node y = NIL; Node z; z = malloc(sizeof(node)); z -> key = k; z -> left = NIL; z -> right = NIL; while( x != NIL){ y = x; if(z -> key < x -> key) x = x -> left; else x = x -> right; } z -> parent = y; if(y == NIL) root = z; else if(z -> key < y -> key) y -> left = z; else y -> right = z; } void inorder(Node u){ if(u != NIL){ inorder(u -> left); printf(" %d", u -> key); inorder(u -> right); } } void preorder(Node u){ if(u != NIL){ printf(" %d", u -> key); preorder(u -> left); preorder(u -> right); } } int main(){ int n, i, x; char com[20]; scanf("%d", &n); for ( i = 0; i < n; i++ ){ scanf("%s", com); if ( com[0] == 'f' ){ scanf("%d", &x); Node t = treeSearch(root, x); if ( t != NIL ) printf("yes\n"); else printf("no\n"); } else if ( com[0] == 'i' ){ scanf("%d", &x); insert(x); } else if ( com[0] == 'p' ){ inorder(root); printf("\n"); preorder(root); printf("\n"); } else if ( com[0] == 'd' ){ scanf("%d", &x); treeDelete(treeSearch(root, x)); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212576/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212576/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ptr, ptr, i32 } @root = dso_local local_unnamed_addr global ptr null, align 8 @.str = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @node = dso_local local_unnamed_addr global %struct.node zeroinitializer, align 8 @str = private unnamed_addr constant [3 x i8] c"no\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeMinimum(ptr noundef readonly %x) local_unnamed_addr #0 { entry: br label %while.cond while.cond: ; preds = %while.cond, %entry %x.addr.0 = phi ptr [ %x, %entry ], [ %0, %while.cond ] %left = getelementptr inbounds %struct.node, ptr %x.addr.0, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !5 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %while.end, label %while.cond, !llvm.loop !11 while.end: ; preds = %while.cond ret ptr %x.addr.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeMaximum(ptr noundef readonly %x) local_unnamed_addr #0 { entry: br label %while.cond while.cond: ; preds = %while.cond, %entry %x.addr.0 = phi ptr [ %x, %entry ], [ %0, %while.cond ] %0 = load ptr, ptr %x.addr.0, align 8, !tbaa !13 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %while.end, label %while.cond, !llvm.loop !14 while.end: ; preds = %while.cond ret ptr %x.addr.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local noalias ptr @treeSearch(ptr noundef readonly %u, i32 noundef %k) local_unnamed_addr #0 { entry: br label %tailrecurse tailrecurse: ; preds = %tailrecurse.backedge, %entry %u.tr = phi ptr [ %u, %entry ], [ %u.tr.be, %tailrecurse.backedge ] %cmp = icmp eq ptr %u.tr, null br i1 %cmp, label %land.lhs.true, label %if.end land.lhs.true: ; preds = %tailrecurse %0 = load i32, ptr inttoptr (i64 24 to ptr), align 8, !tbaa !15 %cmp1 = icmp eq i32 %0, %k br i1 %cmp1, label %if.end10, label %if.end if.end: ; preds = %land.lhs.true, %tailrecurse %key2 = getelementptr inbounds %struct.node, ptr %u.tr, i64 0, i32 3 %1 = load i32, ptr %key2, align 8, !tbaa !15 %cmp3 = icmp sgt i32 %1, %k br i1 %cmp3, label %if.then4, label %if.end5 if.then4: ; preds = %if.end %left = getelementptr inbounds %struct.node, ptr %u.tr, i64 0, i32 1 br label %tailrecurse.backedge tailrecurse.backedge: ; preds = %if.end5, %if.then4 %u.tr.be.in = phi ptr [ %left, %if.then4 ], [ %u.tr, %if.end5 ] %u.tr.be = load ptr, ptr %u.tr.be.in, align 8, !tbaa !16 br label %tailrecurse if.end5: ; preds = %if.end %cmp7 = icmp slt i32 %1, %k br i1 %cmp7, label %tailrecurse.backedge, label %if.end10 if.end10: ; preds = %land.lhs.true, %if.end5 ret ptr null } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeSuccessor(ptr noundef readonly %x) local_unnamed_addr #0 { entry: %0 = load ptr, ptr %x, align 8, !tbaa !13 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %while.cond, label %while.cond.i while.cond.i: ; preds = %entry, %while.cond.i %x.addr.0.i = phi ptr [ %1, %while.cond.i ], [ %0, %entry ] %left.i = getelementptr inbounds %struct.node, ptr %x.addr.0.i, i64 0, i32 1 %1 = load ptr, ptr %left.i, align 8, !tbaa !5 %cmp.not.i = icmp eq ptr %1, null br i1 %cmp.not.i, label %cleanup, label %while.cond.i, !llvm.loop !11 while.cond: ; preds = %entry, %land.rhs %x.addr.0 = phi ptr [ %y.0, %land.rhs ], [ %x, %entry ] %y.0.in = getelementptr inbounds %struct.node, ptr %x.addr.0, i64 0, i32 2 %y.0 = load ptr, ptr %y.0.in, align 8, !tbaa !17 %cmp2.not = icmp eq ptr %y.0, null br i1 %cmp2.not, label %cleanup, label %land.rhs land.rhs: ; preds = %while.cond %2 = load ptr, ptr %y.0, align 8, !tbaa !13 %cmp4 = icmp eq ptr %x.addr.0, %2 br i1 %cmp4, label %while.cond, label %cleanup, !llvm.loop !18 cleanup: ; preds = %while.cond.i, %land.rhs, %while.cond %retval.0 = phi ptr [ %y.0, %land.rhs ], [ null, %while.cond ], [ %x.addr.0.i, %while.cond.i ] ret ptr %retval.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable define dso_local void @treeDelete(ptr noundef %z) local_unnamed_addr #2 { entry: %left = getelementptr inbounds %struct.node, ptr %z, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !5 %cmp = icmp eq ptr %0, null br i1 %cmp, label %if.end8, label %lor.lhs.false lor.lhs.false: ; preds = %entry %1 = load ptr, ptr %z, align 8, !tbaa !13 %cmp1 = icmp eq ptr %1, null br i1 %cmp1, label %if.then10, label %while.cond.i.i while.cond.i.i: ; preds = %lor.lhs.false, %while.cond.i.i %x.addr.0.i.i = phi ptr [ %2, %while.cond.i.i ], [ %1, %lor.lhs.false ] %left.i.i = getelementptr inbounds %struct.node, ptr %x.addr.0.i.i, i64 0, i32 1 %2 = load ptr, ptr %left.i.i, align 8, !tbaa !5 %cmp.not.i.i = icmp eq ptr %2, null br i1 %cmp.not.i.i, label %if.end8, label %while.cond.i.i, !llvm.loop !11 if.end8: ; preds = %while.cond.i.i, %entry %y.0.ph = phi ptr [ %z, %entry ], [ %x.addr.0.i.i, %while.cond.i.i ] %3 = load ptr, ptr %y.0.ph, align 8, !tbaa !13 %cmp9.not = icmp eq ptr %3, null br i1 %cmp9.not, label %if.end12, label %if.then10 if.then10: ; preds = %lor.lhs.false, %if.end8 %y.058 = phi ptr [ %y.0.ph, %if.end8 ], [ %z, %lor.lhs.false ] %x.054 = phi ptr [ %3, %if.end8 ], [ %0, %lor.lhs.false ] %parent = getelementptr inbounds %struct.node, ptr %y.058, i64 0, i32 2 %4 = load ptr, ptr %parent, align 8, !tbaa !17 %parent11 = getelementptr inbounds %struct.node, ptr %x.054, i64 0, i32 2 store ptr %4, ptr %parent11, align 8, !tbaa !17 br label %if.end12 if.end12: ; preds = %if.then10, %if.end8 %y.060 = phi ptr [ %y.058, %if.then10 ], [ %y.0.ph, %if.end8 ] %x.055 = phi ptr [ %x.054, %if.then10 ], [ null, %if.end8 ] %parent13 = getelementptr inbounds %struct.node, ptr %y.060, i64 0, i32 2 %5 = load ptr, ptr %parent13, align 8, !tbaa !17 %cmp14 = icmp eq ptr %5, null br i1 %cmp14, label %if.end27, label %if.else16 if.else16: ; preds = %if.end12 %left18 = getelementptr inbounds %struct.node, ptr %5, i64 0, i32 1 %6 = load ptr, ptr %left18, align 8, !tbaa !5 %cmp19 = icmp eq ptr %y.060, %6 %left18. = select i1 %cmp19, ptr %left18, ptr %5 br label %if.end27 if.end27: ; preds = %if.else16, %if.end12 %left18.sink = phi ptr [ @root, %if.end12 ], [ %left18., %if.else16 ] store ptr %x.055, ptr %left18.sink, align 8, !tbaa !16 %cmp28.not = icmp eq ptr %y.060, %z br i1 %cmp28.not, label %if.end31, label %if.then29 if.then29: ; preds = %if.end27 %key = getelementptr inbounds %struct.node, ptr %y.060, i64 0, i32 3 %7 = load i32, ptr %key, align 8, !tbaa !15 %key30 = getelementptr inbounds %struct.node, ptr %z, i64 0, i32 3 store i32 %7, ptr %key30, align 8, !tbaa !15 br label %if.end31 if.end31: ; preds = %if.then29, %if.end27 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @insert(i32 noundef %k) local_unnamed_addr #3 { entry: %0 = load ptr, ptr @root, align 8, !tbaa !16 %call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #9 %key = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 3 store i32 %k, ptr %key, align 8, !tbaa !15 %cmp.not34 = icmp eq ptr %0, null tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call, i8 0, i64 16, i1 false) br i1 %cmp.not34, label %if.then7, label %while.body while.body: ; preds = %entry, %while.body %x.035 = phi ptr [ %x.1, %while.body ], [ %0, %entry ] %key2 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %1 = load i32, ptr %key2, align 8, !tbaa !15 %cmp3 = icmp sgt i32 %1, %k %left4 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %x.1.in = select i1 %cmp3, ptr %left4, ptr %x.035 %x.1 = load ptr, ptr %x.1.in, align 8, !tbaa !16 %cmp.not = icmp eq ptr %x.1, null br i1 %cmp.not, label %if.else8, label %while.body, !llvm.loop !19 if.then7: ; preds = %entry %parent37 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr null, ptr %parent37, align 8, !tbaa !17 br label %if.end17 if.else8: ; preds = %while.body %parent = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr %x.035, ptr %parent, align 8, !tbaa !17 %key10 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %2 = load i32, ptr %key10, align 8, !tbaa !15 %cmp11 = icmp sgt i32 %2, %k %left13 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %spec.select = select i1 %cmp11, ptr %left13, ptr %x.035 br label %if.end17 if.end17: ; preds = %if.else8, %if.then7 %left13.sink = phi ptr [ @root, %if.then7 ], [ %spec.select, %if.else8 ] store ptr %call, ptr %left13.sink, align 8, !tbaa !16 ret void } ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #4 ; Function Attrs: nofree nounwind uwtable define dso_local void @inorder(ptr noundef readonly %u) local_unnamed_addr #3 { entry: %cmp.not4 = icmp eq ptr %u, null br i1 %cmp.not4, label %if.end, label %if.then if.then: ; preds = %entry, %if.then %u.tr5 = phi ptr [ %2, %if.then ], [ %u, %entry ] %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !5 tail call void @inorder(ptr noundef %0) %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %1 = load i32, ptr %key, align 8, !tbaa !15 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !13 %cmp.not = icmp eq ptr %2, null br i1 %cmp.not, label %if.end, label %if.then if.end: ; preds = %if.then, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: nofree nounwind uwtable define dso_local void @preorder(ptr noundef readonly %u) local_unnamed_addr #3 { entry: %cmp.not4 = icmp eq ptr %u, null br i1 %cmp.not4, label %if.end, label %if.then if.then: ; preds = %entry, %if.then %u.tr5 = phi ptr [ %2, %if.then ], [ %u, %entry ] %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %0 = load i32, ptr %key, align 8, !tbaa !15 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %1 = load ptr, ptr %left, align 8, !tbaa !5 tail call void @preorder(ptr noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !13 %cmp.not = icmp eq ptr %2, null br i1 %cmp.not, label %if.end, label %if.then if.end: ; preds = %if.then, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %com = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #10 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #10 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %com) #10 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !20 %cmp62 = icmp sgt i32 %0, 0 br i1 %cmp62, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.063 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %com) %1 = load i8, ptr %com, align 16, !tbaa !21 switch i8 %1, label %for.inc [ i8 102, label %if.then i8 105, label %if.then16 i8 112, label %if.then23 i8 100, label %if.then31 ] if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %2 = load i32, ptr %x, align 4, !tbaa !20 br label %tailrecurse.i tailrecurse.i: ; preds = %tailrecurse.i.backedge, %if.then %u.tr.i.in = phi ptr [ @root, %if.then ], [ %u.tr.i.in.be, %tailrecurse.i.backedge ] %u.tr.i = load ptr, ptr %u.tr.i.in, align 8, !tbaa !16 %cmp.i = icmp eq ptr %u.tr.i, null br i1 %cmp.i, label %land.lhs.true.i, label %if.end.i land.lhs.true.i: ; preds = %tailrecurse.i %3 = load i32, ptr inttoptr (i64 24 to ptr), align 8, !tbaa !15 %cmp1.i = icmp eq i32 %3, %2 br i1 %cmp1.i, label %treeSearch.exit, label %if.end.i if.end.i: ; preds = %land.lhs.true.i, %tailrecurse.i %key2.i = getelementptr inbounds %struct.node, ptr %u.tr.i, i64 0, i32 3 %4 = load i32, ptr %key2.i, align 8, !tbaa !15 %cmp3.i = icmp sgt i32 %4, %2 br i1 %cmp3.i, label %if.then4.i, label %if.end5.i if.then4.i: ; preds = %if.end.i %left.i = getelementptr inbounds %struct.node, ptr %u.tr.i, i64 0, i32 1 br label %tailrecurse.i.backedge if.end5.i: ; preds = %if.end.i %cmp7.i = icmp slt i32 %4, %2 br i1 %cmp7.i, label %tailrecurse.i.backedge, label %treeSearch.exit tailrecurse.i.backedge: ; preds = %if.end5.i, %if.then4.i %u.tr.i.in.be = phi ptr [ %left.i, %if.then4.i ], [ %u.tr.i, %if.end5.i ] br label %tailrecurse.i treeSearch.exit: ; preds = %land.lhs.true.i, %if.end5.i %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %for.inc if.then16: ; preds = %for.body %call17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %5 = load i32, ptr %x, align 4, !tbaa !20 %6 = load ptr, ptr @root, align 8, !tbaa !16 %call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #9 %key.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 3 store i32 %5, ptr %key.i, align 8, !tbaa !15 %cmp.not34.i = icmp eq ptr %6, null call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call.i, i8 0, i64 16, i1 false) br i1 %cmp.not34.i, label %insert.exit, label %while.body.i while.body.i: ; preds = %if.then16, %while.body.i %x.035.i = phi ptr [ %x.1.i, %while.body.i ], [ %6, %if.then16 ] %key2.i40 = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 3 %7 = load i32, ptr %key2.i40, align 8, !tbaa !15 %cmp3.i41 = icmp sgt i32 %7, %5 %left4.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 1 %x.1.in.i = select i1 %cmp3.i41, ptr %left4.i, ptr %x.035.i %x.1.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !16 %cmp.not.i = icmp eq ptr %x.1.i, null br i1 %cmp.not.i, label %insert.exit, label %while.body.i, !llvm.loop !19 insert.exit: ; preds = %while.body.i, %if.then16 %.sink = phi ptr [ null, %if.then16 ], [ %x.035.i, %while.body.i ] %left13.sink.i = phi ptr [ @root, %if.then16 ], [ %x.1.in.i, %while.body.i ] %parent37.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2 store ptr %.sink, ptr %parent37.i, align 8, !tbaa !17 store ptr %call.i, ptr %left13.sink.i, align 8, !tbaa !16 br label %for.inc if.then23: ; preds = %for.body %8 = load ptr, ptr @root, align 8, !tbaa !16 call void @inorder(ptr noundef %8) %putchar = call i32 @putchar(i32 10) %9 = load ptr, ptr @root, align 8, !tbaa !16 call void @preorder(ptr noundef %9) %putchar39 = call i32 @putchar(i32 10) br label %for.inc if.then31: ; preds = %for.body %call32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %10 = load i32, ptr %x, align 4, !tbaa !20 br label %tailrecurse.i42 tailrecurse.i42: ; preds = %tailrecurse.i42.backedge, %if.then31 %u.tr.i43.in = phi ptr [ @root, %if.then31 ], [ %u.tr.i43.in.be, %tailrecurse.i42.backedge ] %u.tr.i43 = load ptr, ptr %u.tr.i43.in, align 8, !tbaa !16 %cmp.i44 = icmp eq ptr %u.tr.i43, null br i1 %cmp.i44, label %land.lhs.true.i55, label %if.end.i45 land.lhs.true.i55: ; preds = %tailrecurse.i42 %11 = load i32, ptr inttoptr (i64 24 to ptr), align 8, !tbaa !15 %cmp1.i56 = icmp ne i32 %11, %10 call void @llvm.assume(i1 %cmp1.i56) br label %if.end.i45 if.end.i45: ; preds = %land.lhs.true.i55, %tailrecurse.i42 %key2.i46 = getelementptr inbounds %struct.node, ptr %u.tr.i43, i64 0, i32 3 %12 = load i32, ptr %key2.i46, align 8, !tbaa !15 %cmp3.i47 = icmp sgt i32 %12, %10 br i1 %cmp3.i47, label %if.then4.i53, label %if.end5.i48 if.then4.i53: ; preds = %if.end.i45 %left.i54 = getelementptr inbounds %struct.node, ptr %u.tr.i43, i64 0, i32 1 br label %tailrecurse.i42.backedge if.end5.i48: ; preds = %if.end.i45 %cmp7.i49 = icmp slt i32 %12, %10 call void @llvm.assume(i1 %cmp7.i49) br label %tailrecurse.i42.backedge tailrecurse.i42.backedge: ; preds = %if.end5.i48, %if.then4.i53 %u.tr.i43.in.be = phi ptr [ %left.i54, %if.then4.i53 ], [ %u.tr.i43, %if.end5.i48 ] br label %tailrecurse.i42 for.inc: ; preds = %for.body, %treeSearch.exit, %if.then23, %insert.exit %inc = add nuw nsw i32 %i.063, 1 %13 = load i32, ptr %n, align 4, !tbaa !20 %cmp = icmp slt i32 %inc, %13 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !22 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %com) #10 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #10 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #10 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 @putchar(i32 noundef) local_unnamed_addr #6 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #6 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #8 attributes #0 = { nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree nounwind } attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #8 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } attributes #9 = { nounwind allocsize(0) } attributes #10 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !7, i64 8} !6 = !{!"node", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24} !7 = !{!"any pointer", !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{!"int", !8, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = !{!6, !7, i64 0} !14 = distinct !{!14, !12} !15 = !{!6, !10, i64 24} !16 = !{!7, !7, i64 0} !17 = !{!6, !7, i64 16} !18 = distinct !{!18, !12} !19 = distinct !{!19, !12} !20 = !{!10, !10, i64 0} !21 = !{!8, !8, i64 0} !22 = distinct !{!22, !12}
#include<stdio.h> #include<string.h> #include<stdlib.h> #define NIL NULL struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; Node root; Node mini(Node x){ if(x->left==NIL){ return x; } return mini(x->left); } Node max(Node x){ if(x->right==NIL){ return x; } return max(x->right); } Node search(Node u, int k){ if(u->key==k){ return u; } else if(u->key>k){ return search(u->right, k); } else{ return search(u->left, k); } } Node successor(Node x){ Node ans; if(x->right==NIL){ ans=x->parent; while(1){ if(ans->parent==NIL || ans->parent<ans){ break; } ans=x->parent; } } else { ans=x->right; while(1){ if(ans->left==NIL){ break; } ans=ans->left; } } return ans; } void insert(int k){ Node y = NIL; Node x = root; Node z; z = malloc(sizeof(struct node)); z->key = k; z->left = NIL; z->right = NIL; while(x != NIL){ y = x; if(z->key < x->key){ x = x->left; } else{ x = x->right; } } z->parent = y; if(y == NIL){ root = z; } else{ if(z->key < y->key){ y->left = z; } else{ y->right = z; } } } void inorder(Node u){ if(u == NIL){ return; } inorder(u->left); printf(" %d",u->key); inorder(u->right); } void preorder(Node u){ if(u == NIL){ return; } printf(" %d",u->key); preorder(u->left); preorder(u->right); } int main(){ int n, i, x; char com[20]; scanf("%d", &n); for ( i = 0; i < n; i++ ){ scanf("%s", com); if ( com[0] == 'f' ){ scanf("%d", &x); Node t = search(root, x); if ( t != NIL ){ printf("yes\n"); } else{ printf("no\n"); } } else if ( com[0] == 'i' ){ scanf("%d", &x); insert(x); } else if ( com[0] == 'p' ){ inorder(root); printf("\n"); preorder(root); printf("\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212619/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212619/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ptr, ptr, i32 } @root = dso_local local_unnamed_addr global ptr null, align 8 @.str = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @str.6 = private unnamed_addr constant [4 x i8] c"yes\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @mini(ptr noundef readonly %x) local_unnamed_addr #0 { entry: br label %tailrecurse tailrecurse: ; preds = %tailrecurse, %entry %x.tr = phi ptr [ %x, %entry ], [ %0, %tailrecurse ] %left = getelementptr inbounds %struct.node, ptr %x.tr, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !5 %cmp = icmp eq ptr %0, null br i1 %cmp, label %return, label %tailrecurse return: ; preds = %tailrecurse ret ptr %x.tr } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @max(ptr noundef readonly %x) local_unnamed_addr #0 { entry: br label %tailrecurse tailrecurse: ; preds = %tailrecurse, %entry %x.tr = phi ptr [ %x, %entry ], [ %0, %tailrecurse ] %0 = load ptr, ptr %x.tr, align 8, !tbaa !11 %cmp = icmp eq ptr %0, null br i1 %cmp, label %return, label %tailrecurse return: ; preds = %tailrecurse ret ptr %x.tr } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @search(ptr noundef readonly %u, i32 noundef %k) local_unnamed_addr #0 { entry: %key13 = getelementptr inbounds %struct.node, ptr %u, i64 0, i32 3 %0 = load i32, ptr %key13, align 8, !tbaa !12 %cmp14 = icmp eq i32 %0, %k br i1 %cmp14, label %return, label %if.else if.else: ; preds = %entry, %if.else %1 = phi i32 [ %2, %if.else ], [ %0, %entry ] %u.tr15 = phi ptr [ %u.tr.be, %if.else ], [ %u, %entry ] %cmp2 = icmp sgt i32 %1, %k %left = getelementptr inbounds %struct.node, ptr %u.tr15, i64 0, i32 1 %spec.select = select i1 %cmp2, ptr %u.tr15, ptr %left %u.tr.be = load ptr, ptr %spec.select, align 8, !tbaa !13 %key = getelementptr inbounds %struct.node, ptr %u.tr.be, i64 0, i32 3 %2 = load i32, ptr %key, align 8, !tbaa !12 %cmp = icmp eq i32 %2, %k br i1 %cmp, label %return, label %if.else return: ; preds = %if.else, %entry %u.tr.lcssa = phi ptr [ %u, %entry ], [ %u.tr.be, %if.else ] ret ptr %u.tr.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @successor(ptr nocapture noundef readonly %x) local_unnamed_addr #0 { entry: %0 = load ptr, ptr %x, align 8, !tbaa !11 %cmp = icmp eq ptr %0, null br i1 %cmp, label %if.then, label %while.cond8 if.then: ; preds = %entry %parent = getelementptr inbounds %struct.node, ptr %x, i64 0, i32 2 %ans.0 = load ptr, ptr %parent, align 8, !tbaa !14 %parent1 = getelementptr inbounds %struct.node, ptr %ans.0, i64 0, i32 2 %1 = load ptr, ptr %parent1, align 8, !tbaa !14 %cmp2 = icmp eq ptr %1, null %cmp4 = icmp ult ptr %1, %ans.0 %or.cond = or i1 %cmp2, %cmp4 br i1 %or.cond, label %if.end15, label %while.cond while.cond: ; preds = %if.then, %while.cond br label %while.cond while.cond8: ; preds = %entry, %while.cond8 %ans.1 = phi ptr [ %2, %while.cond8 ], [ %0, %entry ] %left = getelementptr inbounds %struct.node, ptr %ans.1, i64 0, i32 1 %2 = load ptr, ptr %left, align 8, !tbaa !5 %cmp10 = icmp eq ptr %2, null br i1 %cmp10, label %if.end15, label %while.cond8 if.end15: ; preds = %while.cond8, %if.then %ans.2 = phi ptr [ %ans.0, %if.then ], [ %ans.1, %while.cond8 ] ret ptr %ans.2 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local void @insert(i32 noundef %k) local_unnamed_addr #2 { entry: %0 = load ptr, ptr @root, align 8, !tbaa !13 %call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7 %key = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 3 store i32 %k, ptr %key, align 8, !tbaa !12 %cmp.not34 = icmp eq ptr %0, null tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call, i8 0, i64 16, i1 false) br i1 %cmp.not34, label %if.then7, label %while.body while.body: ; preds = %entry, %while.body %x.035 = phi ptr [ %x.1, %while.body ], [ %0, %entry ] %key2 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %1 = load i32, ptr %key2, align 8, !tbaa !12 %cmp3 = icmp sgt i32 %1, %k %left4 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %x.1.in = select i1 %cmp3, ptr %left4, ptr %x.035 %x.1 = load ptr, ptr %x.1.in, align 8, !tbaa !13 %cmp.not = icmp eq ptr %x.1, null br i1 %cmp.not, label %if.else8, label %while.body, !llvm.loop !15 if.then7: ; preds = %entry %parent37 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr null, ptr %parent37, align 8, !tbaa !14 br label %if.end17 if.else8: ; preds = %while.body %parent = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr %x.035, ptr %parent, align 8, !tbaa !14 %key10 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %2 = load i32, ptr %key10, align 8, !tbaa !12 %cmp11 = icmp sgt i32 %2, %k %left13 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %spec.select = select i1 %cmp11, ptr %left13, ptr %x.035 br label %if.end17 if.end17: ; preds = %if.else8, %if.then7 %left13.sink = phi ptr [ @root, %if.then7 ], [ %spec.select, %if.else8 ] store ptr %call, ptr %left13.sink, align 8, !tbaa !13 ret void } ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind uwtable define dso_local void @inorder(ptr noundef readonly %u) local_unnamed_addr #2 { entry: %cmp4 = icmp eq ptr %u, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %u.tr5 = phi ptr [ %2, %if.end ], [ %u, %entry ] %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !5 tail call void @inorder(ptr noundef %0) %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %1 = load i32, ptr %key, align 8, !tbaa !12 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !11 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind uwtable define dso_local void @preorder(ptr noundef readonly %u) local_unnamed_addr #2 { entry: %cmp4 = icmp eq ptr %u, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %u.tr5 = phi ptr [ %2, %if.end ], [ %u, %entry ] %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %0 = load i32, ptr %key, align 8, !tbaa !12 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %1 = load ptr, ptr %left, align 8, !tbaa !5 tail call void @preorder(ptr noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !11 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %com = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #8 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #8 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %com) #8 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !17 %cmp34 = icmp sgt i32 %0, 0 br i1 %cmp34, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.035 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %com) %1 = load i8, ptr %com, align 16, !tbaa !18 switch i8 %1, label %for.inc [ i8 102, label %if.then i8 105, label %if.then16 i8 112, label %if.then23 ] if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %2 = load ptr, ptr @root, align 8, !tbaa !13 %3 = load i32, ptr %x, align 4, !tbaa !17 %key13.i = getelementptr inbounds %struct.node, ptr %2, i64 0, i32 3 %4 = load i32, ptr %key13.i, align 8, !tbaa !12 %cmp14.i = icmp eq i32 %4, %3 br i1 %cmp14.i, label %if.then8, label %if.else.i if.else.i: ; preds = %if.then, %if.else.i %5 = phi i32 [ %6, %if.else.i ], [ %4, %if.then ] %u.tr15.i = phi ptr [ %u.tr.be.i, %if.else.i ], [ %2, %if.then ] %cmp2.i = icmp sgt i32 %5, %3 %left.i = getelementptr inbounds %struct.node, ptr %u.tr15.i, i64 0, i32 1 %spec.select.i = select i1 %cmp2.i, ptr %u.tr15.i, ptr %left.i %u.tr.be.i = load ptr, ptr %spec.select.i, align 8, !tbaa !13 %key.i = getelementptr inbounds %struct.node, ptr %u.tr.be.i, i64 0, i32 3 %6 = load i32, ptr %key.i, align 8, !tbaa !12 %cmp.i = icmp eq i32 %6, %3 br i1 %cmp.i, label %if.then8, label %if.else.i if.then8: ; preds = %if.else.i, %if.then %puts31 = call i32 @puts(ptr nonnull dereferenceable(1) @str.6) br label %for.inc if.then16: ; preds = %for.body %call17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %7 = load i32, ptr %x, align 4, !tbaa !17 %8 = load ptr, ptr @root, align 8, !tbaa !13 %call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7 %key.i32 = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 3 store i32 %7, ptr %key.i32, align 8, !tbaa !12 %cmp.not34.i = icmp eq ptr %8, null call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call.i, i8 0, i64 16, i1 false) br i1 %cmp.not34.i, label %insert.exit, label %while.body.i while.body.i: ; preds = %if.then16, %while.body.i %x.035.i = phi ptr [ %x.1.i, %while.body.i ], [ %8, %if.then16 ] %key2.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 3 %9 = load i32, ptr %key2.i, align 8, !tbaa !12 %cmp3.i = icmp sgt i32 %9, %7 %left4.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 1 %x.1.in.i = select i1 %cmp3.i, ptr %left4.i, ptr %x.035.i %x.1.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !13 %cmp.not.i = icmp eq ptr %x.1.i, null br i1 %cmp.not.i, label %insert.exit, label %while.body.i, !llvm.loop !15 insert.exit: ; preds = %while.body.i, %if.then16 %.sink = phi ptr [ null, %if.then16 ], [ %x.035.i, %while.body.i ] %left13.sink.i = phi ptr [ @root, %if.then16 ], [ %x.1.in.i, %while.body.i ] %parent37.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2 store ptr %.sink, ptr %parent37.i, align 8, !tbaa !14 store ptr %call.i, ptr %left13.sink.i, align 8, !tbaa !13 br label %for.inc if.then23: ; preds = %for.body %10 = load ptr, ptr @root, align 8, !tbaa !13 call void @inorder(ptr noundef %10) %putchar = call i32 @putchar(i32 10) %11 = load ptr, ptr @root, align 8, !tbaa !13 call void @preorder(ptr noundef %11) %putchar30 = call i32 @putchar(i32 10) br label %for.inc for.inc: ; preds = %for.body, %if.then8, %if.then23, %insert.exit %inc = add nuw nsw i32 %i.035, 1 %12 = load i32, ptr %n, align 4, !tbaa !17 %cmp = icmp slt i32 %inc, %12 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !19 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %com) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #8 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #5 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6 attributes #0 = { nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind "no-trapping-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 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #7 = { nounwind allocsize(0) } attributes #8 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !7, i64 8} !6 = !{!"node", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24} !7 = !{!"any pointer", !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{!"int", !8, i64 0} !11 = !{!6, !7, i64 0} !12 = !{!6, !10, i64 24} !13 = !{!7, !7, i64 0} !14 = !{!6, !7, i64 16} !15 = distinct !{!15, !16} !16 = !{!"llvm.loop.mustprogress"} !17 = !{!10, !10, i64 0} !18 = !{!8, !8, i64 0} !19 = distinct !{!19, !16}
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> typedef long double LD; typedef long long ll; #define int ll #define pb push_back #define mp make_pair #define REP(i,n) for (int i = 0; i < n; i++) #define FOR(i,a,b) for (int i = a; i < b; i++) #define REPD(i,n) for (int i = n-1; i >= 0; i--) #define FORD(i,a,b) for (int i = a; i >= b; i--) // -----<SCANF>----- #define sfi(x) scanf("%d",&x); #define sfi2(x,y) scanf("%d%d",&x,&y); #define sfi3(x,y,z) scanf("%d%d%d",&x,&y,&z); #define sfl(x) scanf("%lld",&x); #define sfl2(x,y) scanf("%lld%lld",&x,&y); #define sfl3(x,y,z) scanf("%lld%lld%lld",&x,&y,&z); #define sfl4(x,y,z,x1) scanf("%lld%lld%lld%lld",&x,&y,&z,&x1); #define sfl5(x,y,z,x1,y1) scanf("%lld%lld%lld%lld%lld",&x,&y,&z,&x1,&y1); #define sfl6(x,y,z,x1,y1,z1) scanf("%lld%lld%lld%lld%lld%lld",&x,&y,&z,&x1,&y1,&z1); #define sfs(x) scanf("%s",x); #define sfs2(x,y) scanf("%s%s",x,y); #define sfs3(x,y,z) scanf("%s%s%s",x,y,z); // ----</SCANF>----- // ----<PRINTF>----- #define pfi(x) printf("%d\n",x); #define pfi2(x,y) printf("%d %d\n",x,y); #define pfi3(x,y,z) printf("%d %d %d\n",x,y,z); #define pfl(x) printf("%lld\n",x); #define pfl2(x,y) printf("%lld %lld\n",x,y); #define pfl3(x,y,z) printf("%lld %lld %lld\n",x,y,z); #define pfs(x) printf("%s\n",x); #define pfs2(x,y) printf("%s %s\n",x,y); #define pfs3(x,y,z) printf("%s %s %s\n",x,y,z); #define pwe(x) printf("%lld ",x); // print without end // ----</PRINTF>---- long long a,b,c,d,e,t,i,j,n,m,row,col,change,x; long long gcd(long long k,long long l) { if(k%l==0) { return l; } else { gcd(l,k%l); } } int main() { sfl(t); while(t--) { sfl(n); a=gcd(100,n); pfl(100/a); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21267/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21267/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @t = dso_local global i64 0, align 8 @n = dso_local global i64 0, align 8 @a = dso_local local_unnamed_addr global i64 0, align 8 @.str.1 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 @b = dso_local local_unnamed_addr global i64 0, align 8 @c = dso_local local_unnamed_addr global i64 0, align 8 @d = dso_local local_unnamed_addr global i64 0, align 8 @e = dso_local local_unnamed_addr global i64 0, align 8 @i = dso_local local_unnamed_addr global i64 0, align 8 @j = dso_local local_unnamed_addr global i64 0, align 8 @m = dso_local local_unnamed_addr global i64 0, align 8 @row = dso_local local_unnamed_addr global i64 0, align 8 @col = dso_local local_unnamed_addr global i64 0, align 8 @change = dso_local local_unnamed_addr global i64 0, align 8 @x = dso_local local_unnamed_addr global i64 0, align 8 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @gcd(i64 noundef %k, i64 noundef returned %l) local_unnamed_addr #0 { entry: %rem7 = srem i64 %k, %l %cmp8.not = icmp eq i64 %rem7, 0 br i1 %cmp8.not, label %if.end, label %if.else if.else: ; preds = %entry, %if.else %rem12 = phi i64 [ %rem, %if.else ], [ %rem7, %entry ] %l.tr9 = phi i64 [ %rem12, %if.else ], [ %l, %entry ] %rem = srem i64 %l.tr9, %rem12 %cmp = icmp eq i64 %rem, 0 br i1 %cmp, label %if.end, label %if.else if.end: ; preds = %if.else, %entry ret i64 %l } ; Function Attrs: nofree nounwind uwtable define dso_local i64 @main() local_unnamed_addr #1 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t) %0 = load i64, ptr @t, align 8, !tbaa !5 %dec4 = add nsw i64 %0, -1 store i64 %dec4, ptr @t, align 8, !tbaa !5 %tobool.not5 = icmp eq i64 %0, 0 br i1 %tobool.not5, label %while.end, label %while.body while.body: ; preds = %entry, %gcd.exit %call1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n) %1 = load i64, ptr @n, align 8, !tbaa !5 %rem7.i = srem i64 100, %1 %div = sdiv i64 100, %1 %cmp8.not.i = icmp eq i64 %rem7.i, 0 br i1 %cmp8.not.i, label %gcd.exit, label %if.else.i if.else.i: ; preds = %while.body, %if.else.i %rem12.i = phi i64 [ %rem.i, %if.else.i ], [ %rem7.i, %while.body ] %l.tr9.i = phi i64 [ %rem12.i, %if.else.i ], [ %1, %while.body ] %rem.i = srem i64 %l.tr9.i, %rem12.i %cmp.i = icmp eq i64 %rem.i, 0 br i1 %cmp.i, label %gcd.exit, label %if.else.i gcd.exit: ; preds = %if.else.i, %while.body store i64 %1, ptr @a, align 8, !tbaa !5 %call3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div) %2 = load i64, ptr @t, align 8, !tbaa !5 %dec = add nsw i64 %2, -1 store i64 %dec, ptr @t, align 8, !tbaa !5 %tobool.not = icmp eq i64 %2, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %gcd.exit, %entry ret i64 undef } ; 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 attributes #0 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-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" } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <string.h> #include <stdbool.h> #define clr(ar) memset(ar, 0, sizeof(ar)) #define read() freopen("lol.txt", "r", stdin) const char* cmp = "CODEFORCES"; int n, m; char str[1010], lol[1010]; int main(){ int i, j, k, flag; while (scanf("%s", str) != EOF){ flag = 0; n = strlen(str); for (i = 0; i < n; i++){ for (j = i; j < n; j++){ m = 0; for (k = 0; k < i; k++) lol[m++] = str[k]; for (k = j + 1; k < n; k++) lol[m++] = str[k]; lol[m] = 0; if (strcmp(lol, cmp) == 0) flag = 1; } } if (flag) puts("YES"); else puts("NO"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21272/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21272/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [11 x i8] c"CODEFORCES\00", align 1 @cmp = dso_local local_unnamed_addr global ptr @.str, align 8 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @str = dso_local global [1010 x i8] zeroinitializer, align 16 @n = dso_local local_unnamed_addr global i32 0, align 4 @m = dso_local local_unnamed_addr global i32 0, align 4 @lol = dso_local global [1010 x i8] zeroinitializer, align 16 @.str.2 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 @.str.3 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %call69 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @str) %cmp.not70 = icmp eq i32 %call69, -1 br i1 %cmp.not70, label %while.end, label %while.body while.body: ; preds = %entry, %if.end41 %call1 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @str) #5 %conv = trunc i64 %call1 to i32 store i32 %conv, ptr @n, align 4, !tbaa !5 %cmp266 = icmp sgt i32 %conv, 0 br i1 %cmp266, label %for.cond4.preheader.lr.ph, label %if.else for.cond4.preheader.lr.ph: ; preds = %while.body %0 = load ptr, ptr @cmp, align 8, !tbaa !9 %1 = add i64 %call1, 4294967294 %2 = and i64 %1, 4294967295 %wide.trip.count102 = and i64 %call1, 4294967295 %3 = add i64 %call1, 4294967294 br label %for.cond4.preheader for.cond4.preheader: ; preds = %for.cond4.preheader.lr.ph, %for.inc35 %indvars.iv = phi i64 [ 1, %for.cond4.preheader.lr.ph ], [ %indvars.iv.next, %for.inc35 ] %indvars.iv72 = phi i32 [ -1, %for.cond4.preheader.lr.ph ], [ %indvars.iv.next73, %for.inc35 ] %indvar = phi i64 [ 0, %for.cond4.preheader.lr.ph ], [ %6, %for.inc35 ] %flag.068 = phi i32 [ 0, %for.cond4.preheader.lr.ph ], [ %.us-phi, %for.inc35 ] %4 = add nuw i64 %indvar, 2 %indvars101 = trunc i64 %indvar to i32 %5 = sub nsw i64 %2, %indvar %scevgep = getelementptr i8, ptr @lol, i64 %indvar %6 = add nuw nsw i64 %indvar, 1 %7 = add i32 %indvars.iv72, 1 %cmp953.not = icmp eq i32 %indvars101, 0 br i1 %cmp953.not, label %for.body7.preheader, label %for.body7.us.preheader for.body7.us.preheader: ; preds = %for.cond4.preheader %8 = getelementptr i8, ptr @str, i64 %6 %9 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %indvar, i64 0 br label %for.body7.us for.body7.preheader: ; preds = %for.cond4.preheader %10 = getelementptr i8, ptr @str, i64 %indvars.iv br label %for.body7 for.body7.us: ; preds = %for.body7.us.preheader, %for.end26.us %indvars.iv80 = phi i64 [ %indvars.iv, %for.body7.us.preheader ], [ %indvars.iv.next81, %for.end26.us ] %indvar77 = phi i64 [ 0, %for.body7.us.preheader ], [ %indvar.next78, %for.end26.us ] %flag.165.us = phi i32 [ %flag.068, %for.body7.us.preheader ], [ %spec.select.us, %for.end26.us ] %j.064.us = phi i32 [ %indvars101, %for.body7.us.preheader ], [ %add.us, %for.end26.us ] %11 = add nuw i64 %indvar, %indvar77 %12 = sub i64 %3, %11 %13 = and i64 %12, 4294967295 %14 = add nuw nsw i64 %13, 1 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @lol, ptr nonnull align 16 @str, i64 %indvar, i1 false), !tbaa !11 store i32 %7, ptr @m, align 4, !tbaa !5 %add.us = add nuw nsw i32 %j.064.us, 1 %cmp1658.us = icmp slt i32 %add.us, %conv br i1 %cmp1658.us, label %for.body18.us.preheader, label %for.end26.us for.end26.us: ; preds = %for.cond15.for.end26_crit_edge.us, %for.body7.us %inc21.lcssa63.us = phi i32 [ %23, %for.cond15.for.end26_crit_edge.us ], [ %7, %for.body7.us ] %idxprom27.us = sext i32 %inc21.lcssa63.us to i64 %arrayidx28.us = getelementptr inbounds [1010 x i8], ptr @lol, i64 0, i64 %idxprom27.us store i8 0, ptr %arrayidx28.us, align 1, !tbaa !11 %call29.us = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @lol, ptr noundef nonnull dereferenceable(1) %0) #5 %cmp30.us = icmp eq i32 %call29.us, 0 %spec.select.us = select i1 %cmp30.us, i32 1, i32 %flag.165.us %indvar.next78 = add nuw nsw i64 %indvar77, 1 %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1 br i1 %cmp1658.us, label %for.body7.us, label %for.inc35, !llvm.loop !12 for.body18.us: ; preds = %for.body18.us.preheader125, %for.body18.us %indvars.iv84 = phi i64 [ %indvars.iv.next85, %for.body18.us ], [ %indvars.iv84.ph, %for.body18.us.preheader125 ] %indvars.iv82 = phi i64 [ %indvars.iv.next83, %for.body18.us ], [ %indvars.iv82.ph, %for.body18.us.preheader125 ] %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1 %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1 %15 = trunc i64 %indvars.iv.next83 to i32 %cmp16.us = icmp slt i32 %15, %conv br i1 %cmp16.us, label %for.body18.us, label %for.cond15.for.end26_crit_edge.us, !llvm.loop !14 for.body18.us.preheader: ; preds = %for.body7.us %16 = sub i64 %5, %indvar77 %17 = and i64 %16, 4294967295 %18 = add nuw nsw i64 %17, 1 %scevgep79 = getelementptr i8, ptr %8, i64 %indvar77 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %scevgep, ptr noundef nonnull align 1 dereferenceable(1) %scevgep79, i64 %18, i1 false), !tbaa !11 %min.iters.check110 = icmp ult i64 %13, 3 br i1 %min.iters.check110, label %for.body18.us.preheader125, label %vector.ph111 vector.ph111: ; preds = %for.body18.us.preheader %n.vec113 = and i64 %14, 8589934588 %ind.end114 = add nuw i64 %indvars.iv80, %n.vec113 br label %vector.body117 vector.body117: ; preds = %vector.body117, %vector.ph111 %index118 = phi i64 [ 0, %vector.ph111 ], [ %index.next121, %vector.body117 ] %vec.phi119 = phi <2 x i64> [ %9, %vector.ph111 ], [ %19, %vector.body117 ] %vec.phi120 = phi <2 x i64> [ zeroinitializer, %vector.ph111 ], [ %20, %vector.body117 ] %19 = add <2 x i64> %vec.phi119, <i64 1, i64 1> %20 = add <2 x i64> %vec.phi120, <i64 1, i64 1> %index.next121 = add nuw i64 %index118, 4 %21 = icmp eq i64 %index.next121, %n.vec113 br i1 %21, label %middle.block108, label %vector.body117, !llvm.loop !17 middle.block108: ; preds = %vector.body117 %bin.rdx122 = add <2 x i64> %20, %19 %22 = tail call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx122) %cmp.n116 = icmp eq i64 %14, %n.vec113 br i1 %cmp.n116, label %for.cond15.for.end26_crit_edge.us, label %for.body18.us.preheader125 for.body18.us.preheader125: ; preds = %for.body18.us.preheader, %middle.block108 %indvars.iv84.ph = phi i64 [ %indvar, %for.body18.us.preheader ], [ %22, %middle.block108 ] %indvars.iv82.ph = phi i64 [ %indvars.iv80, %for.body18.us.preheader ], [ %ind.end114, %middle.block108 ] br label %for.body18.us for.cond15.for.end26_crit_edge.us: ; preds = %for.body18.us, %middle.block108 %indvars.iv.next85.lcssa = phi i64 [ %22, %middle.block108 ], [ %indvars.iv.next85, %for.body18.us ] %23 = trunc i64 %indvars.iv.next85.lcssa to i32 store i32 %23, ptr @m, align 4, !tbaa !5 br label %for.end26.us for.body7: ; preds = %for.body7.preheader, %for.end26 %indvars.iv92 = phi i64 [ %indvars.iv, %for.body7.preheader ], [ %indvars.iv.next93, %for.end26 ] %indvar89 = phi i64 [ 0, %for.body7.preheader ], [ %indvar.next90, %for.end26 ] %flag.165 = phi i32 [ %flag.068, %for.body7.preheader ], [ %spec.select, %for.end26 ] %j.064 = phi i32 [ 0, %for.body7.preheader ], [ %add, %for.end26 ] %24 = add i64 %4, %indvar89 %25 = trunc i64 %24 to i32 %smax = tail call i32 @llvm.smax.i32(i32 %25, i32 %conv) %26 = add nuw i64 %indvar, %indvar89 %27 = trunc i64 %26 to i32 %reass.sub = sub i32 %smax, %27 %28 = add i32 %reass.sub, -2 %29 = zext i32 %28 to i64 %30 = add nuw nsw i64 %29, 1 store i32 0, ptr @m, align 4, !tbaa !5 %add = add nuw nsw i32 %j.064, 1 %cmp1658 = icmp slt i32 %add, %conv br i1 %cmp1658, label %for.body18.preheader, label %for.end26 for.body18.preheader: ; preds = %for.body7 %31 = sub i64 %5, %indvar89 %32 = and i64 %31, 4294967295 %33 = add nuw nsw i64 %32, 1 %scevgep91 = getelementptr i8, ptr %10, i64 %indvar89 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) @lol, ptr noundef nonnull align 1 dereferenceable(1) %scevgep91, i64 %33, i1 false), !tbaa !11 %min.iters.check = icmp ult i32 %28, 3 br i1 %min.iters.check, label %for.body18.preheader124, label %vector.ph vector.ph: ; preds = %for.body18.preheader %n.vec = and i64 %30, 8589934588 %ind.end = add nuw i64 %indvars.iv92, %n.vec br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %34, %vector.body ] %vec.phi107 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %35, %vector.body ] %34 = add <2 x i64> %vec.phi, <i64 1, i64 1> %35 = add <2 x i64> %vec.phi107, <i64 1, i64 1> %index.next = add nuw i64 %index, 4 %36 = icmp eq i64 %index.next, %n.vec br i1 %36, label %middle.block, label %vector.body, !llvm.loop !18 middle.block: ; preds = %vector.body %bin.rdx = add <2 x i64> %35, %34 %37 = tail call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx) %cmp.n = icmp eq i64 %30, %n.vec br i1 %cmp.n, label %for.cond15.for.end26_crit_edge, label %for.body18.preheader124 for.body18.preheader124: ; preds = %for.body18.preheader, %middle.block %indvars.iv96.ph = phi i64 [ 0, %for.body18.preheader ], [ %37, %middle.block ] %indvars.iv94.ph = phi i64 [ %indvars.iv92, %for.body18.preheader ], [ %ind.end, %middle.block ] br label %for.body18 for.body18: ; preds = %for.body18.preheader124, %for.body18 %indvars.iv96 = phi i64 [ %indvars.iv.next97, %for.body18 ], [ %indvars.iv96.ph, %for.body18.preheader124 ] %indvars.iv94 = phi i64 [ %indvars.iv.next95, %for.body18 ], [ %indvars.iv94.ph, %for.body18.preheader124 ] %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1 %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1 %38 = trunc i64 %indvars.iv.next95 to i32 %cmp16 = icmp slt i32 %38, %conv br i1 %cmp16, label %for.body18, label %for.cond15.for.end26_crit_edge, !llvm.loop !19 for.cond15.for.end26_crit_edge: ; preds = %for.body18, %middle.block %indvars.iv.next97.lcssa = phi i64 [ %37, %middle.block ], [ %indvars.iv.next97, %for.body18 ] %39 = trunc i64 %indvars.iv.next97.lcssa to i32 store i32 %39, ptr @m, align 4, !tbaa !5 br label %for.end26 for.end26: ; preds = %for.cond15.for.end26_crit_edge, %for.body7 %inc21.lcssa63 = phi i64 [ %indvars.iv.next97.lcssa, %for.cond15.for.end26_crit_edge ], [ 0, %for.body7 ] %sext = shl i64 %inc21.lcssa63, 32 %idxprom27 = ashr exact i64 %sext, 32 %arrayidx28 = getelementptr inbounds [1010 x i8], ptr @lol, i64 0, i64 %idxprom27 store i8 0, ptr %arrayidx28, align 1, !tbaa !11 %call29 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @lol, ptr noundef nonnull dereferenceable(1) %0) #5 %cmp30 = icmp eq i32 %call29, 0 %spec.select = select i1 %cmp30, i32 1, i32 %flag.165 %indvar.next90 = add nuw nsw i64 %indvar89, 1 %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1 br i1 %cmp1658, label %for.body7, label %for.inc35, !llvm.loop !12 for.inc35: ; preds = %for.end26.us, %for.end26 %.us-phi = phi i32 [ %spec.select, %for.end26 ], [ %spec.select.us, %for.end26.us ] %indvars.iv.next73 = add nsw i32 %indvars.iv72, 1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %6, %wide.trip.count102 br i1 %exitcond.not, label %for.end37, label %for.cond4.preheader, !llvm.loop !20 for.end37: ; preds = %for.inc35 %tobool.not = icmp eq i32 %.us-phi, 0 br i1 %tobool.not, label %if.else, label %if.end41 if.else: ; preds = %while.body, %for.end37 br label %if.end41 if.end41: ; preds = %for.end37, %if.else %.str.3.sink = phi ptr [ @.str.3, %if.else ], [ @.str.2, %for.end37 ] %call40 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.3.sink) %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @str) %cmp.not = icmp eq i32 %call, -1 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !21 while.end: ; preds = %if.end41, %entry ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #1 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } 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 = !{!10, !10, i64 0} !10 = !{!"any pointer", !7, i64 0} !11 = !{!7, !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"} !14 = distinct !{!14, !13, !15, !16} !15 = !{!"llvm.loop.unroll.runtime.disable"} !16 = !{!"llvm.loop.isvectorized", i32 1} !17 = distinct !{!17, !13, !16, !15} !18 = distinct !{!18, !13, !16, !15} !19 = distinct !{!19, !13, !15, !16} !20 = distinct !{!20, !13} !21 = distinct !{!21, !13}
#include<stdio.h> #include<stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeMaximum(Node x){ while(x->right!=NIL)x=x->right; return x; } Node treeMinimum(Node x){ while(x->left!=NIL)x=x->left; return x; } Node treeSuccessor(Node x){ Node y; if(x->right!=NIL)return treeMinimum(x->right); y=x->parent; while(y!=NIL && x==y->right){ x=y; y=y->parent; } return y; } void insert(int w){ Node y = NIL; Node x = root; Node z; z = malloc(sizeof(struct node)); z->key = w; z->left = NIL; z->right = NIL; while(x!=NIL){ y=x; if(z->key<x->key) x=x->left; else x=x->right; } z->parent=y; if(y==NIL) root=z; else if(z->key<y->key) y->left=z; else y->right=z; } void inParse(Node u){ if(u==NIL){ return; } printf(" %d",u->key); inParse(u->left); inParse(u->right); } void preParse(Node u){ if(u==NIL){ return; } preParse(u->left); printf(" %d",u->key); preParse(u->right); } int main(){ int a,b,c,i; char d[20]; scanf("%d", &a); for ( i = 0; i < a; i++ ){ scanf("%s", d); if ( d[0] == 'i' ){ scanf("%d", &b); insert(b); } else if ( d[0] == 'p' ){ preParse(root); printf("\n"); inParse(root); printf("\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212763/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212763/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ptr, ptr, i32 } @root = dso_local local_unnamed_addr global ptr null, align 8 @.str = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeMaximum(ptr noundef readonly %x) local_unnamed_addr #0 { entry: br label %while.cond while.cond: ; preds = %while.cond, %entry %x.addr.0 = phi ptr [ %x, %entry ], [ %0, %while.cond ] %0 = load ptr, ptr %x.addr.0, align 8, !tbaa !5 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %while.end, label %while.cond, !llvm.loop !11 while.end: ; preds = %while.cond ret ptr %x.addr.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeMinimum(ptr noundef readonly %x) local_unnamed_addr #0 { entry: br label %while.cond while.cond: ; preds = %while.cond, %entry %x.addr.0 = phi ptr [ %x, %entry ], [ %0, %while.cond ] %left = getelementptr inbounds %struct.node, ptr %x.addr.0, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !13 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %while.end, label %while.cond, !llvm.loop !14 while.end: ; preds = %while.cond ret ptr %x.addr.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local ptr @treeSuccessor(ptr noundef readonly %x) local_unnamed_addr #0 { entry: %0 = load ptr, ptr %x, align 8, !tbaa !5 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %while.cond, label %while.cond.i while.cond.i: ; preds = %entry, %while.cond.i %x.addr.0.i = phi ptr [ %1, %while.cond.i ], [ %0, %entry ] %left.i = getelementptr inbounds %struct.node, ptr %x.addr.0.i, i64 0, i32 1 %1 = load ptr, ptr %left.i, align 8, !tbaa !13 %cmp.not.i = icmp eq ptr %1, null br i1 %cmp.not.i, label %cleanup, label %while.cond.i, !llvm.loop !14 while.cond: ; preds = %entry, %land.rhs %x.addr.0 = phi ptr [ %y.0, %land.rhs ], [ %x, %entry ] %y.0.in = getelementptr inbounds %struct.node, ptr %x.addr.0, i64 0, i32 2 %y.0 = load ptr, ptr %y.0.in, align 8, !tbaa !15 %cmp2.not = icmp eq ptr %y.0, null br i1 %cmp2.not, label %cleanup, label %land.rhs land.rhs: ; preds = %while.cond %2 = load ptr, ptr %y.0, align 8, !tbaa !5 %cmp4 = icmp eq ptr %x.addr.0, %2 br i1 %cmp4, label %while.cond, label %cleanup, !llvm.loop !16 cleanup: ; preds = %while.cond.i, %land.rhs, %while.cond %retval.0 = phi ptr [ %y.0, %land.rhs ], [ null, %while.cond ], [ %x.addr.0.i, %while.cond.i ] ret ptr %retval.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local void @insert(i32 noundef %w) local_unnamed_addr #2 { entry: %0 = load ptr, ptr @root, align 8, !tbaa !17 %call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7 %key = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 3 store i32 %w, ptr %key, align 8, !tbaa !18 %cmp.not34 = icmp eq ptr %0, null tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call, i8 0, i64 16, i1 false) br i1 %cmp.not34, label %if.then7, label %while.body while.body: ; preds = %entry, %while.body %x.035 = phi ptr [ %x.1, %while.body ], [ %0, %entry ] %key2 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %1 = load i32, ptr %key2, align 8, !tbaa !18 %cmp3 = icmp sgt i32 %1, %w %left4 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %x.1.in = select i1 %cmp3, ptr %left4, ptr %x.035 %x.1 = load ptr, ptr %x.1.in, align 8, !tbaa !17 %cmp.not = icmp eq ptr %x.1, null br i1 %cmp.not, label %if.else8, label %while.body, !llvm.loop !19 if.then7: ; preds = %entry %parent37 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr null, ptr %parent37, align 8, !tbaa !15 br label %if.end17 if.else8: ; preds = %while.body %parent = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr %x.035, ptr %parent, align 8, !tbaa !15 %key10 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %2 = load i32, ptr %key10, align 8, !tbaa !18 %cmp11 = icmp sgt i32 %2, %w %left13 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %spec.select = select i1 %cmp11, ptr %left13, ptr %x.035 br label %if.end17 if.end17: ; preds = %if.else8, %if.then7 %left13.sink = phi ptr [ @root, %if.then7 ], [ %spec.select, %if.else8 ] store ptr %call, ptr %left13.sink, align 8, !tbaa !17 ret void } ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind uwtable define dso_local void @inParse(ptr noundef readonly %u) local_unnamed_addr #2 { entry: %cmp4 = icmp eq ptr %u, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %u.tr5 = phi ptr [ %2, %if.end ], [ %u, %entry ] %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %0 = load i32, ptr %key, align 8, !tbaa !18 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %1 = load ptr, ptr %left, align 8, !tbaa !13 tail call void @inParse(ptr noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !5 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind uwtable define dso_local void @preParse(ptr noundef readonly %u) local_unnamed_addr #2 { entry: %cmp4 = icmp eq ptr %u, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %u.tr5 = phi ptr [ %2, %if.end ], [ %u, %entry ] %left = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !13 tail call void @preParse(ptr noundef %0) %key = getelementptr inbounds %struct.node, ptr %u.tr5, i64 0, i32 3 %1 = load i32, ptr %key, align 8, !tbaa !18 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %1) %2 = load ptr, ptr %u.tr5, align 8, !tbaa !5 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %d = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #8 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #8 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %d) #8 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !20 %cmp15 = icmp sgt i32 %0, 0 br i1 %cmp15, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.016 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %d) %1 = load i8, ptr %d, align 16, !tbaa !21 switch i8 %1, label %for.inc [ i8 105, label %if.then i8 112, label %if.then9 ] if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %b) %2 = load i32, ptr %b, align 4, !tbaa !20 %3 = load ptr, ptr @root, align 8, !tbaa !17 %call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7 %key.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 3 store i32 %2, ptr %key.i, align 8, !tbaa !18 %cmp.not34.i = icmp eq ptr %3, null call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call.i, i8 0, i64 16, i1 false) br i1 %cmp.not34.i, label %insert.exit, label %while.body.i while.body.i: ; preds = %if.then, %while.body.i %x.035.i = phi ptr [ %x.1.i, %while.body.i ], [ %3, %if.then ] %key2.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 3 %4 = load i32, ptr %key2.i, align 8, !tbaa !18 %cmp3.i = icmp sgt i32 %4, %2 %left4.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 1 %x.1.in.i = select i1 %cmp3.i, ptr %left4.i, ptr %x.035.i %x.1.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !17 %cmp.not.i = icmp eq ptr %x.1.i, null br i1 %cmp.not.i, label %insert.exit, label %while.body.i, !llvm.loop !19 insert.exit: ; preds = %while.body.i, %if.then %.sink = phi ptr [ null, %if.then ], [ %x.035.i, %while.body.i ] %left13.sink.i = phi ptr [ @root, %if.then ], [ %x.1.in.i, %while.body.i ] %parent37.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2 store ptr %.sink, ptr %parent37.i, align 8, !tbaa !15 store ptr %call.i, ptr %left13.sink.i, align 8, !tbaa !17 br label %for.inc if.then9: ; preds = %for.body %5 = load ptr, ptr @root, align 8, !tbaa !17 call void @preParse(ptr noundef %5) %putchar = call i32 @putchar(i32 10) %6 = load ptr, ptr @root, align 8, !tbaa !17 call void @inParse(ptr noundef %6) %putchar14 = call i32 @putchar(i32 10) br label %for.inc for.inc: ; preds = %for.body, %insert.exit, %if.then9 %inc = add nuw nsw i32 %i.016, 1 %7 = load i32, ptr %a, align 4, !tbaa !20 %cmp = icmp slt i32 %inc, %7 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !22 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %d) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #8 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 @putchar(i32 noundef) local_unnamed_addr #5 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6 attributes #0 = { nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind "no-trapping-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 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #7 = { nounwind allocsize(0) } attributes #8 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !7, i64 0} !6 = !{!"node", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24} !7 = !{!"any pointer", !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{!"int", !8, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = !{!6, !7, i64 8} !14 = distinct !{!14, !12} !15 = !{!6, !7, i64 16} !16 = distinct !{!16, !12} !17 = !{!7, !7, i64 0} !18 = !{!6, !10, i64 24} !19 = distinct !{!19, !12} !20 = !{!10, !10, i64 0} !21 = !{!8, !8, i64 0} !22 = distinct !{!22, !12}
#include<stdio.h> #include<stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; void insert(int k){ Node y = NIL; Node x = root; Node z; z = malloc(sizeof(struct node)); z->key = k; z->left = NIL; z->right = NIL; while(x != NIL){ y=x; if(z->key < x->key) x = x->left; else x = x->right; } z->parent = y; if(y == NIL) root = z; else if(z->key < y->key) y->left = z; else y->right = z; } void inorder(Node u){ if(u->left != NIL) inorder(u->left); printf(" %d",u->key); if(u->right != NIL) inorder(u->right); } void preorder(Node u){ printf(" %d",u->key); if(u->left != NIL) preorder(u->left); if(u->right != NIL) preorder(u->right); } int main(){ int n, i, x; char com[20]; scanf("%d", &n); for ( i = 0; i < n; i++ ){ scanf("%s", com); if ( com[0] == 'i' ){ scanf("%d", &x); insert(x); } else if ( com[0] == 'p' ){ inorder(root); printf("\n"); preorder(root); printf("\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212813/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212813/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ptr, ptr, i32 } @root = dso_local local_unnamed_addr global ptr null, align 8 @.str = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local void @insert(i32 noundef %k) local_unnamed_addr #0 { entry: %0 = load ptr, ptr @root, align 8, !tbaa !5 %call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #6 %key = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 3 store i32 %k, ptr %key, align 8, !tbaa !9 %cmp.not34 = icmp eq ptr %0, null tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call, i8 0, i64 16, i1 false) br i1 %cmp.not34, label %if.then7, label %while.body while.body: ; preds = %entry, %while.body %x.035 = phi ptr [ %x.1, %while.body ], [ %0, %entry ] %key2 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %1 = load i32, ptr %key2, align 8, !tbaa !9 %cmp3 = icmp sgt i32 %1, %k %left4 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %x.1.in = select i1 %cmp3, ptr %left4, ptr %x.035 %x.1 = load ptr, ptr %x.1.in, align 8, !tbaa !5 %cmp.not = icmp eq ptr %x.1, null br i1 %cmp.not, label %if.else8, label %while.body, !llvm.loop !12 if.then7: ; preds = %entry %parent37 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr null, ptr %parent37, align 8, !tbaa !14 br label %if.end17 if.else8: ; preds = %while.body %parent = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr %x.035, ptr %parent, align 8, !tbaa !14 %key10 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3 %2 = load i32, ptr %key10, align 8, !tbaa !9 %cmp11 = icmp sgt i32 %2, %k %left13 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 1 %spec.select = select i1 %cmp11, ptr %left13, ptr %x.035 br label %if.end17 if.end17: ; preds = %if.else8, %if.then7 %left13.sink = phi ptr [ @root, %if.then7 ], [ %spec.select, %if.else8 ] store ptr %call, ptr %left13.sink, align 8, !tbaa !5 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local void @inorder(ptr nocapture noundef readonly %u) local_unnamed_addr #0 { entry: br label %tailrecurse tailrecurse: ; preds = %if.end, %entry %u.tr = phi ptr [ %u, %entry ], [ %2, %if.end ] %left = getelementptr inbounds %struct.node, ptr %u.tr, i64 0, i32 1 %0 = load ptr, ptr %left, align 8, !tbaa !15 %cmp.not = icmp eq ptr %0, null br i1 %cmp.not, label %if.end, label %if.then if.then: ; preds = %tailrecurse tail call void @inorder(ptr noundef nonnull %0) br label %if.end if.end: ; preds = %if.then, %tailrecurse %key = getelementptr inbounds %struct.node, ptr %u.tr, i64 0, i32 3 %1 = load i32, ptr %key, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %1) %2 = load ptr, ptr %u.tr, align 8, !tbaa !16 %cmp2.not = icmp eq ptr %2, null br i1 %cmp2.not, label %if.end5, label %tailrecurse if.end5: ; preds = %if.end ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind uwtable define dso_local void @preorder(ptr nocapture noundef readonly %u) local_unnamed_addr #0 { entry: br label %tailrecurse tailrecurse: ; preds = %if.end, %entry %u.tr = phi ptr [ %u, %entry ], [ %2, %if.end ] %key = getelementptr inbounds %struct.node, ptr %u.tr, i64 0, i32 3 %0 = load i32, ptr %key, align 8, !tbaa !9 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) %left = getelementptr inbounds %struct.node, ptr %u.tr, i64 0, i32 1 %1 = load ptr, ptr %left, align 8, !tbaa !15 %cmp.not = icmp eq ptr %1, null br i1 %cmp.not, label %if.end, label %if.then if.then: ; preds = %tailrecurse tail call void @preorder(ptr noundef nonnull %1) br label %if.end if.end: ; preds = %if.then, %tailrecurse %2 = load ptr, ptr %u.tr, align 8, !tbaa !16 %cmp2.not = icmp eq ptr %2, null br i1 %cmp2.not, label %if.end5, label %tailrecurse if.end5: ; preds = %if.end ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %com = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #7 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #7 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %com) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !17 %cmp15 = icmp sgt i32 %0, 0 br i1 %cmp15, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.016 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %com) %1 = load i8, ptr %com, align 16, !tbaa !18 switch i8 %1, label %for.inc [ i8 105, label %if.then i8 112, label %if.then9 ] if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %2 = load i32, ptr %x, align 4, !tbaa !17 %3 = load ptr, ptr @root, align 8, !tbaa !5 %call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #6 %key.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 3 store i32 %2, ptr %key.i, align 8, !tbaa !9 %cmp.not34.i = icmp eq ptr %3, null call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %call.i, i8 0, i64 16, i1 false) br i1 %cmp.not34.i, label %insert.exit, label %while.body.i while.body.i: ; preds = %if.then, %while.body.i %x.035.i = phi ptr [ %x.1.i, %while.body.i ], [ %3, %if.then ] %key2.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 3 %4 = load i32, ptr %key2.i, align 8, !tbaa !9 %cmp3.i = icmp sgt i32 %4, %2 %left4.i = getelementptr inbounds %struct.node, ptr %x.035.i, i64 0, i32 1 %x.1.in.i = select i1 %cmp3.i, ptr %left4.i, ptr %x.035.i %x.1.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !5 %cmp.not.i = icmp eq ptr %x.1.i, null br i1 %cmp.not.i, label %insert.exit, label %while.body.i, !llvm.loop !12 insert.exit: ; preds = %while.body.i, %if.then %.sink = phi ptr [ null, %if.then ], [ %x.035.i, %while.body.i ] %left13.sink.i = phi ptr [ @root, %if.then ], [ %x.1.in.i, %while.body.i ] %parent37.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2 store ptr %.sink, ptr %parent37.i, align 8, !tbaa !14 store ptr %call.i, ptr %left13.sink.i, align 8, !tbaa !5 br label %for.inc if.then9: ; preds = %for.body %5 = load ptr, ptr @root, align 8, !tbaa !5 call void @inorder(ptr noundef %5) %putchar = call i32 @putchar(i32 10) %6 = load ptr, ptr @root, align 8, !tbaa !5 call void @preorder(ptr noundef %6) %putchar14 = call i32 @putchar(i32 10) br label %for.inc for.inc: ; preds = %for.body, %insert.exit, %if.then9 %inc = add nuw nsw i32 %i.016, 1 %7 = load i32, ptr %n, align 4, !tbaa !17 %cmp = icmp slt i32 %inc, %7 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !19 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %com) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #7 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 @putchar(i32 noundef) local_unnamed_addr #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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #6 = { nounwind allocsize(0) } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !11, i64 24} !10 = !{!"node", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24} !11 = !{!"int", !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"} !14 = !{!10, !6, i64 16} !15 = !{!10, !6, i64 8} !16 = !{!10, !6, i64 0} !17 = !{!11, !11, i64 0} !18 = !{!7, !7, i64 0} !19 = distinct !{!19, !13}
#include<stdio.h> #include<stdlib.h> #define LEN 7 struct node{ int key; struct node *parent, *left, *right; }; typedef struct node node; typedef struct node * nodepointer; void insert(int); void inorder(nodepointer); void preorder(nodepointer); nodepointer root; int main(){ int n, k; int i; char com[LEN]; scanf("%d", &n); for(i=0;i<n;i++){ scanf(" %s", com); if(com[0] == 'i'){ scanf("%d", &k); insert(k); } else{ inorder(root); printf("\n"); preorder(root); printf("\n"); } } return 0; } void insert(int k){ nodepointer x, y, z; //zが新しく挿入するノード z = (nodepointer)malloc(sizeof(node)); //zの設定 zは葉だからleft,rightはnullでok z -> key = k; z -> left = NULL; z -> right = NULL; x = root; //たどる際のスタートは根 y = NULL; //yはxの親 //xがnullになるまでたどる。このときyはxの直前のノード、つまりxの親であり葉ノードである。 while(x != NULL){ y = x; if(z -> key < x -> key) x = x -> left; else x = x -> right; } z -> parent = y; //rootがnullのときwhile回らずにyはnullのまま //つまり、木が空っぽのときyはnull if(y == NULL) root = z; else if(z -> key < y -> key) y -> left = z; else y -> right = z; } void inorder(nodepointer n){ if(n == NULL) return; inorder(n -> left); printf(" %d", n -> key); inorder(n -> right); } void preorder(nodepointer n){ if(n == NULL) return; printf(" %d", n -> key); preorder(n -> left); preorder(n -> right); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212857/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212857/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { i32, ptr, ptr, ptr } @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c" %s\00", align 1 @root = dso_local local_unnamed_addr global ptr null, align 8 @.str.3 = private unnamed_addr constant [4 x i8] c" %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %k = alloca i32, align 4 %com = alloca [7 x i8], align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #6 call void @llvm.lifetime.start.p0(i64 7, ptr nonnull %com) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp9 = icmp sgt i32 %0, 0 br i1 %cmp9, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.010 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %com) %1 = load i8, ptr %com, align 1, !tbaa !9 %cmp2 = icmp eq i8 %1, 105 br i1 %cmp2, label %if.then, label %if.else if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k) %2 = load i32, ptr %k, align 4, !tbaa !5 %call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7 store i32 %2, ptr %call.i, align 8, !tbaa !10 %left.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2 call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %left.i, i8 0, i64 16, i1 false) %x.034.i = load ptr, ptr @root, align 8, !tbaa !13 %cmp.not35.i = icmp eq ptr %x.034.i, null br i1 %cmp.not35.i, label %insert.exit, label %while.body.i while.body.i: ; preds = %if.then, %while.body.i %x.036.i = phi ptr [ %x.0.i, %while.body.i ], [ %x.034.i, %if.then ] %3 = load i32, ptr %x.036.i, align 8, !tbaa !10 %cmp3.i = icmp sgt i32 %3, %2 %left4.i = getelementptr inbounds %struct.node, ptr %x.036.i, i64 0, i32 2 %right5.i = getelementptr inbounds %struct.node, ptr %x.036.i, i64 0, i32 3 %x.1.in.i = select i1 %cmp3.i, ptr %left4.i, ptr %right5.i %x.0.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !13 %cmp.not.i = icmp eq ptr %x.0.i, null br i1 %cmp.not.i, label %insert.exit, label %while.body.i, !llvm.loop !14 insert.exit: ; preds = %while.body.i, %if.then %x.036.i.lcssa.sink = phi ptr [ null, %if.then ], [ %x.036.i, %while.body.i ] %left13.sink.i = phi ptr [ @root, %if.then ], [ %x.1.in.i, %while.body.i ] %parent.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 1 store ptr %x.036.i.lcssa.sink, ptr %parent.i, align 8, !tbaa !16 store ptr %call.i, ptr %left13.sink.i, align 8, !tbaa !13 br label %for.inc if.else: ; preds = %for.body %4 = load ptr, ptr @root, align 8, !tbaa !13 call void @inorder(ptr noundef %4) %putchar = call i32 @putchar(i32 10) %5 = load ptr, ptr @root, align 8, !tbaa !13 call void @preorder(ptr noundef %5) %putchar8 = call i32 @putchar(i32 10) br label %for.inc for.inc: ; preds = %insert.exit, %if.else %inc = add nuw nsw i32 %i.010, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %6 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !17 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 7, ptr nonnull %com) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local void @insert(i32 noundef %k) local_unnamed_addr #0 { entry: %call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7 store i32 %k, ptr %call, align 8, !tbaa !10 %left = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %left, i8 0, i64 16, i1 false) %x.034 = load ptr, ptr @root, align 8, !tbaa !13 %cmp.not35 = icmp eq ptr %x.034, null br i1 %cmp.not35, label %if.then7, label %while.body while.body: ; preds = %entry, %while.body %x.036 = phi ptr [ %x.0, %while.body ], [ %x.034, %entry ] %0 = load i32, ptr %x.036, align 8, !tbaa !10 %cmp3 = icmp sgt i32 %0, %k %left4 = getelementptr inbounds %struct.node, ptr %x.036, i64 0, i32 2 %right5 = getelementptr inbounds %struct.node, ptr %x.036, i64 0, i32 3 %x.1.in = select i1 %cmp3, ptr %left4, ptr %right5 %x.0 = load ptr, ptr %x.1.in, align 8, !tbaa !13 %cmp.not = icmp eq ptr %x.0, null br i1 %cmp.not, label %if.else8, label %while.body, !llvm.loop !14 if.then7: ; preds = %entry %parent38 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 1 store ptr null, ptr %parent38, align 8, !tbaa !16 br label %if.end17 if.else8: ; preds = %while.body %parent = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 1 store ptr %x.036, ptr %parent, align 8, !tbaa !16 %1 = load i32, ptr %x.036, align 8, !tbaa !10 %cmp11 = icmp sgt i32 %1, %k br i1 %cmp11, label %if.then12, label %if.else14 if.then12: ; preds = %if.else8 %left13 = getelementptr inbounds %struct.node, ptr %x.036, i64 0, i32 2 br label %if.end17 if.else14: ; preds = %if.else8 %right15 = getelementptr inbounds %struct.node, ptr %x.036, i64 0, i32 3 br label %if.end17 if.end17: ; preds = %if.then12, %if.else14, %if.then7 %left13.sink = phi ptr [ %left13, %if.then12 ], [ %right15, %if.else14 ], [ @root, %if.then7 ] store ptr %call, ptr %left13.sink, align 8, !tbaa !13 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @inorder(ptr noundef readonly %n) local_unnamed_addr #0 { entry: %cmp4 = icmp eq ptr %n, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %n.tr5 = phi ptr [ %2, %if.end ], [ %n, %entry ] %left = getelementptr inbounds %struct.node, ptr %n.tr5, i64 0, i32 2 %0 = load ptr, ptr %left, align 8, !tbaa !18 tail call void @inorder(ptr noundef %0) %1 = load i32, ptr %n.tr5, align 8, !tbaa !10 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %1) %right = getelementptr inbounds %struct.node, ptr %n.tr5, i64 0, i32 3 %2 = load ptr, ptr %right, align 8, !tbaa !19 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local void @preorder(ptr noundef readonly %n) local_unnamed_addr #0 { entry: %cmp4 = icmp eq ptr %n, null br i1 %cmp4, label %return, label %if.end if.end: ; preds = %entry, %if.end %n.tr5 = phi ptr [ %2, %if.end ], [ %n, %entry ] %0 = load i32, ptr %n.tr5, align 8, !tbaa !10 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %0) %left = getelementptr inbounds %struct.node, ptr %n.tr5, i64 0, i32 2 %1 = load ptr, ptr %left, align 8, !tbaa !18 tail call void @preorder(ptr noundef %1) %right = getelementptr inbounds %struct.node, ptr %n.tr5, i64 0, i32 3 %2 = load ptr, ptr %right, align 8, !tbaa !19 %cmp = icmp eq ptr %2, null br i1 %cmp, label %return, label %if.end return: ; preds = %if.end, %entry ret void } ; 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 allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #6 = { nounwind } attributes #7 = { nounwind allocsize(0) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = !{!11, !6, i64 0} !11 = !{!"node", !6, i64 0, !12, i64 8, !12, i64 16, !12, i64 24} !12 = !{!"any pointer", !7, i64 0} !13 = !{!12, !12, i64 0} !14 = distinct !{!14, !15} !15 = !{!"llvm.loop.mustprogress"} !16 = !{!11, !12, i64 8} !17 = distinct !{!17, !15} !18 = !{!11, !12, i64 16} !19 = !{!11, !12, i64 24}
#include <stdio.h> int main(){ int i,j,n,y,b,r,t,re; double genri,max,a; while(1){ scanf("%d",&n); if(n==0) break; scanf("%d",&y); for(i=1;i<=n;i++){ scanf("%d%d%d",&b,&r,&t); if(t==1){ genri=1+y*(double)r/100; } else if(t==2){ a=1+(double)r/100; genri=1+(double)r/100; for(j=2;j<=y;j++){ genri*=a; } } if(i==1){ max=genri; re=b; } if(max<genri){ max=genri; re=b; } } printf("%d\n",re); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212914/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212914/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d%d%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %y = alloca i32, align 4 %b = alloca i32, align 4 %r = alloca i32, align 4 %t = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %r) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3 %call52 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp53 = icmp eq i32 %0, 0 br i1 %cmp53, label %while.end, label %if.end if.end: ; preds = %entry, %for.end33 %max.056 = phi double [ %max.1.lcssa, %for.end33 ], [ undef, %entry ] %genri.055 = phi double [ %genri.1.lcssa, %for.end33 ], [ undef, %entry ] %re.054 = phi i32 [ %re.1.lcssa, %for.end33 ], [ undef, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %y) %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp2.not44 = icmp slt i32 %1, 1 br i1 %cmp2.not44, label %for.end33, label %for.body for.body: ; preds = %if.end, %if.end22 %i.048 = phi i32 [ %inc32, %if.end22 ], [ 1, %if.end ] %max.147 = phi double [ %max.3, %if.end22 ], [ %max.056, %if.end ] %genri.146 = phi double [ %genri.3, %if.end22 ], [ %genri.055, %if.end ] %re.145 = phi i32 [ %re.3, %if.end22 ], [ %re.054, %if.end ] %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %b, ptr noundef nonnull %r, ptr noundef nonnull %t) %2 = load i32, ptr %t, align 4, !tbaa !5 switch i32 %2, label %if.end22 [ i32 1, label %if.then5 i32 2, label %if.then9 ] if.then5: ; preds = %for.body %3 = load i32, ptr %y, align 4, !tbaa !5 %conv = sitofp i32 %3 to double %4 = load i32, ptr %r, align 4, !tbaa !5 %conv6 = sitofp i32 %4 to double %mul = fmul double %conv, %conv6 %div = fdiv double %mul, 1.000000e+02 %add = fadd double %div, 1.000000e+00 br label %if.end22 if.then9: ; preds = %for.body %5 = load i32, ptr %r, align 4, !tbaa !5 %conv10 = sitofp i32 %5 to double %div11 = fdiv double %conv10, 1.000000e+02 %add12 = fadd double %div11, 1.000000e+00 %6 = load i32, ptr %y, align 4, !tbaa !5 %cmp17.not41 = icmp slt i32 %6, 2 br i1 %cmp17.not41, label %if.end22, label %for.body19.preheader for.body19.preheader: ; preds = %if.then9 %7 = add i32 %6, -1 %8 = add i32 %6, -2 %xtraiter = and i32 %7, 7 %9 = icmp ult i32 %8, 7 br i1 %9, label %if.end22.loopexit.unr-lcssa, label %for.body19.preheader.new for.body19.preheader.new: ; preds = %for.body19.preheader %unroll_iter = and i32 %7, -8 br label %for.body19 for.body19: ; preds = %for.body19, %for.body19.preheader.new %genri.243 = phi double [ %add12, %for.body19.preheader.new ], [ %mul20.7, %for.body19 ] %niter = phi i32 [ 0, %for.body19.preheader.new ], [ %niter.next.7, %for.body19 ] %mul20 = fmul double %add12, %genri.243 %mul20.1 = fmul double %add12, %mul20 %mul20.2 = fmul double %add12, %mul20.1 %mul20.3 = fmul double %add12, %mul20.2 %mul20.4 = fmul double %add12, %mul20.3 %mul20.5 = fmul double %add12, %mul20.4 %mul20.6 = fmul double %add12, %mul20.5 %mul20.7 = fmul double %add12, %mul20.6 %niter.next.7 = add i32 %niter, 8 %niter.ncmp.7 = icmp eq i32 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %if.end22.loopexit.unr-lcssa, label %for.body19, !llvm.loop !9 if.end22.loopexit.unr-lcssa: ; preds = %for.body19, %for.body19.preheader %mul20.lcssa.ph = phi double [ undef, %for.body19.preheader ], [ %mul20.7, %for.body19 ] %genri.243.unr = phi double [ %add12, %for.body19.preheader ], [ %mul20.7, %for.body19 ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %if.end22, label %for.body19.epil for.body19.epil: ; preds = %if.end22.loopexit.unr-lcssa, %for.body19.epil %genri.243.epil = phi double [ %mul20.epil, %for.body19.epil ], [ %genri.243.unr, %if.end22.loopexit.unr-lcssa ] %epil.iter = phi i32 [ %epil.iter.next, %for.body19.epil ], [ 0, %if.end22.loopexit.unr-lcssa ] %mul20.epil = fmul double %add12, %genri.243.epil %epil.iter.next = add i32 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %if.end22, label %for.body19.epil, !llvm.loop !11 if.end22: ; preds = %if.end22.loopexit.unr-lcssa, %for.body19.epil, %if.then9, %for.body, %if.then5 %genri.3 = phi double [ %add, %if.then5 ], [ %genri.146, %for.body ], [ %add12, %if.then9 ], [ %mul20.lcssa.ph, %if.end22.loopexit.unr-lcssa ], [ %mul20.epil, %for.body19.epil ] %cmp23 = icmp eq i32 %i.048, 1 %10 = load i32, ptr %b, align 4 %max.2 = select i1 %cmp23, double %genri.3, double %max.147 %cmp27 = fcmp olt double %max.2, %genri.3 %11 = or i1 %cmp23, %cmp27 %re.3 = select i1 %11, i32 %10, i32 %re.145 %max.3 = select i1 %cmp27, double %genri.3, double %max.2 %inc32 = add nuw nsw i32 %i.048, 1 %12 = load i32, ptr %n, align 4, !tbaa !5 %cmp2.not.not = icmp slt i32 %i.048, %12 br i1 %cmp2.not.not, label %for.body, label %for.end33, !llvm.loop !13 for.end33: ; preds = %if.end22, %if.end %re.1.lcssa = phi i32 [ %re.054, %if.end ], [ %re.3, %if.end22 ] %genri.1.lcssa = phi double [ %genri.055, %if.end ], [ %genri.3, %if.end22 ] %max.1.lcssa = phi double [ %max.056, %if.end ], [ %max.3, %if.end22 ] %call34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %re.1.lcssa) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %13 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp eq i32 %13, 0 br i1 %cmp, label %while.end, label %if.end while.end: ; preds = %for.end33, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %r) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.unroll.disable"} !13 = distinct !{!13, !10}
#include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #include<math.h> #include<assert.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){if(a<b){return a;}return b;} int zt(int a,int b){return max(a,b)-min(a,b);} int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;} int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} int nHr(int a,int b){return nCr(a+b-1,b);} int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;} int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;} int sankaku(int x){return ((1+x)*x)/2;} void swap(int *a,int *b){int c;c=(*a);(*a)=(*b);(*b)=c;} //小さい順 int compareInt(const void* a, const void* b){int aNum = *(int*)a;int bNum = *(int*)b;return aNum - bNum;} long long _gcd(long long a,long long b){ long long c; while(b!=0){c=a%b;a=b;b=c;} return a; } long long _lcm(long long a,long long b){long long c=_gcd(a,b);a/=c;return a*b;} int main(void){ int N; long long sum=0; scanf("%d",&N); int a[N+1],b[N]; for(int i=0;i<=N;i++){ scanf("%d",&a[i]); } for(int i=0;i<N;i++){ scanf("%d",&b[i]); } for(int i=0;i<N;i++){ if(a[i]>=b[i]){ sum+=b[i]; }else if(b[i]<=(a[i]+a[i+1])){ sum+=b[i]; a[i+1]-=(b[i]-a[i]); }else{ sum+=a[i]+a[i+1]; a[i+1]=0; } } printf("%lld",sum); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212958/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212958/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @max(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i32 @llvm.smax.i32(i32 %a, i32 %b) ret i32 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @min(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i32 @llvm.smin.i32(i32 %a, i32 %b) ret i32 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @zt(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %sub5 = sub nsw i32 %a, %b %sub = tail call i32 @llvm.abs.i32(i32 %sub5, i1 true) ret i32 %sub } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #1 { entry: %cmp.not4 = icmp eq i32 %b, 0 br i1 %cmp.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %a.addr.06 = phi i32 [ %b.addr.05, %while.body ], [ %a, %entry ] %b.addr.05 = phi i32 [ %rem, %while.body ], [ %b, %entry ] %rem = srem i32 %a.addr.06, %b.addr.05 %cmp.not = icmp eq i32 %rem, 0 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !5 while.end: ; preds = %while.body, %entry %a.addr.0.lcssa = phi i32 [ %a, %entry ], [ %b.addr.05, %while.body ] ret i32 %a.addr.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @lcm(i32 noundef %a, i32 noundef %b) local_unnamed_addr #1 { entry: %cmp.not4.i = icmp eq i32 %b, 0 br i1 %cmp.not4.i, label %gcd.exit, label %while.body.i while.body.i: ; preds = %entry, %while.body.i %a.addr.06.i = phi i32 [ %b.addr.05.i, %while.body.i ], [ %a, %entry ] %b.addr.05.i = phi i32 [ %rem.i, %while.body.i ], [ %b, %entry ] %rem.i = srem i32 %a.addr.06.i, %b.addr.05.i %cmp.not.i = icmp eq i32 %rem.i, 0 br i1 %cmp.not.i, label %gcd.exit, label %while.body.i, !llvm.loop !5 gcd.exit: ; preds = %while.body.i, %entry %a.addr.0.lcssa.i = phi i32 [ %a, %entry ], [ %b.addr.05.i, %while.body.i ] %div = sdiv i32 %a, %a.addr.0.lcssa.i %mul = mul nsw i32 %div, %b ret i32 %mul } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @nCr(i32 noundef %a, i32 noundef %b) local_unnamed_addr #1 { entry: %cmp.not6 = icmp slt i32 %b, 1 br i1 %cmp.not6, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %add = add nsw i32 %a, 1 %xtraiter = and i32 %b, 1 %0 = icmp eq i32 %b, 1 br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.lr.ph.new for.body.lr.ph.new: ; preds = %for.body.lr.ph %unroll_iter = and i32 %b, -2 br label %for.body for.body: ; preds = %for.body, %for.body.lr.ph.new %r.08 = phi i32 [ 1, %for.body.lr.ph.new ], [ %div.1, %for.body ] %i.07 = phi i32 [ 1, %for.body.lr.ph.new ], [ %inc.1, %for.body ] %niter = phi i32 [ 0, %for.body.lr.ph.new ], [ %niter.next.1, %for.body ] %sub = sub i32 %add, %i.07 %mul = mul nsw i32 %r.08, %sub %div = sdiv i32 %mul, %i.07 %inc = add nuw i32 %i.07, 1 %sub.1 = sub i32 %add, %inc %mul.1 = mul nsw i32 %div, %sub.1 %div.1 = sdiv i32 %mul.1, %inc %inc.1 = add nuw i32 %i.07, 2 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !7 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph %div.lcssa.ph = phi i32 [ undef, %for.body.lr.ph ], [ %div.1, %for.body ] %r.08.unr = phi i32 [ 1, %for.body.lr.ph ], [ %div.1, %for.body ] %i.07.unr = phi i32 [ 1, %for.body.lr.ph ], [ %inc.1, %for.body ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %sub.epil = sub i32 %add, %i.07.unr %mul.epil = mul nsw i32 %r.08.unr, %sub.epil %div.epil = sdiv i32 %mul.epil, %i.07.unr br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %r.0.lcssa = phi i32 [ 1, %entry ], [ %div.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %div.epil, %for.body.epil ] ret i32 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @nHr(i32 noundef %a, i32 noundef %b) local_unnamed_addr #1 { entry: %add = add nsw i32 %b, %a %cmp.not6.i = icmp slt i32 %b, 1 br i1 %cmp.not6.i, label %nCr.exit, label %for.body.i.preheader for.body.i.preheader: ; preds = %entry %xtraiter = and i32 %b, 1 %0 = icmp eq i32 %b, 1 br i1 %0, label %nCr.exit.loopexit.unr-lcssa, label %for.body.i.preheader.new for.body.i.preheader.new: ; preds = %for.body.i.preheader %unroll_iter = and i32 %b, -2 br label %for.body.i for.body.i: ; preds = %for.body.i, %for.body.i.preheader.new %r.08.i = phi i32 [ 1, %for.body.i.preheader.new ], [ %div.i.1, %for.body.i ] %i.07.i = phi i32 [ 1, %for.body.i.preheader.new ], [ %inc.i.1, %for.body.i ] %niter = phi i32 [ 0, %for.body.i.preheader.new ], [ %niter.next.1, %for.body.i ] %sub.i = sub i32 %add, %i.07.i %mul.i = mul nsw i32 %sub.i, %r.08.i %div.i = sdiv i32 %mul.i, %i.07.i %inc.i = add nuw i32 %i.07.i, 1 %sub.i.1 = sub i32 %add, %inc.i %mul.i.1 = mul nsw i32 %sub.i.1, %div.i %div.i.1 = sdiv i32 %mul.i.1, %inc.i %inc.i.1 = add nuw i32 %i.07.i, 2 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %nCr.exit.loopexit.unr-lcssa, label %for.body.i, !llvm.loop !7 nCr.exit.loopexit.unr-lcssa: ; preds = %for.body.i, %for.body.i.preheader %div.i.lcssa.ph = phi i32 [ undef, %for.body.i.preheader ], [ %div.i.1, %for.body.i ] %r.08.i.unr = phi i32 [ 1, %for.body.i.preheader ], [ %div.i.1, %for.body.i ] %i.07.i.unr = phi i32 [ 1, %for.body.i.preheader ], [ %inc.i.1, %for.body.i ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %nCr.exit, label %for.body.i.epil for.body.i.epil: ; preds = %nCr.exit.loopexit.unr-lcssa %sub.i.epil = sub i32 %add, %i.07.i.unr %mul.i.epil = mul nsw i32 %sub.i.epil, %r.08.i.unr %div.i.epil = sdiv i32 %mul.i.epil, %i.07.i.unr br label %nCr.exit nCr.exit: ; preds = %for.body.i.epil, %nCr.exit.loopexit.unr-lcssa, %entry %r.0.lcssa.i = phi i32 [ 1, %entry ], [ %div.i.lcssa.ph, %nCr.exit.loopexit.unr-lcssa ], [ %div.i.epil, %for.body.i.epil ] ret i32 %r.0.lcssa.i } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @fact(i32 noundef %a) local_unnamed_addr #1 { entry: %cmp.not4 = icmp slt i32 %a, 1 br i1 %cmp.not4, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %min.iters.check = icmp ult i32 %a, 8 br i1 %min.iters.check, label %for.body.preheader9, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i32 %a, -8 %ind.end = or i32 %n.vec, 1 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %0, %vector.body ] %vec.phi7 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %1, %vector.body ] %vec.ind = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph ], [ %vec.ind.next, %vector.body ] %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4> %0 = mul <4 x i32> %vec.phi, %vec.ind %1 = mul <4 x i32> %vec.phi7, %step.add %index.next = add nuw i32 %index, 8 %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8> %2 = icmp eq i32 %index.next, %n.vec br i1 %2, label %middle.block, label %vector.body, !llvm.loop !8 middle.block: ; preds = %vector.body %bin.rdx = mul <4 x i32> %1, %0 %3 = tail call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %n.vec, %a br i1 %cmp.n, label %for.end, label %for.body.preheader9 for.body.preheader9: ; preds = %for.body.preheader, %middle.block %r.06.ph = phi i32 [ 1, %for.body.preheader ], [ %3, %middle.block ] %i.05.ph = phi i32 [ 1, %for.body.preheader ], [ %ind.end, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader9, %for.body %r.06 = phi i32 [ %mul, %for.body ], [ %r.06.ph, %for.body.preheader9 ] %i.05 = phi i32 [ %inc, %for.body ], [ %i.05.ph, %for.body.preheader9 ] %mul = mul nsw i32 %r.06, %i.05 %inc = add nuw i32 %i.05, 1 %exitcond.not = icmp eq i32 %i.05, %a br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !11 for.end: ; preds = %for.body, %middle.block, %entry %r.0.lcssa = phi i32 [ 1, %entry ], [ %3, %middle.block ], [ %mul, %for.body ] ret i32 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @dsum(i32 noundef %x) local_unnamed_addr #1 { entry: %tobool.not4 = icmp eq i32 %x, 0 br i1 %tobool.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %r.06 = phi i32 [ %add, %while.body ], [ 0, %entry ] %x.addr.05 = phi i32 [ %div, %while.body ], [ %x, %entry ] %rem = srem i32 %x.addr.05, 10 %add = add nsw i32 %r.06, %rem %div = sdiv i32 %x.addr.05, 10 %x.addr.05.off = add i32 %x.addr.05, 9 %tobool.not = icmp ult i32 %x.addr.05.off, 19 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !12 while.end: ; preds = %while.body, %entry %r.0.lcssa = phi i32 [ 0, %entry ], [ %add, %while.body ] ret i32 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @dsumb(i32 noundef %x, i32 noundef %b) local_unnamed_addr #1 { entry: %tobool.not5 = icmp eq i32 %x, 0 br i1 %tobool.not5, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %r.07 = phi i32 [ %add, %while.body ], [ 0, %entry ] %x.addr.06 = phi i32 [ %div, %while.body ], [ %x, %entry ] %rem = srem i32 %x.addr.06, %b %add = add nsw i32 %rem, %r.07 %div = sdiv i32 %x.addr.06, %b %tobool.not = icmp eq i32 %div, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !13 while.end: ; preds = %while.body, %entry %r.0.lcssa = phi i32 [ 0, %entry ], [ %add, %while.body ] ret i32 %r.0.lcssa } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @sankaku(i32 noundef %x) local_unnamed_addr #3 { entry: %add = add nsw i32 %x, 1 %mul = mul nsw i32 %add, %x %div = sdiv i32 %mul, 2 ret i32 %div } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @swap(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #4 { entry: %0 = load i32, ptr %a, align 4, !tbaa !14 %1 = load i32, ptr %b, align 4, !tbaa !14 store i32 %1, ptr %a, align 4, !tbaa !14 store i32 %0, ptr %b, align 4, !tbaa !14 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compareInt(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %0 = load i32, ptr %a, align 4, !tbaa !14 %1 = load i32, ptr %b, align 4, !tbaa !14 %sub = sub nsw i32 %0, %1 ret i32 %sub } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @_gcd(i64 noundef %a, i64 noundef %b) local_unnamed_addr #1 { entry: %cmp.not4 = icmp eq i64 %b, 0 br i1 %cmp.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %a.addr.06 = phi i64 [ %b.addr.05, %while.body ], [ %a, %entry ] %b.addr.05 = phi i64 [ %rem, %while.body ], [ %b, %entry ] %rem = srem i64 %a.addr.06, %b.addr.05 %cmp.not = icmp eq i64 %rem, 0 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !18 while.end: ; preds = %while.body, %entry %a.addr.0.lcssa = phi i64 [ %a, %entry ], [ %b.addr.05, %while.body ] ret i64 %a.addr.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @_lcm(i64 noundef %a, i64 noundef %b) local_unnamed_addr #1 { entry: %cmp.not4.i = icmp eq i64 %b, 0 br i1 %cmp.not4.i, label %_gcd.exit, label %while.body.i while.body.i: ; preds = %entry, %while.body.i %a.addr.06.i = phi i64 [ %b.addr.05.i, %while.body.i ], [ %a, %entry ] %b.addr.05.i = phi i64 [ %rem.i, %while.body.i ], [ %b, %entry ] %rem.i = srem i64 %a.addr.06.i, %b.addr.05.i %cmp.not.i = icmp eq i64 %rem.i, 0 br i1 %cmp.not.i, label %_gcd.exit, label %while.body.i, !llvm.loop !18 _gcd.exit: ; preds = %while.body.i, %entry %a.addr.0.lcssa.i = phi i64 [ %a, %entry ], [ %b.addr.05.i, %while.body.i ] %div = sdiv i64 %a, %a.addr.0.lcssa.i %mul = mul nsw i64 %div, %b ret i64 %mul } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #6 { entry: %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #10 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !14 %add = add nsw i32 %0, 1 %1 = zext i32 %add to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %N, align 4, !tbaa !14 %4 = zext i32 %3 to i64 %vla1 = alloca i32, i64 %4, align 16 %cmp.not89 = icmp slt i32 %3, 0 br i1 %cmp.not89, label %for.cond.cleanup17, label %for.body for.cond4.preheader: ; preds = %for.body %cmp591 = icmp sgt i32 %5, 0 br i1 %cmp591, label %for.body7, label %for.cond.cleanup17 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %5 = load i32, ptr %N, align 4, !tbaa !14 %6 = sext i32 %5 to i64 %cmp.not.not = icmp slt i64 %indvars.iv, %6 br i1 %cmp.not.not, label %for.body, label %for.cond4.preheader, !llvm.loop !19 for.cond15.preheader: ; preds = %for.body7 %cmp1693 = icmp sgt i32 %7, 0 br i1 %cmp1693, label %for.body18.preheader, label %for.cond.cleanup17 for.body18.preheader: ; preds = %for.cond15.preheader %wide.trip.count = zext i32 %7 to i64 br label %for.body18 for.body7: ; preds = %for.cond4.preheader, %for.body7 %indvars.iv99 = phi i64 [ %indvars.iv.next100, %for.body7 ], [ 0, %for.cond4.preheader ] %arrayidx9 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv99 %call10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx9) %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1 %7 = load i32, ptr %N, align 4, !tbaa !14 %8 = sext i32 %7 to i64 %cmp5 = icmp slt i64 %indvars.iv.next100, %8 br i1 %cmp5, label %for.body7, label %for.cond15.preheader, !llvm.loop !20 for.cond.cleanup17: ; preds = %for.inc63, %entry, %for.cond4.preheader, %for.cond15.preheader %sum.0.lcssa = phi i64 [ 0, %for.cond15.preheader ], [ 0, %for.cond4.preheader ], [ 0, %entry ], [ %sum.1, %for.inc63 ] %call66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %sum.0.lcssa) call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #10 ret i32 0 for.body18: ; preds = %for.body18.preheader, %for.inc63 %indvars.iv102 = phi i64 [ 0, %for.body18.preheader ], [ %11, %for.inc63 ] %sum.094 = phi i64 [ 0, %for.body18.preheader ], [ %sum.1, %for.inc63 ] %arrayidx20 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv102 %9 = load i32, ptr %arrayidx20, align 4, !tbaa !14 %arrayidx22 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv102 %10 = load i32, ptr %arrayidx22, align 4, !tbaa !14 %cmp23.not = icmp slt i32 %9, %10 %11 = add nuw nsw i64 %indvars.iv102, 1 br i1 %cmp23.not, label %if.else, label %for.inc63 if.else: ; preds = %for.body18 %arrayidx33 = getelementptr inbounds i32, ptr %vla, i64 %11 %12 = load i32, ptr %arrayidx33, align 4, !tbaa !14 %add34 = add nsw i32 %12, %9 %cmp35.not = icmp sgt i32 %10, %add34 %sub.neg = sub i32 %9, %10 %sub49 = add i32 %sub.neg, %12 %.sink = select i1 %cmp35.not, i32 0, i32 %sub49 %conv.pn.in.ph = call i32 @llvm.smin.i32(i32 %10, i32 %add34) store i32 %.sink, ptr %arrayidx33, align 4, !tbaa !14 br label %for.inc63 for.inc63: ; preds = %if.else, %for.body18 %conv.pn.in = phi i32 [ %10, %for.body18 ], [ %conv.pn.in.ph, %if.else ] %conv.pn = sext i32 %conv.pn.in to i64 %sum.1 = add nsw i64 %sum.094, %conv.pn %exitcond.not = icmp eq i64 %11, %wide.trip.count br i1 %exitcond.not, label %for.cond.cleanup17, label %for.body18, !llvm.loop !21 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #7 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #8 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #7 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #9 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #9 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #9 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.mul.v4i32(<4 x i32>) #9 attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #8 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #10 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = distinct !{!5, !6} !6 = !{!"llvm.loop.mustprogress"} !7 = distinct !{!7, !6} !8 = distinct !{!8, !6, !9, !10} !9 = !{!"llvm.loop.isvectorized", i32 1} !10 = !{!"llvm.loop.unroll.runtime.disable"} !11 = distinct !{!11, !6, !10, !9} !12 = distinct !{!12, !6} !13 = distinct !{!13, !6} !14 = !{!15, !15, i64 0} !15 = !{!"int", !16, i64 0} !16 = !{!"omnipotent char", !17, i64 0} !17 = !{!"Simple C/C++ TBAA"} !18 = distinct !{!18, !6} !19 = distinct !{!19, !6} !20 = distinct !{!20, !6} !21 = distinct !{!21, !6}
#define __USE_MINGW_ANSI_STDIO 0 #include <stdio.h> static inline int abs(int a) { return (a < 0) ? a * -1 : a; } char alpha[27]; #define maxN 50 char s[maxN + 1]; int pos[26]; void testcase() { scanf("%s", alpha); scanf("%s", s); for (int i = 0; alpha[i] != '\0'; ++i) { pos[alpha[i] - 'a'] = i; } // pos['a' - 'a'] will give pos of 'a' on keeb int ans = 0; for (int i = 1; s[i] != '\0'; ++i) { ans += abs(pos[s[i] - 'a'] - pos[s[i - 1] - 'a']); } printf("%d\n", ans); return; } int main() { int t; scanf("%d", &t); for (int i = 0; i < t; ++i) testcase(); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21300/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21300/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @alpha = dso_local global [27 x i8] zeroinitializer, align 16 @s = dso_local global [51 x i8] zeroinitializer, align 16 @pos = dso_local local_unnamed_addr global [26 x i32] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local void @testcase() local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @alpha) %call1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @s) %0 = load i8, ptr @alpha, align 16, !tbaa !5 %cmp.not43 = icmp eq i8 %0, 0 br i1 %cmp.not43, label %for.cond9.preheader, label %for.body for.cond9.preheader: ; preds = %for.body, %entry %1 = load i8, ptr getelementptr inbounds ([51 x i8], ptr @s, i64 0, i64 1), align 1, !tbaa !5 %cmp13.not45 = icmp eq i8 %1, 0 br i1 %cmp13.not45, label %for.cond.cleanup15, label %for.body16 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %2 = phi i8 [ %4, %for.body ], [ %0, %entry ] %conv = sext i8 %2 to i64 %sub = add nsw i64 %conv, -97 %arrayidx7 = getelementptr inbounds [26 x i32], ptr @pos, i64 0, i64 %sub %3 = trunc i64 %indvars.iv to i32 store i32 %3, ptr %arrayidx7, align 4, !tbaa !8 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds [27 x i8], ptr @alpha, i64 0, i64 %indvars.iv.next %4 = load i8, ptr %arrayidx, align 1, !tbaa !5 %cmp.not = icmp eq i8 %4, 0 br i1 %cmp.not, label %for.cond9.preheader, label %for.body, !llvm.loop !10 for.cond.cleanup15: ; preds = %for.body16, %for.cond9.preheader %ans.0.lcssa = phi i32 [ 0, %for.cond9.preheader ], [ %add, %for.body16 ] %call35 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ans.0.lcssa) ret void for.body16: ; preds = %for.cond9.preheader, %for.body16 %indvars.iv48 = phi i64 [ %indvars.iv.next49, %for.body16 ], [ 1, %for.cond9.preheader ] %5 = phi i8 [ %10, %for.body16 ], [ %1, %for.cond9.preheader ] %ans.046 = phi i32 [ %add, %for.body16 ], [ 0, %for.cond9.preheader ] %conv12 = sext i8 %5 to i64 %sub20 = add nsw i64 %conv12, -97 %arrayidx22 = getelementptr inbounds [26 x i32], ptr @pos, i64 0, i64 %sub20 %6 = load i32, ptr %arrayidx22, align 4, !tbaa !8 %7 = add nsw i64 %indvars.iv48, -1 %arrayidx25 = getelementptr inbounds [51 x i8], ptr @s, i64 0, i64 %7 %8 = load i8, ptr %arrayidx25, align 1, !tbaa !5 %conv26 = sext i8 %8 to i64 %sub27 = add nsw i64 %conv26, -97 %arrayidx29 = getelementptr inbounds [26 x i32], ptr @pos, i64 0, i64 %sub27 %9 = load i32, ptr %arrayidx29, align 4, !tbaa !8 %sub30 = sub nsw i32 %6, %9 %call31 = tail call i32 @llvm.abs.i32(i32 %sub30, i1 true) %add = add nuw nsw i32 %call31, %ans.046 %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1 %arrayidx11 = getelementptr inbounds [51 x i8], ptr @s, i64 0, i64 %indvars.iv.next49 %10 = load i8, ptr %arrayidx11, align 1, !tbaa !5 %cmp13.not = icmp eq i8 %10, 0 br i1 %cmp13.not, label %for.cond.cleanup15, label %for.body16, !llvm.loop !12 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: 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 #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !8 %cmp2 = icmp sgt i32 %0, 0 br i1 %cmp2, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %testcase.exit, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4 ret i32 0 for.body: ; preds = %entry, %testcase.exit %i.03 = phi i32 [ %inc, %testcase.exit ], [ 0, %entry ] %call.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @alpha) %call1.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @s) %1 = load i8, ptr @alpha, align 16, !tbaa !5 %cmp.not43.i = icmp eq i8 %1, 0 br i1 %cmp.not43.i, label %for.cond9.preheader.i, label %for.body.i for.cond9.preheader.i: ; preds = %for.body.i, %for.body %2 = load i8, ptr getelementptr inbounds ([51 x i8], ptr @s, i64 0, i64 1), align 1, !tbaa !5 %cmp13.not45.i = icmp eq i8 %2, 0 br i1 %cmp13.not45.i, label %testcase.exit, label %for.body16.i for.body.i: ; preds = %for.body, %for.body.i %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %for.body.i ], [ 0, %for.body ] %3 = phi i8 [ %5, %for.body.i ], [ %1, %for.body ] %conv.i = sext i8 %3 to i64 %sub.i = add nsw i64 %conv.i, -97 %arrayidx7.i = getelementptr inbounds [26 x i32], ptr @pos, i64 0, i64 %sub.i %4 = trunc i64 %indvars.iv.i to i32 store i32 %4, ptr %arrayidx7.i, align 4, !tbaa !8 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %arrayidx.i = getelementptr inbounds [27 x i8], ptr @alpha, i64 0, i64 %indvars.iv.next.i %5 = load i8, ptr %arrayidx.i, align 1, !tbaa !5 %cmp.not.i = icmp eq i8 %5, 0 br i1 %cmp.not.i, label %for.cond9.preheader.i, label %for.body.i, !llvm.loop !10 for.body16.i: ; preds = %for.cond9.preheader.i, %for.body16.i %indvars.iv48.i = phi i64 [ %indvars.iv.next49.i, %for.body16.i ], [ 1, %for.cond9.preheader.i ] %6 = phi i8 [ %11, %for.body16.i ], [ %2, %for.cond9.preheader.i ] %ans.046.i = phi i32 [ %add.i, %for.body16.i ], [ 0, %for.cond9.preheader.i ] %conv12.i = sext i8 %6 to i64 %sub20.i = add nsw i64 %conv12.i, -97 %arrayidx22.i = getelementptr inbounds [26 x i32], ptr @pos, i64 0, i64 %sub20.i %7 = load i32, ptr %arrayidx22.i, align 4, !tbaa !8 %8 = add nsw i64 %indvars.iv48.i, -1 %arrayidx25.i = getelementptr inbounds [51 x i8], ptr @s, i64 0, i64 %8 %9 = load i8, ptr %arrayidx25.i, align 1, !tbaa !5 %conv26.i = sext i8 %9 to i64 %sub27.i = add nsw i64 %conv26.i, -97 %arrayidx29.i = getelementptr inbounds [26 x i32], ptr @pos, i64 0, i64 %sub27.i %10 = load i32, ptr %arrayidx29.i, align 4, !tbaa !8 %sub30.i = sub nsw i32 %7, %10 %call31.i = call i32 @llvm.abs.i32(i32 %sub30.i, i1 true) %add.i = add nuw nsw i32 %call31.i, %ans.046.i %indvars.iv.next49.i = add nuw nsw i64 %indvars.iv48.i, 1 %arrayidx11.i = getelementptr inbounds [51 x i8], ptr @s, i64 0, i64 %indvars.iv.next49.i %11 = load i8, ptr %arrayidx11.i, align 1, !tbaa !5 %cmp13.not.i = icmp eq i8 %11, 0 br i1 %cmp13.not.i, label %testcase.exit, label %for.body16.i, !llvm.loop !12 testcase.exit: ; preds = %for.body16.i, %for.cond9.preheader.i %ans.0.lcssa.i = phi i32 [ 0, %for.cond9.preheader.i ], [ %add.i, %for.body16.i ] %call35.i = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ans.0.lcssa.i) %inc = add nuw nsw i32 %i.03, 1 %12 = load i32, ptr %t, align 4, !tbaa !8 %cmp = icmp slt i32 %inc, %12 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !13 } ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } 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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = !{!9, !9, i64 0} !9 = !{!"int", !6, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11} !13 = distinct !{!13, !11}
#include <stdio.h> int main() { int n; scanf("%d",&n); int a[n+1],b[n]; for(int i=0;i<n+1;i++){ scanf("%d",&a[i]); } for(int i=0;i<n;i++){ scanf("%d",&b[i]); } long long ans=0; for(int i=0;i<n;i++){ if(b[i]<=a[i]){ ans+=b[i]; }else{ b[i]-=a[i]; ans+=a[i]; if(b[i]<=a[i+1]){ a[i+1]-=b[i]; ans+=b[i]; }else{ ans+=a[i+1]; a[i+1]=0; } } } printf("%lld",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213043/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213043/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %add = add nsw i32 %0, 1 %1 = zext i32 %add to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %n, align 4, !tbaa !5 %4 = zext i32 %3 to i64 %vla1 = alloca i32, i64 %4, align 16 %cmp.not93 = icmp slt i32 %3, 0 br i1 %cmp.not93, label %for.cond.cleanup18, label %for.body for.cond5.preheader: ; preds = %for.body %cmp695 = icmp sgt i32 %5, 0 br i1 %cmp695, label %for.body8, label %for.cond.cleanup18 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %5 = load i32, ptr %n, align 4, !tbaa !5 %6 = sext i32 %5 to i64 %cmp.not.not = icmp slt i64 %indvars.iv, %6 br i1 %cmp.not.not, label %for.body, label %for.cond5.preheader, !llvm.loop !9 for.cond16.preheader: ; preds = %for.body8 %cmp1797 = icmp sgt i32 %7, 0 br i1 %cmp1797, label %for.body19.preheader, label %for.cond.cleanup18 for.body19.preheader: ; preds = %for.cond16.preheader %wide.trip.count = zext i32 %7 to i64 br label %for.body19 for.body8: ; preds = %for.cond5.preheader, %for.body8 %indvars.iv103 = phi i64 [ %indvars.iv.next104, %for.body8 ], [ 0, %for.cond5.preheader ] %arrayidx10 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv103 %call11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx10) %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1 %7 = load i32, ptr %n, align 4, !tbaa !5 %8 = sext i32 %7 to i64 %cmp6 = icmp slt i64 %indvars.iv.next104, %8 br i1 %cmp6, label %for.body8, label %for.cond16.preheader, !llvm.loop !11 for.cond.cleanup18: ; preds = %for.inc64, %entry, %for.cond5.preheader, %for.cond16.preheader %ans.0.lcssa = phi i64 [ 0, %for.cond16.preheader ], [ 0, %for.cond5.preheader ], [ 0, %entry ], [ %ans.1, %for.inc64 ] %call67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %ans.0.lcssa) call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 for.body19: ; preds = %for.body19.preheader, %for.inc64 %indvars.iv106 = phi i64 [ 0, %for.body19.preheader ], [ %indvars.iv.next107.pre-phi, %for.inc64 ] %ans.098 = phi i64 [ 0, %for.body19.preheader ], [ %ans.1, %for.inc64 ] %arrayidx21 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv106 %9 = load i32, ptr %arrayidx21, align 4, !tbaa !5 %arrayidx23 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv106 %10 = load i32, ptr %arrayidx23, align 4, !tbaa !5 %cmp24.not = icmp sgt i32 %9, %10 br i1 %cmp24.not, label %if.else, label %if.then if.then: ; preds = %for.body19 %conv = sext i32 %9 to i64 %add27 = add nsw i64 %ans.098, %conv %.pre = add nuw nsw i64 %indvars.iv106, 1 br label %for.inc64 if.else: ; preds = %for.body19 %sub = sub nsw i32 %9, %10 store i32 %sub, ptr %arrayidx21, align 4, !tbaa !5 %conv34 = sext i32 %10 to i64 %add35 = add nsw i64 %ans.098, %conv34 %11 = add nuw nsw i64 %indvars.iv106, 1 %arrayidx40 = getelementptr inbounds i32, ptr %vla, i64 %11 %12 = load i32, ptr %arrayidx40, align 4, !tbaa !5 %cmp41.not = icmp sgt i32 %sub, %12 br i1 %cmp41.not, label %if.else54, label %if.then43 if.then43: ; preds = %if.else %sub49 = sub nsw i32 %12, %sub store i32 %sub49, ptr %arrayidx40, align 4, !tbaa !5 %conv52 = sext i32 %sub to i64 %add53 = add nsw i64 %add35, %conv52 br label %for.inc64 if.else54: ; preds = %if.else %conv58 = sext i32 %12 to i64 %add59 = add nsw i64 %add35, %conv58 store i32 0, ptr %arrayidx40, align 4, !tbaa !5 br label %for.inc64 for.inc64: ; preds = %if.then, %if.else54, %if.then43 %indvars.iv.next107.pre-phi = phi i64 [ %.pre, %if.then ], [ %11, %if.else54 ], [ %11, %if.then43 ] %ans.1 = phi i64 [ %add27, %if.then ], [ %add59, %if.else54 ], [ %add53, %if.then43 ] %exitcond.not = icmp eq i64 %indvars.iv.next107.pre-phi, %wide.trip.count br i1 %exitcond.not, label %for.cond.cleanup18, label %for.body19, !llvm.loop !12 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(void){ int N,i; long a[100005],b[100005],count; char str[5000000],*p; fgets(str,sizeof(str),stdin); N=atoi(str); fgets(str,sizeof(str),stdin); p=strtok(str," \n"); a[0]=atol(p); for(i=1;i<N+1;i++){ p=strtok(NULL," \n"); a[i]=atol(p); } fgets(str,sizeof(str),stdin); p=strtok(str," \n"); b[0]=atol(p); for(i=1;i<N;i++){ p=strtok(NULL," \n"); b[i]=atol(p); } for(i=0;i<N;i++){ if(a[i]>=b[i]){ count+=b[i]; }else{ b[i]-=a[i]; count+=a[i]; if(b[i]>=a[i+1]){ count+=a[i+1]; a[i+1]=0; }else{ a[i+1]-=b[i]; count+=b[i]; } } } printf("%ld\n",count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213087/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213087/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unnamed_addr global ptr, align 8 @.str = private unnamed_addr constant [3 x i8] c" \0A\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%ld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca [100005 x i64], align 16 %b = alloca [100005 x i64], align 16 %str = alloca [5000000 x i8], align 16 call void @llvm.lifetime.start.p0(i64 800040, ptr nonnull %a) #5 call void @llvm.lifetime.start.p0(i64 800040, ptr nonnull %b) #5 call void @llvm.lifetime.start.p0(i64 5000000, ptr nonnull %str) #5 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call = call ptr @fgets(ptr noundef nonnull %str, i32 noundef 5000000, ptr noundef %0) %call.i = call i64 @strtol(ptr nocapture noundef nonnull %str, ptr noundef null, i32 noundef 10) #5 %conv.i = trunc i64 %call.i to i32 %1 = load ptr, ptr @stdin, align 8, !tbaa !5 %call4 = call ptr @fgets(ptr noundef nonnull %str, i32 noundef 5000000, ptr noundef %1) %call6 = call ptr @strtok(ptr noundef nonnull %str, ptr noundef nonnull @.str) #5 %call.i106 = call i64 @strtol(ptr nocapture noundef nonnull %call6, ptr noundef null, i32 noundef 10) #5 store i64 %call.i106, ptr %a, align 16, !tbaa !9 %cmp.not110 = icmp slt i32 %conv.i, 1 br i1 %cmp.not110, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %2 = add i64 %call.i, 1 %wide.trip.count = and i64 %2, 4294967295 br label %for.body for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ 1, %for.body.preheader ], [ %indvars.iv.next, %for.body ] %call8 = call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str) #5 %call.i107 = call i64 @strtol(ptr nocapture noundef nonnull %call8, ptr noundef null, i32 noundef 10) #5 %arrayidx10 = getelementptr inbounds [100005 x i64], ptr %a, i64 0, i64 %indvars.iv store i64 %call.i107, ptr %arrayidx10, align 8, !tbaa !9 %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 !11 for.end: ; preds = %for.body, %entry %3 = load ptr, ptr @stdin, align 8, !tbaa !5 %call12 = call ptr @fgets(ptr noundef nonnull %str, i32 noundef 5000000, ptr noundef %3) %call14 = call ptr @strtok(ptr noundef nonnull %str, ptr noundef nonnull @.str) #5 %call.i108 = call i64 @strtol(ptr nocapture noundef nonnull %call14, ptr noundef null, i32 noundef 10) #5 store i64 %call.i108, ptr %b, align 16, !tbaa !9 %cmp18112 = icmp sgt i32 %conv.i, 1 %wide.trip.count121 = and i64 %call.i, 4294967295 br i1 %cmp18112, label %for.body19, label %for.cond27.preheader for.cond27.preheader: ; preds = %for.body19, %for.end %cmp28114 = icmp sgt i32 %conv.i, 0 call void @llvm.assume(i1 %cmp28114) br label %for.body29 for.body19: ; preds = %for.end, %for.body19 %indvars.iv118 = phi i64 [ %indvars.iv.next119, %for.body19 ], [ 1, %for.end ] %call20 = call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str) #5 %call.i109 = call i64 @strtol(ptr nocapture noundef nonnull %call20, ptr noundef null, i32 noundef 10) #5 %arrayidx23 = getelementptr inbounds [100005 x i64], ptr %b, i64 0, i64 %indvars.iv118 store i64 %call.i109, ptr %arrayidx23, align 8, !tbaa !9 %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1 %exitcond122.not = icmp eq i64 %indvars.iv.next119, %wide.trip.count121 br i1 %exitcond122.not, label %for.cond27.preheader, label %for.body19, !llvm.loop !13 for.body29: ; preds = %for.cond27.preheader, %for.inc70 %indvars.iv123 = phi i64 [ 0, %for.cond27.preheader ], [ %indvars.iv.next124.pre-phi, %for.inc70 ] %count.0116 = phi i64 [ undef, %for.cond27.preheader ], [ %count.1, %for.inc70 ] %arrayidx31 = getelementptr inbounds [100005 x i64], ptr %a, i64 0, i64 %indvars.iv123 %4 = load i64, ptr %arrayidx31, align 8, !tbaa !9 %arrayidx33 = getelementptr inbounds [100005 x i64], ptr %b, i64 0, i64 %indvars.iv123 %5 = load i64, ptr %arrayidx33, align 8, !tbaa !9 %cmp34.not = icmp slt i64 %4, %5 br i1 %cmp34.not, label %if.else, label %if.then if.then: ; preds = %for.body29 %add37 = add nsw i64 %5, %count.0116 %.pre = add nuw nsw i64 %indvars.iv123, 1 br label %for.inc70 if.else: ; preds = %for.body29 %sub = sub nsw i64 %5, %4 store i64 %sub, ptr %arrayidx33, align 8, !tbaa !9 %6 = add nuw nsw i64 %indvars.iv123, 1 %arrayidx49 = getelementptr inbounds [100005 x i64], ptr %a, i64 0, i64 %6 %7 = load i64, ptr %arrayidx49, align 8, !tbaa !9 %cmp50.not = icmp slt i64 %sub, %7 br i1 %cmp50.not, label %if.else59, label %if.then51 if.then51: ; preds = %if.else %add44 = add nsw i64 %4, %count.0116 %add55 = add nsw i64 %add44, %7 store i64 0, ptr %arrayidx49, align 8, !tbaa !9 br label %for.inc70 if.else59: ; preds = %if.else %sub65 = sub nsw i64 %7, %sub store i64 %sub65, ptr %arrayidx49, align 8, !tbaa !9 %add68 = add i64 %5, %count.0116 br label %for.inc70 for.inc70: ; preds = %if.then, %if.else59, %if.then51 %indvars.iv.next124.pre-phi = phi i64 [ %.pre, %if.then ], [ %6, %if.else59 ], [ %6, %if.then51 ] %count.1 = phi i64 [ %add37, %if.then ], [ %add68, %if.else59 ], [ %add55, %if.then51 ] %exitcond128.not = icmp eq i64 %indvars.iv.next124.pre-phi, %wide.trip.count121 br i1 %exitcond128.not, label %for.end72, label %for.body29, !llvm.loop !14 for.end72: ; preds = %for.inc70 %call73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %count.1) call void @llvm.lifetime.end.p0(i64 5000000, ptr nonnull %str) #5 call void @llvm.lifetime.end.p0(i64 800040, ptr nonnull %b) #5 call void @llvm.lifetime.end.p0(i64 800040, ptr nonnull %a) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn declare ptr @strtok(ptr noundef, ptr nocapture noundef readonly) 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: 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 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 = { 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 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 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"long", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12} !14 = distinct !{!14, !12}
#include<stdio.h> int main(){ int a, b, c, d; scanf("%d%d",&a, &b); scanf("%d%d",&c, &d); if(d==1){ printf("1\n"); return 0; } printf("0\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213180/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213180/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 = private unnamed_addr constant [2 x i8] c"0\00", align 1 @str.3 = private unnamed_addr constant [2 x i8] c"1\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 %d = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #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 void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c, ptr noundef nonnull %d) %0 = load i32, ptr %d, align 4, !tbaa !5 %cmp = icmp eq i32 %0, 1 %str.3.str = select i1 %cmp, ptr @str.3, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #4 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 M1,D1,M2,D2; if(scanf("%d%d",&M1,&D1)<2) return 1; if(scanf("%d%d",&M2,&D2)<2) return 1; if(M1==M2){ printf("0\n"); } else{ printf("1\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213238/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213238/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 = private unnamed_addr constant [2 x i8] c"1\00", align 1 @str.3 = private unnamed_addr constant [2 x i8] c"0\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %M1 = alloca i32, align 4 %D1 = alloca i32, align 4 %M2 = alloca i32, align 4 %D2 = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %M1) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %D1) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %M2) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %D2) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %M1, ptr noundef nonnull %D1) %cmp = icmp slt i32 %call, 2 br i1 %cmp, label %cleanup, label %if.end if.end: ; preds = %entry %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %M2, ptr noundef nonnull %D2) %cmp2 = icmp slt i32 %call1, 2 br i1 %cmp2, label %cleanup, label %if.end4 if.end4: ; preds = %if.end %0 = load i32, ptr %M1, align 4, !tbaa !5 %1 = load i32, ptr %M2, align 4, !tbaa !5 %cmp5 = icmp eq i32 %0, %1 %str.3.str = select i1 %cmp5, ptr @str.3, ptr @str %puts13 = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) br label %cleanup cleanup: ; preds = %if.end4, %if.end, %entry %retval.0 = phi i32 [ 1, %entry ], [ 1, %if.end ], [ 0, %if.end4 ] call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %D2) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %M2) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %D1) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %M1) #4 ret i32 %retval.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: 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 M1, D1, M2, D2; scanf("%d%d%d%d", &M1, &D1, &M2, &D2); if (D2==1) printf("%d", 1); else printf("%d", 0); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213281/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213281/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %M1 = alloca i32, align 4 %D1 = alloca i32, align 4 %M2 = alloca i32, align 4 %D2 = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %M1) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %D1) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %M2) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %D2) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %M1, ptr noundef nonnull %D1, ptr noundef nonnull %M2, ptr noundef nonnull %D2) %0 = load i32, ptr %D2, align 4, !tbaa !5 %cmp = icmp eq i32 %0, 1 %. = zext i1 %cmp to i32 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %D2) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %M2) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %D1) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %M1) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <stdlib.h> int main(void) { int N, A, B, C; int l[16]; int i; int search, max; int yosinagasayuri = 999999999; if (scanf("%d%d%d%d", &N, &A, &B, &C) != 4) return 1; for (i = 0; i < N; i++) { if (scanf("%d", &l[i]) != 1) return 1; } max = (1 << (2 * N)); for (search = 0; search < max; search++) { int nagasa[4] = {0}; int cost[4] = {-10, -10, -10, -10}; int yakusimaruhiroko; for (i = 0; i < N; i++) { int idx = (search >> (2 * i)) & 3; nagasa[idx] += l[i]; cost[idx] += 10; } if (cost[0] < 0 || cost[1] < 0 || cost[2] < 0) continue; cost[0] += abs(A - nagasa[0]); cost[1] += abs(B - nagasa[1]); cost[2] += abs(C - nagasa[2]); yakusimaruhiroko = cost[0] + cost[1] + cost[2]; if (yakusimaruhiroko < yosinagasayuri) yosinagasayuri = yakusimaruhiroko; } printf("%d\n", yosinagasayuri); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213331/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213331/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @__const.main.cost = private unnamed_addr constant [4 x i32] [i32 -10, i32 -10, i32 -10, i32 -10], align 16 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %A = alloca i32, align 4 %B = alloca i32, align 4 %C = alloca i32, align 4 %l = alloca [16 x i32], align 16 %nagasa = alloca [4 x i32], align 16 %cost = alloca [4 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #7 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %A) #7 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %B) #7 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %C) #7 call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %l) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %A, ptr noundef nonnull %B, ptr noundef nonnull %C) %cmp.not = icmp eq i32 %call, 4 br i1 %cmp.not, label %for.cond.preheader, label %cleanup57 for.cond.preheader: ; preds = %entry %0 = load i32, ptr %N, align 4, !tbaa !5 %cmp180 = icmp sgt i32 %0, 0 br i1 %cmp180, label %for.body, label %for.end55 for.cond: ; preds = %for.body %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %N, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp1 = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp1, label %for.body, label %for.end, !llvm.loop !9 for.body: ; preds = %for.cond.preheader, %for.cond %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond ], [ 0, %for.cond.preheader ] %arrayidx = getelementptr inbounds [16 x i32], ptr %l, i64 0, i64 %indvars.iv %call2 = 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 %for.cond, label %cleanup57 for.end: ; preds = %for.cond %mul = shl nsw i32 %1, 1 %cmp1082 = icmp sgt i32 %1, 0 %arrayidx25 = getelementptr inbounds [4 x i32], ptr %cost, i64 0, i64 1 %arrayidx28 = getelementptr inbounds [4 x i32], ptr %cost, i64 0, i64 2 %3 = load i32, ptr %A, align 4 %4 = load i32, ptr %B, align 4 %arrayidx35 = getelementptr inbounds [4 x i32], ptr %nagasa, i64 0, i64 1 %5 = load i32, ptr %C, align 4 %arrayidx39 = getelementptr inbounds [4 x i32], ptr %nagasa, i64 0, i64 2 br i1 %cmp1082, label %for.body8.us.preheader, label %for.end55 for.body8.us.preheader: ; preds = %for.end %wide.trip.count = zext i32 %1 to i64 %xtraiter = and i64 %wide.trip.count, 1 %6 = icmp eq i32 %1, 1 %unroll_iter = and i64 %wide.trip.count, 4294967294 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br label %for.body8.us for.body8.us: ; preds = %for.body8.us.preheader, %cleanup.us %yosinagasayuri.085.us = phi i32 [ %yosinagasayuri.2.us, %cleanup.us ], [ 999999999, %for.body8.us.preheader ] %search.084.us = phi i32 [ %inc54.us, %cleanup.us ], [ 0, %for.body8.us.preheader ] call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %nagasa) #7 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %nagasa, i8 0, i64 16, i1 false) call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %cost) #7 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %cost, ptr noundef nonnull align 16 dereferenceable(16) @__const.main.cost, i64 16, i1 false) br i1 %6, label %for.cond9.for.end22_crit_edge.us.unr-lcssa, label %for.body11.us if.end31.us: ; preds = %for.cond9.for.end22_crit_edge.us %7 = load i32, ptr %nagasa, align 16, !tbaa !5 %sub.us = sub nsw i32 %3, %7 %8 = call i32 @llvm.abs.i32(i32 %sub.us, i1 true) %add34.us = add nuw nsw i32 %8, %25 %9 = load i32, ptr %arrayidx35, align 4, !tbaa !5 %sub36.us = sub nsw i32 %4, %9 %10 = call i32 @llvm.abs.i32(i32 %sub36.us, i1 true) %add38.us = add nuw nsw i32 %10, %26 %11 = load i32, ptr %arrayidx39, align 8, !tbaa !5 %sub40.us = sub nsw i32 %5, %11 %12 = call i32 @llvm.abs.i32(i32 %sub40.us, i1 true) %add42.us = add nuw nsw i32 %12, %27 %add45.us = add nuw nsw i32 %add38.us, %add34.us %add47.us = add nuw nsw i32 %add45.us, %add42.us %spec.select.us = call i32 @llvm.smin.i32(i32 %add47.us, i32 %yosinagasayuri.085.us) br label %cleanup.us cleanup.us: ; preds = %if.end31.us, %for.cond9.for.end22_crit_edge.us %yosinagasayuri.2.us = phi i32 [ %spec.select.us, %if.end31.us ], [ %yosinagasayuri.085.us, %for.cond9.for.end22_crit_edge.us ] call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %cost) #7 call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %nagasa) #7 %inc54.us = add nuw nsw i32 %search.084.us, 1 %search.0.highbits.us = lshr i32 %inc54.us, %mul %cmp7.us = icmp eq i32 %search.0.highbits.us, 0 br i1 %cmp7.us, label %for.body8.us, label %for.end55, !llvm.loop !11 for.body11.us: ; preds = %for.body8.us, %for.body11.us %indvars.iv89 = phi i64 [ %indvars.iv.next90.1, %for.body11.us ], [ 0, %for.body8.us ] %niter = phi i64 [ %niter.next.1, %for.body11.us ], [ 0, %for.body8.us ] %indvars.iv89.tr = trunc i64 %indvars.iv89 to i32 %13 = shl i32 %indvars.iv89.tr, 1 %shr.us = lshr i32 %search.084.us, %13 %and.us = and i32 %shr.us, 3 %arrayidx14.us = getelementptr inbounds [16 x i32], ptr %l, i64 0, i64 %indvars.iv89 %14 = load i32, ptr %arrayidx14.us, align 8, !tbaa !5 %idxprom15.us = zext i32 %and.us to i64 %arrayidx16.us = getelementptr inbounds [4 x i32], ptr %nagasa, i64 0, i64 %idxprom15.us %15 = load i32, ptr %arrayidx16.us, align 4, !tbaa !5 %add.us = add nsw i32 %15, %14 store i32 %add.us, ptr %arrayidx16.us, align 4, !tbaa !5 %arrayidx18.us = getelementptr inbounds [4 x i32], ptr %cost, i64 0, i64 %idxprom15.us %16 = load i32, ptr %arrayidx18.us, align 4, !tbaa !5 %add19.us = add nsw i32 %16, 10 store i32 %add19.us, ptr %arrayidx18.us, align 4, !tbaa !5 %indvars.iv.next90 = or i64 %indvars.iv89, 1 %indvars.iv89.tr.1 = trunc i64 %indvars.iv.next90 to i32 %17 = shl i32 %indvars.iv89.tr.1, 1 %shr.us.1 = lshr i32 %search.084.us, %17 %and.us.1 = and i32 %shr.us.1, 3 %arrayidx14.us.1 = getelementptr inbounds [16 x i32], ptr %l, i64 0, i64 %indvars.iv.next90 %18 = load i32, ptr %arrayidx14.us.1, align 4, !tbaa !5 %idxprom15.us.1 = zext i32 %and.us.1 to i64 %arrayidx16.us.1 = getelementptr inbounds [4 x i32], ptr %nagasa, i64 0, i64 %idxprom15.us.1 %19 = load i32, ptr %arrayidx16.us.1, align 4, !tbaa !5 %add.us.1 = add nsw i32 %19, %18 store i32 %add.us.1, ptr %arrayidx16.us.1, align 4, !tbaa !5 %arrayidx18.us.1 = getelementptr inbounds [4 x i32], ptr %cost, i64 0, i64 %idxprom15.us.1 %20 = load i32, ptr %arrayidx18.us.1, align 4, !tbaa !5 %add19.us.1 = add nsw i32 %20, 10 store i32 %add19.us.1, ptr %arrayidx18.us.1, align 4, !tbaa !5 %indvars.iv.next90.1 = add nuw nsw i64 %indvars.iv89, 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.cond9.for.end22_crit_edge.us.unr-lcssa, label %for.body11.us, !llvm.loop !12 for.cond9.for.end22_crit_edge.us.unr-lcssa: ; preds = %for.body11.us, %for.body8.us %indvars.iv89.unr = phi i64 [ 0, %for.body8.us ], [ %indvars.iv.next90.1, %for.body11.us ] br i1 %lcmp.mod.not, label %for.cond9.for.end22_crit_edge.us, label %for.body11.us.epil for.body11.us.epil: ; preds = %for.cond9.for.end22_crit_edge.us.unr-lcssa %indvars.iv89.tr.epil = trunc i64 %indvars.iv89.unr to i32 %21 = shl i32 %indvars.iv89.tr.epil, 1 %shr.us.epil = lshr i32 %search.084.us, %21 %and.us.epil = and i32 %shr.us.epil, 3 %arrayidx14.us.epil = getelementptr inbounds [16 x i32], ptr %l, i64 0, i64 %indvars.iv89.unr %22 = load i32, ptr %arrayidx14.us.epil, align 4, !tbaa !5 %idxprom15.us.epil = zext i32 %and.us.epil to i64 %arrayidx16.us.epil = getelementptr inbounds [4 x i32], ptr %nagasa, i64 0, i64 %idxprom15.us.epil %23 = load i32, ptr %arrayidx16.us.epil, align 4, !tbaa !5 %add.us.epil = add nsw i32 %23, %22 store i32 %add.us.epil, ptr %arrayidx16.us.epil, align 4, !tbaa !5 %arrayidx18.us.epil = getelementptr inbounds [4 x i32], ptr %cost, i64 0, i64 %idxprom15.us.epil %24 = load i32, ptr %arrayidx18.us.epil, align 4, !tbaa !5 %add19.us.epil = add nsw i32 %24, 10 store i32 %add19.us.epil, ptr %arrayidx18.us.epil, align 4, !tbaa !5 br label %for.cond9.for.end22_crit_edge.us for.cond9.for.end22_crit_edge.us: ; preds = %for.cond9.for.end22_crit_edge.us.unr-lcssa, %for.body11.us.epil %25 = load i32, ptr %cost, align 16, !tbaa !5 %cmp24.us = icmp slt i32 %25, 0 %26 = load i32, ptr %arrayidx25, align 4 %cmp26.us = icmp slt i32 %26, 0 %or.cond.us = select i1 %cmp24.us, i1 true, i1 %cmp26.us %27 = load i32, ptr %arrayidx28, align 8 %cmp29.us = icmp slt i32 %27, 0 %or.cond66.us = select i1 %or.cond.us, i1 true, i1 %cmp29.us br i1 %or.cond66.us, label %cleanup.us, label %if.end31.us for.end55: ; preds = %cleanup.us, %for.cond.preheader, %for.end %.us-phi = phi i32 [ 999999999, %for.end ], [ 999999999, %for.cond.preheader ], [ %yosinagasayuri.2.us, %cleanup.us ] %call56 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.us-phi) br label %cleanup57 cleanup57: ; preds = %for.body, %entry, %for.end55 %retval.0 = phi i32 [ 0, %for.end55 ], [ 1, %entry ], [ 1, %for.body ] call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %l) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %C) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %B) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %A) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #7 ret i32 %retval.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #5 ; 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) #6 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(){ int N, A, B, C; int l[8]; scanf("%d %d %d %d\n",&N,&A,&B,&C); for(int i=0;i<N;i++) scanf("%d\n",&l[i]); int i[8]; int mptmp ,mpmin=100000000; int tmpa,tmpb,tmpc; for(i[0]=0;i[0]<4;i[0]++) { for(i[1]=0;i[1]<4;i[1]++) { for(i[2]=0;i[2]<4;i[2]++) { for(i[3]=0;i[3]<4;i[3]++) { for(i[4]=0;i[4]<4;i[4]++) { for(i[5]=0;i[5]<4;i[5]++) { for(i[6]=0;i[6]<4;i[6]++) { for(i[7]=0;i[7]<4;i[7]++) { mptmp = -30; tmpa = 0; tmpb = 0; tmpc = 0; for(int j=0;j<N;j++) { if(i[j] == 0) { tmpa += l[j]; mptmp += 10; } if(i[j] == 1) { tmpb += l[j]; mptmp += 10; } if(i[j] == 2) { tmpc += l[j]; mptmp += 10; } } if((tmpa!=0)&(tmpb!=0)&(tmpc!=0)) { mptmp += abs(tmpa-A); mptmp += abs(tmpb-B); mptmp += abs(tmpc-C); mpmin = (mpmin > mptmp) ? mptmp : mpmin; } }}}}}}}} printf("%d",mpmin); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213382/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213382/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [13 x i8] c"%d %d %d %d\0A\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %A = alloca i32, align 4 %B = alloca i32, align 4 %C = alloca i32, align 4 %l = alloca [8 x i32], align 16 %i2 = alloca [8 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %A) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %B) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %C) #5 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %l) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %A, ptr noundef nonnull %B, ptr noundef nonnull %C) %0 = load i32, ptr %N, align 4, !tbaa !5 %cmp165 = icmp sgt i32 %0, 0 br i1 %cmp165, label %for.body, label %for.cond.cleanup.thread for.cond.cleanup.thread: ; preds = %entry call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %i2) #5 %arrayidx8211 = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 1 %arrayidx13212 = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 2 %arrayidx18213 = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 3 %arrayidx23214 = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 4 %arrayidx28215 = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 5 %arrayidx33216 = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 6 %arrayidx38217 = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 7 br label %for.body7.preheader for.cond.cleanup: ; preds = %for.body call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %i2) #5 %arrayidx8 = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 1 %arrayidx13 = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 2 %arrayidx18 = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 3 %arrayidx23 = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 4 %arrayidx28 = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 5 %arrayidx33 = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 6 %arrayidx38 = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 7 %cmp44167 = icmp sgt i32 %32, 0 %1 = load i32, ptr %A, align 4 %2 = load i32, ptr %B, align 4 %3 = load i32, ptr %C, align 4 store i32 0, ptr %i2, align 16, !tbaa !5 br i1 %cmp44167, label %for.body7.us.preheader, label %for.body7.preheader for.body7.preheader: ; preds = %for.cond.cleanup.thread, %for.cond.cleanup %arrayidx38225 = phi ptr [ %arrayidx38217, %for.cond.cleanup.thread ], [ %arrayidx38, %for.cond.cleanup ] %arrayidx33224 = phi ptr [ %arrayidx33216, %for.cond.cleanup.thread ], [ %arrayidx33, %for.cond.cleanup ] %arrayidx28223 = phi ptr [ %arrayidx28215, %for.cond.cleanup.thread ], [ %arrayidx28, %for.cond.cleanup ] %arrayidx23222 = phi ptr [ %arrayidx23214, %for.cond.cleanup.thread ], [ %arrayidx23, %for.cond.cleanup ] %arrayidx18221 = phi ptr [ %arrayidx18213, %for.cond.cleanup.thread ], [ %arrayidx18, %for.cond.cleanup ] %arrayidx13220 = phi ptr [ %arrayidx13212, %for.cond.cleanup.thread ], [ %arrayidx13, %for.cond.cleanup ] %arrayidx8219 = phi ptr [ %arrayidx8211, %for.cond.cleanup.thread ], [ %arrayidx8, %for.cond.cleanup ] store i32 4, ptr %arrayidx8219, align 4, !tbaa !5 store i32 4, ptr %arrayidx13220, align 8, !tbaa !5 store i32 4, ptr %arrayidx18221, align 4, !tbaa !5 store i32 4, ptr %arrayidx23222, align 16, !tbaa !5 store i32 4, ptr %arrayidx28223, align 4, !tbaa !5 store i32 4, ptr %arrayidx33224, align 8, !tbaa !5 store i32 4, ptr %arrayidx38225, align 4, !tbaa !5 br label %for.end120 for.body7.us.preheader: ; preds = %for.cond.cleanup %wide.trip.count = zext i32 %32 to i64 br label %for.body7.us for.body7.us: ; preds = %for.body7.us.preheader, %for.inc117.split.us.us %mpmin.0195.us = phi i32 [ %mpmin.8.us.us.us.us.us.us.us.us.3, %for.inc117.split.us.us ], [ 100000000, %for.body7.us.preheader ] %storemerge194.us = phi i32 [ %inc119.us, %for.inc117.split.us.us ], [ 0, %for.body7.us.preheader ] store i32 0, ptr %arrayidx8, align 4, !tbaa !5 br label %for.body12.us.us for.body12.us.us: ; preds = %for.inc113.split.us.us.us, %for.body7.us %mpmin.1193.us.us = phi i32 [ %mpmin.0195.us, %for.body7.us ], [ %mpmin.8.us.us.us.us.us.us.us.us.3, %for.inc113.split.us.us.us ] %storemerge146192.us.us = phi i32 [ 0, %for.body7.us ], [ %inc115.us.us, %for.inc113.split.us.us.us ] store i32 0, ptr %arrayidx13, align 8, !tbaa !5 br label %for.body17.us.us.us for.body17.us.us.us: ; preds = %for.inc109.split.us.us.us.us, %for.body12.us.us %mpmin.2190.us.us.us = phi i32 [ %mpmin.1193.us.us, %for.body12.us.us ], [ %mpmin.8.us.us.us.us.us.us.us.us.3, %for.inc109.split.us.us.us.us ] %storemerge147189.us.us.us = phi i32 [ 0, %for.body12.us.us ], [ %inc111.us.us.us, %for.inc109.split.us.us.us.us ] store i32 0, ptr %arrayidx18, align 4, !tbaa !5 br label %for.body22.us.us.us.us for.body22.us.us.us.us: ; preds = %for.inc105.split.us.us.us.us.us, %for.body17.us.us.us %mpmin.3188.us.us.us.us = phi i32 [ %mpmin.2190.us.us.us, %for.body17.us.us.us ], [ %mpmin.8.us.us.us.us.us.us.us.us.3, %for.inc105.split.us.us.us.us.us ] %storemerge148187.us.us.us.us = phi i32 [ 0, %for.body17.us.us.us ], [ %inc107.us.us.us.us, %for.inc105.split.us.us.us.us.us ] store i32 0, ptr %arrayidx23, align 16, !tbaa !5 br label %for.body27.us.us.us.us.us for.body27.us.us.us.us.us: ; preds = %for.inc101.split.us.us.us.us.us.us, %for.body22.us.us.us.us %mpmin.4185.us.us.us.us.us = phi i32 [ %mpmin.3188.us.us.us.us, %for.body22.us.us.us.us ], [ %mpmin.8.us.us.us.us.us.us.us.us.3, %for.inc101.split.us.us.us.us.us.us ] %storemerge149184.us.us.us.us.us = phi i32 [ 0, %for.body22.us.us.us.us ], [ %inc103.us.us.us.us.us, %for.inc101.split.us.us.us.us.us.us ] store i32 0, ptr %arrayidx28, align 4, !tbaa !5 br label %for.body32.us.us.us.us.us.us for.body32.us.us.us.us.us.us: ; preds = %for.inc97.split.us.us.us.us.us.us.us, %for.body27.us.us.us.us.us %mpmin.5183.us.us.us.us.us.us = phi i32 [ %mpmin.4185.us.us.us.us.us, %for.body27.us.us.us.us.us ], [ %mpmin.8.us.us.us.us.us.us.us.us.3, %for.inc97.split.us.us.us.us.us.us.us ] %storemerge150182.us.us.us.us.us.us = phi i32 [ 0, %for.body27.us.us.us.us.us ], [ %inc99.us.us.us.us.us.us, %for.inc97.split.us.us.us.us.us.us.us ] store i32 0, ptr %arrayidx33, align 8, !tbaa !5 br label %for.body37.us.us.us.us.us.us.us for.body37.us.us.us.us.us.us.us: ; preds = %for.inc89.us.us.us.us.us.us.us.us.3, %for.body32.us.us.us.us.us.us %mpmin.6180.us.us.us.us.us.us.us = phi i32 [ %mpmin.5183.us.us.us.us.us.us, %for.body32.us.us.us.us.us.us ], [ %mpmin.8.us.us.us.us.us.us.us.us.3, %for.inc89.us.us.us.us.us.us.us.us.3 ] %storemerge151179.us.us.us.us.us.us.us = phi i32 [ 0, %for.body32.us.us.us.us.us.us ], [ %inc95.us.us.us.us.us.us.us, %for.inc89.us.us.us.us.us.us.us.us.3 ] store i32 0, ptr %arrayidx38, align 4, !tbaa !5 br label %for.body46.us.us.us.us.us.us.us.us if.then80.us.us.us.us.us.us.us.us: ; preds = %for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us %sub.us.us.us.us.us.us.us.us = sub nsw i32 %tmpa.1158163.us.us.us.us.us.us.us.us, %1 %4 = call i32 @llvm.abs.i32(i32 %sub.us.us.us.us.us.us.us.us, i1 true) %add81.us.us.us.us.us.us.us.us = add nsw i32 %4, %mptmp.3.us.us.us.us.us.us.us.us %sub82.us.us.us.us.us.us.us.us = sub nsw i32 %tmpb.1164.us.us.us.us.us.us.us.us, %2 %5 = call i32 @llvm.abs.i32(i32 %sub82.us.us.us.us.us.us.us.us, i1 true) %add83.us.us.us.us.us.us.us.us = add nsw i32 %add81.us.us.us.us.us.us.us.us, %5 %sub84.us.us.us.us.us.us.us.us = sub nsw i32 %tmpc.1.us.us.us.us.us.us.us.us, %3 %6 = call i32 @llvm.abs.i32(i32 %sub84.us.us.us.us.us.us.us.us, i1 true) %add85.us.us.us.us.us.us.us.us = add nsw i32 %add83.us.us.us.us.us.us.us.us, %6 %cond.us.us.us.us.us.us.us.us = call i32 @llvm.smin.i32(i32 %mpmin.6180.us.us.us.us.us.us.us, i32 %add85.us.us.us.us.us.us.us.us) br label %for.inc89.us.us.us.us.us.us.us.us for.inc89.us.us.us.us.us.us.us.us: ; preds = %for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us, %if.then80.us.us.us.us.us.us.us.us %mpmin.8.us.us.us.us.us.us.us.us = phi i32 [ %cond.us.us.us.us.us.us.us.us, %if.then80.us.us.us.us.us.us.us.us ], [ %mpmin.6180.us.us.us.us.us.us.us, %for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us ] store i32 1, ptr %arrayidx38, align 4, !tbaa !5 br label %for.body46.us.us.us.us.us.us.us.us.1 for.body46.us.us.us.us.us.us.us.us.1: ; preds = %for.inc71.us.us.us.us.us.us.us.us.1, %for.inc89.us.us.us.us.us.us.us.us %indvars.iv199.1 = phi i64 [ %indvars.iv.next200.1, %for.inc71.us.us.us.us.us.us.us.us.1 ], [ 0, %for.inc89.us.us.us.us.us.us.us.us ] %tmpc.0171.us.us.us.us.us.us.us.us.1 = phi i32 [ %tmpc.1.us.us.us.us.us.us.us.us.1, %for.inc71.us.us.us.us.us.us.us.us.1 ], [ 0, %for.inc89.us.us.us.us.us.us.us.us ] %tmpb.0170.us.us.us.us.us.us.us.us.1 = phi i32 [ %tmpb.1164.us.us.us.us.us.us.us.us.1, %for.inc71.us.us.us.us.us.us.us.us.1 ], [ 0, %for.inc89.us.us.us.us.us.us.us.us ] %tmpa.0169.us.us.us.us.us.us.us.us.1 = phi i32 [ %tmpa.1158163.us.us.us.us.us.us.us.us.1, %for.inc71.us.us.us.us.us.us.us.us.1 ], [ 0, %for.inc89.us.us.us.us.us.us.us.us ] %mptmp.0168.us.us.us.us.us.us.us.us.1 = phi i32 [ %mptmp.3.us.us.us.us.us.us.us.us.1, %for.inc71.us.us.us.us.us.us.us.us.1 ], [ -30, %for.inc89.us.us.us.us.us.us.us.us ] %arrayidx48.us.us.us.us.us.us.us.us.1 = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 %indvars.iv199.1 %7 = load i32, ptr %arrayidx48.us.us.us.us.us.us.us.us.1, align 4, !tbaa !5 switch i32 %7, label %for.inc71.us.us.us.us.us.us.us.us.1 [ i32 0, label %if.end.thread.us.us.us.us.us.us.us.us.1 i32 1, label %if.then56.us.us.us.us.us.us.us.us.1 i32 2, label %if.then65.us.us.us.us.us.us.us.us.1 ] if.then65.us.us.us.us.us.us.us.us.1: ; preds = %for.body46.us.us.us.us.us.us.us.us.1 %arrayidx67.us.us.us.us.us.us.us.us.1 = getelementptr inbounds [8 x i32], ptr %l, i64 0, i64 %indvars.iv199.1 %8 = load i32, ptr %arrayidx67.us.us.us.us.us.us.us.us.1, align 4, !tbaa !5 %add68.us.us.us.us.us.us.us.us.1 = add nsw i32 %8, %tmpc.0171.us.us.us.us.us.us.us.us.1 %add69.us.us.us.us.us.us.us.us.1 = add nsw i32 %mptmp.0168.us.us.us.us.us.us.us.us.1, 10 br label %for.inc71.us.us.us.us.us.us.us.us.1 if.then56.us.us.us.us.us.us.us.us.1: ; preds = %for.body46.us.us.us.us.us.us.us.us.1 %arrayidx58.us.us.us.us.us.us.us.us.1 = getelementptr inbounds [8 x i32], ptr %l, i64 0, i64 %indvars.iv199.1 %9 = load i32, ptr %arrayidx58.us.us.us.us.us.us.us.us.1, align 4, !tbaa !5 %add59.us.us.us.us.us.us.us.us.1 = add nsw i32 %9, %tmpb.0170.us.us.us.us.us.us.us.us.1 %add60.us.us.us.us.us.us.us.us.1 = add nsw i32 %mptmp.0168.us.us.us.us.us.us.us.us.1, 10 br label %for.inc71.us.us.us.us.us.us.us.us.1 if.end.thread.us.us.us.us.us.us.us.us.1: ; preds = %for.body46.us.us.us.us.us.us.us.us.1 %arrayidx51.us.us.us.us.us.us.us.us.1 = getelementptr inbounds [8 x i32], ptr %l, i64 0, i64 %indvars.iv199.1 %10 = load i32, ptr %arrayidx51.us.us.us.us.us.us.us.us.1, align 4, !tbaa !5 %add.us.us.us.us.us.us.us.us.1 = add nsw i32 %10, %tmpa.0169.us.us.us.us.us.us.us.us.1 %add52.us.us.us.us.us.us.us.us.1 = add nsw i32 %mptmp.0168.us.us.us.us.us.us.us.us.1, 10 br label %for.inc71.us.us.us.us.us.us.us.us.1 for.inc71.us.us.us.us.us.us.us.us.1: ; preds = %if.end.thread.us.us.us.us.us.us.us.us.1, %if.then56.us.us.us.us.us.us.us.us.1, %if.then65.us.us.us.us.us.us.us.us.1, %for.body46.us.us.us.us.us.us.us.us.1 %tmpb.1164.us.us.us.us.us.us.us.us.1 = phi i32 [ %tmpb.0170.us.us.us.us.us.us.us.us.1, %if.then65.us.us.us.us.us.us.us.us.1 ], [ %tmpb.0170.us.us.us.us.us.us.us.us.1, %if.end.thread.us.us.us.us.us.us.us.us.1 ], [ %add59.us.us.us.us.us.us.us.us.1, %if.then56.us.us.us.us.us.us.us.us.1 ], [ %tmpb.0170.us.us.us.us.us.us.us.us.1, %for.body46.us.us.us.us.us.us.us.us.1 ] %tmpa.1158163.us.us.us.us.us.us.us.us.1 = phi i32 [ %tmpa.0169.us.us.us.us.us.us.us.us.1, %if.then65.us.us.us.us.us.us.us.us.1 ], [ %add.us.us.us.us.us.us.us.us.1, %if.end.thread.us.us.us.us.us.us.us.us.1 ], [ %tmpa.0169.us.us.us.us.us.us.us.us.1, %if.then56.us.us.us.us.us.us.us.us.1 ], [ %tmpa.0169.us.us.us.us.us.us.us.us.1, %for.body46.us.us.us.us.us.us.us.us.1 ] %mptmp.3.us.us.us.us.us.us.us.us.1 = phi i32 [ %add69.us.us.us.us.us.us.us.us.1, %if.then65.us.us.us.us.us.us.us.us.1 ], [ %add52.us.us.us.us.us.us.us.us.1, %if.end.thread.us.us.us.us.us.us.us.us.1 ], [ %add60.us.us.us.us.us.us.us.us.1, %if.then56.us.us.us.us.us.us.us.us.1 ], [ %mptmp.0168.us.us.us.us.us.us.us.us.1, %for.body46.us.us.us.us.us.us.us.us.1 ] %tmpc.1.us.us.us.us.us.us.us.us.1 = phi i32 [ %add68.us.us.us.us.us.us.us.us.1, %if.then65.us.us.us.us.us.us.us.us.1 ], [ %tmpc.0171.us.us.us.us.us.us.us.us.1, %if.end.thread.us.us.us.us.us.us.us.us.1 ], [ %tmpc.0171.us.us.us.us.us.us.us.us.1, %if.then56.us.us.us.us.us.us.us.us.1 ], [ %tmpc.0171.us.us.us.us.us.us.us.us.1, %for.body46.us.us.us.us.us.us.us.us.1 ] %indvars.iv.next200.1 = add nuw nsw i64 %indvars.iv199.1, 1 %exitcond.1.not = icmp eq i64 %indvars.iv.next200.1, %wide.trip.count br i1 %exitcond.1.not, label %for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us.1, label %for.body46.us.us.us.us.us.us.us.us.1, !llvm.loop !9 for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us.1: ; preds = %for.inc71.us.us.us.us.us.us.us.us.1 %cmp74.us.us.us.us.us.us.us.us.1 = icmp ne i32 %tmpa.1158163.us.us.us.us.us.us.us.us.1, 0 %cmp75.us.us.us.us.us.us.us.us.1 = icmp ne i32 %tmpb.1164.us.us.us.us.us.us.us.us.1, 0 %and153.us.us.us.us.us.us.us.us.1 = and i1 %cmp74.us.us.us.us.us.us.us.us.1, %cmp75.us.us.us.us.us.us.us.us.1 %cmp77.us.us.us.us.us.us.us.us.1 = icmp ne i32 %tmpc.1.us.us.us.us.us.us.us.us.1, 0 %and79154.us.us.us.us.us.us.us.us.1 = and i1 %and153.us.us.us.us.us.us.us.us.1, %cmp77.us.us.us.us.us.us.us.us.1 br i1 %and79154.us.us.us.us.us.us.us.us.1, label %if.then80.us.us.us.us.us.us.us.us.1, label %for.inc89.us.us.us.us.us.us.us.us.1 if.then80.us.us.us.us.us.us.us.us.1: ; preds = %for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us.1 %sub.us.us.us.us.us.us.us.us.1 = sub nsw i32 %tmpa.1158163.us.us.us.us.us.us.us.us.1, %1 %11 = call i32 @llvm.abs.i32(i32 %sub.us.us.us.us.us.us.us.us.1, i1 true) %add81.us.us.us.us.us.us.us.us.1 = add nsw i32 %11, %mptmp.3.us.us.us.us.us.us.us.us.1 %sub82.us.us.us.us.us.us.us.us.1 = sub nsw i32 %tmpb.1164.us.us.us.us.us.us.us.us.1, %2 %12 = call i32 @llvm.abs.i32(i32 %sub82.us.us.us.us.us.us.us.us.1, i1 true) %add83.us.us.us.us.us.us.us.us.1 = add nsw i32 %add81.us.us.us.us.us.us.us.us.1, %12 %sub84.us.us.us.us.us.us.us.us.1 = sub nsw i32 %tmpc.1.us.us.us.us.us.us.us.us.1, %3 %13 = call i32 @llvm.abs.i32(i32 %sub84.us.us.us.us.us.us.us.us.1, i1 true) %add85.us.us.us.us.us.us.us.us.1 = add nsw i32 %add83.us.us.us.us.us.us.us.us.1, %13 %cond.us.us.us.us.us.us.us.us.1 = call i32 @llvm.smin.i32(i32 %mpmin.8.us.us.us.us.us.us.us.us, i32 %add85.us.us.us.us.us.us.us.us.1) br label %for.inc89.us.us.us.us.us.us.us.us.1 for.inc89.us.us.us.us.us.us.us.us.1: ; preds = %if.then80.us.us.us.us.us.us.us.us.1, %for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us.1 %mpmin.8.us.us.us.us.us.us.us.us.1 = phi i32 [ %cond.us.us.us.us.us.us.us.us.1, %if.then80.us.us.us.us.us.us.us.us.1 ], [ %mpmin.8.us.us.us.us.us.us.us.us, %for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us.1 ] store i32 2, ptr %arrayidx38, align 4, !tbaa !5 br label %for.body46.us.us.us.us.us.us.us.us.2 for.body46.us.us.us.us.us.us.us.us.2: ; preds = %for.inc71.us.us.us.us.us.us.us.us.2, %for.inc89.us.us.us.us.us.us.us.us.1 %indvars.iv199.2 = phi i64 [ %indvars.iv.next200.2, %for.inc71.us.us.us.us.us.us.us.us.2 ], [ 0, %for.inc89.us.us.us.us.us.us.us.us.1 ] %tmpc.0171.us.us.us.us.us.us.us.us.2 = phi i32 [ %tmpc.1.us.us.us.us.us.us.us.us.2, %for.inc71.us.us.us.us.us.us.us.us.2 ], [ 0, %for.inc89.us.us.us.us.us.us.us.us.1 ] %tmpb.0170.us.us.us.us.us.us.us.us.2 = phi i32 [ %tmpb.1164.us.us.us.us.us.us.us.us.2, %for.inc71.us.us.us.us.us.us.us.us.2 ], [ 0, %for.inc89.us.us.us.us.us.us.us.us.1 ] %tmpa.0169.us.us.us.us.us.us.us.us.2 = phi i32 [ %tmpa.1158163.us.us.us.us.us.us.us.us.2, %for.inc71.us.us.us.us.us.us.us.us.2 ], [ 0, %for.inc89.us.us.us.us.us.us.us.us.1 ] %mptmp.0168.us.us.us.us.us.us.us.us.2 = phi i32 [ %mptmp.3.us.us.us.us.us.us.us.us.2, %for.inc71.us.us.us.us.us.us.us.us.2 ], [ -30, %for.inc89.us.us.us.us.us.us.us.us.1 ] %arrayidx48.us.us.us.us.us.us.us.us.2 = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 %indvars.iv199.2 %14 = load i32, ptr %arrayidx48.us.us.us.us.us.us.us.us.2, align 4, !tbaa !5 switch i32 %14, label %for.inc71.us.us.us.us.us.us.us.us.2 [ i32 0, label %if.end.thread.us.us.us.us.us.us.us.us.2 i32 1, label %if.then56.us.us.us.us.us.us.us.us.2 i32 2, label %if.then65.us.us.us.us.us.us.us.us.2 ] if.then65.us.us.us.us.us.us.us.us.2: ; preds = %for.body46.us.us.us.us.us.us.us.us.2 %arrayidx67.us.us.us.us.us.us.us.us.2 = getelementptr inbounds [8 x i32], ptr %l, i64 0, i64 %indvars.iv199.2 %15 = load i32, ptr %arrayidx67.us.us.us.us.us.us.us.us.2, align 4, !tbaa !5 %add68.us.us.us.us.us.us.us.us.2 = add nsw i32 %15, %tmpc.0171.us.us.us.us.us.us.us.us.2 %add69.us.us.us.us.us.us.us.us.2 = add nsw i32 %mptmp.0168.us.us.us.us.us.us.us.us.2, 10 br label %for.inc71.us.us.us.us.us.us.us.us.2 if.then56.us.us.us.us.us.us.us.us.2: ; preds = %for.body46.us.us.us.us.us.us.us.us.2 %arrayidx58.us.us.us.us.us.us.us.us.2 = getelementptr inbounds [8 x i32], ptr %l, i64 0, i64 %indvars.iv199.2 %16 = load i32, ptr %arrayidx58.us.us.us.us.us.us.us.us.2, align 4, !tbaa !5 %add59.us.us.us.us.us.us.us.us.2 = add nsw i32 %16, %tmpb.0170.us.us.us.us.us.us.us.us.2 %add60.us.us.us.us.us.us.us.us.2 = add nsw i32 %mptmp.0168.us.us.us.us.us.us.us.us.2, 10 br label %for.inc71.us.us.us.us.us.us.us.us.2 if.end.thread.us.us.us.us.us.us.us.us.2: ; preds = %for.body46.us.us.us.us.us.us.us.us.2 %arrayidx51.us.us.us.us.us.us.us.us.2 = getelementptr inbounds [8 x i32], ptr %l, i64 0, i64 %indvars.iv199.2 %17 = load i32, ptr %arrayidx51.us.us.us.us.us.us.us.us.2, align 4, !tbaa !5 %add.us.us.us.us.us.us.us.us.2 = add nsw i32 %17, %tmpa.0169.us.us.us.us.us.us.us.us.2 %add52.us.us.us.us.us.us.us.us.2 = add nsw i32 %mptmp.0168.us.us.us.us.us.us.us.us.2, 10 br label %for.inc71.us.us.us.us.us.us.us.us.2 for.inc71.us.us.us.us.us.us.us.us.2: ; preds = %if.end.thread.us.us.us.us.us.us.us.us.2, %if.then56.us.us.us.us.us.us.us.us.2, %if.then65.us.us.us.us.us.us.us.us.2, %for.body46.us.us.us.us.us.us.us.us.2 %tmpb.1164.us.us.us.us.us.us.us.us.2 = phi i32 [ %tmpb.0170.us.us.us.us.us.us.us.us.2, %if.then65.us.us.us.us.us.us.us.us.2 ], [ %tmpb.0170.us.us.us.us.us.us.us.us.2, %if.end.thread.us.us.us.us.us.us.us.us.2 ], [ %add59.us.us.us.us.us.us.us.us.2, %if.then56.us.us.us.us.us.us.us.us.2 ], [ %tmpb.0170.us.us.us.us.us.us.us.us.2, %for.body46.us.us.us.us.us.us.us.us.2 ] %tmpa.1158163.us.us.us.us.us.us.us.us.2 = phi i32 [ %tmpa.0169.us.us.us.us.us.us.us.us.2, %if.then65.us.us.us.us.us.us.us.us.2 ], [ %add.us.us.us.us.us.us.us.us.2, %if.end.thread.us.us.us.us.us.us.us.us.2 ], [ %tmpa.0169.us.us.us.us.us.us.us.us.2, %if.then56.us.us.us.us.us.us.us.us.2 ], [ %tmpa.0169.us.us.us.us.us.us.us.us.2, %for.body46.us.us.us.us.us.us.us.us.2 ] %mptmp.3.us.us.us.us.us.us.us.us.2 = phi i32 [ %add69.us.us.us.us.us.us.us.us.2, %if.then65.us.us.us.us.us.us.us.us.2 ], [ %add52.us.us.us.us.us.us.us.us.2, %if.end.thread.us.us.us.us.us.us.us.us.2 ], [ %add60.us.us.us.us.us.us.us.us.2, %if.then56.us.us.us.us.us.us.us.us.2 ], [ %mptmp.0168.us.us.us.us.us.us.us.us.2, %for.body46.us.us.us.us.us.us.us.us.2 ] %tmpc.1.us.us.us.us.us.us.us.us.2 = phi i32 [ %add68.us.us.us.us.us.us.us.us.2, %if.then65.us.us.us.us.us.us.us.us.2 ], [ %tmpc.0171.us.us.us.us.us.us.us.us.2, %if.end.thread.us.us.us.us.us.us.us.us.2 ], [ %tmpc.0171.us.us.us.us.us.us.us.us.2, %if.then56.us.us.us.us.us.us.us.us.2 ], [ %tmpc.0171.us.us.us.us.us.us.us.us.2, %for.body46.us.us.us.us.us.us.us.us.2 ] %indvars.iv.next200.2 = add nuw nsw i64 %indvars.iv199.2, 1 %exitcond.2.not = icmp eq i64 %indvars.iv.next200.2, %wide.trip.count br i1 %exitcond.2.not, label %for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us.2, label %for.body46.us.us.us.us.us.us.us.us.2, !llvm.loop !9 for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us.2: ; preds = %for.inc71.us.us.us.us.us.us.us.us.2 %cmp74.us.us.us.us.us.us.us.us.2 = icmp ne i32 %tmpa.1158163.us.us.us.us.us.us.us.us.2, 0 %cmp75.us.us.us.us.us.us.us.us.2 = icmp ne i32 %tmpb.1164.us.us.us.us.us.us.us.us.2, 0 %and153.us.us.us.us.us.us.us.us.2 = and i1 %cmp74.us.us.us.us.us.us.us.us.2, %cmp75.us.us.us.us.us.us.us.us.2 %cmp77.us.us.us.us.us.us.us.us.2 = icmp ne i32 %tmpc.1.us.us.us.us.us.us.us.us.2, 0 %and79154.us.us.us.us.us.us.us.us.2 = and i1 %and153.us.us.us.us.us.us.us.us.2, %cmp77.us.us.us.us.us.us.us.us.2 br i1 %and79154.us.us.us.us.us.us.us.us.2, label %if.then80.us.us.us.us.us.us.us.us.2, label %for.inc89.us.us.us.us.us.us.us.us.2 if.then80.us.us.us.us.us.us.us.us.2: ; preds = %for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us.2 %sub.us.us.us.us.us.us.us.us.2 = sub nsw i32 %tmpa.1158163.us.us.us.us.us.us.us.us.2, %1 %18 = call i32 @llvm.abs.i32(i32 %sub.us.us.us.us.us.us.us.us.2, i1 true) %add81.us.us.us.us.us.us.us.us.2 = add nsw i32 %18, %mptmp.3.us.us.us.us.us.us.us.us.2 %sub82.us.us.us.us.us.us.us.us.2 = sub nsw i32 %tmpb.1164.us.us.us.us.us.us.us.us.2, %2 %19 = call i32 @llvm.abs.i32(i32 %sub82.us.us.us.us.us.us.us.us.2, i1 true) %add83.us.us.us.us.us.us.us.us.2 = add nsw i32 %add81.us.us.us.us.us.us.us.us.2, %19 %sub84.us.us.us.us.us.us.us.us.2 = sub nsw i32 %tmpc.1.us.us.us.us.us.us.us.us.2, %3 %20 = call i32 @llvm.abs.i32(i32 %sub84.us.us.us.us.us.us.us.us.2, i1 true) %add85.us.us.us.us.us.us.us.us.2 = add nsw i32 %add83.us.us.us.us.us.us.us.us.2, %20 %cond.us.us.us.us.us.us.us.us.2 = call i32 @llvm.smin.i32(i32 %mpmin.8.us.us.us.us.us.us.us.us.1, i32 %add85.us.us.us.us.us.us.us.us.2) br label %for.inc89.us.us.us.us.us.us.us.us.2 for.inc89.us.us.us.us.us.us.us.us.2: ; preds = %if.then80.us.us.us.us.us.us.us.us.2, %for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us.2 %mpmin.8.us.us.us.us.us.us.us.us.2 = phi i32 [ %cond.us.us.us.us.us.us.us.us.2, %if.then80.us.us.us.us.us.us.us.us.2 ], [ %mpmin.8.us.us.us.us.us.us.us.us.1, %for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us.2 ] store i32 3, ptr %arrayidx38, align 4, !tbaa !5 br label %for.body46.us.us.us.us.us.us.us.us.3 for.body46.us.us.us.us.us.us.us.us.3: ; preds = %for.inc71.us.us.us.us.us.us.us.us.3, %for.inc89.us.us.us.us.us.us.us.us.2 %indvars.iv199.3 = phi i64 [ %indvars.iv.next200.3, %for.inc71.us.us.us.us.us.us.us.us.3 ], [ 0, %for.inc89.us.us.us.us.us.us.us.us.2 ] %tmpc.0171.us.us.us.us.us.us.us.us.3 = phi i32 [ %tmpc.1.us.us.us.us.us.us.us.us.3, %for.inc71.us.us.us.us.us.us.us.us.3 ], [ 0, %for.inc89.us.us.us.us.us.us.us.us.2 ] %tmpb.0170.us.us.us.us.us.us.us.us.3 = phi i32 [ %tmpb.1164.us.us.us.us.us.us.us.us.3, %for.inc71.us.us.us.us.us.us.us.us.3 ], [ 0, %for.inc89.us.us.us.us.us.us.us.us.2 ] %tmpa.0169.us.us.us.us.us.us.us.us.3 = phi i32 [ %tmpa.1158163.us.us.us.us.us.us.us.us.3, %for.inc71.us.us.us.us.us.us.us.us.3 ], [ 0, %for.inc89.us.us.us.us.us.us.us.us.2 ] %mptmp.0168.us.us.us.us.us.us.us.us.3 = phi i32 [ %mptmp.3.us.us.us.us.us.us.us.us.3, %for.inc71.us.us.us.us.us.us.us.us.3 ], [ -30, %for.inc89.us.us.us.us.us.us.us.us.2 ] %arrayidx48.us.us.us.us.us.us.us.us.3 = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 %indvars.iv199.3 %21 = load i32, ptr %arrayidx48.us.us.us.us.us.us.us.us.3, align 4, !tbaa !5 switch i32 %21, label %for.inc71.us.us.us.us.us.us.us.us.3 [ i32 0, label %if.end.thread.us.us.us.us.us.us.us.us.3 i32 1, label %if.then56.us.us.us.us.us.us.us.us.3 i32 2, label %if.then65.us.us.us.us.us.us.us.us.3 ] if.then65.us.us.us.us.us.us.us.us.3: ; preds = %for.body46.us.us.us.us.us.us.us.us.3 %arrayidx67.us.us.us.us.us.us.us.us.3 = getelementptr inbounds [8 x i32], ptr %l, i64 0, i64 %indvars.iv199.3 %22 = load i32, ptr %arrayidx67.us.us.us.us.us.us.us.us.3, align 4, !tbaa !5 %add68.us.us.us.us.us.us.us.us.3 = add nsw i32 %22, %tmpc.0171.us.us.us.us.us.us.us.us.3 %add69.us.us.us.us.us.us.us.us.3 = add nsw i32 %mptmp.0168.us.us.us.us.us.us.us.us.3, 10 br label %for.inc71.us.us.us.us.us.us.us.us.3 if.then56.us.us.us.us.us.us.us.us.3: ; preds = %for.body46.us.us.us.us.us.us.us.us.3 %arrayidx58.us.us.us.us.us.us.us.us.3 = getelementptr inbounds [8 x i32], ptr %l, i64 0, i64 %indvars.iv199.3 %23 = load i32, ptr %arrayidx58.us.us.us.us.us.us.us.us.3, align 4, !tbaa !5 %add59.us.us.us.us.us.us.us.us.3 = add nsw i32 %23, %tmpb.0170.us.us.us.us.us.us.us.us.3 %add60.us.us.us.us.us.us.us.us.3 = add nsw i32 %mptmp.0168.us.us.us.us.us.us.us.us.3, 10 br label %for.inc71.us.us.us.us.us.us.us.us.3 if.end.thread.us.us.us.us.us.us.us.us.3: ; preds = %for.body46.us.us.us.us.us.us.us.us.3 %arrayidx51.us.us.us.us.us.us.us.us.3 = getelementptr inbounds [8 x i32], ptr %l, i64 0, i64 %indvars.iv199.3 %24 = load i32, ptr %arrayidx51.us.us.us.us.us.us.us.us.3, align 4, !tbaa !5 %add.us.us.us.us.us.us.us.us.3 = add nsw i32 %24, %tmpa.0169.us.us.us.us.us.us.us.us.3 %add52.us.us.us.us.us.us.us.us.3 = add nsw i32 %mptmp.0168.us.us.us.us.us.us.us.us.3, 10 br label %for.inc71.us.us.us.us.us.us.us.us.3 for.inc71.us.us.us.us.us.us.us.us.3: ; preds = %if.end.thread.us.us.us.us.us.us.us.us.3, %if.then56.us.us.us.us.us.us.us.us.3, %if.then65.us.us.us.us.us.us.us.us.3, %for.body46.us.us.us.us.us.us.us.us.3 %tmpb.1164.us.us.us.us.us.us.us.us.3 = phi i32 [ %tmpb.0170.us.us.us.us.us.us.us.us.3, %if.then65.us.us.us.us.us.us.us.us.3 ], [ %tmpb.0170.us.us.us.us.us.us.us.us.3, %if.end.thread.us.us.us.us.us.us.us.us.3 ], [ %add59.us.us.us.us.us.us.us.us.3, %if.then56.us.us.us.us.us.us.us.us.3 ], [ %tmpb.0170.us.us.us.us.us.us.us.us.3, %for.body46.us.us.us.us.us.us.us.us.3 ] %tmpa.1158163.us.us.us.us.us.us.us.us.3 = phi i32 [ %tmpa.0169.us.us.us.us.us.us.us.us.3, %if.then65.us.us.us.us.us.us.us.us.3 ], [ %add.us.us.us.us.us.us.us.us.3, %if.end.thread.us.us.us.us.us.us.us.us.3 ], [ %tmpa.0169.us.us.us.us.us.us.us.us.3, %if.then56.us.us.us.us.us.us.us.us.3 ], [ %tmpa.0169.us.us.us.us.us.us.us.us.3, %for.body46.us.us.us.us.us.us.us.us.3 ] %mptmp.3.us.us.us.us.us.us.us.us.3 = phi i32 [ %add69.us.us.us.us.us.us.us.us.3, %if.then65.us.us.us.us.us.us.us.us.3 ], [ %add52.us.us.us.us.us.us.us.us.3, %if.end.thread.us.us.us.us.us.us.us.us.3 ], [ %add60.us.us.us.us.us.us.us.us.3, %if.then56.us.us.us.us.us.us.us.us.3 ], [ %mptmp.0168.us.us.us.us.us.us.us.us.3, %for.body46.us.us.us.us.us.us.us.us.3 ] %tmpc.1.us.us.us.us.us.us.us.us.3 = phi i32 [ %add68.us.us.us.us.us.us.us.us.3, %if.then65.us.us.us.us.us.us.us.us.3 ], [ %tmpc.0171.us.us.us.us.us.us.us.us.3, %if.end.thread.us.us.us.us.us.us.us.us.3 ], [ %tmpc.0171.us.us.us.us.us.us.us.us.3, %if.then56.us.us.us.us.us.us.us.us.3 ], [ %tmpc.0171.us.us.us.us.us.us.us.us.3, %for.body46.us.us.us.us.us.us.us.us.3 ] %indvars.iv.next200.3 = add nuw nsw i64 %indvars.iv199.3, 1 %exitcond.3.not = icmp eq i64 %indvars.iv.next200.3, %wide.trip.count br i1 %exitcond.3.not, label %for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us.3, label %for.body46.us.us.us.us.us.us.us.us.3, !llvm.loop !9 for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us.3: ; preds = %for.inc71.us.us.us.us.us.us.us.us.3 %cmp74.us.us.us.us.us.us.us.us.3 = icmp ne i32 %tmpa.1158163.us.us.us.us.us.us.us.us.3, 0 %cmp75.us.us.us.us.us.us.us.us.3 = icmp ne i32 %tmpb.1164.us.us.us.us.us.us.us.us.3, 0 %and153.us.us.us.us.us.us.us.us.3 = and i1 %cmp74.us.us.us.us.us.us.us.us.3, %cmp75.us.us.us.us.us.us.us.us.3 %cmp77.us.us.us.us.us.us.us.us.3 = icmp ne i32 %tmpc.1.us.us.us.us.us.us.us.us.3, 0 %and79154.us.us.us.us.us.us.us.us.3 = and i1 %and153.us.us.us.us.us.us.us.us.3, %cmp77.us.us.us.us.us.us.us.us.3 br i1 %and79154.us.us.us.us.us.us.us.us.3, label %if.then80.us.us.us.us.us.us.us.us.3, label %for.inc89.us.us.us.us.us.us.us.us.3 if.then80.us.us.us.us.us.us.us.us.3: ; preds = %for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us.3 %sub.us.us.us.us.us.us.us.us.3 = sub nsw i32 %tmpa.1158163.us.us.us.us.us.us.us.us.3, %1 %25 = call i32 @llvm.abs.i32(i32 %sub.us.us.us.us.us.us.us.us.3, i1 true) %add81.us.us.us.us.us.us.us.us.3 = add nsw i32 %25, %mptmp.3.us.us.us.us.us.us.us.us.3 %sub82.us.us.us.us.us.us.us.us.3 = sub nsw i32 %tmpb.1164.us.us.us.us.us.us.us.us.3, %2 %26 = call i32 @llvm.abs.i32(i32 %sub82.us.us.us.us.us.us.us.us.3, i1 true) %add83.us.us.us.us.us.us.us.us.3 = add nsw i32 %add81.us.us.us.us.us.us.us.us.3, %26 %sub84.us.us.us.us.us.us.us.us.3 = sub nsw i32 %tmpc.1.us.us.us.us.us.us.us.us.3, %3 %27 = call i32 @llvm.abs.i32(i32 %sub84.us.us.us.us.us.us.us.us.3, i1 true) %add85.us.us.us.us.us.us.us.us.3 = add nsw i32 %add83.us.us.us.us.us.us.us.us.3, %27 %cond.us.us.us.us.us.us.us.us.3 = call i32 @llvm.smin.i32(i32 %mpmin.8.us.us.us.us.us.us.us.us.2, i32 %add85.us.us.us.us.us.us.us.us.3) br label %for.inc89.us.us.us.us.us.us.us.us.3 for.inc89.us.us.us.us.us.us.us.us.3: ; preds = %if.then80.us.us.us.us.us.us.us.us.3, %for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us.3 %mpmin.8.us.us.us.us.us.us.us.us.3 = phi i32 [ %cond.us.us.us.us.us.us.us.us.3, %if.then80.us.us.us.us.us.us.us.us.3 ], [ %mpmin.8.us.us.us.us.us.us.us.us.2, %for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us.3 ] store i32 4, ptr %arrayidx38, align 4, !tbaa !5 %inc95.us.us.us.us.us.us.us = add nuw nsw i32 %storemerge151179.us.us.us.us.us.us.us, 1 store i32 %inc95.us.us.us.us.us.us.us, ptr %arrayidx33, align 8, !tbaa !5 %exitcond203.not = icmp eq i32 %inc95.us.us.us.us.us.us.us, 4 br i1 %exitcond203.not, label %for.inc97.split.us.us.us.us.us.us.us, label %for.body37.us.us.us.us.us.us.us, !llvm.loop !11 for.body46.us.us.us.us.us.us.us.us: ; preds = %for.inc71.us.us.us.us.us.us.us.us, %for.body37.us.us.us.us.us.us.us %indvars.iv199 = phi i64 [ %indvars.iv.next200, %for.inc71.us.us.us.us.us.us.us.us ], [ 0, %for.body37.us.us.us.us.us.us.us ] %tmpc.0171.us.us.us.us.us.us.us.us = phi i32 [ %tmpc.1.us.us.us.us.us.us.us.us, %for.inc71.us.us.us.us.us.us.us.us ], [ 0, %for.body37.us.us.us.us.us.us.us ] %tmpb.0170.us.us.us.us.us.us.us.us = phi i32 [ %tmpb.1164.us.us.us.us.us.us.us.us, %for.inc71.us.us.us.us.us.us.us.us ], [ 0, %for.body37.us.us.us.us.us.us.us ] %tmpa.0169.us.us.us.us.us.us.us.us = phi i32 [ %tmpa.1158163.us.us.us.us.us.us.us.us, %for.inc71.us.us.us.us.us.us.us.us ], [ 0, %for.body37.us.us.us.us.us.us.us ] %mptmp.0168.us.us.us.us.us.us.us.us = phi i32 [ %mptmp.3.us.us.us.us.us.us.us.us, %for.inc71.us.us.us.us.us.us.us.us ], [ -30, %for.body37.us.us.us.us.us.us.us ] %arrayidx48.us.us.us.us.us.us.us.us = getelementptr inbounds [8 x i32], ptr %i2, i64 0, i64 %indvars.iv199 %28 = load i32, ptr %arrayidx48.us.us.us.us.us.us.us.us, align 4, !tbaa !5 switch i32 %28, label %for.inc71.us.us.us.us.us.us.us.us [ i32 0, label %if.end.thread.us.us.us.us.us.us.us.us i32 1, label %if.then56.us.us.us.us.us.us.us.us i32 2, label %if.then65.us.us.us.us.us.us.us.us ] if.then65.us.us.us.us.us.us.us.us: ; preds = %for.body46.us.us.us.us.us.us.us.us %arrayidx67.us.us.us.us.us.us.us.us = getelementptr inbounds [8 x i32], ptr %l, i64 0, i64 %indvars.iv199 %29 = load i32, ptr %arrayidx67.us.us.us.us.us.us.us.us, align 4, !tbaa !5 %add68.us.us.us.us.us.us.us.us = add nsw i32 %29, %tmpc.0171.us.us.us.us.us.us.us.us %add69.us.us.us.us.us.us.us.us = add nsw i32 %mptmp.0168.us.us.us.us.us.us.us.us, 10 br label %for.inc71.us.us.us.us.us.us.us.us if.then56.us.us.us.us.us.us.us.us: ; preds = %for.body46.us.us.us.us.us.us.us.us %arrayidx58.us.us.us.us.us.us.us.us = getelementptr inbounds [8 x i32], ptr %l, i64 0, i64 %indvars.iv199 %30 = load i32, ptr %arrayidx58.us.us.us.us.us.us.us.us, align 4, !tbaa !5 %add59.us.us.us.us.us.us.us.us = add nsw i32 %30, %tmpb.0170.us.us.us.us.us.us.us.us %add60.us.us.us.us.us.us.us.us = add nsw i32 %mptmp.0168.us.us.us.us.us.us.us.us, 10 br label %for.inc71.us.us.us.us.us.us.us.us if.end.thread.us.us.us.us.us.us.us.us: ; preds = %for.body46.us.us.us.us.us.us.us.us %arrayidx51.us.us.us.us.us.us.us.us = getelementptr inbounds [8 x i32], ptr %l, i64 0, i64 %indvars.iv199 %31 = load i32, ptr %arrayidx51.us.us.us.us.us.us.us.us, align 4, !tbaa !5 %add.us.us.us.us.us.us.us.us = add nsw i32 %31, %tmpa.0169.us.us.us.us.us.us.us.us %add52.us.us.us.us.us.us.us.us = add nsw i32 %mptmp.0168.us.us.us.us.us.us.us.us, 10 br label %for.inc71.us.us.us.us.us.us.us.us for.inc71.us.us.us.us.us.us.us.us: ; preds = %if.end.thread.us.us.us.us.us.us.us.us, %if.then56.us.us.us.us.us.us.us.us, %if.then65.us.us.us.us.us.us.us.us, %for.body46.us.us.us.us.us.us.us.us %tmpb.1164.us.us.us.us.us.us.us.us = phi i32 [ %tmpb.0170.us.us.us.us.us.us.us.us, %if.then65.us.us.us.us.us.us.us.us ], [ %tmpb.0170.us.us.us.us.us.us.us.us, %if.end.thread.us.us.us.us.us.us.us.us ], [ %add59.us.us.us.us.us.us.us.us, %if.then56.us.us.us.us.us.us.us.us ], [ %tmpb.0170.us.us.us.us.us.us.us.us, %for.body46.us.us.us.us.us.us.us.us ] %tmpa.1158163.us.us.us.us.us.us.us.us = phi i32 [ %tmpa.0169.us.us.us.us.us.us.us.us, %if.then65.us.us.us.us.us.us.us.us ], [ %add.us.us.us.us.us.us.us.us, %if.end.thread.us.us.us.us.us.us.us.us ], [ %tmpa.0169.us.us.us.us.us.us.us.us, %if.then56.us.us.us.us.us.us.us.us ], [ %tmpa.0169.us.us.us.us.us.us.us.us, %for.body46.us.us.us.us.us.us.us.us ] %mptmp.3.us.us.us.us.us.us.us.us = phi i32 [ %add69.us.us.us.us.us.us.us.us, %if.then65.us.us.us.us.us.us.us.us ], [ %add52.us.us.us.us.us.us.us.us, %if.end.thread.us.us.us.us.us.us.us.us ], [ %add60.us.us.us.us.us.us.us.us, %if.then56.us.us.us.us.us.us.us.us ], [ %mptmp.0168.us.us.us.us.us.us.us.us, %for.body46.us.us.us.us.us.us.us.us ] %tmpc.1.us.us.us.us.us.us.us.us = phi i32 [ %add68.us.us.us.us.us.us.us.us, %if.then65.us.us.us.us.us.us.us.us ], [ %tmpc.0171.us.us.us.us.us.us.us.us, %if.end.thread.us.us.us.us.us.us.us.us ], [ %tmpc.0171.us.us.us.us.us.us.us.us, %if.then56.us.us.us.us.us.us.us.us ], [ %tmpc.0171.us.us.us.us.us.us.us.us, %for.body46.us.us.us.us.us.us.us.us ] %indvars.iv.next200 = add nuw nsw i64 %indvars.iv199, 1 %exitcond.not = icmp eq i64 %indvars.iv.next200, %wide.trip.count br i1 %exitcond.not, label %for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us, label %for.body46.us.us.us.us.us.us.us.us, !llvm.loop !9 for.cond43.for.cond.cleanup45_crit_edge.us.us.us.us.us.us.us.us: ; preds = %for.inc71.us.us.us.us.us.us.us.us %cmp74.us.us.us.us.us.us.us.us = icmp ne i32 %tmpa.1158163.us.us.us.us.us.us.us.us, 0 %cmp75.us.us.us.us.us.us.us.us = icmp ne i32 %tmpb.1164.us.us.us.us.us.us.us.us, 0 %and153.us.us.us.us.us.us.us.us = and i1 %cmp74.us.us.us.us.us.us.us.us, %cmp75.us.us.us.us.us.us.us.us %cmp77.us.us.us.us.us.us.us.us = icmp ne i32 %tmpc.1.us.us.us.us.us.us.us.us, 0 %and79154.us.us.us.us.us.us.us.us = and i1 %and153.us.us.us.us.us.us.us.us, %cmp77.us.us.us.us.us.us.us.us br i1 %and79154.us.us.us.us.us.us.us.us, label %if.then80.us.us.us.us.us.us.us.us, label %for.inc89.us.us.us.us.us.us.us.us for.inc97.split.us.us.us.us.us.us.us: ; preds = %for.inc89.us.us.us.us.us.us.us.us.3 %inc99.us.us.us.us.us.us = add nuw nsw i32 %storemerge150182.us.us.us.us.us.us, 1 store i32 %inc99.us.us.us.us.us.us, ptr %arrayidx28, align 4, !tbaa !5 %exitcond204.not = icmp eq i32 %inc99.us.us.us.us.us.us, 4 br i1 %exitcond204.not, label %for.inc101.split.us.us.us.us.us.us, label %for.body32.us.us.us.us.us.us, !llvm.loop !12 for.inc101.split.us.us.us.us.us.us: ; preds = %for.inc97.split.us.us.us.us.us.us.us %inc103.us.us.us.us.us = add nuw nsw i32 %storemerge149184.us.us.us.us.us, 1 store i32 %inc103.us.us.us.us.us, ptr %arrayidx23, align 16, !tbaa !5 %exitcond205.not = icmp eq i32 %inc103.us.us.us.us.us, 4 br i1 %exitcond205.not, label %for.inc105.split.us.us.us.us.us, label %for.body27.us.us.us.us.us, !llvm.loop !13 for.inc105.split.us.us.us.us.us: ; preds = %for.inc101.split.us.us.us.us.us.us %inc107.us.us.us.us = add nuw nsw i32 %storemerge148187.us.us.us.us, 1 store i32 %inc107.us.us.us.us, ptr %arrayidx18, align 4, !tbaa !5 %exitcond206.not = icmp eq i32 %inc107.us.us.us.us, 4 br i1 %exitcond206.not, label %for.inc109.split.us.us.us.us, label %for.body22.us.us.us.us, !llvm.loop !14 for.inc109.split.us.us.us.us: ; preds = %for.inc105.split.us.us.us.us.us %inc111.us.us.us = add nuw nsw i32 %storemerge147189.us.us.us, 1 store i32 %inc111.us.us.us, ptr %arrayidx13, align 8, !tbaa !5 %exitcond207.not = icmp eq i32 %inc111.us.us.us, 4 br i1 %exitcond207.not, label %for.inc113.split.us.us.us, label %for.body17.us.us.us, !llvm.loop !15 for.inc113.split.us.us.us: ; preds = %for.inc109.split.us.us.us.us %inc115.us.us = add nuw nsw i32 %storemerge146192.us.us, 1 store i32 %inc115.us.us, ptr %arrayidx8, align 4, !tbaa !5 %exitcond208.not = icmp eq i32 %inc115.us.us, 4 br i1 %exitcond208.not, label %for.inc117.split.us.us, label %for.body12.us.us, !llvm.loop !16 for.inc117.split.us.us: ; preds = %for.inc113.split.us.us.us %inc119.us = add nuw nsw i32 %storemerge194.us, 1 store i32 %inc119.us, ptr %i2, align 16, !tbaa !5 %exitcond209.not = icmp eq i32 %inc119.us, 4 br i1 %exitcond209.not, label %for.end120, label %for.body7.us, !llvm.loop !17 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [8 x i32], ptr %l, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %32 = load i32, ptr %N, align 4, !tbaa !5 %33 = sext i32 %32 to i64 %cmp = icmp slt i64 %indvars.iv.next, %33 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !18 for.end120: ; preds = %for.inc117.split.us.us, %for.body7.preheader %.us-phi196 = phi i32 [ 100000000, %for.body7.preheader ], [ %mpmin.8.us.us.us.us.us.us.us.us.3, %for.inc117.split.us.us ] %call121 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.us-phi196) call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %i2) #5 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %l) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %C) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %B) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %A) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #3 ; 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) #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 speculatable willreturn memory(none) } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10}
#include <stdio.h> int main() { int x,y; scanf("%d %d",&x,&y); for ( int i=0 ; i<=x ; i++) { if ( (2*i + 4*(x-i)) == y) { printf("Yes"); return 0; } } printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213425/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213425/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"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: %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.not10 = icmp slt i32 %0, 0 br i1 %cmp.not10, label %cleanup5, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %1 = load i32, ptr %y, align 4, !tbaa !5 br label %for.body for.cond: ; preds = %for.body %inc = add nuw i32 %i.011, 1 %exitcond.not = icmp eq i32 %i.011, %0 br i1 %exitcond.not, label %cleanup5, label %for.body, !llvm.loop !9 for.body: ; preds = %for.body.lr.ph, %for.cond %i.011 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.cond ] %mul = shl nuw nsw i32 %i.011, 1 %sub = sub nsw i32 %0, %i.011 %mul1 = shl nsw i32 %sub, 2 %add = add nsw i32 %mul1, %mul %cmp2 = icmp eq i32 %add, %1 br i1 %cmp2, label %cleanup5, label %for.cond cleanup5: ; preds = %for.cond, %for.body, %entry %.str.1.sink = phi ptr [ @.str.2, %entry ], [ @.str.1, %for.body ], [ @.str.2, %for.cond ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1.sink) 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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(){ int x,y,count,ans=0; scanf("%d %d",&x,&y); for (int i=0;i<(x+1);i++){ count=2*i+4*(x-i); if(count == y){ ans=ans+1; } } if(ans!=0){ printf("Yes\n"); }else{ printf("No\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213469/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213469/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @str = private unnamed_addr constant [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: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #5 %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.not15 = icmp slt i32 %0, 0 br i1 %cmp.not15, label %if.else, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %1 = load i32, ptr %y, align 4, !tbaa !5 %2 = add i32 %0, 1 %min.iters.check = icmp ult i32 %2, 8 br i1 %min.iters.check, label %for.body.preheader, label %vector.ph vector.ph: ; preds = %for.body.lr.ph %n.vec = and i32 %2, -8 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %0, i64 0 %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer %broadcast.splatinsert21 = insertelement <4 x i32> poison, i32 %1, i64 0 %broadcast.splat22 = shufflevector <4 x i32> %broadcast.splatinsert21, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %15, %vector.body ] %vec.phi20 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %16, %vector.body ] %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4> %3 = shl nuw nsw <4 x i32> %vec.ind, <i32 1, i32 1, i32 1, i32 1> %4 = shl nuw nsw <4 x i32> %step.add, <i32 1, i32 1, i32 1, i32 1> %5 = sub nsw <4 x i32> %broadcast.splat, %vec.ind %6 = sub nsw <4 x i32> %broadcast.splat, %step.add %7 = shl nsw <4 x i32> %5, <i32 2, i32 2, i32 2, i32 2> %8 = shl nsw <4 x i32> %6, <i32 2, i32 2, i32 2, i32 2> %9 = add nsw <4 x i32> %7, %3 %10 = add nsw <4 x i32> %8, %4 %11 = icmp eq <4 x i32> %9, %broadcast.splat22 %12 = icmp eq <4 x i32> %10, %broadcast.splat22 %13 = zext <4 x i1> %11 to <4 x i32> %14 = zext <4 x i1> %12 to <4 x i32> %15 = add <4 x i32> %vec.phi, %13 %16 = add <4 x i32> %vec.phi20, %14 %index.next = add nuw i32 %index, 8 %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8> %17 = icmp eq i32 %index.next, %n.vec br i1 %17, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %16, %15 %18 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %2, %n.vec br i1 %cmp.n, label %for.cond.cleanup, label %for.body.preheader for.body.preheader: ; preds = %for.body.lr.ph, %middle.block %i.017.ph = phi i32 [ 0, %for.body.lr.ph ], [ %n.vec, %middle.block ] %ans.016.ph = phi i32 [ 0, %for.body.lr.ph ], [ %18, %middle.block ] br label %for.body for.cond.cleanup: ; preds = %for.body, %middle.block %spec.select.lcssa = phi i32 [ %18, %middle.block ], [ %spec.select, %for.body ] %19 = icmp eq i32 %spec.select.lcssa, 0 br i1 %19, label %if.else, label %if.end9 for.body: ; preds = %for.body.preheader, %for.body %i.017 = phi i32 [ %inc, %for.body ], [ %i.017.ph, %for.body.preheader ] %ans.016 = phi i32 [ %spec.select, %for.body ], [ %ans.016.ph, %for.body.preheader ] %mul = shl nuw nsw i32 %i.017, 1 %sub = sub nsw i32 %0, %i.017 %mul1 = shl nsw i32 %sub, 2 %add2 = add nsw i32 %mul1, %mul %cmp3 = icmp eq i32 %add2, %1 %add4 = zext i1 %cmp3 to i32 %spec.select = add nuw nsw i32 %ans.016, %add4 %inc = add nuw i32 %i.017, 1 %exitcond.not = icmp eq i32 %i.017, %0 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !13 if.else: ; preds = %entry, %for.cond.cleanup br label %if.end9 if.end9: ; preds = %for.cond.cleanup, %if.else %str.sink = phi ptr [ @str, %if.else ], [ @str.3, %for.cond.cleanup ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = 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}
#include<stdio.h> int main(){ int x,y; scanf("%d%d",&x,&y); if(y/2<x || 4*x<y || y%2!=0) printf("No"); else{ printf("Yes"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213511/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213511/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"No\00", align 1 @.str.2 = 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: %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 %y, align 4, !tbaa !5 %div = sdiv i32 %0, 2 %1 = load i32, ptr %x, align 4, !tbaa !5 %cmp = icmp sge i32 %div, %1 %mul = shl nsw i32 %1, 2 %cmp1 = icmp sge i32 %mul, %0 %or.cond.not8 = select i1 %cmp, i1 %cmp1, i1 false %2 = and i32 %0, 1 %cmp3.not = icmp eq i32 %2, 0 %or.cond7 = and i1 %cmp3.not, %or.cond.not8 %.str.2..str.1 = select i1 %or.cond7, ptr @.str.2, ptr @.str.1 %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2..str.1) 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 a, b, i; scanf("%d %d", &a, &b); for(i = 0;i <= a;i += 1){ if(4*a - 2*i == b){ printf("Yes\n"); return 0; } } printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213555/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213555/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @str = private unnamed_addr constant [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 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 %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %cmp.not10 = icmp slt i32 %0, 0 br i1 %cmp.not10, label %cleanup, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %mul = shl nsw i32 %0, 2 %1 = load i32, ptr %b, align 4, !tbaa !5 br label %for.body for.cond: ; preds = %for.body %add = add nuw i32 %i.011, 1 %exitcond.not = icmp eq i32 %i.011, %0 br i1 %exitcond.not, label %cleanup, label %for.body, !llvm.loop !9 for.body: ; preds = %for.body.lr.ph, %for.cond %i.011 = phi i32 [ 0, %for.body.lr.ph ], [ %add, %for.cond ] %mul1 = shl nuw nsw i32 %i.011, 1 %sub = sub nsw i32 %mul, %mul1 %cmp2 = icmp eq i32 %sub, %1 br i1 %cmp2, label %cleanup, label %for.cond cleanup: ; preds = %for.cond, %for.body, %entry %str.sink = phi ptr [ @str, %entry ], [ @str.3, %for.body ], [ @str, %for.cond ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) 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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(){ int i,num,X,Y,cnt; cnt = 0; if(scanf("%d%d",&X,&Y) == -1){ return 0; } for(i = 0;i <= X;i++){ num = 2*i + 4*(X - i); if(num == Y){ cnt++; } } if(cnt == 0){ printf("No\n"); }else{ printf("Yes\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213599/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213599/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 = 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: %X = alloca i32, align 4 %Y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %X) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %Y) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %X, ptr noundef nonnull %Y) %cmp = icmp eq i32 %call, -1 br i1 %cmp, label %cleanup, label %for.cond.preheader for.cond.preheader: ; preds = %entry %0 = load i32, ptr %X, align 4, !tbaa !5 %cmp1.not21 = icmp slt i32 %0, 0 br i1 %cmp1.not21, label %cleanup.sink.split, label %for.body.lr.ph for.body.lr.ph: ; preds = %for.cond.preheader %1 = load i32, ptr %Y, align 4, !tbaa !5 %2 = add i32 %0, 1 %min.iters.check = icmp ult i32 %2, 8 br i1 %min.iters.check, label %for.body.preheader, label %vector.ph vector.ph: ; preds = %for.body.lr.ph %n.vec = and i32 %2, -8 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %0, i64 0 %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer %broadcast.splatinsert28 = insertelement <4 x i32> poison, i32 %1, i64 0 %broadcast.splat29 = shufflevector <4 x i32> %broadcast.splatinsert28, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %15, %vector.body ] %vec.phi26 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %16, %vector.body ] %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ] %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4> %3 = shl nuw nsw <4 x i32> %vec.ind, <i32 1, i32 1, i32 1, i32 1> %4 = shl nuw nsw <4 x i32> %step.add, <i32 1, i32 1, i32 1, i32 1> %5 = sub nsw <4 x i32> %broadcast.splat, %vec.ind %6 = sub nsw <4 x i32> %broadcast.splat, %step.add %7 = shl nsw <4 x i32> %5, <i32 2, i32 2, i32 2, i32 2> %8 = shl nsw <4 x i32> %6, <i32 2, i32 2, i32 2, i32 2> %9 = add nsw <4 x i32> %7, %3 %10 = add nsw <4 x i32> %8, %4 %11 = icmp eq <4 x i32> %9, %broadcast.splat29 %12 = icmp eq <4 x i32> %10, %broadcast.splat29 %13 = zext <4 x i1> %11 to <4 x i32> %14 = zext <4 x i1> %12 to <4 x i32> %15 = add <4 x i32> %vec.phi, %13 %16 = add <4 x i32> %vec.phi26, %14 %index.next = add nuw i32 %index, 8 %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8> %17 = icmp eq i32 %index.next, %n.vec br i1 %17, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %16, %15 %18 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %2, %n.vec br i1 %cmp.n, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %for.body.lr.ph, %middle.block %cnt.023.ph = phi i32 [ 0, %for.body.lr.ph ], [ %18, %middle.block ] %i.022.ph = phi i32 [ 0, %for.body.lr.ph ], [ %n.vec, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader, %for.body %cnt.023 = phi i32 [ %spec.select, %for.body ], [ %cnt.023.ph, %for.body.preheader ] %i.022 = phi i32 [ %inc6, %for.body ], [ %i.022.ph, %for.body.preheader ] %mul = shl nuw nsw i32 %i.022, 1 %sub = sub nsw i32 %0, %i.022 %mul2 = shl nsw i32 %sub, 2 %add = add nsw i32 %mul2, %mul %cmp3 = icmp eq i32 %add, %1 %inc = zext i1 %cmp3 to i32 %spec.select = add nuw nsw i32 %cnt.023, %inc %inc6 = add nuw i32 %i.022, 1 %exitcond.not = icmp eq i32 %i.022, %0 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !13 for.end: ; preds = %for.body, %middle.block %spec.select.lcssa = phi i32 [ %18, %middle.block ], [ %spec.select, %for.body ] %19 = icmp eq i32 %spec.select.lcssa, 0 %spec.select25 = select i1 %19, ptr @str.3, ptr @str br label %cleanup.sink.split cleanup.sink.split: ; preds = %for.end, %for.cond.preheader %str.3.sink = phi ptr [ @str.3, %for.cond.preheader ], [ %spec.select25, %for.end ] %puts20 = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.sink) br label %cleanup cleanup: ; preds = %cleanup.sink.split, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %Y) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %X) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = 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}
#include <stdio.h> int main(){ int i,leg; int x,y; int n = scanf("%d %d",&x ,&y); if (1 <= x <= 100 || 1 <= y <= 100){ for(i=0;i<=x;i++){ leg = ( 4 * i ) + 2 * (x - i); if(leg == y) break; } if(i != x+1) printf("Yes"); if(i == x+1) printf("No"); }else{ printf("error"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213641/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213641/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"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: %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 %cmp7.not32 = icmp slt i32 %0, 0 br i1 %cmp7.not32, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %1 = load i32, ptr %y, align 4, !tbaa !5 br label %for.body for.body: ; preds = %for.body.lr.ph, %for.inc %i.033 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.inc ] %mul = shl nsw i32 %i.033, 2 %sub = sub nsw i32 %0, %i.033 %mul9 = shl nsw i32 %sub, 1 %add = add nsw i32 %mul9, %mul %cmp10 = icmp eq i32 %add, %1 br i1 %cmp10, label %for.end, label %for.inc for.inc: ; preds = %for.body %inc = add nuw i32 %i.033, 1 %exitcond.not = icmp eq i32 %i.033, %0 br i1 %exitcond.not, label %if.then22, label %for.body, !llvm.loop !9 for.end: ; preds = %for.body, %entry %i.0.lcssa = phi i32 [ 0, %entry ], [ %i.033, %for.body ] %add13.pre-phi = add i32 %0, 1 %cmp14.not = icmp eq i32 %i.0.lcssa, %add13.pre-phi br i1 %cmp14.not, label %if.end18, label %if.then16 if.then16: ; preds = %for.end %call17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1) %.pre = load i32, ptr %x, align 4, !tbaa !5 %.pre37 = add nsw i32 %.pre, 1 br label %if.end18 if.end18: ; preds = %if.then16, %for.end %add19.pre-phi = phi i32 [ %.pre37, %if.then16 ], [ %add13.pre-phi, %for.end ] %cmp20 = icmp eq i32 %i.0.lcssa, %add19.pre-phi br i1 %cmp20, label %if.then22, label %if.end26 if.then22: ; preds = %for.inc, %if.end18 %call23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2) br label %if.end26 if.end26: ; preds = %if.end18, %if.then22 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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main() { //int A,B,C,D,E; int X,Y; scanf("%d %d", &X, &Y); for(int i; i<=X; i++) { if((i*2)+(X-i)*4==Y) { printf("Yes"); return(0); } } printf("No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213685/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213685/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"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: %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 %Y, align 4, !tbaa !5 %cmp2 = icmp eq i32 %0, 0 %.str.1..str.2 = select i1 %cmp2, ptr @.str.1, ptr @.str.2 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1..str.2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %Y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %X) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void){ int x,y; scanf("%d",&x); scanf("%d",&y); if((y % 2 != 0)||(y<2*x)||(y>4*x)){ printf("No"); return 0; } printf("Yes"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213735/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213735/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: 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) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %y) %0 = load i32, ptr %y, align 4, !tbaa !5 %1 = and i32 %0, 1 %cmp.not = icmp eq i32 %1, 0 br i1 %cmp.not, label %lor.lhs.false, label %cleanup lor.lhs.false: ; preds = %entry %2 = load i32, ptr %x, align 4, !tbaa !5 %mul = shl nsw i32 %2, 1 %cmp2 = icmp slt i32 %0, %mul %mul4 = shl nsw i32 %2, 2 %cmp5 = icmp sgt i32 %0, %mul4 %or.cond = select i1 %cmp2, i1 true, i1 %cmp5 %spec.select = select i1 %or.cond, ptr @.str.1, ptr @.str.2 br label %cleanup cleanup: ; preds = %lor.lhs.false, %entry %.str.2.sink = phi ptr [ @.str.1, %entry ], [ %spec.select, %lor.lhs.false ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) 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 <string.h> #include <stdio.h> #include <stdlib.h> #include<math.h> #define ll long long #define pai 3.1415926535897932384626433832795028841971693 long long min(long long a, long long b){ if(a < b) return a; else return b; } long long max(long long a, long long b){ if(a < b) return b; else return a; } int main(){ int x,y,a,b; scanf("%d %d",&x,&y); for(int a=0;a<=100;a++){ for(int b=0;b<=100;b++){ if(2*a+4*b==y && a+b==x){ printf("Yes"); return 0; } } } printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213779/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213779/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"Yes\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @min(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i64 @llvm.smin.i64(i64 %a, i64 %b) ret i64 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @max(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %b.a = tail call i64 @llvm.smax.i64(i64 %a, i64 %b) ret i64 %b.a } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %y, align 4, !tbaa !5 %1 = load i32, ptr %x, align 4 br label %for.cond3.preheader for.cond3.preheader: ; preds = %entry, %for.inc12 %a1.031 = phi i32 [ 0, %entry ], [ %inc13, %for.inc12 ] %mul = shl nuw nsw i32 %a1.031, 1 br label %for.body6 for.body6: ; preds = %for.inc.1, %for.cond3.preheader %b2.030 = phi i32 [ 0, %for.cond3.preheader ], [ %inc.1, %for.inc.1 ] %mul7 = shl nuw nsw i32 %b2.030, 2 %add = add nuw nsw i32 %mul7, %mul %cmp8 = icmp eq i32 %add, %0 %add9 = add nuw nsw i32 %b2.030, %a1.031 %cmp10 = icmp eq i32 %add9, %1 %or.cond = select i1 %cmp8, i1 %cmp10, i1 false br i1 %or.cond, label %cleanup18, label %for.inc for.inc: ; preds = %for.body6 %inc = or i32 %b2.030, 1 %exitcond = icmp eq i32 %inc, 101 br i1 %exitcond, label %for.inc12, label %for.body6.1, !llvm.loop !9 for.body6.1: ; preds = %for.inc %mul7.1 = shl nuw nsw i32 %inc, 2 %add.1 = add nuw nsw i32 %mul7.1, %mul %cmp8.1 = icmp eq i32 %add.1, %0 %add9.1 = add nuw nsw i32 %inc, %a1.031 %cmp10.1 = icmp eq i32 %add9.1, %1 %or.cond.1 = select i1 %cmp8.1, i1 %cmp10.1, i1 false br i1 %or.cond.1, label %cleanup18, label %for.inc.1 for.inc.1: ; preds = %for.body6.1 %inc.1 = add nuw nsw i32 %b2.030, 2 br label %for.body6 for.inc12: ; preds = %for.inc %inc13 = add nuw nsw i32 %a1.031, 1 %exitcond32 = icmp eq i32 %inc13, 101 br i1 %exitcond32, label %cleanup18, label %for.cond3.preheader, !llvm.loop !11 cleanup18: ; preds = %for.inc12, %for.body6, %for.body6.1 %.str.1.sink = phi ptr [ @.str.1, %for.body6.1 ], [ @.str.1, %for.body6 ], [ @.str.2, %for.inc12 ] %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #4 attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main() { char w[3][10] = {"Sunny", "Cloudy", "Rainy"}; char s[10]; scanf("%s", s); for(int i = 0; i < 3; i++) { if(s[0] == w[i][0]) { printf("%s\n", w[(i + 1) % 3]); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213829/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213829/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.w = private unnamed_addr constant [3 x [10 x i8]] [[10 x i8] c"Sunny\00\00\00\00\00", [10 x i8] c"Cloudy\00\00\00\00", [10 x i8] c"Rainy\00\00\00\00\00"], align 16 @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [10 x i8], align 1 call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %s) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %0 = load i8, ptr %s, align 1, !tbaa !5 %cmp4 = icmp eq i8 %0, 83 br i1 %cmp4, label %if.then, label %for.inc if.then: ; preds = %entry %puts = call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([3 x [10 x i8]], ptr @__const.main.w, i64 0, i64 1)) %.pre = load i8, ptr %s, align 1, !tbaa !5 br label %for.inc for.inc: ; preds = %entry, %if.then %1 = phi i8 [ %0, %entry ], [ %.pre, %if.then ] %cmp4.1 = icmp eq i8 %1, 67 br i1 %cmp4.1, label %if.then.1, label %for.inc.1 if.then.1: ; preds = %for.inc %puts.1 = call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([3 x [10 x i8]], ptr @__const.main.w, i64 0, i64 2)) %.pre17 = load i8, ptr %s, align 1, !tbaa !5 br label %for.inc.1 for.inc.1: ; preds = %if.then.1, %for.inc %2 = phi i8 [ %.pre17, %if.then.1 ], [ %1, %for.inc ] %cmp4.2 = icmp eq i8 %2, 82 br i1 %cmp4.2, label %if.then.2, label %for.inc.2 if.then.2: ; preds = %for.inc.1 %puts.2 = call i32 @puts(ptr nonnull dereferenceable(1) @__const.main.w) br label %for.inc.2 for.inc.2: ; preds = %if.then.2, %for.inc.1 call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %s) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<string.h> int main(void){ char c; scanf("%c", &c); if(c=='S'){ printf("Cloudy"); }else if(c=='C'){ printf("Rainy"); }else if(c=='R'){ printf("Sunny"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213872/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213872/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%c\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c"Cloudy\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"Rainy\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"Sunny\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %c = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c) %0 = load i8, ptr %c, align 1, !tbaa !5 switch i8 %0, label %if.end15 [ i8 83, label %if.end15.sink.split i8 67, label %if.then6 i8 82, label %if.then12 ] if.then6: ; preds = %entry br label %if.end15.sink.split if.then12: ; preds = %entry br label %if.end15.sink.split if.end15.sink.split: ; preds = %entry, %if.then12, %if.then6 %.str.2.sink = phi ptr [ @.str.2, %if.then6 ], [ @.str.3, %if.then12 ], [ @.str.1, %entry ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) br label %if.end15 if.end15: ; preds = %if.end15.sink.split, %entry call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <string.h> int main(void) { char str[7]; scanf("%s", str); if (strcmp("Sunny", str) == 0) { printf("Cloudy"); } else if (strcmp("Cloudy", str) == 0) { printf("Rainy"); } else if (strcmp("Rainy", str) == 0) { printf("Sunny"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213937/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213937/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"Sunny\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"Cloudy\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"Rainy\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %str = alloca [7 x i8], align 1 call void @llvm.lifetime.start.p0(i64 7, ptr nonnull %str) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %str) %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(6) @.str.1, ptr noundef nonnull dereferenceable(6) %str, i64 6) %cmp = icmp eq i32 %bcmp, 0 br i1 %cmp, label %if.end16.sink.split, label %if.else if.else: ; preds = %entry %bcmp17 = call i32 @bcmp(ptr noundef nonnull dereferenceable(7) @.str.2, ptr noundef nonnull dereferenceable(7) %str, i64 7) %cmp6 = icmp eq i32 %bcmp17, 0 br i1 %cmp6, label %if.end16.sink.split, label %if.else9 if.else9: ; preds = %if.else %bcmp18 = call i32 @bcmp(ptr noundef nonnull dereferenceable(6) @.str.3, ptr noundef nonnull dereferenceable(6) %str, i64 6) %cmp12 = icmp eq i32 %bcmp18, 0 br i1 %cmp12, label %if.end16.sink.split, label %if.end16 if.end16.sink.split: ; preds = %if.else9, %if.else, %entry %.str.3.sink = phi ptr [ @.str.2, %entry ], [ @.str.3, %if.else ], [ @.str.1, %if.else9 ] %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink) br label %if.end16 if.end16: ; preds = %if.end16.sink.split, %if.else9 call void @llvm.lifetime.end.p0(i64 7, ptr nonnull %str) #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 willreturn memory(argmem: read) declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) 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 willreturn memory(argmem: read) } 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)"}
#include<stdio.h> int main(void){ char S[][10] = {"Sunny","Cloudy","Rainy"}; char a[10]; scanf("%s",a); switch(a[0]){ case 'S': printf("%s",S[1]); return 0; case 'C': printf("%s",S[2]); return 0; case 'R': printf("%s",S[0]); return 0; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213988/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213988/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.S = private unnamed_addr constant [3 x [10 x i8]] [[10 x i8] c"Sunny\00\00\00\00\00", [10 x i8] c"Cloudy\00\00\00\00", [10 x i8] c"Rainy\00\00\00\00\00"], align 16 @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %S = alloca [3 x [10 x i8]], align 16 %a = alloca [10 x i8], align 1 call void @llvm.lifetime.start.p0(i64 30, ptr nonnull %S) #4 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(30) %S, ptr noundef nonnull align 16 dereferenceable(30) @__const.main.S, i64 30, i1 false) call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i8, ptr %a, align 1, !tbaa !5 %conv = sext i8 %0 to i32 switch i32 %conv, label %cleanup [ i32 83, label %sw.bb i32 67, label %sw.bb4 i32 82, label %cleanup.sink.split ] sw.bb: ; preds = %entry %arrayidx1 = getelementptr inbounds [3 x [10 x i8]], ptr %S, i64 0, i64 1 br label %cleanup.sink.split sw.bb4: ; preds = %entry %arrayidx5 = getelementptr inbounds [3 x [10 x i8]], ptr %S, i64 0, i64 2 br label %cleanup.sink.split cleanup.sink.split: ; preds = %entry, %sw.bb, %sw.bb4 %S.sink = phi ptr [ %arrayidx5, %sw.bb4 ], [ %arrayidx1, %sw.bb ], [ %S, %entry ] %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull %S.sink) br label %cleanup cleanup: ; preds = %cleanup.sink.split, %entry call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 30, ptr nonnull %S) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <stdlib.h> int counts[5]; int main() { int n; int i, j, k; scanf("%d", &n); for(i=0; i<n; i++) { scanf("%d", &j); counts[j]++; } int ans = counts[4]; ans +=counts[3]; ans+=counts[2]/2 + counts[2]%2; counts[1]-=counts[3]; counts[1]-=2*(counts[2]%2); if(counts[1]<0) counts[1]=0; ans+=(counts[1]+3)/4; printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21403/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21403/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @counts = dso_local local_unnamed_addr global [5 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: %n = alloca i32, align 4 %j = 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 %j) #4 %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.body, label %for.end for.body: ; preds = %entry, %for.body %i.019 = phi i32 [ %inc2, %for.body ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %j) %1 = load i32, ptr %j, align 4, !tbaa !5 %idxprom = sext i32 %1 to i64 %arrayidx = getelementptr inbounds [5 x i32], ptr @counts, i64 0, i64 %idxprom %2 = load i32, ptr %arrayidx, align 4, !tbaa !5 %inc = add nsw i32 %2, 1 store i32 %inc, ptr %arrayidx, align 4, !tbaa !5 %inc2 = add nuw nsw i32 %i.019, 1 %3 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc2, %3 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry %4 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @counts, i64 0, i64 4), align 16, !tbaa !5 %5 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @counts, i64 0, i64 3), align 4, !tbaa !5 %6 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @counts, i64 0, i64 2), align 8, !tbaa !5 %div = sdiv i32 %6, 2 %rem = srem i32 %6, 2 %7 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @counts, i64 0, i64 1), align 4, !tbaa !5 %8 = shl nsw i32 %rem, 1 %9 = add i32 %5, %8 %sub6 = sub i32 %7, %9 %spec.store.select = call i32 @llvm.smax.i32(i32 %sub6, i32 0) store i32 %spec.store.select, ptr getelementptr inbounds ([5 x i32], ptr @counts, i64 0, i64 1), align 4 %add8 = add nuw nsw i32 %spec.store.select, 3 %div916 = lshr i32 %add8, 2 %add3 = add i32 %5, %4 %add = add i32 %add3, %rem %add4 = add i32 %add, %div %add10 = add nsw i32 %add4, %div916 %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add10) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %j) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(void) { char S[20]; scanf("%s",&S); if(S[0] == 'S') { printf("Cloudy\n"); } else if(S[0] == 'C') { printf("Rainy\n"); } else if(S[0] == 'R') { printf("Sunny\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214080/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214080/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 = private unnamed_addr constant [6 x i8] c"Sunny\00", align 1 @str.4 = private unnamed_addr constant [6 x i8] c"Rainy\00", align 1 @str.5 = private unnamed_addr constant [7 x i8] c"Cloudy\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %S = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %S) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S) %0 = load i8, ptr %S, align 16, !tbaa !5 switch i8 %0, label %if.end17 [ i8 83, label %if.end17.sink.split i8 67, label %if.then7 i8 82, label %if.then14 ] if.then7: ; preds = %entry br label %if.end17.sink.split if.then14: ; preds = %entry br label %if.end17.sink.split if.end17.sink.split: ; preds = %entry, %if.then14, %if.then7 %str.4.sink = phi ptr [ @str.4, %if.then7 ], [ @str, %if.then14 ], [ @str.5, %entry ] %puts18 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink) br label %if.end17 if.end17: ; preds = %if.end17.sink.split, %entry call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %S) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <stdlib.h> int main(void) { char s; scanf("%c",&s); if(s=='S'){ printf("Cloudy"); }else if(s=='C'){ printf("Rainy"); }else{ printf("Sunny"); } return EXIT_SUCCESS; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214130/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214130/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%c\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c"Cloudy\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"Rainy\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"Sunny\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %s) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %0 = load i8, ptr %s, align 1, !tbaa !5 %switch.selectcmp = icmp eq i8 %0, 67 %switch.select = select i1 %switch.selectcmp, ptr @.str.2, ptr @.str.3 %switch.selectcmp11 = icmp eq i8 %0, 83 %switch.select12 = select i1 %switch.selectcmp11, ptr @.str.1, ptr %switch.select %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %switch.select12) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %s) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <string.h> int main() { char sn[20]; int i = 0; scanf("%s", sn); if (!strcmp(sn ,"Sunny")) { printf("Cloudy\n"); } else if (!strcmp(sn,"Cloudy")){ printf("Rainy\n"); } else if (!strcmp(sn,"Rainy")) { printf("Sunny\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214174/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214174/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 = private unnamed_addr constant [7 x i8] c"Cloudy\00", align 1 @str.7 = private unnamed_addr constant [6 x i8] c"Rainy\00", align 1 @str.8 = private unnamed_addr constant [6 x i8] c"Sunny\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %sn = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %sn) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %sn) %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(6) %sn, ptr noundef nonnull dereferenceable(6) @str.8, i64 6) %tobool.not = icmp eq i32 %bcmp, 0 br i1 %tobool.not, label %if.end16.sink.split, label %if.else if.else: ; preds = %entry %bcmp17 = call i32 @bcmp(ptr noundef nonnull dereferenceable(7) %sn, ptr noundef nonnull dereferenceable(7) @str, i64 7) %tobool6.not = icmp eq i32 %bcmp17, 0 br i1 %tobool6.not, label %if.end16.sink.split, label %if.else9 if.else9: ; preds = %if.else %bcmp19 = call i32 @bcmp(ptr noundef nonnull dereferenceable(6) %sn, ptr noundef nonnull dereferenceable(6) @str.7, i64 6) %tobool12.not = icmp eq i32 %bcmp19, 0 br i1 %tobool12.not, label %if.end16.sink.split, label %if.end16 if.end16.sink.split: ; preds = %if.else9, %if.else, %entry %str.7.sink = phi ptr [ @str, %entry ], [ @str.7, %if.else ], [ @str.8, %if.else9 ] %puts18 = call i32 @puts(ptr nonnull dereferenceable(1) %str.7.sink) br label %if.end16 if.end16: ; preds = %if.end16.sink.split, %if.else9 call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %sn) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind willreturn memory(argmem: read) } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
#include <stdio.h> int main() { char S[40]; scanf("%s", S); switch (S[0]) { case 'S': printf("Cloudy\n"); break; case 'C': printf("Rainy\n"); break; case 'R': printf("Sunny\n"); break; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214224/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214224/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 = private unnamed_addr constant [6 x i8] c"Sunny\00", align 1 @str.4 = private unnamed_addr constant [6 x i8] c"Rainy\00", align 1 @str.5 = private unnamed_addr constant [7 x i8] c"Cloudy\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %S = alloca [40 x i8], align 16 call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %S) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S) %0 = load i8, ptr %S, align 16, !tbaa !5 %conv = sext i8 %0 to i32 switch i32 %conv, label %sw.epilog [ i32 83, label %sw.epilog.sink.split i32 67, label %sw.bb2 i32 82, label %sw.bb4 ] sw.bb2: ; preds = %entry br label %sw.epilog.sink.split sw.bb4: ; preds = %entry br label %sw.epilog.sink.split sw.epilog.sink.split: ; preds = %entry, %sw.bb2, %sw.bb4 %str.sink = phi ptr [ @str, %sw.bb4 ], [ @str.4, %sw.bb2 ], [ @str.5, %entry ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) br label %sw.epilog sw.epilog: ; preds = %sw.epilog.sink.split, %entry call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %S) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<stdlib.h> typedef struct directedGraph{ int *vertex; int *next; int *start; int v,e; int pointer; } graph; graph* newGraph(const int v,const int e){ graph *g=(graph *)malloc(sizeof(graph)); g->vertex=(int *)calloc(e,sizeof(int)); g->next=(int *)calloc(e,sizeof(int)); g->start=(int *)calloc(v,sizeof(int)); for(int i=0;i<v;i++) g->start[i]=-1; g->v=v; g->e=e; g->pointer=0; return g; } void freeGraph(graph *g){ free(g->vertex); free(g->next); free(g->start); free(g); return; } void addEdge(graph *g,const int from,const int to){ const int p=g->pointer; g->vertex[p]=to; g->next[p]=g->start[from]; g->start[from]=p; g->pointer++; return; } typedef long long int int64; void run(void){ int n; scanf("%d",&n); graph *g=newGraph(n,2*n); int i; for(i=0;i<n-1;i++){ int x,y; scanf("%d%d",&x,&y); x--; y--; addEdge(g,x,y); addEdge(g,y,x); } int *q=(int *)calloc(n,sizeof(int)); int *parent=(int *)calloc(n,sizeof(int)); q[0]=0; int front=0; int last=1; while(last<n){ int v=q[front++]; for(int p=g->start[v];p!=-1;p=g->next[p]){ int u=g->vertex[p]; if(u==parent[v]) continue; parent[u]=v; q[last++]=u; } } const int mod=1000000007; int *dp=(int *)calloc(2*n,sizeof(int)); for(i=n-1;i>=0;i--){ int v=q[i]; dp[2*v]=dp[2*v+1]=1; for(int p=g->start[v];p!=-1;p=g->next[p]){ int u=g->vertex[p]; if(u==parent[v]) continue; dp[2*v]=(int64)dp[2*v]*(dp[2*u]+dp[2*u+1])%mod; dp[2*v+1]=(int64)dp[2*v+1]*dp[2*u]%mod; } } printf("%d\n",(dp[0]+dp[1])%mod); } int main(void){ run(); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214268/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214268/source.c" target datalayout = "e-m:e-p270: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.directedGraph = type { ptr, ptr, ptr, i32, i32, i32 } @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write, argmem: none, inaccessiblemem: readwrite) uwtable define dso_local noalias ptr @newGraph(i32 noundef %v, i32 noundef %e) local_unnamed_addr #0 { entry: %call = tail call noalias dereferenceable_or_null(40) ptr @malloc(i64 noundef 40) #10 %conv = sext i32 %e to i64 %call1 = tail call noalias ptr @calloc(i64 noundef %conv, i64 noundef 4) #11 store ptr %call1, ptr %call, align 8, !tbaa !5 %call3 = tail call noalias ptr @calloc(i64 noundef %conv, i64 noundef 4) #11 %next = getelementptr inbounds %struct.directedGraph, ptr %call, i64 0, i32 1 store ptr %call3, ptr %next, align 8, !tbaa !11 %conv4 = sext i32 %v to i64 %call5 = tail call noalias ptr @calloc(i64 noundef %conv4, i64 noundef 4) #11 %start = getelementptr inbounds %struct.directedGraph, ptr %call, i64 0, i32 2 store ptr %call5, ptr %start, align 8, !tbaa !12 %cmp23 = icmp sgt i32 %v, 0 br i1 %cmp23, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %entry %0 = zext i32 %v to i64 %1 = shl nuw nsw i64 %0, 2 tail call void @llvm.memset.p0.i64(ptr align 4 %call5, i8 -1, i64 %1, i1 false), !tbaa !13 br label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body.preheader, %entry %v8 = getelementptr inbounds %struct.directedGraph, ptr %call, i64 0, i32 3 store i32 %v, ptr %v8, align 8, !tbaa !14 %e9 = getelementptr inbounds %struct.directedGraph, ptr %call, i64 0, i32 4 store i32 %e, ptr %e9, align 4, !tbaa !15 %pointer = getelementptr inbounds %struct.directedGraph, ptr %call, i64 0, i32 5 store i32 0, ptr %pointer, align 8, !tbaa !16 ret ptr %call } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @calloc(i64 noundef, i64 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: mustprogress nounwind willreturn uwtable define dso_local void @freeGraph(ptr nocapture noundef %g) local_unnamed_addr #4 { entry: %0 = load ptr, ptr %g, align 8, !tbaa !5 tail call void @free(ptr noundef %0) #12 %next = getelementptr inbounds %struct.directedGraph, ptr %g, i64 0, i32 1 %1 = load ptr, ptr %next, align 8, !tbaa !11 tail call void @free(ptr noundef %1) #12 %start = getelementptr inbounds %struct.directedGraph, ptr %g, i64 0, i32 2 %2 = load ptr, ptr %start, align 8, !tbaa !12 tail call void @free(ptr noundef %2) #12 tail call void @free(ptr noundef %g) #12 ret void } ; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) uwtable define dso_local void @addEdge(ptr nocapture noundef %g, i32 noundef %from, i32 noundef %to) local_unnamed_addr #6 { entry: %pointer = getelementptr inbounds %struct.directedGraph, ptr %g, i64 0, i32 5 %0 = load i32, ptr %pointer, align 8, !tbaa !16 %1 = load ptr, ptr %g, align 8, !tbaa !5 %idxprom = sext i32 %0 to i64 %arrayidx = getelementptr inbounds i32, ptr %1, i64 %idxprom store i32 %to, ptr %arrayidx, align 4, !tbaa !13 %start = getelementptr inbounds %struct.directedGraph, ptr %g, i64 0, i32 2 %2 = load ptr, ptr %start, align 8, !tbaa !12 %idxprom1 = sext i32 %from to i64 %arrayidx2 = getelementptr inbounds i32, ptr %2, i64 %idxprom1 %3 = load i32, ptr %arrayidx2, align 4, !tbaa !13 %next = getelementptr inbounds %struct.directedGraph, ptr %g, i64 0, i32 1 %4 = load ptr, ptr %next, align 8, !tbaa !11 %arrayidx4 = getelementptr inbounds i32, ptr %4, i64 %idxprom store i32 %3, ptr %arrayidx4, align 4, !tbaa !13 store i32 %0, ptr %arrayidx2, align 4, !tbaa !13 %5 = load i32, ptr %pointer, align 8, !tbaa !16 %inc = add nsw i32 %5, 1 store i32 %inc, ptr %pointer, align 8, !tbaa !16 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @run() local_unnamed_addr #7 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #12 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !13 %mul = shl nsw i32 %0, 1 %conv.i = sext i32 %mul to i64 %call1.i = call noalias ptr @calloc(i64 noundef %conv.i, i64 noundef 4) #11 %call3.i = call noalias ptr @calloc(i64 noundef %conv.i, i64 noundef 4) #11 %conv4.i = sext i32 %0 to i64 %call5.i = call noalias ptr @calloc(i64 noundef %conv4.i, i64 noundef 4) #11 %cmp23.i = icmp sgt i32 %0, 0 br i1 %cmp23.i, label %newGraph.exit, label %for.end newGraph.exit: ; preds = %entry %1 = zext i32 %0 to i64 %2 = shl nuw nsw i64 %1, 2 call void @llvm.memset.p0.i64(ptr align 4 %call5.i, i8 -1, i64 %2, i1 false), !tbaa !13 %cmp180.not = icmp eq i32 %0, 1 br i1 %cmp180.not, label %for.end, label %for.body for.body: ; preds = %newGraph.exit, %for.body %3 = phi i32 [ %inc.i178, %for.body ], [ 0, %newGraph.exit ] %i.0181 = phi i32 [ %inc, %for.body ], [ 0, %newGraph.exit ] call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #12 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #12 %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x, ptr noundef nonnull %y) %4 = load i32, ptr %x, align 4, !tbaa !13 %dec = add nsw i32 %4, -1 %5 = load i32, ptr %y, align 4, !tbaa !13 %dec3 = add nsw i32 %5, -1 %idxprom.i = zext i32 %3 to i64 %arrayidx.i = getelementptr inbounds i32, ptr %call1.i, i64 %idxprom.i store i32 %dec3, ptr %arrayidx.i, align 4, !tbaa !13 %idxprom1.i = sext i32 %dec to i64 %arrayidx2.i = getelementptr inbounds i32, ptr %call5.i, i64 %idxprom1.i %6 = load i32, ptr %arrayidx2.i, align 4, !tbaa !13 %arrayidx4.i = getelementptr inbounds i32, ptr %call3.i, i64 %idxprom.i store i32 %6, ptr %arrayidx4.i, align 4, !tbaa !13 store i32 %3, ptr %arrayidx2.i, align 4, !tbaa !13 %inc.i = or i32 %3, 1 %idxprom.i171 = zext i32 %inc.i to i64 %arrayidx.i172 = getelementptr inbounds i32, ptr %call1.i, i64 %idxprom.i171 store i32 %dec, ptr %arrayidx.i172, align 4, !tbaa !13 %idxprom1.i174 = sext i32 %dec3 to i64 %arrayidx2.i175 = getelementptr inbounds i32, ptr %call5.i, i64 %idxprom1.i174 %7 = load i32, ptr %arrayidx2.i175, align 4, !tbaa !13 %arrayidx4.i177 = getelementptr inbounds i32, ptr %call3.i, i64 %idxprom.i171 store i32 %7, ptr %arrayidx4.i177, align 4, !tbaa !13 store i32 %inc.i, ptr %arrayidx2.i175, align 4, !tbaa !13 %inc.i178 = add nuw nsw i32 %3, 2 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #12 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #12 %inc = add nuw nsw i32 %i.0181, 1 %8 = load i32, ptr %n, align 4, !tbaa !13 %sub = add nsw i32 %8, -1 %cmp = icmp slt i32 %inc, %sub br i1 %cmp, label %for.body, label %for.end.loopexit, !llvm.loop !17 for.end.loopexit: ; preds = %for.body %.pre202 = sext i32 %8 to i64 br label %for.end for.end: ; preds = %entry, %for.end.loopexit, %newGraph.exit %conv.pre-phi = phi i64 [ %.pre202, %for.end.loopexit ], [ %conv4.i, %newGraph.exit ], [ %conv4.i, %entry ] %.lcssa = phi i32 [ %8, %for.end.loopexit ], [ 1, %newGraph.exit ], [ %0, %entry ] %call4 = call noalias ptr @calloc(i64 noundef %conv.pre-phi, i64 noundef 4) #11 %call6 = call noalias ptr @calloc(i64 noundef %conv.pre-phi, i64 noundef 4) #11 %cmp7187 = icmp sgt i32 %.lcssa, 1 br i1 %cmp7187, label %while.body, label %while.end while.cond.loopexit: ; preds = %cleanup, %while.body %last.1.lcssa = phi i32 [ %last.0188, %while.body ], [ %last.2, %cleanup ] %cmp7 = icmp slt i32 %last.1.lcssa, %.lcssa br i1 %cmp7, label %while.body, label %while.end, !llvm.loop !19 while.body: ; preds = %for.end, %while.cond.loopexit %indvars.iv = phi i64 [ %indvars.iv.next, %while.cond.loopexit ], [ 0, %for.end ] %last.0188 = phi i32 [ %last.1.lcssa, %while.cond.loopexit ], [ 1, %for.end ] %indvars.iv.next = add nuw i64 %indvars.iv, 1 %arrayidx10 = getelementptr inbounds i32, ptr %call4, i64 %indvars.iv %9 = load i32, ptr %arrayidx10, align 4, !tbaa !13 %idxprom11 = sext i32 %9 to i64 %arrayidx12 = getelementptr inbounds i32, ptr %call5.i, i64 %idxprom11 %p.0182 = load i32, ptr %arrayidx12, align 4, !tbaa !13 %cmp14.not183 = icmp eq i32 %p.0182, -1 br i1 %cmp14.not183, label %while.cond.loopexit, label %for.body16.lr.ph for.body16.lr.ph: ; preds = %while.body %arrayidx20 = getelementptr inbounds i32, ptr %call6, i64 %idxprom11 br label %for.body16 for.body16: ; preds = %for.body16.lr.ph, %cleanup %p.0185 = phi i32 [ %p.0182, %for.body16.lr.ph ], [ %p.0, %cleanup ] %last.1184 = phi i32 [ %last.0188, %for.body16.lr.ph ], [ %last.2, %cleanup ] %idxprom17 = sext i32 %p.0185 to i64 %arrayidx18 = getelementptr inbounds i32, ptr %call1.i, i64 %idxprom17 %10 = load i32, ptr %arrayidx18, align 4, !tbaa !13 %11 = load i32, ptr %arrayidx20, align 4, !tbaa !13 %cmp21 = icmp eq i32 %10, %11 br i1 %cmp21, label %cleanup, label %if.end if.end: ; preds = %for.body16 %idxprom23 = sext i32 %10 to i64 %arrayidx24 = getelementptr inbounds i32, ptr %call6, i64 %idxprom23 store i32 %9, ptr %arrayidx24, align 4, !tbaa !13 %inc25 = add nsw i32 %last.1184, 1 %idxprom26 = sext i32 %last.1184 to i64 %arrayidx27 = getelementptr inbounds i32, ptr %call4, i64 %idxprom26 store i32 %10, ptr %arrayidx27, align 4, !tbaa !13 br label %cleanup cleanup: ; preds = %for.body16, %if.end %last.2 = phi i32 [ %inc25, %if.end ], [ %last.1184, %for.body16 ] %arrayidx30 = getelementptr inbounds i32, ptr %call3.i, i64 %idxprom17 %p.0 = load i32, ptr %arrayidx30, align 4, !tbaa !13 %cmp14.not = icmp eq i32 %p.0, -1 br i1 %cmp14.not, label %while.cond.loopexit, label %for.body16, !llvm.loop !20 while.end: ; preds = %while.cond.loopexit, %for.end %mul33 = shl nsw i32 %.lcssa, 1 %conv34 = sext i32 %mul33 to i64 %call35 = call noalias ptr @calloc(i64 noundef %conv34, i64 noundef 4) #11 %cmp38194 = icmp sgt i32 %.lcssa, 0 br i1 %cmp38194, label %for.body40.preheader, label %for.end114 for.body40.preheader: ; preds = %while.end %12 = zext i32 %.lcssa to i64 br label %for.body40 for.cond37.loopexit: ; preds = %cleanup103, %for.body40 %cmp38 = icmp sgt i64 %indvars.iv198, 1 br i1 %cmp38, label %for.body40, label %for.end114.loopexit, !llvm.loop !21 for.body40: ; preds = %for.body40.preheader, %for.cond37.loopexit %indvars.iv198 = phi i64 [ %12, %for.body40.preheader ], [ %indvars.iv.next199, %for.cond37.loopexit ] %indvars.iv.next199 = add nsw i64 %indvars.iv198, -1 %idxprom42 = and i64 %indvars.iv.next199, 4294967295 %arrayidx43 = getelementptr inbounds i32, ptr %call4, i64 %idxprom42 %13 = load i32, ptr %arrayidx43, align 4, !tbaa !13 %mul44 = shl nsw i32 %13, 1 %add = or i32 %mul44, 1 %idxprom45 = sext i32 %add to i64 %arrayidx46 = getelementptr inbounds i32, ptr %call35, i64 %idxprom45 store i32 1, ptr %arrayidx46, align 4, !tbaa !13 %idxprom48 = sext i32 %mul44 to i64 %arrayidx49 = getelementptr inbounds i32, ptr %call35, i64 %idxprom48 store i32 1, ptr %arrayidx49, align 4, !tbaa !13 %idxprom52 = sext i32 %13 to i64 %arrayidx53 = getelementptr inbounds i32, ptr %call5.i, i64 %idxprom52 %p50.0190 = load i32, ptr %arrayidx53, align 4, !tbaa !13 %cmp55.not191 = icmp eq i32 %p50.0190, -1 br i1 %cmp55.not191, label %for.cond37.loopexit, label %for.body58.lr.ph for.body58.lr.ph: ; preds = %for.body40 %arrayidx64 = getelementptr inbounds i32, ptr %call6, i64 %idxprom52 %14 = load i32, ptr %arrayidx64, align 4, !tbaa !13 br label %for.body58 for.body58: ; preds = %for.body58.lr.ph, %cleanup103 %15 = phi i32 [ 1, %for.body58.lr.ph ], [ %21, %cleanup103 ] %16 = phi i32 [ 1, %for.body58.lr.ph ], [ %22, %cleanup103 ] %p50.0192 = phi i32 [ %p50.0190, %for.body58.lr.ph ], [ %p50.0, %cleanup103 ] %idxprom61 = sext i32 %p50.0192 to i64 %arrayidx62 = getelementptr inbounds i32, ptr %call1.i, i64 %idxprom61 %17 = load i32, ptr %arrayidx62, align 4, !tbaa !13 %cmp65 = icmp eq i32 %17, %14 br i1 %cmp65, label %cleanup103, label %if.end68 if.end68: ; preds = %for.body58 %conv72 = sext i32 %16 to i64 %mul73 = shl nsw i32 %17, 1 %idxprom74 = sext i32 %mul73 to i64 %arrayidx75 = getelementptr inbounds i32, ptr %call35, i64 %idxprom74 %18 = load i32, ptr %arrayidx75, align 4, !tbaa !13 %add77 = or i32 %mul73, 1 %idxprom78 = sext i32 %add77 to i64 %arrayidx79 = getelementptr inbounds i32, ptr %call35, i64 %idxprom78 %19 = load i32, ptr %arrayidx79, align 4, !tbaa !13 %add80 = add nsw i32 %19, %18 %conv81 = sext i32 %add80 to i64 %mul82 = mul nsw i64 %conv81, %conv72 %rem = srem i64 %mul82, 1000000007 %conv83 = trunc i64 %rem to i32 store i32 %conv83, ptr %arrayidx49, align 4, !tbaa !13 %conv91 = sext i32 %15 to i64 %20 = load i32, ptr %arrayidx75, align 4, !tbaa !13 %conv95 = sext i32 %20 to i64 %mul96 = mul nsw i64 %conv95, %conv91 %rem97 = srem i64 %mul96, 1000000007 %conv98 = trunc i64 %rem97 to i32 store i32 %conv98, ptr %arrayidx46, align 4, !tbaa !13 br label %cleanup103 cleanup103: ; preds = %for.body58, %if.end68 %21 = phi i32 [ %15, %for.body58 ], [ %conv98, %if.end68 ] %22 = phi i32 [ %16, %for.body58 ], [ %conv83, %if.end68 ] %arrayidx109 = getelementptr inbounds i32, ptr %call3.i, i64 %idxprom61 %p50.0 = load i32, ptr %arrayidx109, align 4, !tbaa !13 %cmp55.not = icmp eq i32 %p50.0, -1 br i1 %cmp55.not, label %for.cond37.loopexit, label %for.body58, !llvm.loop !22 for.end114.loopexit: ; preds = %for.cond37.loopexit %.pre = load i32, ptr %call35, align 4, !tbaa !13 %arrayidx116.phi.trans.insert = getelementptr inbounds i32, ptr %call35, i64 1 %.pre201 = load i32, ptr %arrayidx116.phi.trans.insert, align 4, !tbaa !13 %23 = add nsw i32 %.pre201, %.pre %24 = srem i32 %23, 1000000007 br label %for.end114 for.end114: ; preds = %for.end114.loopexit, %while.end %add117 = phi i32 [ %24, %for.end114.loopexit ], [ 0, %while.end ] %call119 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %add117) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #12 ret void } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #8 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #7 { entry: tail call void @run() ret i32 0 } ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #9 attributes #0 = { mustprogress nofree nounwind willreturn memory(write, argmem: none, inaccessiblemem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nounwind willreturn uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #8 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #9 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #10 = { nounwind allocsize(0) } attributes #11 = { nounwind allocsize(0,1) } attributes #12 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !7, i64 0} !6 = !{!"directedGraph", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32} !7 = !{!"any pointer", !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{!"int", !8, i64 0} !11 = !{!6, !7, i64 8} !12 = !{!6, !7, i64 16} !13 = !{!10, !10, i64 0} !14 = !{!6, !10, i64 24} !15 = !{!6, !10, i64 28} !16 = !{!6, !10, i64 32} !17 = distinct !{!17, !18} !18 = !{!"llvm.loop.mustprogress"} !19 = distinct !{!19, !18} !20 = distinct !{!20, !18} !21 = distinct !{!21, !18} !22 = distinct !{!22, !18}
#include<stdio.h> int main(){ int n,i,S[14],H[14],C[14],D[14],number; char chara,dummy; for(i=1;i<14;i++){ S[i] = 0; D[i] = 0; H[i] = 0; C[i] = 0; } scanf("%d",&n); for(i=0;i<n;i++){ scanf("%c",&dummy); scanf("%c %d",&chara,&number); switch(chara){ case 'S': S[number] = number; break; case 'H': H[number] = number; break; case 'C': C[number] = number; break; case 'D': D[number] = number; break; default: break; } } for(i=1;i<14;i++){ if(S[i] == 0){ printf("S %d\n",i); } } for(i=1;i<14;i++){ if(H[i] == 0) printf("H %d\n",i); } for(i=1;i<14;i++){ if(C[i] == 0) printf("C %d\n",i); } for(i=1;i<14;i++){ if(D[i] == 0) printf("D %d\n",i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214325/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214325/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%c\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"%c %d\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"S %d\0A\00", align 1 @.str.4 = private unnamed_addr constant [6 x i8] c"H %d\0A\00", align 1 @.str.5 = private unnamed_addr constant [6 x i8] c"C %d\0A\00", align 1 @.str.6 = private unnamed_addr constant [6 x i8] c"D %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %S = alloca [14 x i32], align 16 %H = alloca [14 x i32], align 16 %C = alloca [14 x i32], align 16 %D = alloca [14 x i32], align 16 %number = alloca i32, align 4 %chara = alloca i8, align 1 %dummy = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %S) #4 call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %H) #4 call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %C) #4 call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %D) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %number) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %chara) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %dummy) #4 %scevgep = getelementptr inbounds i8, ptr %S, i64 4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %scevgep, i8 0, i64 52, i1 false), !tbaa !5 %scevgep110 = getelementptr inbounds i8, ptr %D, i64 4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %scevgep110, i8 0, i64 52, i1 false), !tbaa !5 %scevgep111 = getelementptr inbounds i8, ptr %H, i64 4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %scevgep111, i8 0, i64 52, i1 false), !tbaa !5 %scevgep112 = getelementptr inbounds i8, ptr %C, i64 4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %scevgep112, i8 0, i64 52, i1 false), !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp8104 = icmp sgt i32 %0, 0 br i1 %cmp8104, label %for.body9, label %if.then for.cond26.preheader: ; preds = %for.inc23 %.pre = load i32, ptr %scevgep, align 4, !tbaa !5 %cmp32 = icmp eq i32 %.pre, 0 br i1 %cmp32, label %if.then, label %for.inc35 for.body9: ; preds = %entry, %for.inc23 %i.1105 = phi i32 [ %inc24, %for.inc23 ], [ 0, %entry ] %call10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %dummy) %call11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %chara, ptr noundef nonnull %number) %1 = load i8, ptr %chara, align 1, !tbaa !9 %conv = sext i8 %1 to i32 switch i32 %conv, label %for.inc23 [ i32 83, label %for.inc23.sink.split i32 72, label %sw.bb14 i32 67, label %sw.bb17 i32 68, label %sw.bb20 ] sw.bb14: ; preds = %for.body9 br label %for.inc23.sink.split sw.bb17: ; preds = %for.body9 br label %for.inc23.sink.split sw.bb20: ; preds = %for.body9 br label %for.inc23.sink.split for.inc23.sink.split: ; preds = %for.body9, %sw.bb20, %sw.bb17, %sw.bb14 %S.sink = phi ptr [ %H, %sw.bb14 ], [ %C, %sw.bb17 ], [ %D, %sw.bb20 ], [ %S, %for.body9 ] %.sink119 = load i32, ptr %number, align 4, !tbaa !5 %idxprom12 = sext i32 %.sink119 to i64 %arrayidx13 = getelementptr inbounds [14 x i32], ptr %S.sink, i64 0, i64 %idxprom12 store i32 %.sink119, ptr %arrayidx13, align 4, !tbaa !5 br label %for.inc23 for.inc23: ; preds = %for.inc23.sink.split, %for.body9 %inc24 = add nuw nsw i32 %i.1105, 1 %2 = load i32, ptr %n, align 4, !tbaa !5 %cmp8 = icmp slt i32 %inc24, %2 br i1 %cmp8, label %for.body9, label %for.cond26.preheader, !llvm.loop !10 if.then: ; preds = %entry, %for.cond26.preheader %call34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1) br label %for.inc35 for.inc35: ; preds = %for.cond26.preheader, %if.then %arrayidx31.1 = getelementptr inbounds [14 x i32], ptr %S, i64 0, i64 2 %3 = load i32, ptr %arrayidx31.1, align 8, !tbaa !5 %cmp32.1 = icmp eq i32 %3, 0 br i1 %cmp32.1, label %if.then.1, label %for.inc35.1 if.then.1: ; preds = %for.inc35 %call34.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2) br label %for.inc35.1 for.inc35.1: ; preds = %if.then.1, %for.inc35 %arrayidx31.2 = getelementptr inbounds [14 x i32], ptr %S, i64 0, i64 3 %4 = load i32, ptr %arrayidx31.2, align 4, !tbaa !5 %cmp32.2 = icmp eq i32 %4, 0 br i1 %cmp32.2, label %if.then.2, label %for.inc35.2 if.then.2: ; preds = %for.inc35.1 %call34.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3) br label %for.inc35.2 for.inc35.2: ; preds = %if.then.2, %for.inc35.1 %arrayidx31.3 = getelementptr inbounds [14 x i32], ptr %S, i64 0, i64 4 %5 = load i32, ptr %arrayidx31.3, align 16, !tbaa !5 %cmp32.3 = icmp eq i32 %5, 0 br i1 %cmp32.3, label %if.then.3, label %for.inc35.3 if.then.3: ; preds = %for.inc35.2 %call34.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4) br label %for.inc35.3 for.inc35.3: ; preds = %if.then.3, %for.inc35.2 %arrayidx31.4 = getelementptr inbounds [14 x i32], ptr %S, i64 0, i64 5 %6 = load i32, ptr %arrayidx31.4, align 4, !tbaa !5 %cmp32.4 = icmp eq i32 %6, 0 br i1 %cmp32.4, label %if.then.4, label %for.inc35.4 if.then.4: ; preds = %for.inc35.3 %call34.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5) br label %for.inc35.4 for.inc35.4: ; preds = %if.then.4, %for.inc35.3 %arrayidx31.5 = getelementptr inbounds [14 x i32], ptr %S, i64 0, i64 6 %7 = load i32, ptr %arrayidx31.5, align 8, !tbaa !5 %cmp32.5 = icmp eq i32 %7, 0 br i1 %cmp32.5, label %if.then.5, label %for.inc35.5 if.then.5: ; preds = %for.inc35.4 %call34.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6) br label %for.inc35.5 for.inc35.5: ; preds = %if.then.5, %for.inc35.4 %arrayidx31.6 = getelementptr inbounds [14 x i32], ptr %S, i64 0, i64 7 %8 = load i32, ptr %arrayidx31.6, align 4, !tbaa !5 %cmp32.6 = icmp eq i32 %8, 0 br i1 %cmp32.6, label %if.then.6, label %for.inc35.6 if.then.6: ; preds = %for.inc35.5 %call34.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7) br label %for.inc35.6 for.inc35.6: ; preds = %if.then.6, %for.inc35.5 %arrayidx31.7 = getelementptr inbounds [14 x i32], ptr %S, i64 0, i64 8 %9 = load i32, ptr %arrayidx31.7, align 16, !tbaa !5 %cmp32.7 = icmp eq i32 %9, 0 br i1 %cmp32.7, label %if.then.7, label %for.inc35.7 if.then.7: ; preds = %for.inc35.6 %call34.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8) br label %for.inc35.7 for.inc35.7: ; preds = %if.then.7, %for.inc35.6 %arrayidx31.8 = getelementptr inbounds [14 x i32], ptr %S, i64 0, i64 9 %10 = load i32, ptr %arrayidx31.8, align 4, !tbaa !5 %cmp32.8 = icmp eq i32 %10, 0 br i1 %cmp32.8, label %if.then.8, label %for.inc35.8 if.then.8: ; preds = %for.inc35.7 %call34.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9) br label %for.inc35.8 for.inc35.8: ; preds = %if.then.8, %for.inc35.7 %arrayidx31.9 = getelementptr inbounds [14 x i32], ptr %S, i64 0, i64 10 %11 = load i32, ptr %arrayidx31.9, align 8, !tbaa !5 %cmp32.9 = icmp eq i32 %11, 0 br i1 %cmp32.9, label %if.then.9, label %for.inc35.9 if.then.9: ; preds = %for.inc35.8 %call34.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10) br label %for.inc35.9 for.inc35.9: ; preds = %if.then.9, %for.inc35.8 %arrayidx31.10 = getelementptr inbounds [14 x i32], ptr %S, i64 0, i64 11 %12 = load i32, ptr %arrayidx31.10, align 4, !tbaa !5 %cmp32.10 = icmp eq i32 %12, 0 br i1 %cmp32.10, label %if.then.10, label %for.inc35.10 if.then.10: ; preds = %for.inc35.9 %call34.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11) br label %for.inc35.10 for.inc35.10: ; preds = %if.then.10, %for.inc35.9 %arrayidx31.11 = getelementptr inbounds [14 x i32], ptr %S, i64 0, i64 12 %13 = load i32, ptr %arrayidx31.11, align 16, !tbaa !5 %cmp32.11 = icmp eq i32 %13, 0 br i1 %cmp32.11, label %if.then.11, label %for.inc35.11 if.then.11: ; preds = %for.inc35.10 %call34.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12) br label %for.inc35.11 for.inc35.11: ; preds = %if.then.11, %for.inc35.10 %arrayidx31.12 = getelementptr inbounds [14 x i32], ptr %S, i64 0, i64 13 %14 = load i32, ptr %arrayidx31.12, align 4, !tbaa !5 %cmp32.12 = icmp eq i32 %14, 0 br i1 %cmp32.12, label %if.then.12, label %for.inc35.12 if.then.12: ; preds = %for.inc35.11 %call34.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 13) br label %for.inc35.12 for.inc35.12: ; preds = %if.then.12, %for.inc35.11 %15 = load i32, ptr %scevgep111, align 4, !tbaa !5 %cmp44 = icmp eq i32 %15, 0 br i1 %cmp44, label %if.then46, label %for.inc49 if.then46: ; preds = %for.inc35.12 %call47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1) br label %for.inc49 for.inc49: ; preds = %for.inc35.12, %if.then46 %arrayidx43.1 = getelementptr inbounds [14 x i32], ptr %H, i64 0, i64 2 %16 = load i32, ptr %arrayidx43.1, align 8, !tbaa !5 %cmp44.1 = icmp eq i32 %16, 0 br i1 %cmp44.1, label %if.then46.1, label %for.inc49.1 if.then46.1: ; preds = %for.inc49 %call47.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2) br label %for.inc49.1 for.inc49.1: ; preds = %if.then46.1, %for.inc49 %arrayidx43.2 = getelementptr inbounds [14 x i32], ptr %H, i64 0, i64 3 %17 = load i32, ptr %arrayidx43.2, align 4, !tbaa !5 %cmp44.2 = icmp eq i32 %17, 0 br i1 %cmp44.2, label %if.then46.2, label %for.inc49.2 if.then46.2: ; preds = %for.inc49.1 %call47.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3) br label %for.inc49.2 for.inc49.2: ; preds = %if.then46.2, %for.inc49.1 %arrayidx43.3 = getelementptr inbounds [14 x i32], ptr %H, i64 0, i64 4 %18 = load i32, ptr %arrayidx43.3, align 16, !tbaa !5 %cmp44.3 = icmp eq i32 %18, 0 br i1 %cmp44.3, label %if.then46.3, label %for.inc49.3 if.then46.3: ; preds = %for.inc49.2 %call47.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4) br label %for.inc49.3 for.inc49.3: ; preds = %if.then46.3, %for.inc49.2 %arrayidx43.4 = getelementptr inbounds [14 x i32], ptr %H, i64 0, i64 5 %19 = load i32, ptr %arrayidx43.4, align 4, !tbaa !5 %cmp44.4 = icmp eq i32 %19, 0 br i1 %cmp44.4, label %if.then46.4, label %for.inc49.4 if.then46.4: ; preds = %for.inc49.3 %call47.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5) br label %for.inc49.4 for.inc49.4: ; preds = %if.then46.4, %for.inc49.3 %arrayidx43.5 = getelementptr inbounds [14 x i32], ptr %H, i64 0, i64 6 %20 = load i32, ptr %arrayidx43.5, align 8, !tbaa !5 %cmp44.5 = icmp eq i32 %20, 0 br i1 %cmp44.5, label %if.then46.5, label %for.inc49.5 if.then46.5: ; preds = %for.inc49.4 %call47.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6) br label %for.inc49.5 for.inc49.5: ; preds = %if.then46.5, %for.inc49.4 %arrayidx43.6 = getelementptr inbounds [14 x i32], ptr %H, i64 0, i64 7 %21 = load i32, ptr %arrayidx43.6, align 4, !tbaa !5 %cmp44.6 = icmp eq i32 %21, 0 br i1 %cmp44.6, label %if.then46.6, label %for.inc49.6 if.then46.6: ; preds = %for.inc49.5 %call47.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7) br label %for.inc49.6 for.inc49.6: ; preds = %if.then46.6, %for.inc49.5 %arrayidx43.7 = getelementptr inbounds [14 x i32], ptr %H, i64 0, i64 8 %22 = load i32, ptr %arrayidx43.7, align 16, !tbaa !5 %cmp44.7 = icmp eq i32 %22, 0 br i1 %cmp44.7, label %if.then46.7, label %for.inc49.7 if.then46.7: ; preds = %for.inc49.6 %call47.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8) br label %for.inc49.7 for.inc49.7: ; preds = %if.then46.7, %for.inc49.6 %arrayidx43.8 = getelementptr inbounds [14 x i32], ptr %H, i64 0, i64 9 %23 = load i32, ptr %arrayidx43.8, align 4, !tbaa !5 %cmp44.8 = icmp eq i32 %23, 0 br i1 %cmp44.8, label %if.then46.8, label %for.inc49.8 if.then46.8: ; preds = %for.inc49.7 %call47.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9) br label %for.inc49.8 for.inc49.8: ; preds = %if.then46.8, %for.inc49.7 %arrayidx43.9 = getelementptr inbounds [14 x i32], ptr %H, i64 0, i64 10 %24 = load i32, ptr %arrayidx43.9, align 8, !tbaa !5 %cmp44.9 = icmp eq i32 %24, 0 br i1 %cmp44.9, label %if.then46.9, label %for.inc49.9 if.then46.9: ; preds = %for.inc49.8 %call47.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10) br label %for.inc49.9 for.inc49.9: ; preds = %if.then46.9, %for.inc49.8 %arrayidx43.10 = getelementptr inbounds [14 x i32], ptr %H, i64 0, i64 11 %25 = load i32, ptr %arrayidx43.10, align 4, !tbaa !5 %cmp44.10 = icmp eq i32 %25, 0 br i1 %cmp44.10, label %if.then46.10, label %for.inc49.10 if.then46.10: ; preds = %for.inc49.9 %call47.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11) br label %for.inc49.10 for.inc49.10: ; preds = %if.then46.10, %for.inc49.9 %arrayidx43.11 = getelementptr inbounds [14 x i32], ptr %H, i64 0, i64 12 %26 = load i32, ptr %arrayidx43.11, align 16, !tbaa !5 %cmp44.11 = icmp eq i32 %26, 0 br i1 %cmp44.11, label %if.then46.11, label %for.inc49.11 if.then46.11: ; preds = %for.inc49.10 %call47.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12) br label %for.inc49.11 for.inc49.11: ; preds = %if.then46.11, %for.inc49.10 %arrayidx43.12 = getelementptr inbounds [14 x i32], ptr %H, i64 0, i64 13 %27 = load i32, ptr %arrayidx43.12, align 4, !tbaa !5 %cmp44.12 = icmp eq i32 %27, 0 br i1 %cmp44.12, label %if.then46.12, label %for.inc49.12 if.then46.12: ; preds = %for.inc49.11 %call47.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 13) br label %for.inc49.12 for.inc49.12: ; preds = %if.then46.12, %for.inc49.11 %28 = load i32, ptr %scevgep112, align 4, !tbaa !5 %cmp58 = icmp eq i32 %28, 0 br i1 %cmp58, label %if.then60, label %for.inc63 if.then60: ; preds = %for.inc49.12 %call61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1) br label %for.inc63 for.inc63: ; preds = %for.inc49.12, %if.then60 %arrayidx57.1 = getelementptr inbounds [14 x i32], ptr %C, i64 0, i64 2 %29 = load i32, ptr %arrayidx57.1, align 8, !tbaa !5 %cmp58.1 = icmp eq i32 %29, 0 br i1 %cmp58.1, label %if.then60.1, label %for.inc63.1 if.then60.1: ; preds = %for.inc63 %call61.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2) br label %for.inc63.1 for.inc63.1: ; preds = %if.then60.1, %for.inc63 %arrayidx57.2 = getelementptr inbounds [14 x i32], ptr %C, i64 0, i64 3 %30 = load i32, ptr %arrayidx57.2, align 4, !tbaa !5 %cmp58.2 = icmp eq i32 %30, 0 br i1 %cmp58.2, label %if.then60.2, label %for.inc63.2 if.then60.2: ; preds = %for.inc63.1 %call61.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3) br label %for.inc63.2 for.inc63.2: ; preds = %if.then60.2, %for.inc63.1 %arrayidx57.3 = getelementptr inbounds [14 x i32], ptr %C, i64 0, i64 4 %31 = load i32, ptr %arrayidx57.3, align 16, !tbaa !5 %cmp58.3 = icmp eq i32 %31, 0 br i1 %cmp58.3, label %if.then60.3, label %for.inc63.3 if.then60.3: ; preds = %for.inc63.2 %call61.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4) br label %for.inc63.3 for.inc63.3: ; preds = %if.then60.3, %for.inc63.2 %arrayidx57.4 = getelementptr inbounds [14 x i32], ptr %C, i64 0, i64 5 %32 = load i32, ptr %arrayidx57.4, align 4, !tbaa !5 %cmp58.4 = icmp eq i32 %32, 0 br i1 %cmp58.4, label %if.then60.4, label %for.inc63.4 if.then60.4: ; preds = %for.inc63.3 %call61.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5) br label %for.inc63.4 for.inc63.4: ; preds = %if.then60.4, %for.inc63.3 %arrayidx57.5 = getelementptr inbounds [14 x i32], ptr %C, i64 0, i64 6 %33 = load i32, ptr %arrayidx57.5, align 8, !tbaa !5 %cmp58.5 = icmp eq i32 %33, 0 br i1 %cmp58.5, label %if.then60.5, label %for.inc63.5 if.then60.5: ; preds = %for.inc63.4 %call61.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6) br label %for.inc63.5 for.inc63.5: ; preds = %if.then60.5, %for.inc63.4 %arrayidx57.6 = getelementptr inbounds [14 x i32], ptr %C, i64 0, i64 7 %34 = load i32, ptr %arrayidx57.6, align 4, !tbaa !5 %cmp58.6 = icmp eq i32 %34, 0 br i1 %cmp58.6, label %if.then60.6, label %for.inc63.6 if.then60.6: ; preds = %for.inc63.5 %call61.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7) br label %for.inc63.6 for.inc63.6: ; preds = %if.then60.6, %for.inc63.5 %arrayidx57.7 = getelementptr inbounds [14 x i32], ptr %C, i64 0, i64 8 %35 = load i32, ptr %arrayidx57.7, align 16, !tbaa !5 %cmp58.7 = icmp eq i32 %35, 0 br i1 %cmp58.7, label %if.then60.7, label %for.inc63.7 if.then60.7: ; preds = %for.inc63.6 %call61.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8) br label %for.inc63.7 for.inc63.7: ; preds = %if.then60.7, %for.inc63.6 %arrayidx57.8 = getelementptr inbounds [14 x i32], ptr %C, i64 0, i64 9 %36 = load i32, ptr %arrayidx57.8, align 4, !tbaa !5 %cmp58.8 = icmp eq i32 %36, 0 br i1 %cmp58.8, label %if.then60.8, label %for.inc63.8 if.then60.8: ; preds = %for.inc63.7 %call61.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9) br label %for.inc63.8 for.inc63.8: ; preds = %if.then60.8, %for.inc63.7 %arrayidx57.9 = getelementptr inbounds [14 x i32], ptr %C, i64 0, i64 10 %37 = load i32, ptr %arrayidx57.9, align 8, !tbaa !5 %cmp58.9 = icmp eq i32 %37, 0 br i1 %cmp58.9, label %if.then60.9, label %for.inc63.9 if.then60.9: ; preds = %for.inc63.8 %call61.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10) br label %for.inc63.9 for.inc63.9: ; preds = %if.then60.9, %for.inc63.8 %arrayidx57.10 = getelementptr inbounds [14 x i32], ptr %C, i64 0, i64 11 %38 = load i32, ptr %arrayidx57.10, align 4, !tbaa !5 %cmp58.10 = icmp eq i32 %38, 0 br i1 %cmp58.10, label %if.then60.10, label %for.inc63.10 if.then60.10: ; preds = %for.inc63.9 %call61.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11) br label %for.inc63.10 for.inc63.10: ; preds = %if.then60.10, %for.inc63.9 %arrayidx57.11 = getelementptr inbounds [14 x i32], ptr %C, i64 0, i64 12 %39 = load i32, ptr %arrayidx57.11, align 16, !tbaa !5 %cmp58.11 = icmp eq i32 %39, 0 br i1 %cmp58.11, label %if.then60.11, label %for.inc63.11 if.then60.11: ; preds = %for.inc63.10 %call61.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12) br label %for.inc63.11 for.inc63.11: ; preds = %if.then60.11, %for.inc63.10 %arrayidx57.12 = getelementptr inbounds [14 x i32], ptr %C, i64 0, i64 13 %40 = load i32, ptr %arrayidx57.12, align 4, !tbaa !5 %cmp58.12 = icmp eq i32 %40, 0 br i1 %cmp58.12, label %if.then60.12, label %for.inc63.12 if.then60.12: ; preds = %for.inc63.11 %call61.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 13) br label %for.inc63.12 for.inc63.12: ; preds = %if.then60.12, %for.inc63.11 %41 = load i32, ptr %scevgep110, align 4, !tbaa !5 %cmp72 = icmp eq i32 %41, 0 br i1 %cmp72, label %if.then74, label %for.inc77 if.then74: ; preds = %for.inc63.12 %call75 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 1) br label %for.inc77 for.inc77: ; preds = %for.inc63.12, %if.then74 %arrayidx71.1 = getelementptr inbounds [14 x i32], ptr %D, i64 0, i64 2 %42 = load i32, ptr %arrayidx71.1, align 8, !tbaa !5 %cmp72.1 = icmp eq i32 %42, 0 br i1 %cmp72.1, label %if.then74.1, label %for.inc77.1 if.then74.1: ; preds = %for.inc77 %call75.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 2) br label %for.inc77.1 for.inc77.1: ; preds = %if.then74.1, %for.inc77 %arrayidx71.2 = getelementptr inbounds [14 x i32], ptr %D, i64 0, i64 3 %43 = load i32, ptr %arrayidx71.2, align 4, !tbaa !5 %cmp72.2 = icmp eq i32 %43, 0 br i1 %cmp72.2, label %if.then74.2, label %for.inc77.2 if.then74.2: ; preds = %for.inc77.1 %call75.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 3) br label %for.inc77.2 for.inc77.2: ; preds = %if.then74.2, %for.inc77.1 %arrayidx71.3 = getelementptr inbounds [14 x i32], ptr %D, i64 0, i64 4 %44 = load i32, ptr %arrayidx71.3, align 16, !tbaa !5 %cmp72.3 = icmp eq i32 %44, 0 br i1 %cmp72.3, label %if.then74.3, label %for.inc77.3 if.then74.3: ; preds = %for.inc77.2 %call75.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 4) br label %for.inc77.3 for.inc77.3: ; preds = %if.then74.3, %for.inc77.2 %arrayidx71.4 = getelementptr inbounds [14 x i32], ptr %D, i64 0, i64 5 %45 = load i32, ptr %arrayidx71.4, align 4, !tbaa !5 %cmp72.4 = icmp eq i32 %45, 0 br i1 %cmp72.4, label %if.then74.4, label %for.inc77.4 if.then74.4: ; preds = %for.inc77.3 %call75.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 5) br label %for.inc77.4 for.inc77.4: ; preds = %if.then74.4, %for.inc77.3 %arrayidx71.5 = getelementptr inbounds [14 x i32], ptr %D, i64 0, i64 6 %46 = load i32, ptr %arrayidx71.5, align 8, !tbaa !5 %cmp72.5 = icmp eq i32 %46, 0 br i1 %cmp72.5, label %if.then74.5, label %for.inc77.5 if.then74.5: ; preds = %for.inc77.4 %call75.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 6) br label %for.inc77.5 for.inc77.5: ; preds = %if.then74.5, %for.inc77.4 %arrayidx71.6 = getelementptr inbounds [14 x i32], ptr %D, i64 0, i64 7 %47 = load i32, ptr %arrayidx71.6, align 4, !tbaa !5 %cmp72.6 = icmp eq i32 %47, 0 br i1 %cmp72.6, label %if.then74.6, label %for.inc77.6 if.then74.6: ; preds = %for.inc77.5 %call75.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 7) br label %for.inc77.6 for.inc77.6: ; preds = %if.then74.6, %for.inc77.5 %arrayidx71.7 = getelementptr inbounds [14 x i32], ptr %D, i64 0, i64 8 %48 = load i32, ptr %arrayidx71.7, align 16, !tbaa !5 %cmp72.7 = icmp eq i32 %48, 0 br i1 %cmp72.7, label %if.then74.7, label %for.inc77.7 if.then74.7: ; preds = %for.inc77.6 %call75.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 8) br label %for.inc77.7 for.inc77.7: ; preds = %if.then74.7, %for.inc77.6 %arrayidx71.8 = getelementptr inbounds [14 x i32], ptr %D, i64 0, i64 9 %49 = load i32, ptr %arrayidx71.8, align 4, !tbaa !5 %cmp72.8 = icmp eq i32 %49, 0 br i1 %cmp72.8, label %if.then74.8, label %for.inc77.8 if.then74.8: ; preds = %for.inc77.7 %call75.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 9) br label %for.inc77.8 for.inc77.8: ; preds = %if.then74.8, %for.inc77.7 %arrayidx71.9 = getelementptr inbounds [14 x i32], ptr %D, i64 0, i64 10 %50 = load i32, ptr %arrayidx71.9, align 8, !tbaa !5 %cmp72.9 = icmp eq i32 %50, 0 br i1 %cmp72.9, label %if.then74.9, label %for.inc77.9 if.then74.9: ; preds = %for.inc77.8 %call75.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 10) br label %for.inc77.9 for.inc77.9: ; preds = %if.then74.9, %for.inc77.8 %arrayidx71.10 = getelementptr inbounds [14 x i32], ptr %D, i64 0, i64 11 %51 = load i32, ptr %arrayidx71.10, align 4, !tbaa !5 %cmp72.10 = icmp eq i32 %51, 0 br i1 %cmp72.10, label %if.then74.10, label %for.inc77.10 if.then74.10: ; preds = %for.inc77.9 %call75.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 11) br label %for.inc77.10 for.inc77.10: ; preds = %if.then74.10, %for.inc77.9 %arrayidx71.11 = getelementptr inbounds [14 x i32], ptr %D, i64 0, i64 12 %52 = load i32, ptr %arrayidx71.11, align 16, !tbaa !5 %cmp72.11 = icmp eq i32 %52, 0 br i1 %cmp72.11, label %if.then74.11, label %for.inc77.11 if.then74.11: ; preds = %for.inc77.10 %call75.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 12) br label %for.inc77.11 for.inc77.11: ; preds = %if.then74.11, %for.inc77.10 %arrayidx71.12 = getelementptr inbounds [14 x i32], ptr %D, i64 0, i64 13 %53 = load i32, ptr %arrayidx71.12, align 4, !tbaa !5 %cmp72.12 = icmp eq i32 %53, 0 br i1 %cmp72.12, label %if.then74.12, label %for.inc77.12 if.then74.12: ; preds = %for.inc77.11 %call75.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 13) br label %for.inc77.12 for.inc77.12: ; preds = %if.then74.12, %for.inc77.11 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %dummy) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %chara) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %number) #4 call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %D) #4 call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %C) #4 call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %H) #4 call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %S) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main() { int n, i, c[52] = { 0 }, j, d, l; char k[2]; scanf("%d", &n); for (i = 0; i < n; ++i) { scanf("%s %d", k, &j); switch(k[0]) { case 'S': c[j - 1]++; break; case 'H': c[j + 12]++; break; case 'C': c[j + 25]++; break; case 'D': c[j + 38]++; } } for (i = 0; i < 52; ++i) { d = i / 13; l = i + 1 - (d * 13); if(!c[i]) { switch(d) { case 0: printf("S %d\n", l); break; case 1: printf("H %d\n", l); break; case 2: printf("C %d\n", l); break; case 3: printf("D %d\n", l); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214369/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214369/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%s %d\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"S %d\0A\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"H %d\0A\00", align 1 @.str.4 = private unnamed_addr constant [6 x i8] c"C %d\0A\00", align 1 @.str.5 = private unnamed_addr constant [6 x i8] c"D %d\0A\00", align 1 @reltable.main = private unnamed_addr constant [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32)], align 4 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %c = alloca [52 x i32], align 16 %j = alloca i32, align 4 %k = alloca [2 x i8], align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %c) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %c, i8 0, i64 208, i1 false) call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %j) #5 call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %k) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp49 = icmp sgt i32 %0, 0 br i1 %cmp49, label %for.body, label %for.body21.preheader for.body: ; preds = %entry, %for.inc %i.050 = phi i32 [ %inc17, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %k, ptr noundef nonnull %j) %1 = load i8, ptr %k, align 1, !tbaa !9 %conv = sext i8 %1 to i32 switch i32 %conv, label %for.inc [ i32 83, label %sw.bb i32 72, label %sw.bb3 i32 67, label %sw.bb7 i32 68, label %sw.bb12 ] sw.bb: ; preds = %for.body %2 = load i32, ptr %j, align 4, !tbaa !5 %sub = add nsw i32 %2, -1 br label %for.inc.sink.split sw.bb3: ; preds = %for.body %3 = load i32, ptr %j, align 4, !tbaa !5 %add = add nsw i32 %3, 12 br label %for.inc.sink.split sw.bb7: ; preds = %for.body %4 = load i32, ptr %j, align 4, !tbaa !5 %add8 = add nsw i32 %4, 25 br label %for.inc.sink.split sw.bb12: ; preds = %for.body %5 = load i32, ptr %j, align 4, !tbaa !5 %add13 = add nsw i32 %5, 38 br label %for.inc.sink.split for.inc.sink.split: ; preds = %sw.bb12, %sw.bb7, %sw.bb3, %sw.bb %add13.sink = phi i32 [ %add13, %sw.bb12 ], [ %add8, %sw.bb7 ], [ %add, %sw.bb3 ], [ %sub, %sw.bb ] %idxprom14 = sext i32 %add13.sink to i64 %arrayidx15 = getelementptr inbounds [52 x i32], ptr %c, i64 0, i64 %idxprom14 %6 = load i32, ptr %arrayidx15, align 4, !tbaa !5 %inc = add nsw i32 %6, 1 store i32 %inc, ptr %arrayidx15, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.inc.sink.split, %for.body %inc17 = add nuw nsw i32 %i.050, 1 %7 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc17, %7 br i1 %cmp, label %for.body, label %for.body21.preheader, !llvm.loop !10 for.body21.preheader: ; preds = %for.inc, %entry br label %for.body21 for.body21: ; preds = %for.body21.preheader, %for.inc35 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc35 ], [ 0, %for.body21.preheader ] %div.lhs.trunc = trunc i64 %indvars.iv to i8 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %arrayidx25 = getelementptr inbounds [52 x i32], ptr %c, i64 0, i64 %indvars.iv %8 = load i32, ptr %arrayidx25, align 4, !tbaa !5 %tobool.not = icmp eq i32 %8, 0 %9 = icmp ult i8 %div.lhs.trunc, 52 %or.cond = and i1 %tobool.not, %9 br i1 %or.cond, label %switch.lookup, label %for.inc35 switch.lookup: ; preds = %for.body21 %div48 = udiv i8 %div.lhs.trunc, 13 %div.zext = zext i8 %div48 to i32 %mul.neg = mul nsw i32 %div.zext, -13 %10 = trunc i64 %indvars.iv.next to i32 %sub23 = add nsw i32 %mul.neg, %10 %11 = zext i8 %div48 to i64 %reltable.shift = shl i64 %11, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) %call33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %reltable.intrinsic, i32 noundef %sub23) br label %for.inc35 for.inc35: ; preds = %switch.lookup, %for.body21 %exitcond.not = icmp eq i64 %indvars.iv.next, 52 br i1 %exitcond.not, label %for.end37, label %for.body21, !llvm.loop !12 for.end37: ; preds = %for.inc35 call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %k) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %j) #5 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %c) #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 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 willreturn memory(argmem: read) declare ptr @llvm.load.relative.i64(ptr, i64) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 willreturn memory(argmem: read) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include <stdio.h> int main(void) { int c[4][13] = {0}; int n, i; scanf("%d", &n); for(i = 0; n > i; i++){ char bm; int bi; scanf("%*c%c%*c%d", &bm, &bi); switch(bm){ case 'S': c[0][bi-1] = 1; break; case 'H': c[1][bi-1] = 1; break; case 'C': c[2][bi-1] = 1; break; case 'D': c[3][bi-1] = 1; break; } } for(i = 0; 52 > i; i++){ if(c[i/13][i%13] == 0) printf("%c %d\n", i/13 == 0? 'S' : i/13 == 1 ? 'H' : i/13 == 2 ? 'C' : 'D', i%13+1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214411/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214411/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [11 x i8] c"%*c%c%*c%d\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %c = alloca [4 x [13 x i32]], align 16 %n = alloca i32, align 4 %bm = alloca i8, align 1 %bi = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %c) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %c, i8 0, i64 208, i1 false) call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp59 = icmp sgt i32 %0, 0 br i1 %cmp59, label %for.body, label %for.body21.preheader for.body: ; preds = %entry, %sw.epilog %i.060 = phi i32 [ %inc, %sw.epilog ], [ 0, %entry ] call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %bm) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %bi) #4 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %bm, ptr noundef nonnull %bi) %1 = load i8, ptr %bm, align 1, !tbaa !9 %conv = sext i8 %1 to i32 switch i32 %conv, label %sw.epilog [ i32 83, label %sw.bb i32 72, label %sw.bb3 i32 67, label %sw.bb8 i32 68, label %sw.bb13 ] sw.bb: ; preds = %for.body %2 = load i32, ptr %bi, align 4, !tbaa !5 %sub = add nsw i32 %2, -1 %idxprom = sext i32 %sub to i64 %arrayidx2 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 %idxprom br label %sw.epilog.sink.split sw.bb3: ; preds = %for.body %3 = load i32, ptr %bi, align 4, !tbaa !5 %sub5 = add nsw i32 %3, -1 %idxprom6 = sext i32 %sub5 to i64 %arrayidx7 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 1, i64 %idxprom6 br label %sw.epilog.sink.split sw.bb8: ; preds = %for.body %4 = load i32, ptr %bi, align 4, !tbaa !5 %sub10 = add nsw i32 %4, -1 %idxprom11 = sext i32 %sub10 to i64 %arrayidx12 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 2, i64 %idxprom11 br label %sw.epilog.sink.split sw.bb13: ; preds = %for.body %5 = load i32, ptr %bi, align 4, !tbaa !5 %sub15 = add nsw i32 %5, -1 %idxprom16 = sext i32 %sub15 to i64 %arrayidx17 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 3, i64 %idxprom16 br label %sw.epilog.sink.split sw.epilog.sink.split: ; preds = %sw.bb, %sw.bb3, %sw.bb8, %sw.bb13 %arrayidx17.sink = phi ptr [ %arrayidx17, %sw.bb13 ], [ %arrayidx12, %sw.bb8 ], [ %arrayidx7, %sw.bb3 ], [ %arrayidx2, %sw.bb ] store i32 1, ptr %arrayidx17.sink, align 4, !tbaa !5 br label %sw.epilog sw.epilog: ; preds = %sw.epilog.sink.split, %for.body call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %bi) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %bm) #4 %inc = add nuw nsw i32 %i.060, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp sgt i32 %6, %inc br i1 %cmp, label %for.body, label %for.body21.preheader, !llvm.loop !10 for.body21.preheader: ; preds = %sw.epilog, %entry br label %for.body21 for.body21: ; preds = %for.body21.preheader, %for.inc44 %i.161 = phi i32 [ %inc45, %for.inc44 ], [ 0, %for.body21.preheader ] %div.lhs.trunc = trunc i32 %i.161 to i8 %div57 = udiv i8 %div.lhs.trunc, 13 %idxprom22 = zext i8 %div57 to i64 %rem58 = urem i8 %div.lhs.trunc, 13 %idxprom24 = zext i8 %rem58 to i64 %arrayidx25 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 %idxprom22, i64 %idxprom24 %7 = load i32, ptr %arrayidx25, align 4, !tbaa !5 %cmp26 = icmp eq i32 %7, 0 br i1 %cmp26, label %if.then, label %for.inc44 if.then: ; preds = %for.body21 %cmp29 = icmp ult i32 %i.161, 13 br i1 %cmp29, label %cond.end40, label %cond.false cond.false: ; preds = %if.then %i.1.off = add nsw i32 %i.161, -13 %cmp32 = icmp ult i32 %i.1.off, 13 br i1 %cmp32, label %cond.end40, label %cond.false35 cond.false35: ; preds = %cond.false %i.1.off56 = add nsw i32 %i.161, -26 %cmp37 = icmp ult i32 %i.1.off56, 13 %cond = select i1 %cmp37, i32 67, i32 68 br label %cond.end40 cond.end40: ; preds = %cond.false35, %cond.false, %if.then %cond41 = phi i32 [ 83, %if.then ], [ %cond, %cond.false35 ], [ 72, %cond.false ] %narrow = add nuw nsw i8 %rem58, 1 %add = zext i8 %narrow to i32 %call43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %cond41, i32 noundef %add) br label %for.inc44 for.inc44: ; preds = %for.body21, %cond.end40 %inc45 = add nuw nsw i32 %i.161, 1 %exitcond.not = icmp eq i32 %inc45, 52 br i1 %exitcond.not, label %for.end46, label %for.body21, !llvm.loop !12 for.end46: ; preds = %for.inc44 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %c) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include<stdio.h> int main(){ int i,j; int n; char suit; int num; int card[4][14]; for(i=0;i<14;i++){ card[0][i]=0; card[1][i]=0; card[2][i]=0; card[3][i]=0; } scanf("%d",&n); for(i=0;i<n;i++){ scanf(" %c %d",&suit,&num); if(suit=='S') card[0][num]=num; if(suit=='H') card[1][num]=num; if(suit=='C') card[2][num]=num; if(suit=='D') card[3][num]=num; } for(i=0;i<4;i++){ for(j=1;j<=13;j++){ if(card[i][j]!=j){ if(i==0) printf("S %d\n",j); if(i==1) printf("H %d\n",j); if(i==2) printf("C %d\n",j); if(i==3) printf("D %d\n",j); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214455/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214455/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c" %c %d\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"S %d\0A\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"H %d\0A\00", align 1 @.str.4 = private unnamed_addr constant [6 x i8] c"C %d\0A\00", align 1 @.str.5 = private unnamed_addr constant [6 x i8] c"D %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %suit = alloca i8, align 1 %num = alloca i32, align 4 %card = alloca [4 x [14 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %suit) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #4 call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %card) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(224) %card, i8 0, i64 224, 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 %cmp12114 = icmp sgt i32 %0, 0 br i1 %cmp12114, label %for.body13, label %for.cond51.preheader.preheader for.body13: ; preds = %entry, %for.inc44 %i.1115 = phi i32 [ %inc45, %for.inc44 ], [ 0, %entry ] %call14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %suit, ptr noundef nonnull %num) %1 = load i8, ptr %suit, align 1, !tbaa !9 switch i8 %1, label %for.inc44 [ i8 83, label %if.end.thread i8 72, label %if.then23 i8 67, label %if.then31 i8 68, label %if.then39 ] if.end.thread: ; preds = %for.body13 %2 = load i32, ptr %num, align 4, !tbaa !5 %idxprom18 = sext i32 %2 to i64 %arrayidx19 = getelementptr inbounds [14 x i32], ptr %card, i64 0, i64 %idxprom18 store i32 %2, ptr %arrayidx19, align 4, !tbaa !5 br label %for.inc44 if.then23: ; preds = %for.body13 %3 = load i32, ptr %num, align 4, !tbaa !5 %idxprom25 = sext i32 %3 to i64 %arrayidx26 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 %idxprom25 store i32 %3, ptr %arrayidx26, align 4, !tbaa !5 br label %for.inc44 if.then31: ; preds = %for.body13 %4 = load i32, ptr %num, align 4, !tbaa !5 %idxprom33 = sext i32 %4 to i64 %arrayidx34 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 %idxprom33 store i32 %4, ptr %arrayidx34, align 4, !tbaa !5 br label %for.inc44 if.then39: ; preds = %for.body13 %5 = load i32, ptr %num, align 4, !tbaa !5 %idxprom41 = sext i32 %5 to i64 %arrayidx42 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 %idxprom41 store i32 %5, ptr %arrayidx42, align 4, !tbaa !5 br label %for.inc44 for.inc44: ; preds = %for.body13, %if.then23, %if.end.thread, %if.then31, %if.then39 %inc45 = add nuw nsw i32 %i.1115, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp12 = icmp slt i32 %inc45, %6 br i1 %cmp12, label %for.body13, label %for.cond51.preheader.preheader, !llvm.loop !10 for.cond51.preheader.preheader: ; preds = %for.inc44, %entry br label %for.cond51.preheader for.cond51.preheader: ; preds = %for.cond51.preheader.preheader, %for.inc86 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc86 ], [ 0, %for.cond51.preheader.preheader ] %7 = trunc i64 %indvars.iv to i32 switch i32 %7, label %for.inc86 [ i32 0, label %for.body54.us.preheader i32 1, label %for.body54.us118.preheader i32 2, label %for.body54.us128.preheader i32 3, label %for.body54.us138.preheader ] for.body54.us138.preheader: ; preds = %for.cond51.preheader %arrayidx58.us141 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1 %8 = load i32, ptr %arrayidx58.us141, align 4, !tbaa !5 %cmp59.not.us142 = icmp eq i32 %8, 1 br i1 %cmp59.not.us142, label %for.inc83.us144, label %if.then61.us143 for.body54.us128.preheader: ; preds = %for.cond51.preheader %arrayidx58.us131 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1 %9 = load i32, ptr %arrayidx58.us131, align 4, !tbaa !5 %cmp59.not.us132 = icmp eq i32 %9, 1 br i1 %cmp59.not.us132, label %for.inc83.us134, label %if.then61.us133 for.body54.us118.preheader: ; preds = %for.cond51.preheader %arrayidx58.us121 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1 %10 = load i32, ptr %arrayidx58.us121, align 4, !tbaa !5 %cmp59.not.us122 = icmp eq i32 %10, 1 br i1 %cmp59.not.us122, label %for.inc83.us124, label %if.then61.us123 for.body54.us.preheader: ; preds = %for.cond51.preheader %arrayidx58.us = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1 %11 = load i32, ptr %arrayidx58.us, align 4, !tbaa !5 %cmp59.not.us = icmp eq i32 %11, 1 br i1 %cmp59.not.us, label %for.inc83.us, label %if.then61.us if.then61.us: ; preds = %for.body54.us.preheader %call65.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 1) br label %for.inc83.us for.inc83.us: ; preds = %if.then61.us, %for.body54.us.preheader %arrayidx58.us.1 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %12 = load i32, ptr %arrayidx58.us.1, align 8, !tbaa !5 %cmp59.not.us.1 = icmp eq i32 %12, 2 br i1 %cmp59.not.us.1, label %for.inc83.us.1, label %if.then61.us.1 if.then61.us.1: ; preds = %for.inc83.us %call65.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 2) br label %for.inc83.us.1 for.inc83.us.1: ; preds = %if.then61.us.1, %for.inc83.us %arrayidx58.us.2 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %13 = load i32, ptr %arrayidx58.us.2, align 4, !tbaa !5 %cmp59.not.us.2 = icmp eq i32 %13, 3 br i1 %cmp59.not.us.2, label %for.inc83.us.2, label %if.then61.us.2 if.then61.us.2: ; preds = %for.inc83.us.1 %call65.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 3) br label %for.inc83.us.2 for.inc83.us.2: ; preds = %if.then61.us.2, %for.inc83.us.1 %arrayidx58.us.3 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %14 = load i32, ptr %arrayidx58.us.3, align 8, !tbaa !5 %cmp59.not.us.3 = icmp eq i32 %14, 4 br i1 %cmp59.not.us.3, label %for.inc83.us.3, label %if.then61.us.3 if.then61.us.3: ; preds = %for.inc83.us.2 %call65.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 4) br label %for.inc83.us.3 for.inc83.us.3: ; preds = %if.then61.us.3, %for.inc83.us.2 %arrayidx58.us.4 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %15 = load i32, ptr %arrayidx58.us.4, align 4, !tbaa !5 %cmp59.not.us.4 = icmp eq i32 %15, 5 br i1 %cmp59.not.us.4, label %for.inc83.us.4, label %if.then61.us.4 if.then61.us.4: ; preds = %for.inc83.us.3 %call65.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 5) br label %for.inc83.us.4 for.inc83.us.4: ; preds = %if.then61.us.4, %for.inc83.us.3 %arrayidx58.us.5 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %16 = load i32, ptr %arrayidx58.us.5, align 8, !tbaa !5 %cmp59.not.us.5 = icmp eq i32 %16, 6 br i1 %cmp59.not.us.5, label %for.inc83.us.5, label %if.then61.us.5 if.then61.us.5: ; preds = %for.inc83.us.4 %call65.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 6) br label %for.inc83.us.5 for.inc83.us.5: ; preds = %if.then61.us.5, %for.inc83.us.4 %arrayidx58.us.6 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %17 = load i32, ptr %arrayidx58.us.6, align 4, !tbaa !5 %cmp59.not.us.6 = icmp eq i32 %17, 7 br i1 %cmp59.not.us.6, label %for.inc83.us.6, label %if.then61.us.6 if.then61.us.6: ; preds = %for.inc83.us.5 %call65.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 7) br label %for.inc83.us.6 for.inc83.us.6: ; preds = %if.then61.us.6, %for.inc83.us.5 %arrayidx58.us.7 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %18 = load i32, ptr %arrayidx58.us.7, align 8, !tbaa !5 %cmp59.not.us.7 = icmp eq i32 %18, 8 br i1 %cmp59.not.us.7, label %for.inc83.us.7, label %if.then61.us.7 if.then61.us.7: ; preds = %for.inc83.us.6 %call65.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 8) br label %for.inc83.us.7 for.inc83.us.7: ; preds = %if.then61.us.7, %for.inc83.us.6 %arrayidx58.us.8 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %19 = load i32, ptr %arrayidx58.us.8, align 4, !tbaa !5 %cmp59.not.us.8 = icmp eq i32 %19, 9 br i1 %cmp59.not.us.8, label %for.inc83.us.8, label %if.then61.us.8 if.then61.us.8: ; preds = %for.inc83.us.7 %call65.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 9) br label %for.inc83.us.8 for.inc83.us.8: ; preds = %if.then61.us.8, %for.inc83.us.7 %arrayidx58.us.9 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %20 = load i32, ptr %arrayidx58.us.9, align 8, !tbaa !5 %cmp59.not.us.9 = icmp eq i32 %20, 10 br i1 %cmp59.not.us.9, label %for.inc83.us.9, label %if.then61.us.9 if.then61.us.9: ; preds = %for.inc83.us.8 %call65.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 10) br label %for.inc83.us.9 for.inc83.us.9: ; preds = %if.then61.us.9, %for.inc83.us.8 %arrayidx58.us.10 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %21 = load i32, ptr %arrayidx58.us.10, align 4, !tbaa !5 %cmp59.not.us.10 = icmp eq i32 %21, 11 br i1 %cmp59.not.us.10, label %for.inc83.us.10, label %if.then61.us.10 if.then61.us.10: ; preds = %for.inc83.us.9 %call65.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 11) br label %for.inc83.us.10 for.inc83.us.10: ; preds = %if.then61.us.10, %for.inc83.us.9 %arrayidx58.us.11 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %22 = load i32, ptr %arrayidx58.us.11, align 8, !tbaa !5 %cmp59.not.us.11 = icmp eq i32 %22, 12 br i1 %cmp59.not.us.11, label %for.inc83.us.11, label %if.then61.us.11 if.then61.us.11: ; preds = %for.inc83.us.10 %call65.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 12) br label %for.inc83.us.11 for.inc83.us.11: ; preds = %if.then61.us.11, %for.inc83.us.10 %arrayidx58.us.12 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 13 %23 = load i32, ptr %arrayidx58.us.12, align 4, !tbaa !5 %cmp59.not.us.12 = icmp eq i32 %23, 13 br i1 %cmp59.not.us.12, label %for.inc86, label %for.inc86.sink.split if.then61.us123: ; preds = %for.body54.us118.preheader %call70.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1) br label %for.inc83.us124 for.inc83.us124: ; preds = %if.then61.us123, %for.body54.us118.preheader %arrayidx58.us121.1 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %24 = load i32, ptr %arrayidx58.us121.1, align 8, !tbaa !5 %cmp59.not.us122.1 = icmp eq i32 %24, 2 br i1 %cmp59.not.us122.1, label %for.inc83.us124.1, label %if.then61.us123.1 if.then61.us123.1: ; preds = %for.inc83.us124 %call70.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2) br label %for.inc83.us124.1 for.inc83.us124.1: ; preds = %if.then61.us123.1, %for.inc83.us124 %arrayidx58.us121.2 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %25 = load i32, ptr %arrayidx58.us121.2, align 4, !tbaa !5 %cmp59.not.us122.2 = icmp eq i32 %25, 3 br i1 %cmp59.not.us122.2, label %for.inc83.us124.2, label %if.then61.us123.2 if.then61.us123.2: ; preds = %for.inc83.us124.1 %call70.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3) br label %for.inc83.us124.2 for.inc83.us124.2: ; preds = %if.then61.us123.2, %for.inc83.us124.1 %arrayidx58.us121.3 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %26 = load i32, ptr %arrayidx58.us121.3, align 8, !tbaa !5 %cmp59.not.us122.3 = icmp eq i32 %26, 4 br i1 %cmp59.not.us122.3, label %for.inc83.us124.3, label %if.then61.us123.3 if.then61.us123.3: ; preds = %for.inc83.us124.2 %call70.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4) br label %for.inc83.us124.3 for.inc83.us124.3: ; preds = %if.then61.us123.3, %for.inc83.us124.2 %arrayidx58.us121.4 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %27 = load i32, ptr %arrayidx58.us121.4, align 4, !tbaa !5 %cmp59.not.us122.4 = icmp eq i32 %27, 5 br i1 %cmp59.not.us122.4, label %for.inc83.us124.4, label %if.then61.us123.4 if.then61.us123.4: ; preds = %for.inc83.us124.3 %call70.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5) br label %for.inc83.us124.4 for.inc83.us124.4: ; preds = %if.then61.us123.4, %for.inc83.us124.3 %arrayidx58.us121.5 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %28 = load i32, ptr %arrayidx58.us121.5, align 8, !tbaa !5 %cmp59.not.us122.5 = icmp eq i32 %28, 6 br i1 %cmp59.not.us122.5, label %for.inc83.us124.5, label %if.then61.us123.5 if.then61.us123.5: ; preds = %for.inc83.us124.4 %call70.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6) br label %for.inc83.us124.5 for.inc83.us124.5: ; preds = %if.then61.us123.5, %for.inc83.us124.4 %arrayidx58.us121.6 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %29 = load i32, ptr %arrayidx58.us121.6, align 4, !tbaa !5 %cmp59.not.us122.6 = icmp eq i32 %29, 7 br i1 %cmp59.not.us122.6, label %for.inc83.us124.6, label %if.then61.us123.6 if.then61.us123.6: ; preds = %for.inc83.us124.5 %call70.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7) br label %for.inc83.us124.6 for.inc83.us124.6: ; preds = %if.then61.us123.6, %for.inc83.us124.5 %arrayidx58.us121.7 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %30 = load i32, ptr %arrayidx58.us121.7, align 8, !tbaa !5 %cmp59.not.us122.7 = icmp eq i32 %30, 8 br i1 %cmp59.not.us122.7, label %for.inc83.us124.7, label %if.then61.us123.7 if.then61.us123.7: ; preds = %for.inc83.us124.6 %call70.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8) br label %for.inc83.us124.7 for.inc83.us124.7: ; preds = %if.then61.us123.7, %for.inc83.us124.6 %arrayidx58.us121.8 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %31 = load i32, ptr %arrayidx58.us121.8, align 4, !tbaa !5 %cmp59.not.us122.8 = icmp eq i32 %31, 9 br i1 %cmp59.not.us122.8, label %for.inc83.us124.8, label %if.then61.us123.8 if.then61.us123.8: ; preds = %for.inc83.us124.7 %call70.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9) br label %for.inc83.us124.8 for.inc83.us124.8: ; preds = %if.then61.us123.8, %for.inc83.us124.7 %arrayidx58.us121.9 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %32 = load i32, ptr %arrayidx58.us121.9, align 8, !tbaa !5 %cmp59.not.us122.9 = icmp eq i32 %32, 10 br i1 %cmp59.not.us122.9, label %for.inc83.us124.9, label %if.then61.us123.9 if.then61.us123.9: ; preds = %for.inc83.us124.8 %call70.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10) br label %for.inc83.us124.9 for.inc83.us124.9: ; preds = %if.then61.us123.9, %for.inc83.us124.8 %arrayidx58.us121.10 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %33 = load i32, ptr %arrayidx58.us121.10, align 4, !tbaa !5 %cmp59.not.us122.10 = icmp eq i32 %33, 11 br i1 %cmp59.not.us122.10, label %for.inc83.us124.10, label %if.then61.us123.10 if.then61.us123.10: ; preds = %for.inc83.us124.9 %call70.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11) br label %for.inc83.us124.10 for.inc83.us124.10: ; preds = %if.then61.us123.10, %for.inc83.us124.9 %arrayidx58.us121.11 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %34 = load i32, ptr %arrayidx58.us121.11, align 8, !tbaa !5 %cmp59.not.us122.11 = icmp eq i32 %34, 12 br i1 %cmp59.not.us122.11, label %for.inc83.us124.11, label %if.then61.us123.11 if.then61.us123.11: ; preds = %for.inc83.us124.10 %call70.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12) br label %for.inc83.us124.11 for.inc83.us124.11: ; preds = %if.then61.us123.11, %for.inc83.us124.10 %arrayidx58.us121.12 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 13 %35 = load i32, ptr %arrayidx58.us121.12, align 4, !tbaa !5 %cmp59.not.us122.12 = icmp eq i32 %35, 13 br i1 %cmp59.not.us122.12, label %for.inc86, label %for.inc86.sink.split if.then61.us133: ; preds = %for.body54.us128.preheader %call75.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1) br label %for.inc83.us134 for.inc83.us134: ; preds = %if.then61.us133, %for.body54.us128.preheader %arrayidx58.us131.1 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %36 = load i32, ptr %arrayidx58.us131.1, align 8, !tbaa !5 %cmp59.not.us132.1 = icmp eq i32 %36, 2 br i1 %cmp59.not.us132.1, label %for.inc83.us134.1, label %if.then61.us133.1 if.then61.us133.1: ; preds = %for.inc83.us134 %call75.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2) br label %for.inc83.us134.1 for.inc83.us134.1: ; preds = %if.then61.us133.1, %for.inc83.us134 %arrayidx58.us131.2 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %37 = load i32, ptr %arrayidx58.us131.2, align 4, !tbaa !5 %cmp59.not.us132.2 = icmp eq i32 %37, 3 br i1 %cmp59.not.us132.2, label %for.inc83.us134.2, label %if.then61.us133.2 if.then61.us133.2: ; preds = %for.inc83.us134.1 %call75.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3) br label %for.inc83.us134.2 for.inc83.us134.2: ; preds = %if.then61.us133.2, %for.inc83.us134.1 %arrayidx58.us131.3 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %38 = load i32, ptr %arrayidx58.us131.3, align 8, !tbaa !5 %cmp59.not.us132.3 = icmp eq i32 %38, 4 br i1 %cmp59.not.us132.3, label %for.inc83.us134.3, label %if.then61.us133.3 if.then61.us133.3: ; preds = %for.inc83.us134.2 %call75.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4) br label %for.inc83.us134.3 for.inc83.us134.3: ; preds = %if.then61.us133.3, %for.inc83.us134.2 %arrayidx58.us131.4 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %39 = load i32, ptr %arrayidx58.us131.4, align 4, !tbaa !5 %cmp59.not.us132.4 = icmp eq i32 %39, 5 br i1 %cmp59.not.us132.4, label %for.inc83.us134.4, label %if.then61.us133.4 if.then61.us133.4: ; preds = %for.inc83.us134.3 %call75.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5) br label %for.inc83.us134.4 for.inc83.us134.4: ; preds = %if.then61.us133.4, %for.inc83.us134.3 %arrayidx58.us131.5 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %40 = load i32, ptr %arrayidx58.us131.5, align 8, !tbaa !5 %cmp59.not.us132.5 = icmp eq i32 %40, 6 br i1 %cmp59.not.us132.5, label %for.inc83.us134.5, label %if.then61.us133.5 if.then61.us133.5: ; preds = %for.inc83.us134.4 %call75.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6) br label %for.inc83.us134.5 for.inc83.us134.5: ; preds = %if.then61.us133.5, %for.inc83.us134.4 %arrayidx58.us131.6 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %41 = load i32, ptr %arrayidx58.us131.6, align 4, !tbaa !5 %cmp59.not.us132.6 = icmp eq i32 %41, 7 br i1 %cmp59.not.us132.6, label %for.inc83.us134.6, label %if.then61.us133.6 if.then61.us133.6: ; preds = %for.inc83.us134.5 %call75.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7) br label %for.inc83.us134.6 for.inc83.us134.6: ; preds = %if.then61.us133.6, %for.inc83.us134.5 %arrayidx58.us131.7 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %42 = load i32, ptr %arrayidx58.us131.7, align 8, !tbaa !5 %cmp59.not.us132.7 = icmp eq i32 %42, 8 br i1 %cmp59.not.us132.7, label %for.inc83.us134.7, label %if.then61.us133.7 if.then61.us133.7: ; preds = %for.inc83.us134.6 %call75.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8) br label %for.inc83.us134.7 for.inc83.us134.7: ; preds = %if.then61.us133.7, %for.inc83.us134.6 %arrayidx58.us131.8 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %43 = load i32, ptr %arrayidx58.us131.8, align 4, !tbaa !5 %cmp59.not.us132.8 = icmp eq i32 %43, 9 br i1 %cmp59.not.us132.8, label %for.inc83.us134.8, label %if.then61.us133.8 if.then61.us133.8: ; preds = %for.inc83.us134.7 %call75.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9) br label %for.inc83.us134.8 for.inc83.us134.8: ; preds = %if.then61.us133.8, %for.inc83.us134.7 %arrayidx58.us131.9 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %44 = load i32, ptr %arrayidx58.us131.9, align 8, !tbaa !5 %cmp59.not.us132.9 = icmp eq i32 %44, 10 br i1 %cmp59.not.us132.9, label %for.inc83.us134.9, label %if.then61.us133.9 if.then61.us133.9: ; preds = %for.inc83.us134.8 %call75.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10) br label %for.inc83.us134.9 for.inc83.us134.9: ; preds = %if.then61.us133.9, %for.inc83.us134.8 %arrayidx58.us131.10 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %45 = load i32, ptr %arrayidx58.us131.10, align 4, !tbaa !5 %cmp59.not.us132.10 = icmp eq i32 %45, 11 br i1 %cmp59.not.us132.10, label %for.inc83.us134.10, label %if.then61.us133.10 if.then61.us133.10: ; preds = %for.inc83.us134.9 %call75.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11) br label %for.inc83.us134.10 for.inc83.us134.10: ; preds = %if.then61.us133.10, %for.inc83.us134.9 %arrayidx58.us131.11 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %46 = load i32, ptr %arrayidx58.us131.11, align 8, !tbaa !5 %cmp59.not.us132.11 = icmp eq i32 %46, 12 br i1 %cmp59.not.us132.11, label %for.inc83.us134.11, label %if.then61.us133.11 if.then61.us133.11: ; preds = %for.inc83.us134.10 %call75.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12) br label %for.inc83.us134.11 for.inc83.us134.11: ; preds = %if.then61.us133.11, %for.inc83.us134.10 %arrayidx58.us131.12 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 13 %47 = load i32, ptr %arrayidx58.us131.12, align 4, !tbaa !5 %cmp59.not.us132.12 = icmp eq i32 %47, 13 br i1 %cmp59.not.us132.12, label %for.inc86, label %for.inc86.sink.split if.then61.us143: ; preds = %for.body54.us138.preheader %call80.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1) br label %for.inc83.us144 for.inc83.us144: ; preds = %if.then61.us143, %for.body54.us138.preheader %arrayidx58.us141.1 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %48 = load i32, ptr %arrayidx58.us141.1, align 8, !tbaa !5 %cmp59.not.us142.1 = icmp eq i32 %48, 2 br i1 %cmp59.not.us142.1, label %for.inc83.us144.1, label %if.then61.us143.1 if.then61.us143.1: ; preds = %for.inc83.us144 %call80.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2) br label %for.inc83.us144.1 for.inc83.us144.1: ; preds = %if.then61.us143.1, %for.inc83.us144 %arrayidx58.us141.2 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %49 = load i32, ptr %arrayidx58.us141.2, align 4, !tbaa !5 %cmp59.not.us142.2 = icmp eq i32 %49, 3 br i1 %cmp59.not.us142.2, label %for.inc83.us144.2, label %if.then61.us143.2 if.then61.us143.2: ; preds = %for.inc83.us144.1 %call80.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3) br label %for.inc83.us144.2 for.inc83.us144.2: ; preds = %if.then61.us143.2, %for.inc83.us144.1 %arrayidx58.us141.3 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %50 = load i32, ptr %arrayidx58.us141.3, align 8, !tbaa !5 %cmp59.not.us142.3 = icmp eq i32 %50, 4 br i1 %cmp59.not.us142.3, label %for.inc83.us144.3, label %if.then61.us143.3 if.then61.us143.3: ; preds = %for.inc83.us144.2 %call80.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4) br label %for.inc83.us144.3 for.inc83.us144.3: ; preds = %if.then61.us143.3, %for.inc83.us144.2 %arrayidx58.us141.4 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %51 = load i32, ptr %arrayidx58.us141.4, align 4, !tbaa !5 %cmp59.not.us142.4 = icmp eq i32 %51, 5 br i1 %cmp59.not.us142.4, label %for.inc83.us144.4, label %if.then61.us143.4 if.then61.us143.4: ; preds = %for.inc83.us144.3 %call80.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5) br label %for.inc83.us144.4 for.inc83.us144.4: ; preds = %if.then61.us143.4, %for.inc83.us144.3 %arrayidx58.us141.5 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %52 = load i32, ptr %arrayidx58.us141.5, align 8, !tbaa !5 %cmp59.not.us142.5 = icmp eq i32 %52, 6 br i1 %cmp59.not.us142.5, label %for.inc83.us144.5, label %if.then61.us143.5 if.then61.us143.5: ; preds = %for.inc83.us144.4 %call80.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6) br label %for.inc83.us144.5 for.inc83.us144.5: ; preds = %if.then61.us143.5, %for.inc83.us144.4 %arrayidx58.us141.6 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %53 = load i32, ptr %arrayidx58.us141.6, align 4, !tbaa !5 %cmp59.not.us142.6 = icmp eq i32 %53, 7 br i1 %cmp59.not.us142.6, label %for.inc83.us144.6, label %if.then61.us143.6 if.then61.us143.6: ; preds = %for.inc83.us144.5 %call80.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7) br label %for.inc83.us144.6 for.inc83.us144.6: ; preds = %if.then61.us143.6, %for.inc83.us144.5 %arrayidx58.us141.7 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %54 = load i32, ptr %arrayidx58.us141.7, align 8, !tbaa !5 %cmp59.not.us142.7 = icmp eq i32 %54, 8 br i1 %cmp59.not.us142.7, label %for.inc83.us144.7, label %if.then61.us143.7 if.then61.us143.7: ; preds = %for.inc83.us144.6 %call80.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8) br label %for.inc83.us144.7 for.inc83.us144.7: ; preds = %if.then61.us143.7, %for.inc83.us144.6 %arrayidx58.us141.8 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %55 = load i32, ptr %arrayidx58.us141.8, align 4, !tbaa !5 %cmp59.not.us142.8 = icmp eq i32 %55, 9 br i1 %cmp59.not.us142.8, label %for.inc83.us144.8, label %if.then61.us143.8 if.then61.us143.8: ; preds = %for.inc83.us144.7 %call80.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9) br label %for.inc83.us144.8 for.inc83.us144.8: ; preds = %if.then61.us143.8, %for.inc83.us144.7 %arrayidx58.us141.9 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %56 = load i32, ptr %arrayidx58.us141.9, align 8, !tbaa !5 %cmp59.not.us142.9 = icmp eq i32 %56, 10 br i1 %cmp59.not.us142.9, label %for.inc83.us144.9, label %if.then61.us143.9 if.then61.us143.9: ; preds = %for.inc83.us144.8 %call80.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10) br label %for.inc83.us144.9 for.inc83.us144.9: ; preds = %if.then61.us143.9, %for.inc83.us144.8 %arrayidx58.us141.10 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %57 = load i32, ptr %arrayidx58.us141.10, align 4, !tbaa !5 %cmp59.not.us142.10 = icmp eq i32 %57, 11 br i1 %cmp59.not.us142.10, label %for.inc83.us144.10, label %if.then61.us143.10 if.then61.us143.10: ; preds = %for.inc83.us144.9 %call80.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11) br label %for.inc83.us144.10 for.inc83.us144.10: ; preds = %if.then61.us143.10, %for.inc83.us144.9 %arrayidx58.us141.11 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %58 = load i32, ptr %arrayidx58.us141.11, align 8, !tbaa !5 %cmp59.not.us142.11 = icmp eq i32 %58, 12 br i1 %cmp59.not.us142.11, label %for.inc83.us144.11, label %if.then61.us143.11 if.then61.us143.11: ; preds = %for.inc83.us144.10 %call80.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12) br label %for.inc83.us144.11 for.inc83.us144.11: ; preds = %if.then61.us143.11, %for.inc83.us144.10 %arrayidx58.us141.12 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 13 %59 = load i32, ptr %arrayidx58.us141.12, align 4, !tbaa !5 %cmp59.not.us142.12 = icmp eq i32 %59, 13 br i1 %cmp59.not.us142.12, label %for.inc86, label %for.inc86.sink.split for.inc86.sink.split: ; preds = %for.inc83.us144.11, %for.inc83.us134.11, %for.inc83.us124.11, %for.inc83.us.11 %.str.5.sink = phi ptr [ @.str.2, %for.inc83.us.11 ], [ @.str.3, %for.inc83.us124.11 ], [ @.str.4, %for.inc83.us134.11 ], [ @.str.5, %for.inc83.us144.11 ] %call80.us.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink, i32 noundef 13) br label %for.inc86 for.inc86: ; preds = %for.inc86.sink.split, %for.inc83.us144.11, %for.inc83.us134.11, %for.inc83.us124.11, %for.inc83.us.11, %for.cond51.preheader %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %for.end88, label %for.cond51.preheader, !llvm.loop !12 for.end88: ; preds = %for.inc86 call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %card) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %suit) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include <stdio.h> #define MAX_TYPE 4 #define MAX_RANK 13 int main(int argc, char **argv){ int i,j; char buf[256]; int data[MAX_TYPE][MAX_RANK] = {}; int len,rank,type; char ch_type; // Input fgets( buf, 256, stdin); sscanf( buf, "%d",&len); for(i=0;i<len;i++){ fgets( buf, 256, stdin); sscanf( buf,"%c %d",&ch_type,&rank); // Convert Type type = 0; switch(ch_type){ case 'S': type = 0; break; case 'H': type = 1; break; case 'C': type = 2; break; case 'D': type = 3; break; default: return 1; } // Found data[type][rank-1] = 1; } // Output for(i=0;i<MAX_TYPE;i++){ for(j=0;j<MAX_RANK;j++){ if( !data[i][j] ){ // Convert Type ch_type = 'S'; switch(i){ case 0: ch_type = 'S'; break; case 1: ch_type = 'H'; break; case 2: ch_type = 'C'; break; case 3: ch_type = 'D'; break; default: break; } printf("%c %d\n",ch_type,j+1); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214499/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214499/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unnamed_addr global ptr, align 8 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%c %d\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %buf = alloca [256 x i8], align 16 %data = alloca [4 x [13 x i32]], align 16 %len = alloca i32, align 4 %rank = alloca i32, align 4 %ch_type = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %buf) #4 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %data) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %data, i8 0, i64 208, i1 false) call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %len) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %rank) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %ch_type) #4 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call = call ptr @fgets(ptr noundef nonnull %buf, i32 noundef 256, ptr noundef %0) %call2 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %buf, ptr noundef nonnull @.str, ptr noundef nonnull %len) #4 %1 = load i32, ptr %len, align 4, !tbaa !9 %cmp54 = icmp sgt i32 %1, 0 br i1 %cmp54, label %for.body, label %for.cond16.preheader.preheader for.body: ; preds = %entry, %sw.epilog %i.055 = phi i32 [ %inc, %sw.epilog ], [ 0, %entry ] %2 = load ptr, ptr @stdin, align 8, !tbaa !5 %call4 = call ptr @fgets(ptr noundef nonnull %buf, i32 noundef 256, ptr noundef %2) %call6 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %buf, ptr noundef nonnull @.str.1, ptr noundef nonnull %ch_type, ptr noundef nonnull %rank) #4 %3 = load i8, ptr %ch_type, align 1, !tbaa !11 %conv = sext i8 %3 to i32 switch i32 %conv, label %cleanup [ i32 83, label %sw.epilog i32 72, label %sw.bb7 i32 67, label %sw.bb8 i32 68, label %sw.bb9 ] sw.bb7: ; preds = %for.body br label %sw.epilog sw.bb8: ; preds = %for.body br label %sw.epilog sw.bb9: ; preds = %for.body br label %sw.epilog sw.epilog: ; preds = %for.body, %sw.bb9, %sw.bb8, %sw.bb7 %type.0 = phi i64 [ 3, %sw.bb9 ], [ 2, %sw.bb8 ], [ 1, %sw.bb7 ], [ 0, %for.body ] %4 = load i32, ptr %rank, align 4, !tbaa !9 %sub = add nsw i32 %4, -1 %idxprom10 = sext i32 %sub to i64 %arrayidx11 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %type.0, i64 %idxprom10 store i32 1, ptr %arrayidx11, align 4, !tbaa !9 %inc = add nuw nsw i32 %i.055, 1 %5 = load i32, ptr %len, align 4, !tbaa !9 %cmp = icmp slt i32 %inc, %5 br i1 %cmp, label %for.body, label %for.cond16.preheader.preheader, !llvm.loop !12 for.cond16.preheader.preheader: ; preds = %sw.epilog, %entry br label %for.cond16.preheader for.cond16.preheader: ; preds = %for.cond16.preheader.preheader, %for.inc32.12 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc32.12 ], [ 0, %for.cond16.preheader.preheader ] %arrayidx23 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 0 %6 = load i32, ptr %arrayidx23, align 4, !tbaa !9 %tobool.not = icmp eq i32 %6, 0 br i1 %tobool.not, label %if.then, label %for.inc32 if.then: ; preds = %for.cond16.preheader store i8 83, ptr %ch_type, align 1, !tbaa !11 %7 = trunc i64 %indvars.iv to i32 switch i32 %7, label %sw.epilog29 [ i32 3, label %sw.bb27 i32 1, label %sw.bb25 i32 2, label %sw.bb26 ] sw.bb25: ; preds = %if.then store i8 72, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29 sw.bb26: ; preds = %if.then store i8 67, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29 sw.bb27: ; preds = %if.then store i8 68, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29 sw.epilog29: ; preds = %if.then, %sw.bb27, %sw.bb26, %sw.bb25 %conv30 = phi i32 [ 68, %sw.bb27 ], [ 67, %sw.bb26 ], [ 72, %sw.bb25 ], [ 83, %if.then ] %call31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30, i32 noundef 1) br label %for.inc32 for.inc32: ; preds = %for.cond16.preheader, %sw.epilog29 %arrayidx23.1 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 1 %8 = load i32, ptr %arrayidx23.1, align 4, !tbaa !9 %tobool.not.1 = icmp eq i32 %8, 0 br i1 %tobool.not.1, label %if.then.1, label %for.inc32.1 if.then.1: ; preds = %for.inc32 store i8 83, ptr %ch_type, align 1, !tbaa !11 %9 = trunc i64 %indvars.iv to i32 switch i32 %9, label %sw.epilog29.1 [ i32 3, label %sw.bb27.1 i32 1, label %sw.bb25.1 i32 2, label %sw.bb26.1 ] sw.bb27.1: ; preds = %if.then.1 store i8 68, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.1 sw.bb26.1: ; preds = %if.then.1 store i8 67, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.1 sw.bb25.1: ; preds = %if.then.1 store i8 72, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.1 sw.epilog29.1: ; preds = %sw.bb25.1, %sw.bb26.1, %sw.bb27.1, %if.then.1 %conv30.1 = phi i32 [ 72, %sw.bb25.1 ], [ 67, %sw.bb26.1 ], [ 68, %sw.bb27.1 ], [ 83, %if.then.1 ] %call31.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.1, i32 noundef 2) br label %for.inc32.1 for.inc32.1: ; preds = %sw.epilog29.1, %for.inc32 %arrayidx23.2 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 2 %10 = load i32, ptr %arrayidx23.2, align 4, !tbaa !9 %tobool.not.2 = icmp eq i32 %10, 0 br i1 %tobool.not.2, label %if.then.2, label %for.inc32.2 if.then.2: ; preds = %for.inc32.1 store i8 83, ptr %ch_type, align 1, !tbaa !11 %11 = trunc i64 %indvars.iv to i32 switch i32 %11, label %sw.epilog29.2 [ i32 3, label %sw.bb27.2 i32 1, label %sw.bb25.2 i32 2, label %sw.bb26.2 ] sw.bb27.2: ; preds = %if.then.2 store i8 68, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.2 sw.bb26.2: ; preds = %if.then.2 store i8 67, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.2 sw.bb25.2: ; preds = %if.then.2 store i8 72, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.2 sw.epilog29.2: ; preds = %sw.bb25.2, %sw.bb26.2, %sw.bb27.2, %if.then.2 %conv30.2 = phi i32 [ 72, %sw.bb25.2 ], [ 67, %sw.bb26.2 ], [ 68, %sw.bb27.2 ], [ 83, %if.then.2 ] %call31.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.2, i32 noundef 3) br label %for.inc32.2 for.inc32.2: ; preds = %sw.epilog29.2, %for.inc32.1 %arrayidx23.3 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 3 %12 = load i32, ptr %arrayidx23.3, align 4, !tbaa !9 %tobool.not.3 = icmp eq i32 %12, 0 br i1 %tobool.not.3, label %if.then.3, label %for.inc32.3 if.then.3: ; preds = %for.inc32.2 store i8 83, ptr %ch_type, align 1, !tbaa !11 %13 = trunc i64 %indvars.iv to i32 switch i32 %13, label %sw.epilog29.3 [ i32 3, label %sw.bb27.3 i32 1, label %sw.bb25.3 i32 2, label %sw.bb26.3 ] sw.bb27.3: ; preds = %if.then.3 store i8 68, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.3 sw.bb26.3: ; preds = %if.then.3 store i8 67, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.3 sw.bb25.3: ; preds = %if.then.3 store i8 72, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.3 sw.epilog29.3: ; preds = %sw.bb25.3, %sw.bb26.3, %sw.bb27.3, %if.then.3 %conv30.3 = phi i32 [ 72, %sw.bb25.3 ], [ 67, %sw.bb26.3 ], [ 68, %sw.bb27.3 ], [ 83, %if.then.3 ] %call31.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.3, i32 noundef 4) br label %for.inc32.3 for.inc32.3: ; preds = %sw.epilog29.3, %for.inc32.2 %arrayidx23.4 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 4 %14 = load i32, ptr %arrayidx23.4, align 4, !tbaa !9 %tobool.not.4 = icmp eq i32 %14, 0 br i1 %tobool.not.4, label %if.then.4, label %for.inc32.4 if.then.4: ; preds = %for.inc32.3 store i8 83, ptr %ch_type, align 1, !tbaa !11 %15 = trunc i64 %indvars.iv to i32 switch i32 %15, label %sw.epilog29.4 [ i32 3, label %sw.bb27.4 i32 1, label %sw.bb25.4 i32 2, label %sw.bb26.4 ] sw.bb27.4: ; preds = %if.then.4 store i8 68, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.4 sw.bb26.4: ; preds = %if.then.4 store i8 67, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.4 sw.bb25.4: ; preds = %if.then.4 store i8 72, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.4 sw.epilog29.4: ; preds = %sw.bb25.4, %sw.bb26.4, %sw.bb27.4, %if.then.4 %conv30.4 = phi i32 [ 72, %sw.bb25.4 ], [ 67, %sw.bb26.4 ], [ 68, %sw.bb27.4 ], [ 83, %if.then.4 ] %call31.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.4, i32 noundef 5) br label %for.inc32.4 for.inc32.4: ; preds = %sw.epilog29.4, %for.inc32.3 %arrayidx23.5 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 5 %16 = load i32, ptr %arrayidx23.5, align 4, !tbaa !9 %tobool.not.5 = icmp eq i32 %16, 0 br i1 %tobool.not.5, label %if.then.5, label %for.inc32.5 if.then.5: ; preds = %for.inc32.4 store i8 83, ptr %ch_type, align 1, !tbaa !11 %17 = trunc i64 %indvars.iv to i32 switch i32 %17, label %sw.epilog29.5 [ i32 3, label %sw.bb27.5 i32 1, label %sw.bb25.5 i32 2, label %sw.bb26.5 ] sw.bb27.5: ; preds = %if.then.5 store i8 68, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.5 sw.bb26.5: ; preds = %if.then.5 store i8 67, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.5 sw.bb25.5: ; preds = %if.then.5 store i8 72, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.5 sw.epilog29.5: ; preds = %sw.bb25.5, %sw.bb26.5, %sw.bb27.5, %if.then.5 %conv30.5 = phi i32 [ 72, %sw.bb25.5 ], [ 67, %sw.bb26.5 ], [ 68, %sw.bb27.5 ], [ 83, %if.then.5 ] %call31.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.5, i32 noundef 6) br label %for.inc32.5 for.inc32.5: ; preds = %sw.epilog29.5, %for.inc32.4 %arrayidx23.6 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 6 %18 = load i32, ptr %arrayidx23.6, align 4, !tbaa !9 %tobool.not.6 = icmp eq i32 %18, 0 br i1 %tobool.not.6, label %if.then.6, label %for.inc32.6 if.then.6: ; preds = %for.inc32.5 store i8 83, ptr %ch_type, align 1, !tbaa !11 %19 = trunc i64 %indvars.iv to i32 switch i32 %19, label %sw.epilog29.6 [ i32 3, label %sw.bb27.6 i32 1, label %sw.bb25.6 i32 2, label %sw.bb26.6 ] sw.bb27.6: ; preds = %if.then.6 store i8 68, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.6 sw.bb26.6: ; preds = %if.then.6 store i8 67, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.6 sw.bb25.6: ; preds = %if.then.6 store i8 72, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.6 sw.epilog29.6: ; preds = %sw.bb25.6, %sw.bb26.6, %sw.bb27.6, %if.then.6 %conv30.6 = phi i32 [ 72, %sw.bb25.6 ], [ 67, %sw.bb26.6 ], [ 68, %sw.bb27.6 ], [ 83, %if.then.6 ] %call31.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.6, i32 noundef 7) br label %for.inc32.6 for.inc32.6: ; preds = %sw.epilog29.6, %for.inc32.5 %arrayidx23.7 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 7 %20 = load i32, ptr %arrayidx23.7, align 4, !tbaa !9 %tobool.not.7 = icmp eq i32 %20, 0 br i1 %tobool.not.7, label %if.then.7, label %for.inc32.7 if.then.7: ; preds = %for.inc32.6 store i8 83, ptr %ch_type, align 1, !tbaa !11 %21 = trunc i64 %indvars.iv to i32 switch i32 %21, label %sw.epilog29.7 [ i32 3, label %sw.bb27.7 i32 1, label %sw.bb25.7 i32 2, label %sw.bb26.7 ] sw.bb27.7: ; preds = %if.then.7 store i8 68, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.7 sw.bb26.7: ; preds = %if.then.7 store i8 67, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.7 sw.bb25.7: ; preds = %if.then.7 store i8 72, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.7 sw.epilog29.7: ; preds = %sw.bb25.7, %sw.bb26.7, %sw.bb27.7, %if.then.7 %conv30.7 = phi i32 [ 72, %sw.bb25.7 ], [ 67, %sw.bb26.7 ], [ 68, %sw.bb27.7 ], [ 83, %if.then.7 ] %call31.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.7, i32 noundef 8) br label %for.inc32.7 for.inc32.7: ; preds = %sw.epilog29.7, %for.inc32.6 %arrayidx23.8 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 8 %22 = load i32, ptr %arrayidx23.8, align 4, !tbaa !9 %tobool.not.8 = icmp eq i32 %22, 0 br i1 %tobool.not.8, label %if.then.8, label %for.inc32.8 if.then.8: ; preds = %for.inc32.7 store i8 83, ptr %ch_type, align 1, !tbaa !11 %23 = trunc i64 %indvars.iv to i32 switch i32 %23, label %sw.epilog29.8 [ i32 3, label %sw.bb27.8 i32 1, label %sw.bb25.8 i32 2, label %sw.bb26.8 ] sw.bb27.8: ; preds = %if.then.8 store i8 68, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.8 sw.bb26.8: ; preds = %if.then.8 store i8 67, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.8 sw.bb25.8: ; preds = %if.then.8 store i8 72, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.8 sw.epilog29.8: ; preds = %sw.bb25.8, %sw.bb26.8, %sw.bb27.8, %if.then.8 %conv30.8 = phi i32 [ 72, %sw.bb25.8 ], [ 67, %sw.bb26.8 ], [ 68, %sw.bb27.8 ], [ 83, %if.then.8 ] %call31.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.8, i32 noundef 9) br label %for.inc32.8 for.inc32.8: ; preds = %sw.epilog29.8, %for.inc32.7 %arrayidx23.9 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 9 %24 = load i32, ptr %arrayidx23.9, align 4, !tbaa !9 %tobool.not.9 = icmp eq i32 %24, 0 br i1 %tobool.not.9, label %if.then.9, label %for.inc32.9 if.then.9: ; preds = %for.inc32.8 store i8 83, ptr %ch_type, align 1, !tbaa !11 %25 = trunc i64 %indvars.iv to i32 switch i32 %25, label %sw.epilog29.9 [ i32 3, label %sw.bb27.9 i32 1, label %sw.bb25.9 i32 2, label %sw.bb26.9 ] sw.bb27.9: ; preds = %if.then.9 store i8 68, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.9 sw.bb26.9: ; preds = %if.then.9 store i8 67, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.9 sw.bb25.9: ; preds = %if.then.9 store i8 72, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.9 sw.epilog29.9: ; preds = %sw.bb25.9, %sw.bb26.9, %sw.bb27.9, %if.then.9 %conv30.9 = phi i32 [ 72, %sw.bb25.9 ], [ 67, %sw.bb26.9 ], [ 68, %sw.bb27.9 ], [ 83, %if.then.9 ] %call31.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.9, i32 noundef 10) br label %for.inc32.9 for.inc32.9: ; preds = %sw.epilog29.9, %for.inc32.8 %arrayidx23.10 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 10 %26 = load i32, ptr %arrayidx23.10, align 4, !tbaa !9 %tobool.not.10 = icmp eq i32 %26, 0 br i1 %tobool.not.10, label %if.then.10, label %for.inc32.10 if.then.10: ; preds = %for.inc32.9 store i8 83, ptr %ch_type, align 1, !tbaa !11 %27 = trunc i64 %indvars.iv to i32 switch i32 %27, label %sw.epilog29.10 [ i32 3, label %sw.bb27.10 i32 1, label %sw.bb25.10 i32 2, label %sw.bb26.10 ] sw.bb27.10: ; preds = %if.then.10 store i8 68, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.10 sw.bb26.10: ; preds = %if.then.10 store i8 67, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.10 sw.bb25.10: ; preds = %if.then.10 store i8 72, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.10 sw.epilog29.10: ; preds = %sw.bb25.10, %sw.bb26.10, %sw.bb27.10, %if.then.10 %conv30.10 = phi i32 [ 72, %sw.bb25.10 ], [ 67, %sw.bb26.10 ], [ 68, %sw.bb27.10 ], [ 83, %if.then.10 ] %call31.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.10, i32 noundef 11) br label %for.inc32.10 for.inc32.10: ; preds = %sw.epilog29.10, %for.inc32.9 %arrayidx23.11 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 11 %28 = load i32, ptr %arrayidx23.11, align 4, !tbaa !9 %tobool.not.11 = icmp eq i32 %28, 0 br i1 %tobool.not.11, label %if.then.11, label %for.inc32.11 if.then.11: ; preds = %for.inc32.10 store i8 83, ptr %ch_type, align 1, !tbaa !11 %29 = trunc i64 %indvars.iv to i32 switch i32 %29, label %sw.epilog29.11 [ i32 3, label %sw.bb27.11 i32 1, label %sw.bb25.11 i32 2, label %sw.bb26.11 ] sw.bb27.11: ; preds = %if.then.11 store i8 68, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.11 sw.bb26.11: ; preds = %if.then.11 store i8 67, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.11 sw.bb25.11: ; preds = %if.then.11 store i8 72, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.11 sw.epilog29.11: ; preds = %sw.bb25.11, %sw.bb26.11, %sw.bb27.11, %if.then.11 %conv30.11 = phi i32 [ 72, %sw.bb25.11 ], [ 67, %sw.bb26.11 ], [ 68, %sw.bb27.11 ], [ 83, %if.then.11 ] %call31.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.11, i32 noundef 12) br label %for.inc32.11 for.inc32.11: ; preds = %sw.epilog29.11, %for.inc32.10 %arrayidx23.12 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 12 %30 = load i32, ptr %arrayidx23.12, align 4, !tbaa !9 %tobool.not.12 = icmp eq i32 %30, 0 br i1 %tobool.not.12, label %if.then.12, label %for.inc32.12 if.then.12: ; preds = %for.inc32.11 store i8 83, ptr %ch_type, align 1, !tbaa !11 %31 = trunc i64 %indvars.iv to i32 switch i32 %31, label %sw.epilog29.12 [ i32 3, label %sw.bb27.12 i32 1, label %sw.bb25.12 i32 2, label %sw.bb26.12 ] sw.bb27.12: ; preds = %if.then.12 store i8 68, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.12 sw.bb26.12: ; preds = %if.then.12 store i8 67, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.12 sw.bb25.12: ; preds = %if.then.12 store i8 72, ptr %ch_type, align 1, !tbaa !11 br label %sw.epilog29.12 sw.epilog29.12: ; preds = %sw.bb25.12, %sw.bb26.12, %sw.bb27.12, %if.then.12 %conv30.12 = phi i32 [ 72, %sw.bb25.12 ], [ 67, %sw.bb26.12 ], [ 68, %sw.bb27.12 ], [ 83, %if.then.12 ] %call31.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.12, i32 noundef 13) br label %for.inc32.12 for.inc32.12: ; preds = %sw.epilog29.12, %for.inc32.11 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %cleanup, label %for.cond16.preheader, !llvm.loop !14 cleanup: ; preds = %for.body, %for.inc32.12 %retval.0 = phi i32 [ 0, %for.inc32.12 ], [ 1, %for.body ] call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %ch_type) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %rank) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %len) #4 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %data) #4 call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %buf) #4 ret i32 %retval.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree 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 ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"int", !7, i64 0} !11 = !{!7, !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"} !14 = distinct !{!14, !13}
#include<stdio.h> int main(){ int n,number,card[4][14]; int i,j; char s; for(i=0;i<=13;i++){ card[0][i]=1; card[1][i]=1; card[2][i]=1; card[3][i]=1; } scanf("%d",&n); for(i=0;i<n;i++){ scanf(" %c %d",&s,&number); if(s=='S')card[0][number]=0; else if(s=='H')card[1][number]=0; else if(s=='C')card[2][number]=0; else if(s=='D')card[3][number]=0; } for(i=0;i<4;i++){ for(j=1;j<=13;j++){ if(card[i][j]==1){ if(i==0)s='S'; else if(i==1)s='H'; else if(i==2)s='C'; else if(i==3)s='D'; printf("%c %d\n",s,j); } } } return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214541/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214541/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c" %c %d\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %number = alloca i32, align 4 %card = alloca [4 x [14 x i32]], align 16 %s = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %number) #3 call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %card) #3 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %s) #3 %arrayidx7 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 0 %arrayidx4.2 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 2 %arrayidx10.2 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 2 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %card, align 16, !tbaa !5 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx7, align 16, !tbaa !5 %arrayidx1.4 = getelementptr inbounds [14 x i32], ptr %card, i64 0, i64 4 %arrayidx7.4 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 4 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx4.2, align 16, !tbaa !5 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx10.2, align 16, !tbaa !5 %arrayidx4.6 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 6 %arrayidx10.6 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 6 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx1.4, align 16, !tbaa !5 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx7.4, align 16, !tbaa !5 %arrayidx1.8 = getelementptr inbounds [14 x i32], ptr %card, i64 0, i64 8 %arrayidx7.8 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 8 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx4.6, align 16, !tbaa !5 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx10.6, align 16, !tbaa !5 %arrayidx4.10 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 10 %arrayidx10.10 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 10 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx1.8, align 16, !tbaa !5 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx7.8, align 16, !tbaa !5 %arrayidx1.12 = getelementptr inbounds [14 x i32], ptr %card, i64 0, i64 12 %arrayidx7.12 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 12 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx1.12, align 16, !tbaa !5 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx4.10, align 16, !tbaa !5 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx7.12, align 16, !tbaa !5 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx10.10, align 16, !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp12110 = icmp sgt i32 %0, 0 br i1 %cmp12110, label %for.body13, label %for.cond53.preheader.preheader for.body13: ; preds = %entry, %for.inc46 %i.1111 = phi i32 [ %inc47, %for.inc46 ], [ 0, %entry ] %call14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s, ptr noundef nonnull %number) %1 = load i8, ptr %s, align 1, !tbaa !9 switch i8 %1, label %for.inc46 [ i8 83, label %if.then i8 72, label %if.then23 i8 67, label %if.then31 i8 68, label %if.then39 ] if.then: ; preds = %for.body13 %2 = load i32, ptr %number, align 4, !tbaa !5 %idxprom18 = sext i32 %2 to i64 %arrayidx19 = getelementptr inbounds [14 x i32], ptr %card, i64 0, i64 %idxprom18 br label %for.inc46.sink.split if.then23: ; preds = %for.body13 %3 = load i32, ptr %number, align 4, !tbaa !5 %idxprom25 = sext i32 %3 to i64 %arrayidx26 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 %idxprom25 br label %for.inc46.sink.split if.then31: ; preds = %for.body13 %4 = load i32, ptr %number, align 4, !tbaa !5 %idxprom33 = sext i32 %4 to i64 %arrayidx34 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 %idxprom33 br label %for.inc46.sink.split if.then39: ; preds = %for.body13 %5 = load i32, ptr %number, align 4, !tbaa !5 %idxprom41 = sext i32 %5 to i64 %arrayidx42 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 %idxprom41 br label %for.inc46.sink.split for.inc46.sink.split: ; preds = %if.then23, %if.then39, %if.then31, %if.then %arrayidx19.sink = phi ptr [ %arrayidx19, %if.then ], [ %arrayidx34, %if.then31 ], [ %arrayidx42, %if.then39 ], [ %arrayidx26, %if.then23 ] store i32 0, ptr %arrayidx19.sink, align 4, !tbaa !5 br label %for.inc46 for.inc46: ; preds = %for.inc46.sink.split, %for.body13 %inc47 = add nuw nsw i32 %i.1111, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp12 = icmp slt i32 %inc47, %6 br i1 %cmp12, label %for.body13, label %for.cond53.preheader.preheader, !llvm.loop !10 for.cond53.preheader.preheader: ; preds = %for.inc46, %entry br label %for.cond53.preheader for.cond53.preheader: ; preds = %for.cond53.preheader.preheader, %for.inc89 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc89 ], [ 0, %for.cond53.preheader.preheader ] %7 = trunc i64 %indvars.iv to i32 %arrayidx60 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1 %8 = load i32, ptr %arrayidx60, align 4, !tbaa !5 %cmp61 = icmp eq i32 %8, 1 switch i32 %7, label %for.body56.preheader [ i32 0, label %for.body56.us.preheader i32 1, label %for.body56.us114.preheader i32 2, label %for.body56.us127.preheader i32 3, label %for.body56.us140.preheader ] for.body56.us140.preheader: ; preds = %for.cond53.preheader br i1 %cmp61, label %if.then63.us145, label %for.inc86.us149 for.body56.us127.preheader: ; preds = %for.cond53.preheader br i1 %cmp61, label %if.then63.us132, label %for.inc86.us136 for.body56.us114.preheader: ; preds = %for.cond53.preheader br i1 %cmp61, label %if.then63.us119, label %for.inc86.us123 for.body56.us.preheader: ; preds = %for.cond53.preheader br i1 %cmp61, label %if.then63.us, label %for.inc86.us for.body56.preheader: ; preds = %for.cond53.preheader br i1 %cmp61, label %if.then63, label %for.inc86 if.then63.us: ; preds = %for.body56.us.preheader store i8 83, ptr %s, align 1, !tbaa !9 %call84.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 1) br label %for.inc86.us for.inc86.us: ; preds = %if.then63.us, %for.body56.us.preheader %arrayidx60.us.1 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %9 = load i32, ptr %arrayidx60.us.1, align 8, !tbaa !5 %cmp61.us.1 = icmp eq i32 %9, 1 br i1 %cmp61.us.1, label %if.then63.us.1, label %for.inc86.us.1 if.then63.us.1: ; preds = %for.inc86.us store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 2) br label %for.inc86.us.1 for.inc86.us.1: ; preds = %if.then63.us.1, %for.inc86.us %arrayidx60.us.2 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %10 = load i32, ptr %arrayidx60.us.2, align 4, !tbaa !5 %cmp61.us.2 = icmp eq i32 %10, 1 br i1 %cmp61.us.2, label %if.then63.us.2, label %for.inc86.us.2 if.then63.us.2: ; preds = %for.inc86.us.1 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 3) br label %for.inc86.us.2 for.inc86.us.2: ; preds = %if.then63.us.2, %for.inc86.us.1 %arrayidx60.us.3 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %11 = load i32, ptr %arrayidx60.us.3, align 8, !tbaa !5 %cmp61.us.3 = icmp eq i32 %11, 1 br i1 %cmp61.us.3, label %if.then63.us.3, label %for.inc86.us.3 if.then63.us.3: ; preds = %for.inc86.us.2 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 4) br label %for.inc86.us.3 for.inc86.us.3: ; preds = %if.then63.us.3, %for.inc86.us.2 %arrayidx60.us.4 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %12 = load i32, ptr %arrayidx60.us.4, align 4, !tbaa !5 %cmp61.us.4 = icmp eq i32 %12, 1 br i1 %cmp61.us.4, label %if.then63.us.4, label %for.inc86.us.4 if.then63.us.4: ; preds = %for.inc86.us.3 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 5) br label %for.inc86.us.4 for.inc86.us.4: ; preds = %if.then63.us.4, %for.inc86.us.3 %arrayidx60.us.5 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %13 = load i32, ptr %arrayidx60.us.5, align 8, !tbaa !5 %cmp61.us.5 = icmp eq i32 %13, 1 br i1 %cmp61.us.5, label %if.then63.us.5, label %for.inc86.us.5 if.then63.us.5: ; preds = %for.inc86.us.4 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 6) br label %for.inc86.us.5 for.inc86.us.5: ; preds = %if.then63.us.5, %for.inc86.us.4 %arrayidx60.us.6 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %14 = load i32, ptr %arrayidx60.us.6, align 4, !tbaa !5 %cmp61.us.6 = icmp eq i32 %14, 1 br i1 %cmp61.us.6, label %if.then63.us.6, label %for.inc86.us.6 if.then63.us.6: ; preds = %for.inc86.us.5 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 7) br label %for.inc86.us.6 for.inc86.us.6: ; preds = %if.then63.us.6, %for.inc86.us.5 %arrayidx60.us.7 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %15 = load i32, ptr %arrayidx60.us.7, align 8, !tbaa !5 %cmp61.us.7 = icmp eq i32 %15, 1 br i1 %cmp61.us.7, label %if.then63.us.7, label %for.inc86.us.7 if.then63.us.7: ; preds = %for.inc86.us.6 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 8) br label %for.inc86.us.7 for.inc86.us.7: ; preds = %if.then63.us.7, %for.inc86.us.6 %arrayidx60.us.8 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %16 = load i32, ptr %arrayidx60.us.8, align 4, !tbaa !5 %cmp61.us.8 = icmp eq i32 %16, 1 br i1 %cmp61.us.8, label %if.then63.us.8, label %for.inc86.us.8 if.then63.us.8: ; preds = %for.inc86.us.7 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 9) br label %for.inc86.us.8 for.inc86.us.8: ; preds = %if.then63.us.8, %for.inc86.us.7 %arrayidx60.us.9 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %17 = load i32, ptr %arrayidx60.us.9, align 8, !tbaa !5 %cmp61.us.9 = icmp eq i32 %17, 1 br i1 %cmp61.us.9, label %if.then63.us.9, label %for.inc86.us.9 if.then63.us.9: ; preds = %for.inc86.us.8 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 10) br label %for.inc86.us.9 for.inc86.us.9: ; preds = %if.then63.us.9, %for.inc86.us.8 %arrayidx60.us.10 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %18 = load i32, ptr %arrayidx60.us.10, align 4, !tbaa !5 %cmp61.us.10 = icmp eq i32 %18, 1 br i1 %cmp61.us.10, label %if.then63.us.10, label %for.inc86.us.10 if.then63.us.10: ; preds = %for.inc86.us.9 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 11) br label %for.inc86.us.10 for.inc86.us.10: ; preds = %if.then63.us.10, %for.inc86.us.9 %arrayidx60.us.11 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %19 = load i32, ptr %arrayidx60.us.11, align 8, !tbaa !5 %cmp61.us.11 = icmp eq i32 %19, 1 br i1 %cmp61.us.11, label %if.then63.us.11, label %for.inc86.us.11 if.then63.us.11: ; preds = %for.inc86.us.10 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 12) br label %for.inc86.us.11 for.inc86.us.11: ; preds = %if.then63.us.11, %for.inc86.us.10 %arrayidx60.us.12 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 13 %20 = load i32, ptr %arrayidx60.us.12, align 4, !tbaa !5 %cmp61.us.12 = icmp eq i32 %20, 1 br i1 %cmp61.us.12, label %if.then63.us.12, label %for.inc89 if.then63.us.12: ; preds = %for.inc86.us.11 store i8 83, ptr %s, align 1, !tbaa !9 br label %for.inc89.sink.split if.then63.us119: ; preds = %for.body56.us114.preheader store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 1) br label %for.inc86.us123 for.inc86.us123: ; preds = %if.then63.us119, %for.body56.us114.preheader %arrayidx60.us117.1 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %21 = load i32, ptr %arrayidx60.us117.1, align 8, !tbaa !5 %cmp61.us118.1 = icmp eq i32 %21, 1 br i1 %cmp61.us118.1, label %if.then63.us119.1, label %for.inc86.us123.1 if.then63.us119.1: ; preds = %for.inc86.us123 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 2) br label %for.inc86.us123.1 for.inc86.us123.1: ; preds = %if.then63.us119.1, %for.inc86.us123 %arrayidx60.us117.2 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %22 = load i32, ptr %arrayidx60.us117.2, align 4, !tbaa !5 %cmp61.us118.2 = icmp eq i32 %22, 1 br i1 %cmp61.us118.2, label %if.then63.us119.2, label %for.inc86.us123.2 if.then63.us119.2: ; preds = %for.inc86.us123.1 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 3) br label %for.inc86.us123.2 for.inc86.us123.2: ; preds = %if.then63.us119.2, %for.inc86.us123.1 %arrayidx60.us117.3 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %23 = load i32, ptr %arrayidx60.us117.3, align 8, !tbaa !5 %cmp61.us118.3 = icmp eq i32 %23, 1 br i1 %cmp61.us118.3, label %if.then63.us119.3, label %for.inc86.us123.3 if.then63.us119.3: ; preds = %for.inc86.us123.2 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 4) br label %for.inc86.us123.3 for.inc86.us123.3: ; preds = %if.then63.us119.3, %for.inc86.us123.2 %arrayidx60.us117.4 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %24 = load i32, ptr %arrayidx60.us117.4, align 4, !tbaa !5 %cmp61.us118.4 = icmp eq i32 %24, 1 br i1 %cmp61.us118.4, label %if.then63.us119.4, label %for.inc86.us123.4 if.then63.us119.4: ; preds = %for.inc86.us123.3 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 5) br label %for.inc86.us123.4 for.inc86.us123.4: ; preds = %if.then63.us119.4, %for.inc86.us123.3 %arrayidx60.us117.5 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %25 = load i32, ptr %arrayidx60.us117.5, align 8, !tbaa !5 %cmp61.us118.5 = icmp eq i32 %25, 1 br i1 %cmp61.us118.5, label %if.then63.us119.5, label %for.inc86.us123.5 if.then63.us119.5: ; preds = %for.inc86.us123.4 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 6) br label %for.inc86.us123.5 for.inc86.us123.5: ; preds = %if.then63.us119.5, %for.inc86.us123.4 %arrayidx60.us117.6 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %26 = load i32, ptr %arrayidx60.us117.6, align 4, !tbaa !5 %cmp61.us118.6 = icmp eq i32 %26, 1 br i1 %cmp61.us118.6, label %if.then63.us119.6, label %for.inc86.us123.6 if.then63.us119.6: ; preds = %for.inc86.us123.5 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 7) br label %for.inc86.us123.6 for.inc86.us123.6: ; preds = %if.then63.us119.6, %for.inc86.us123.5 %arrayidx60.us117.7 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %27 = load i32, ptr %arrayidx60.us117.7, align 8, !tbaa !5 %cmp61.us118.7 = icmp eq i32 %27, 1 br i1 %cmp61.us118.7, label %if.then63.us119.7, label %for.inc86.us123.7 if.then63.us119.7: ; preds = %for.inc86.us123.6 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 8) br label %for.inc86.us123.7 for.inc86.us123.7: ; preds = %if.then63.us119.7, %for.inc86.us123.6 %arrayidx60.us117.8 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %28 = load i32, ptr %arrayidx60.us117.8, align 4, !tbaa !5 %cmp61.us118.8 = icmp eq i32 %28, 1 br i1 %cmp61.us118.8, label %if.then63.us119.8, label %for.inc86.us123.8 if.then63.us119.8: ; preds = %for.inc86.us123.7 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 9) br label %for.inc86.us123.8 for.inc86.us123.8: ; preds = %if.then63.us119.8, %for.inc86.us123.7 %arrayidx60.us117.9 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %29 = load i32, ptr %arrayidx60.us117.9, align 8, !tbaa !5 %cmp61.us118.9 = icmp eq i32 %29, 1 br i1 %cmp61.us118.9, label %if.then63.us119.9, label %for.inc86.us123.9 if.then63.us119.9: ; preds = %for.inc86.us123.8 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 10) br label %for.inc86.us123.9 for.inc86.us123.9: ; preds = %if.then63.us119.9, %for.inc86.us123.8 %arrayidx60.us117.10 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %30 = load i32, ptr %arrayidx60.us117.10, align 4, !tbaa !5 %cmp61.us118.10 = icmp eq i32 %30, 1 br i1 %cmp61.us118.10, label %if.then63.us119.10, label %for.inc86.us123.10 if.then63.us119.10: ; preds = %for.inc86.us123.9 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 11) br label %for.inc86.us123.10 for.inc86.us123.10: ; preds = %if.then63.us119.10, %for.inc86.us123.9 %arrayidx60.us117.11 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %31 = load i32, ptr %arrayidx60.us117.11, align 8, !tbaa !5 %cmp61.us118.11 = icmp eq i32 %31, 1 br i1 %cmp61.us118.11, label %if.then63.us119.11, label %for.inc86.us123.11 if.then63.us119.11: ; preds = %for.inc86.us123.10 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 12) br label %for.inc86.us123.11 for.inc86.us123.11: ; preds = %if.then63.us119.11, %for.inc86.us123.10 %arrayidx60.us117.12 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 13 %32 = load i32, ptr %arrayidx60.us117.12, align 4, !tbaa !5 %cmp61.us118.12 = icmp eq i32 %32, 1 br i1 %cmp61.us118.12, label %if.then63.us119.12, label %for.inc89 if.then63.us119.12: ; preds = %for.inc86.us123.11 store i8 72, ptr %s, align 1, !tbaa !9 br label %for.inc89.sink.split if.then63.us132: ; preds = %for.body56.us127.preheader store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 1) br label %for.inc86.us136 for.inc86.us136: ; preds = %if.then63.us132, %for.body56.us127.preheader %arrayidx60.us130.1 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %33 = load i32, ptr %arrayidx60.us130.1, align 8, !tbaa !5 %cmp61.us131.1 = icmp eq i32 %33, 1 br i1 %cmp61.us131.1, label %if.then63.us132.1, label %for.inc86.us136.1 if.then63.us132.1: ; preds = %for.inc86.us136 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 2) br label %for.inc86.us136.1 for.inc86.us136.1: ; preds = %if.then63.us132.1, %for.inc86.us136 %arrayidx60.us130.2 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %34 = load i32, ptr %arrayidx60.us130.2, align 4, !tbaa !5 %cmp61.us131.2 = icmp eq i32 %34, 1 br i1 %cmp61.us131.2, label %if.then63.us132.2, label %for.inc86.us136.2 if.then63.us132.2: ; preds = %for.inc86.us136.1 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 3) br label %for.inc86.us136.2 for.inc86.us136.2: ; preds = %if.then63.us132.2, %for.inc86.us136.1 %arrayidx60.us130.3 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %35 = load i32, ptr %arrayidx60.us130.3, align 8, !tbaa !5 %cmp61.us131.3 = icmp eq i32 %35, 1 br i1 %cmp61.us131.3, label %if.then63.us132.3, label %for.inc86.us136.3 if.then63.us132.3: ; preds = %for.inc86.us136.2 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 4) br label %for.inc86.us136.3 for.inc86.us136.3: ; preds = %if.then63.us132.3, %for.inc86.us136.2 %arrayidx60.us130.4 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %36 = load i32, ptr %arrayidx60.us130.4, align 4, !tbaa !5 %cmp61.us131.4 = icmp eq i32 %36, 1 br i1 %cmp61.us131.4, label %if.then63.us132.4, label %for.inc86.us136.4 if.then63.us132.4: ; preds = %for.inc86.us136.3 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 5) br label %for.inc86.us136.4 for.inc86.us136.4: ; preds = %if.then63.us132.4, %for.inc86.us136.3 %arrayidx60.us130.5 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %37 = load i32, ptr %arrayidx60.us130.5, align 8, !tbaa !5 %cmp61.us131.5 = icmp eq i32 %37, 1 br i1 %cmp61.us131.5, label %if.then63.us132.5, label %for.inc86.us136.5 if.then63.us132.5: ; preds = %for.inc86.us136.4 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 6) br label %for.inc86.us136.5 for.inc86.us136.5: ; preds = %if.then63.us132.5, %for.inc86.us136.4 %arrayidx60.us130.6 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %38 = load i32, ptr %arrayidx60.us130.6, align 4, !tbaa !5 %cmp61.us131.6 = icmp eq i32 %38, 1 br i1 %cmp61.us131.6, label %if.then63.us132.6, label %for.inc86.us136.6 if.then63.us132.6: ; preds = %for.inc86.us136.5 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 7) br label %for.inc86.us136.6 for.inc86.us136.6: ; preds = %if.then63.us132.6, %for.inc86.us136.5 %arrayidx60.us130.7 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %39 = load i32, ptr %arrayidx60.us130.7, align 8, !tbaa !5 %cmp61.us131.7 = icmp eq i32 %39, 1 br i1 %cmp61.us131.7, label %if.then63.us132.7, label %for.inc86.us136.7 if.then63.us132.7: ; preds = %for.inc86.us136.6 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 8) br label %for.inc86.us136.7 for.inc86.us136.7: ; preds = %if.then63.us132.7, %for.inc86.us136.6 %arrayidx60.us130.8 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %40 = load i32, ptr %arrayidx60.us130.8, align 4, !tbaa !5 %cmp61.us131.8 = icmp eq i32 %40, 1 br i1 %cmp61.us131.8, label %if.then63.us132.8, label %for.inc86.us136.8 if.then63.us132.8: ; preds = %for.inc86.us136.7 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 9) br label %for.inc86.us136.8 for.inc86.us136.8: ; preds = %if.then63.us132.8, %for.inc86.us136.7 %arrayidx60.us130.9 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %41 = load i32, ptr %arrayidx60.us130.9, align 8, !tbaa !5 %cmp61.us131.9 = icmp eq i32 %41, 1 br i1 %cmp61.us131.9, label %if.then63.us132.9, label %for.inc86.us136.9 if.then63.us132.9: ; preds = %for.inc86.us136.8 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 10) br label %for.inc86.us136.9 for.inc86.us136.9: ; preds = %if.then63.us132.9, %for.inc86.us136.8 %arrayidx60.us130.10 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %42 = load i32, ptr %arrayidx60.us130.10, align 4, !tbaa !5 %cmp61.us131.10 = icmp eq i32 %42, 1 br i1 %cmp61.us131.10, label %if.then63.us132.10, label %for.inc86.us136.10 if.then63.us132.10: ; preds = %for.inc86.us136.9 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 11) br label %for.inc86.us136.10 for.inc86.us136.10: ; preds = %if.then63.us132.10, %for.inc86.us136.9 %arrayidx60.us130.11 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %43 = load i32, ptr %arrayidx60.us130.11, align 8, !tbaa !5 %cmp61.us131.11 = icmp eq i32 %43, 1 br i1 %cmp61.us131.11, label %if.then63.us132.11, label %for.inc86.us136.11 if.then63.us132.11: ; preds = %for.inc86.us136.10 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 12) br label %for.inc86.us136.11 for.inc86.us136.11: ; preds = %if.then63.us132.11, %for.inc86.us136.10 %arrayidx60.us130.12 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 13 %44 = load i32, ptr %arrayidx60.us130.12, align 4, !tbaa !5 %cmp61.us131.12 = icmp eq i32 %44, 1 br i1 %cmp61.us131.12, label %if.then63.us132.12, label %for.inc89 if.then63.us132.12: ; preds = %for.inc86.us136.11 store i8 67, ptr %s, align 1, !tbaa !9 br label %for.inc89.sink.split if.then63.us145: ; preds = %for.body56.us140.preheader store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 1) br label %for.inc86.us149 for.inc86.us149: ; preds = %if.then63.us145, %for.body56.us140.preheader %arrayidx60.us143.1 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %45 = load i32, ptr %arrayidx60.us143.1, align 8, !tbaa !5 %cmp61.us144.1 = icmp eq i32 %45, 1 br i1 %cmp61.us144.1, label %if.then63.us145.1, label %for.inc86.us149.1 if.then63.us145.1: ; preds = %for.inc86.us149 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 2) br label %for.inc86.us149.1 for.inc86.us149.1: ; preds = %if.then63.us145.1, %for.inc86.us149 %arrayidx60.us143.2 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %46 = load i32, ptr %arrayidx60.us143.2, align 4, !tbaa !5 %cmp61.us144.2 = icmp eq i32 %46, 1 br i1 %cmp61.us144.2, label %if.then63.us145.2, label %for.inc86.us149.2 if.then63.us145.2: ; preds = %for.inc86.us149.1 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 3) br label %for.inc86.us149.2 for.inc86.us149.2: ; preds = %if.then63.us145.2, %for.inc86.us149.1 %arrayidx60.us143.3 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %47 = load i32, ptr %arrayidx60.us143.3, align 8, !tbaa !5 %cmp61.us144.3 = icmp eq i32 %47, 1 br i1 %cmp61.us144.3, label %if.then63.us145.3, label %for.inc86.us149.3 if.then63.us145.3: ; preds = %for.inc86.us149.2 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 4) br label %for.inc86.us149.3 for.inc86.us149.3: ; preds = %if.then63.us145.3, %for.inc86.us149.2 %arrayidx60.us143.4 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %48 = load i32, ptr %arrayidx60.us143.4, align 4, !tbaa !5 %cmp61.us144.4 = icmp eq i32 %48, 1 br i1 %cmp61.us144.4, label %if.then63.us145.4, label %for.inc86.us149.4 if.then63.us145.4: ; preds = %for.inc86.us149.3 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 5) br label %for.inc86.us149.4 for.inc86.us149.4: ; preds = %if.then63.us145.4, %for.inc86.us149.3 %arrayidx60.us143.5 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %49 = load i32, ptr %arrayidx60.us143.5, align 8, !tbaa !5 %cmp61.us144.5 = icmp eq i32 %49, 1 br i1 %cmp61.us144.5, label %if.then63.us145.5, label %for.inc86.us149.5 if.then63.us145.5: ; preds = %for.inc86.us149.4 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 6) br label %for.inc86.us149.5 for.inc86.us149.5: ; preds = %if.then63.us145.5, %for.inc86.us149.4 %arrayidx60.us143.6 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %50 = load i32, ptr %arrayidx60.us143.6, align 4, !tbaa !5 %cmp61.us144.6 = icmp eq i32 %50, 1 br i1 %cmp61.us144.6, label %if.then63.us145.6, label %for.inc86.us149.6 if.then63.us145.6: ; preds = %for.inc86.us149.5 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 7) br label %for.inc86.us149.6 for.inc86.us149.6: ; preds = %if.then63.us145.6, %for.inc86.us149.5 %arrayidx60.us143.7 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %51 = load i32, ptr %arrayidx60.us143.7, align 8, !tbaa !5 %cmp61.us144.7 = icmp eq i32 %51, 1 br i1 %cmp61.us144.7, label %if.then63.us145.7, label %for.inc86.us149.7 if.then63.us145.7: ; preds = %for.inc86.us149.6 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 8) br label %for.inc86.us149.7 for.inc86.us149.7: ; preds = %if.then63.us145.7, %for.inc86.us149.6 %arrayidx60.us143.8 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %52 = load i32, ptr %arrayidx60.us143.8, align 4, !tbaa !5 %cmp61.us144.8 = icmp eq i32 %52, 1 br i1 %cmp61.us144.8, label %if.then63.us145.8, label %for.inc86.us149.8 if.then63.us145.8: ; preds = %for.inc86.us149.7 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 9) br label %for.inc86.us149.8 for.inc86.us149.8: ; preds = %if.then63.us145.8, %for.inc86.us149.7 %arrayidx60.us143.9 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %53 = load i32, ptr %arrayidx60.us143.9, align 8, !tbaa !5 %cmp61.us144.9 = icmp eq i32 %53, 1 br i1 %cmp61.us144.9, label %if.then63.us145.9, label %for.inc86.us149.9 if.then63.us145.9: ; preds = %for.inc86.us149.8 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 10) br label %for.inc86.us149.9 for.inc86.us149.9: ; preds = %if.then63.us145.9, %for.inc86.us149.8 %arrayidx60.us143.10 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %54 = load i32, ptr %arrayidx60.us143.10, align 4, !tbaa !5 %cmp61.us144.10 = icmp eq i32 %54, 1 br i1 %cmp61.us144.10, label %if.then63.us145.10, label %for.inc86.us149.10 if.then63.us145.10: ; preds = %for.inc86.us149.9 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 11) br label %for.inc86.us149.10 for.inc86.us149.10: ; preds = %if.then63.us145.10, %for.inc86.us149.9 %arrayidx60.us143.11 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %55 = load i32, ptr %arrayidx60.us143.11, align 8, !tbaa !5 %cmp61.us144.11 = icmp eq i32 %55, 1 br i1 %cmp61.us144.11, label %if.then63.us145.11, label %for.inc86.us149.11 if.then63.us145.11: ; preds = %for.inc86.us149.10 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 12) br label %for.inc86.us149.11 for.inc86.us149.11: ; preds = %if.then63.us145.11, %for.inc86.us149.10 %arrayidx60.us143.12 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 13 %56 = load i32, ptr %arrayidx60.us143.12, align 4, !tbaa !5 %cmp61.us144.12 = icmp eq i32 %56, 1 br i1 %cmp61.us144.12, label %if.then63.us145.12, label %for.inc89 if.then63.us145.12: ; preds = %for.inc86.us149.11 store i8 68, ptr %s, align 1, !tbaa !9 br label %for.inc89.sink.split if.then63: ; preds = %for.body56.preheader %57 = load i8, ptr %s, align 1, !tbaa !9 %conv83 = sext i8 %57 to i32 %call84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83, i32 noundef 1) br label %for.inc86 for.inc86: ; preds = %for.body56.preheader, %if.then63 %arrayidx60.1 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %58 = load i32, ptr %arrayidx60.1, align 8, !tbaa !5 %cmp61.1 = icmp eq i32 %58, 1 br i1 %cmp61.1, label %if.then63.1, label %for.inc86.1 if.then63.1: ; preds = %for.inc86 %59 = load i8, ptr %s, align 1, !tbaa !9 %conv83.1 = sext i8 %59 to i32 %call84.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.1, i32 noundef 2) br label %for.inc86.1 for.inc86.1: ; preds = %if.then63.1, %for.inc86 %arrayidx60.2 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %60 = load i32, ptr %arrayidx60.2, align 4, !tbaa !5 %cmp61.2 = icmp eq i32 %60, 1 br i1 %cmp61.2, label %if.then63.2, label %for.inc86.2 if.then63.2: ; preds = %for.inc86.1 %61 = load i8, ptr %s, align 1, !tbaa !9 %conv83.2 = sext i8 %61 to i32 %call84.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.2, i32 noundef 3) br label %for.inc86.2 for.inc86.2: ; preds = %if.then63.2, %for.inc86.1 %arrayidx60.3 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %62 = load i32, ptr %arrayidx60.3, align 8, !tbaa !5 %cmp61.3 = icmp eq i32 %62, 1 br i1 %cmp61.3, label %if.then63.3, label %for.inc86.3 if.then63.3: ; preds = %for.inc86.2 %63 = load i8, ptr %s, align 1, !tbaa !9 %conv83.3 = sext i8 %63 to i32 %call84.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.3, i32 noundef 4) br label %for.inc86.3 for.inc86.3: ; preds = %if.then63.3, %for.inc86.2 %arrayidx60.4 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %64 = load i32, ptr %arrayidx60.4, align 4, !tbaa !5 %cmp61.4 = icmp eq i32 %64, 1 br i1 %cmp61.4, label %if.then63.4, label %for.inc86.4 if.then63.4: ; preds = %for.inc86.3 %65 = load i8, ptr %s, align 1, !tbaa !9 %conv83.4 = sext i8 %65 to i32 %call84.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.4, i32 noundef 5) br label %for.inc86.4 for.inc86.4: ; preds = %if.then63.4, %for.inc86.3 %arrayidx60.5 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %66 = load i32, ptr %arrayidx60.5, align 8, !tbaa !5 %cmp61.5 = icmp eq i32 %66, 1 br i1 %cmp61.5, label %if.then63.5, label %for.inc86.5 if.then63.5: ; preds = %for.inc86.4 %67 = load i8, ptr %s, align 1, !tbaa !9 %conv83.5 = sext i8 %67 to i32 %call84.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.5, i32 noundef 6) br label %for.inc86.5 for.inc86.5: ; preds = %if.then63.5, %for.inc86.4 %arrayidx60.6 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %68 = load i32, ptr %arrayidx60.6, align 4, !tbaa !5 %cmp61.6 = icmp eq i32 %68, 1 br i1 %cmp61.6, label %if.then63.6, label %for.inc86.6 if.then63.6: ; preds = %for.inc86.5 %69 = load i8, ptr %s, align 1, !tbaa !9 %conv83.6 = sext i8 %69 to i32 %call84.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.6, i32 noundef 7) br label %for.inc86.6 for.inc86.6: ; preds = %if.then63.6, %for.inc86.5 %arrayidx60.7 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %70 = load i32, ptr %arrayidx60.7, align 8, !tbaa !5 %cmp61.7 = icmp eq i32 %70, 1 br i1 %cmp61.7, label %if.then63.7, label %for.inc86.7 if.then63.7: ; preds = %for.inc86.6 %71 = load i8, ptr %s, align 1, !tbaa !9 %conv83.7 = sext i8 %71 to i32 %call84.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.7, i32 noundef 8) br label %for.inc86.7 for.inc86.7: ; preds = %if.then63.7, %for.inc86.6 %arrayidx60.8 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %72 = load i32, ptr %arrayidx60.8, align 4, !tbaa !5 %cmp61.8 = icmp eq i32 %72, 1 br i1 %cmp61.8, label %if.then63.8, label %for.inc86.8 if.then63.8: ; preds = %for.inc86.7 %73 = load i8, ptr %s, align 1, !tbaa !9 %conv83.8 = sext i8 %73 to i32 %call84.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.8, i32 noundef 9) br label %for.inc86.8 for.inc86.8: ; preds = %if.then63.8, %for.inc86.7 %arrayidx60.9 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %74 = load i32, ptr %arrayidx60.9, align 8, !tbaa !5 %cmp61.9 = icmp eq i32 %74, 1 br i1 %cmp61.9, label %if.then63.9, label %for.inc86.9 if.then63.9: ; preds = %for.inc86.8 %75 = load i8, ptr %s, align 1, !tbaa !9 %conv83.9 = sext i8 %75 to i32 %call84.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.9, i32 noundef 10) br label %for.inc86.9 for.inc86.9: ; preds = %if.then63.9, %for.inc86.8 %arrayidx60.10 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %76 = load i32, ptr %arrayidx60.10, align 4, !tbaa !5 %cmp61.10 = icmp eq i32 %76, 1 br i1 %cmp61.10, label %if.then63.10, label %for.inc86.10 if.then63.10: ; preds = %for.inc86.9 %77 = load i8, ptr %s, align 1, !tbaa !9 %conv83.10 = sext i8 %77 to i32 %call84.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.10, i32 noundef 11) br label %for.inc86.10 for.inc86.10: ; preds = %if.then63.10, %for.inc86.9 %arrayidx60.11 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %78 = load i32, ptr %arrayidx60.11, align 8, !tbaa !5 %cmp61.11 = icmp eq i32 %78, 1 br i1 %cmp61.11, label %if.then63.11, label %for.inc86.11 if.then63.11: ; preds = %for.inc86.10 %79 = load i8, ptr %s, align 1, !tbaa !9 %conv83.11 = sext i8 %79 to i32 %call84.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.11, i32 noundef 12) br label %for.inc86.11 for.inc86.11: ; preds = %if.then63.11, %for.inc86.10 %arrayidx60.12 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 13 %80 = load i32, ptr %arrayidx60.12, align 4, !tbaa !5 %cmp61.12 = icmp eq i32 %80, 1 br i1 %cmp61.12, label %if.then63.12, label %for.inc89 if.then63.12: ; preds = %for.inc86.11 %81 = load i8, ptr %s, align 1, !tbaa !9 %conv83.12 = sext i8 %81 to i32 br label %for.inc89.sink.split for.inc89.sink.split: ; preds = %if.then63.us.12, %if.then63.us119.12, %if.then63.us132.12, %if.then63.us145.12, %if.then63.12 %conv83.12.sink = phi i32 [ %conv83.12, %if.then63.12 ], [ 68, %if.then63.us145.12 ], [ 67, %if.then63.us132.12 ], [ 72, %if.then63.us119.12 ], [ 83, %if.then63.us.12 ] %call84.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.12.sink, i32 noundef 13) br label %for.inc89 for.inc89: ; preds = %for.inc89.sink.split, %for.inc86.11, %for.inc86.us149.11, %for.inc86.us136.11, %for.inc86.us123.11, %for.inc86.us.11 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %for.end91, label %for.cond53.preheader, !llvm.loop !12 for.end91: ; preds = %for.inc89 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %s) #3 call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %card) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %number) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include <stdio.h> #include <stdlib.h> int main(void) { int n, i, j; int cards[4][13] = { {0} }; char marks[4] = {'S', 'H', 'C', 'D'}; char in_mark; int in_rank; scanf("%d", &n); for (i = 0; i < n; i++) { scanf(" %c %d", &in_mark, &in_rank); switch (in_mark) { case 'S': cards[0][in_rank - 1] = 1; break; case 'H': cards[1][in_rank - 1] = 1; break; case 'C': cards[2][in_rank - 1] = 1; break; case 'D': cards[3][in_rank - 1] = 1; break; } } for(i = 0; i < 4; i++) { for (j = 0; j < 13; j++) { if (cards[i][j] == 0) printf("%c %d\n", marks[i], j + 1); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214585/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214585/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.marks = private unnamed_addr constant [4 x i8] c"SHCD", align 1 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c" %c %d\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %cards = alloca [4 x [13 x i32]], align 16 %in_mark = alloca i8, align 1 %in_rank = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %cards) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %cards, i8 0, i64 208, i1 false) call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %in_mark) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %in_rank) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp50 = icmp sgt i32 %0, 0 br i1 %cmp50, label %for.body, label %for.cond22.preheader.preheader for.body: ; preds = %entry, %for.inc %i.051 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %in_mark, ptr noundef nonnull %in_rank) %1 = load i8, ptr %in_mark, align 1, !tbaa !9 %conv = sext i8 %1 to i32 switch i32 %conv, label %for.inc [ i32 83, label %sw.bb i32 72, label %sw.bb3 i32 67, label %sw.bb8 i32 68, label %sw.bb13 ] sw.bb: ; preds = %for.body %2 = load i32, ptr %in_rank, align 4, !tbaa !5 %sub = add nsw i32 %2, -1 %idxprom = sext i32 %sub to i64 %arrayidx2 = getelementptr inbounds [13 x i32], ptr %cards, i64 0, i64 %idxprom br label %for.inc.sink.split sw.bb3: ; preds = %for.body %3 = load i32, ptr %in_rank, align 4, !tbaa !5 %sub5 = add nsw i32 %3, -1 %idxprom6 = sext i32 %sub5 to i64 %arrayidx7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 %idxprom6 br label %for.inc.sink.split sw.bb8: ; preds = %for.body %4 = load i32, ptr %in_rank, align 4, !tbaa !5 %sub10 = add nsw i32 %4, -1 %idxprom11 = sext i32 %sub10 to i64 %arrayidx12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 %idxprom11 br label %for.inc.sink.split sw.bb13: ; preds = %for.body %5 = load i32, ptr %in_rank, align 4, !tbaa !5 %sub15 = add nsw i32 %5, -1 %idxprom16 = sext i32 %sub15 to i64 %arrayidx17 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 %idxprom16 br label %for.inc.sink.split for.inc.sink.split: ; preds = %sw.bb13, %sw.bb8, %sw.bb3, %sw.bb %arrayidx2.sink = phi ptr [ %arrayidx2, %sw.bb ], [ %arrayidx7, %sw.bb3 ], [ %arrayidx12, %sw.bb8 ], [ %arrayidx17, %sw.bb13 ] store i32 1, ptr %arrayidx2.sink, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.inc.sink.split, %for.body %inc = add nuw nsw i32 %i.051, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %6 br i1 %cmp, label %for.body, label %for.cond22.preheader.preheader, !llvm.loop !10 for.cond22.preheader.preheader: ; preds = %for.inc, %entry br label %for.cond22.preheader for.cond22.preheader: ; preds = %for.cond22.preheader.preheader, %for.inc36.12 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc36.12 ], [ 0, %for.cond22.preheader.preheader ] %arrayidx33 = getelementptr inbounds [4 x i8], ptr @__const.main.marks, i64 0, i64 %indvars.iv %arrayidx29 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 0 %7 = load i32, ptr %arrayidx29, align 4, !tbaa !5 %cmp30 = icmp eq i32 %7, 0 br i1 %cmp30, label %if.then, label %for.inc36 if.then: ; preds = %for.cond22.preheader %8 = load i8, ptr %arrayidx33, align 1, !tbaa !9 %conv34 = sext i8 %8 to i32 %call35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv34, i32 noundef 1) br label %for.inc36 for.inc36: ; preds = %for.cond22.preheader, %if.then %arrayidx29.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1 %9 = load i32, ptr %arrayidx29.1, align 4, !tbaa !5 %cmp30.1 = icmp eq i32 %9, 0 br i1 %cmp30.1, label %if.then.1, label %for.inc36.1 if.then.1: ; preds = %for.inc36 %10 = load i8, ptr %arrayidx33, align 1, !tbaa !9 %conv34.1 = sext i8 %10 to i32 %call35.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv34.1, i32 noundef 2) br label %for.inc36.1 for.inc36.1: ; preds = %if.then.1, %for.inc36 %arrayidx29.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2 %11 = load i32, ptr %arrayidx29.2, align 4, !tbaa !5 %cmp30.2 = icmp eq i32 %11, 0 br i1 %cmp30.2, label %if.then.2, label %for.inc36.2 if.then.2: ; preds = %for.inc36.1 %12 = load i8, ptr %arrayidx33, align 1, !tbaa !9 %conv34.2 = sext i8 %12 to i32 %call35.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv34.2, i32 noundef 3) br label %for.inc36.2 for.inc36.2: ; preds = %if.then.2, %for.inc36.1 %arrayidx29.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3 %13 = load i32, ptr %arrayidx29.3, align 4, !tbaa !5 %cmp30.3 = icmp eq i32 %13, 0 br i1 %cmp30.3, label %if.then.3, label %for.inc36.3 if.then.3: ; preds = %for.inc36.2 %14 = load i8, ptr %arrayidx33, align 1, !tbaa !9 %conv34.3 = sext i8 %14 to i32 %call35.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv34.3, i32 noundef 4) br label %for.inc36.3 for.inc36.3: ; preds = %if.then.3, %for.inc36.2 %arrayidx29.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4 %15 = load i32, ptr %arrayidx29.4, align 4, !tbaa !5 %cmp30.4 = icmp eq i32 %15, 0 br i1 %cmp30.4, label %if.then.4, label %for.inc36.4 if.then.4: ; preds = %for.inc36.3 %16 = load i8, ptr %arrayidx33, align 1, !tbaa !9 %conv34.4 = sext i8 %16 to i32 %call35.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv34.4, i32 noundef 5) br label %for.inc36.4 for.inc36.4: ; preds = %if.then.4, %for.inc36.3 %arrayidx29.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5 %17 = load i32, ptr %arrayidx29.5, align 4, !tbaa !5 %cmp30.5 = icmp eq i32 %17, 0 br i1 %cmp30.5, label %if.then.5, label %for.inc36.5 if.then.5: ; preds = %for.inc36.4 %18 = load i8, ptr %arrayidx33, align 1, !tbaa !9 %conv34.5 = sext i8 %18 to i32 %call35.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv34.5, i32 noundef 6) br label %for.inc36.5 for.inc36.5: ; preds = %if.then.5, %for.inc36.4 %arrayidx29.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6 %19 = load i32, ptr %arrayidx29.6, align 4, !tbaa !5 %cmp30.6 = icmp eq i32 %19, 0 br i1 %cmp30.6, label %if.then.6, label %for.inc36.6 if.then.6: ; preds = %for.inc36.5 %20 = load i8, ptr %arrayidx33, align 1, !tbaa !9 %conv34.6 = sext i8 %20 to i32 %call35.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv34.6, i32 noundef 7) br label %for.inc36.6 for.inc36.6: ; preds = %if.then.6, %for.inc36.5 %arrayidx29.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7 %21 = load i32, ptr %arrayidx29.7, align 4, !tbaa !5 %cmp30.7 = icmp eq i32 %21, 0 br i1 %cmp30.7, label %if.then.7, label %for.inc36.7 if.then.7: ; preds = %for.inc36.6 %22 = load i8, ptr %arrayidx33, align 1, !tbaa !9 %conv34.7 = sext i8 %22 to i32 %call35.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv34.7, i32 noundef 8) br label %for.inc36.7 for.inc36.7: ; preds = %if.then.7, %for.inc36.6 %arrayidx29.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8 %23 = load i32, ptr %arrayidx29.8, align 4, !tbaa !5 %cmp30.8 = icmp eq i32 %23, 0 br i1 %cmp30.8, label %if.then.8, label %for.inc36.8 if.then.8: ; preds = %for.inc36.7 %24 = load i8, ptr %arrayidx33, align 1, !tbaa !9 %conv34.8 = sext i8 %24 to i32 %call35.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv34.8, i32 noundef 9) br label %for.inc36.8 for.inc36.8: ; preds = %if.then.8, %for.inc36.7 %arrayidx29.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9 %25 = load i32, ptr %arrayidx29.9, align 4, !tbaa !5 %cmp30.9 = icmp eq i32 %25, 0 br i1 %cmp30.9, label %if.then.9, label %for.inc36.9 if.then.9: ; preds = %for.inc36.8 %26 = load i8, ptr %arrayidx33, align 1, !tbaa !9 %conv34.9 = sext i8 %26 to i32 %call35.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv34.9, i32 noundef 10) br label %for.inc36.9 for.inc36.9: ; preds = %if.then.9, %for.inc36.8 %arrayidx29.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10 %27 = load i32, ptr %arrayidx29.10, align 4, !tbaa !5 %cmp30.10 = icmp eq i32 %27, 0 br i1 %cmp30.10, label %if.then.10, label %for.inc36.10 if.then.10: ; preds = %for.inc36.9 %28 = load i8, ptr %arrayidx33, align 1, !tbaa !9 %conv34.10 = sext i8 %28 to i32 %call35.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv34.10, i32 noundef 11) br label %for.inc36.10 for.inc36.10: ; preds = %if.then.10, %for.inc36.9 %arrayidx29.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11 %29 = load i32, ptr %arrayidx29.11, align 4, !tbaa !5 %cmp30.11 = icmp eq i32 %29, 0 br i1 %cmp30.11, label %if.then.11, label %for.inc36.11 if.then.11: ; preds = %for.inc36.10 %30 = load i8, ptr %arrayidx33, align 1, !tbaa !9 %conv34.11 = sext i8 %30 to i32 %call35.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv34.11, i32 noundef 12) br label %for.inc36.11 for.inc36.11: ; preds = %if.then.11, %for.inc36.10 %arrayidx29.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12 %31 = load i32, ptr %arrayidx29.12, align 4, !tbaa !5 %cmp30.12 = icmp eq i32 %31, 0 br i1 %cmp30.12, label %if.then.12, label %for.inc36.12 if.then.12: ; preds = %for.inc36.11 %32 = load i8, ptr %arrayidx33, align 1, !tbaa !9 %conv34.12 = sext i8 %32 to i32 %call35.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv34.12, i32 noundef 13) br label %for.inc36.12 for.inc36.12: ; preds = %if.then.12, %for.inc36.11 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %for.end41, label %for.cond22.preheader, !llvm.loop !12 for.end41: ; preds = %for.inc36.12 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %in_rank) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %in_mark) #4 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %cards) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include <stdio.h> int getID(char); char getSuit(int); int main(void) { int card[4][13]; int i,j,num; for(i=0;i<4;i++) { for(j=0;j<13;j++) { card[i][j]=0; } } scanf("%d",&num); for(i=0;i<num;i++) { char suit; int id,rank; scanf(" %c",&suit); scanf("%d",&rank); id=getID(suit); card[id][rank-1]=1; } for(i=0;i<4;i++) { for(j=0;j<13;j++) { if(card[i][j]==0) printf("%c %d\n",getSuit(i),j+1); } } return 0; } int getID(char suit) { int id; if(suit=='S') id=0; else if(suit=='H') id=1; else if(suit=='C') id=2; else id=3; return id; } char getSuit(int id) { char suit; if(id==0) suit='S'; else if(id==1) suit='H'; else if(id==2) suit='C'; else suit='D'; return suit; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214628/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214628/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c" %c\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %card = alloca [4 x [13 x i32]], align 16 %num = alloca i32, align 4 %suit = alloca i8, align 1 %rank = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %card) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %card, i8 0, i64 208, i1 false), !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %num) %0 = load i32, ptr %num, align 4, !tbaa !5 %cmp1058 = icmp sgt i32 %0, 0 br i1 %cmp1058, label %for.body11, label %for.cond25.preheader.preheader for.body11: ; preds = %entry, %getID.exit %i.159 = phi i32 [ %inc20, %getID.exit ], [ 0, %entry ] call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %suit) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %rank) #5 %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %suit) %call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %rank) %1 = load i8, ptr %suit, align 1, !tbaa !9 switch i8 %1, label %if.else11.i [ i8 83, label %getID.exit i8 72, label %if.then5.i i8 67, label %if.then10.i ] if.then5.i: ; preds = %for.body11 br label %getID.exit if.then10.i: ; preds = %for.body11 br label %getID.exit if.else11.i: ; preds = %for.body11 br label %getID.exit getID.exit: ; preds = %for.body11, %if.then5.i, %if.then10.i, %if.else11.i %id.0.i = phi i64 [ 1, %if.then5.i ], [ 2, %if.then10.i ], [ 3, %if.else11.i ], [ 0, %for.body11 ] %2 = load i32, ptr %rank, align 4, !tbaa !5 %sub = add nsw i32 %2, -1 %idxprom17 = sext i32 %sub to i64 %arrayidx18 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %id.0.i, i64 %idxprom17 store i32 1, ptr %arrayidx18, align 4, !tbaa !5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %rank) #5 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %suit) #5 %inc20 = add nuw nsw i32 %i.159, 1 %3 = load i32, ptr %num, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc20, %3 br i1 %cmp10, label %for.body11, label %for.cond25.preheader.preheader, !llvm.loop !10 for.cond25.preheader.preheader: ; preds = %getID.exit, %entry br label %for.cond25.preheader for.cond25.preheader: ; preds = %for.cond25.preheader.preheader, %for.inc38 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc38 ], [ 0, %for.cond25.preheader.preheader ] %4 = trunc i64 %indvars.iv to i32 %arrayidx31 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 0 %5 = load i32, ptr %arrayidx31, align 4, !tbaa !5 %cmp32 = icmp eq i32 %5, 0 switch i32 %4, label %for.body27.preheader [ i32 0, label %for.body27.us.preheader i32 1, label %for.body27.us62.preheader i32 2, label %for.body27.us76.preheader ] for.body27.us76.preheader: ; preds = %for.cond25.preheader br i1 %cmp32, label %if.then.us81, label %for.inc35.us86 for.body27.us62.preheader: ; preds = %for.cond25.preheader br i1 %cmp32, label %if.then.us67, label %for.inc35.us72 for.body27.us.preheader: ; preds = %for.cond25.preheader br i1 %cmp32, label %if.then.us, label %for.inc35.us for.body27.preheader: ; preds = %for.cond25.preheader br i1 %cmp32, label %if.then, label %for.inc35 if.then.us: ; preds = %for.body27.us.preheader %call34.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 1) br label %for.inc35.us for.inc35.us: ; preds = %if.then.us, %for.body27.us.preheader %arrayidx31.us.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1 %6 = load i32, ptr %arrayidx31.us.1, align 4, !tbaa !5 %cmp32.us.1 = icmp eq i32 %6, 0 br i1 %cmp32.us.1, label %if.then.us.1, label %for.inc35.us.1 if.then.us.1: ; preds = %for.inc35.us %call34.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 2) br label %for.inc35.us.1 for.inc35.us.1: ; preds = %if.then.us.1, %for.inc35.us %arrayidx31.us.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %7 = load i32, ptr %arrayidx31.us.2, align 4, !tbaa !5 %cmp32.us.2 = icmp eq i32 %7, 0 br i1 %cmp32.us.2, label %if.then.us.2, label %for.inc35.us.2 if.then.us.2: ; preds = %for.inc35.us.1 %call34.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 3) br label %for.inc35.us.2 for.inc35.us.2: ; preds = %if.then.us.2, %for.inc35.us.1 %arrayidx31.us.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %8 = load i32, ptr %arrayidx31.us.3, align 4, !tbaa !5 %cmp32.us.3 = icmp eq i32 %8, 0 br i1 %cmp32.us.3, label %if.then.us.3, label %for.inc35.us.3 if.then.us.3: ; preds = %for.inc35.us.2 %call34.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 4) br label %for.inc35.us.3 for.inc35.us.3: ; preds = %if.then.us.3, %for.inc35.us.2 %arrayidx31.us.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %9 = load i32, ptr %arrayidx31.us.4, align 4, !tbaa !5 %cmp32.us.4 = icmp eq i32 %9, 0 br i1 %cmp32.us.4, label %if.then.us.4, label %for.inc35.us.4 if.then.us.4: ; preds = %for.inc35.us.3 %call34.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 5) br label %for.inc35.us.4 for.inc35.us.4: ; preds = %if.then.us.4, %for.inc35.us.3 %arrayidx31.us.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %10 = load i32, ptr %arrayidx31.us.5, align 4, !tbaa !5 %cmp32.us.5 = icmp eq i32 %10, 0 br i1 %cmp32.us.5, label %if.then.us.5, label %for.inc35.us.5 if.then.us.5: ; preds = %for.inc35.us.4 %call34.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 6) br label %for.inc35.us.5 for.inc35.us.5: ; preds = %if.then.us.5, %for.inc35.us.4 %arrayidx31.us.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %11 = load i32, ptr %arrayidx31.us.6, align 4, !tbaa !5 %cmp32.us.6 = icmp eq i32 %11, 0 br i1 %cmp32.us.6, label %if.then.us.6, label %for.inc35.us.6 if.then.us.6: ; preds = %for.inc35.us.5 %call34.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 7) br label %for.inc35.us.6 for.inc35.us.6: ; preds = %if.then.us.6, %for.inc35.us.5 %arrayidx31.us.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %12 = load i32, ptr %arrayidx31.us.7, align 4, !tbaa !5 %cmp32.us.7 = icmp eq i32 %12, 0 br i1 %cmp32.us.7, label %if.then.us.7, label %for.inc35.us.7 if.then.us.7: ; preds = %for.inc35.us.6 %call34.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 8) br label %for.inc35.us.7 for.inc35.us.7: ; preds = %if.then.us.7, %for.inc35.us.6 %arrayidx31.us.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %13 = load i32, ptr %arrayidx31.us.8, align 4, !tbaa !5 %cmp32.us.8 = icmp eq i32 %13, 0 br i1 %cmp32.us.8, label %if.then.us.8, label %for.inc35.us.8 if.then.us.8: ; preds = %for.inc35.us.7 %call34.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 9) br label %for.inc35.us.8 for.inc35.us.8: ; preds = %if.then.us.8, %for.inc35.us.7 %arrayidx31.us.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %14 = load i32, ptr %arrayidx31.us.9, align 4, !tbaa !5 %cmp32.us.9 = icmp eq i32 %14, 0 br i1 %cmp32.us.9, label %if.then.us.9, label %for.inc35.us.9 if.then.us.9: ; preds = %for.inc35.us.8 %call34.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 10) br label %for.inc35.us.9 for.inc35.us.9: ; preds = %if.then.us.9, %for.inc35.us.8 %arrayidx31.us.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %15 = load i32, ptr %arrayidx31.us.10, align 4, !tbaa !5 %cmp32.us.10 = icmp eq i32 %15, 0 br i1 %cmp32.us.10, label %if.then.us.10, label %for.inc35.us.10 if.then.us.10: ; preds = %for.inc35.us.9 %call34.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 11) br label %for.inc35.us.10 for.inc35.us.10: ; preds = %if.then.us.10, %for.inc35.us.9 %arrayidx31.us.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %16 = load i32, ptr %arrayidx31.us.11, align 4, !tbaa !5 %cmp32.us.11 = icmp eq i32 %16, 0 br i1 %cmp32.us.11, label %if.then.us.11, label %for.inc35.us.11 if.then.us.11: ; preds = %for.inc35.us.10 %call34.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 12) br label %for.inc35.us.11 for.inc35.us.11: ; preds = %if.then.us.11, %for.inc35.us.10 %arrayidx31.us.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %17 = load i32, ptr %arrayidx31.us.12, align 4, !tbaa !5 %cmp32.us.12 = icmp eq i32 %17, 0 br i1 %cmp32.us.12, label %for.inc38.sink.split, label %for.inc38 if.then.us67: ; preds = %for.body27.us62.preheader %call34.us71 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 1) br label %for.inc35.us72 for.inc35.us72: ; preds = %if.then.us67, %for.body27.us62.preheader %arrayidx31.us65.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1 %18 = load i32, ptr %arrayidx31.us65.1, align 4, !tbaa !5 %cmp32.us66.1 = icmp eq i32 %18, 0 br i1 %cmp32.us66.1, label %if.then.us67.1, label %for.inc35.us72.1 if.then.us67.1: ; preds = %for.inc35.us72 %call34.us71.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 2) br label %for.inc35.us72.1 for.inc35.us72.1: ; preds = %if.then.us67.1, %for.inc35.us72 %arrayidx31.us65.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %19 = load i32, ptr %arrayidx31.us65.2, align 4, !tbaa !5 %cmp32.us66.2 = icmp eq i32 %19, 0 br i1 %cmp32.us66.2, label %if.then.us67.2, label %for.inc35.us72.2 if.then.us67.2: ; preds = %for.inc35.us72.1 %call34.us71.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 3) br label %for.inc35.us72.2 for.inc35.us72.2: ; preds = %if.then.us67.2, %for.inc35.us72.1 %arrayidx31.us65.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %20 = load i32, ptr %arrayidx31.us65.3, align 4, !tbaa !5 %cmp32.us66.3 = icmp eq i32 %20, 0 br i1 %cmp32.us66.3, label %if.then.us67.3, label %for.inc35.us72.3 if.then.us67.3: ; preds = %for.inc35.us72.2 %call34.us71.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 4) br label %for.inc35.us72.3 for.inc35.us72.3: ; preds = %if.then.us67.3, %for.inc35.us72.2 %arrayidx31.us65.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %21 = load i32, ptr %arrayidx31.us65.4, align 4, !tbaa !5 %cmp32.us66.4 = icmp eq i32 %21, 0 br i1 %cmp32.us66.4, label %if.then.us67.4, label %for.inc35.us72.4 if.then.us67.4: ; preds = %for.inc35.us72.3 %call34.us71.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 5) br label %for.inc35.us72.4 for.inc35.us72.4: ; preds = %if.then.us67.4, %for.inc35.us72.3 %arrayidx31.us65.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %22 = load i32, ptr %arrayidx31.us65.5, align 4, !tbaa !5 %cmp32.us66.5 = icmp eq i32 %22, 0 br i1 %cmp32.us66.5, label %if.then.us67.5, label %for.inc35.us72.5 if.then.us67.5: ; preds = %for.inc35.us72.4 %call34.us71.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 6) br label %for.inc35.us72.5 for.inc35.us72.5: ; preds = %if.then.us67.5, %for.inc35.us72.4 %arrayidx31.us65.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %23 = load i32, ptr %arrayidx31.us65.6, align 4, !tbaa !5 %cmp32.us66.6 = icmp eq i32 %23, 0 br i1 %cmp32.us66.6, label %if.then.us67.6, label %for.inc35.us72.6 if.then.us67.6: ; preds = %for.inc35.us72.5 %call34.us71.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 7) br label %for.inc35.us72.6 for.inc35.us72.6: ; preds = %if.then.us67.6, %for.inc35.us72.5 %arrayidx31.us65.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %24 = load i32, ptr %arrayidx31.us65.7, align 4, !tbaa !5 %cmp32.us66.7 = icmp eq i32 %24, 0 br i1 %cmp32.us66.7, label %if.then.us67.7, label %for.inc35.us72.7 if.then.us67.7: ; preds = %for.inc35.us72.6 %call34.us71.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 8) br label %for.inc35.us72.7 for.inc35.us72.7: ; preds = %if.then.us67.7, %for.inc35.us72.6 %arrayidx31.us65.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %25 = load i32, ptr %arrayidx31.us65.8, align 4, !tbaa !5 %cmp32.us66.8 = icmp eq i32 %25, 0 br i1 %cmp32.us66.8, label %if.then.us67.8, label %for.inc35.us72.8 if.then.us67.8: ; preds = %for.inc35.us72.7 %call34.us71.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 9) br label %for.inc35.us72.8 for.inc35.us72.8: ; preds = %if.then.us67.8, %for.inc35.us72.7 %arrayidx31.us65.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %26 = load i32, ptr %arrayidx31.us65.9, align 4, !tbaa !5 %cmp32.us66.9 = icmp eq i32 %26, 0 br i1 %cmp32.us66.9, label %if.then.us67.9, label %for.inc35.us72.9 if.then.us67.9: ; preds = %for.inc35.us72.8 %call34.us71.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 10) br label %for.inc35.us72.9 for.inc35.us72.9: ; preds = %if.then.us67.9, %for.inc35.us72.8 %arrayidx31.us65.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %27 = load i32, ptr %arrayidx31.us65.10, align 4, !tbaa !5 %cmp32.us66.10 = icmp eq i32 %27, 0 br i1 %cmp32.us66.10, label %if.then.us67.10, label %for.inc35.us72.10 if.then.us67.10: ; preds = %for.inc35.us72.9 %call34.us71.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 11) br label %for.inc35.us72.10 for.inc35.us72.10: ; preds = %if.then.us67.10, %for.inc35.us72.9 %arrayidx31.us65.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %28 = load i32, ptr %arrayidx31.us65.11, align 4, !tbaa !5 %cmp32.us66.11 = icmp eq i32 %28, 0 br i1 %cmp32.us66.11, label %if.then.us67.11, label %for.inc35.us72.11 if.then.us67.11: ; preds = %for.inc35.us72.10 %call34.us71.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 12) br label %for.inc35.us72.11 for.inc35.us72.11: ; preds = %if.then.us67.11, %for.inc35.us72.10 %arrayidx31.us65.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %29 = load i32, ptr %arrayidx31.us65.12, align 4, !tbaa !5 %cmp32.us66.12 = icmp eq i32 %29, 0 br i1 %cmp32.us66.12, label %for.inc38.sink.split, label %for.inc38 if.then.us81: ; preds = %for.body27.us76.preheader %call34.us85 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 1) br label %for.inc35.us86 for.inc35.us86: ; preds = %if.then.us81, %for.body27.us76.preheader %arrayidx31.us79.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1 %30 = load i32, ptr %arrayidx31.us79.1, align 4, !tbaa !5 %cmp32.us80.1 = icmp eq i32 %30, 0 br i1 %cmp32.us80.1, label %if.then.us81.1, label %for.inc35.us86.1 if.then.us81.1: ; preds = %for.inc35.us86 %call34.us85.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 2) br label %for.inc35.us86.1 for.inc35.us86.1: ; preds = %if.then.us81.1, %for.inc35.us86 %arrayidx31.us79.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %31 = load i32, ptr %arrayidx31.us79.2, align 4, !tbaa !5 %cmp32.us80.2 = icmp eq i32 %31, 0 br i1 %cmp32.us80.2, label %if.then.us81.2, label %for.inc35.us86.2 if.then.us81.2: ; preds = %for.inc35.us86.1 %call34.us85.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 3) br label %for.inc35.us86.2 for.inc35.us86.2: ; preds = %if.then.us81.2, %for.inc35.us86.1 %arrayidx31.us79.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %32 = load i32, ptr %arrayidx31.us79.3, align 4, !tbaa !5 %cmp32.us80.3 = icmp eq i32 %32, 0 br i1 %cmp32.us80.3, label %if.then.us81.3, label %for.inc35.us86.3 if.then.us81.3: ; preds = %for.inc35.us86.2 %call34.us85.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 4) br label %for.inc35.us86.3 for.inc35.us86.3: ; preds = %if.then.us81.3, %for.inc35.us86.2 %arrayidx31.us79.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %33 = load i32, ptr %arrayidx31.us79.4, align 4, !tbaa !5 %cmp32.us80.4 = icmp eq i32 %33, 0 br i1 %cmp32.us80.4, label %if.then.us81.4, label %for.inc35.us86.4 if.then.us81.4: ; preds = %for.inc35.us86.3 %call34.us85.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 5) br label %for.inc35.us86.4 for.inc35.us86.4: ; preds = %if.then.us81.4, %for.inc35.us86.3 %arrayidx31.us79.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %34 = load i32, ptr %arrayidx31.us79.5, align 4, !tbaa !5 %cmp32.us80.5 = icmp eq i32 %34, 0 br i1 %cmp32.us80.5, label %if.then.us81.5, label %for.inc35.us86.5 if.then.us81.5: ; preds = %for.inc35.us86.4 %call34.us85.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 6) br label %for.inc35.us86.5 for.inc35.us86.5: ; preds = %if.then.us81.5, %for.inc35.us86.4 %arrayidx31.us79.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %35 = load i32, ptr %arrayidx31.us79.6, align 4, !tbaa !5 %cmp32.us80.6 = icmp eq i32 %35, 0 br i1 %cmp32.us80.6, label %if.then.us81.6, label %for.inc35.us86.6 if.then.us81.6: ; preds = %for.inc35.us86.5 %call34.us85.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 7) br label %for.inc35.us86.6 for.inc35.us86.6: ; preds = %if.then.us81.6, %for.inc35.us86.5 %arrayidx31.us79.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %36 = load i32, ptr %arrayidx31.us79.7, align 4, !tbaa !5 %cmp32.us80.7 = icmp eq i32 %36, 0 br i1 %cmp32.us80.7, label %if.then.us81.7, label %for.inc35.us86.7 if.then.us81.7: ; preds = %for.inc35.us86.6 %call34.us85.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 8) br label %for.inc35.us86.7 for.inc35.us86.7: ; preds = %if.then.us81.7, %for.inc35.us86.6 %arrayidx31.us79.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %37 = load i32, ptr %arrayidx31.us79.8, align 4, !tbaa !5 %cmp32.us80.8 = icmp eq i32 %37, 0 br i1 %cmp32.us80.8, label %if.then.us81.8, label %for.inc35.us86.8 if.then.us81.8: ; preds = %for.inc35.us86.7 %call34.us85.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 9) br label %for.inc35.us86.8 for.inc35.us86.8: ; preds = %if.then.us81.8, %for.inc35.us86.7 %arrayidx31.us79.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %38 = load i32, ptr %arrayidx31.us79.9, align 4, !tbaa !5 %cmp32.us80.9 = icmp eq i32 %38, 0 br i1 %cmp32.us80.9, label %if.then.us81.9, label %for.inc35.us86.9 if.then.us81.9: ; preds = %for.inc35.us86.8 %call34.us85.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 10) br label %for.inc35.us86.9 for.inc35.us86.9: ; preds = %if.then.us81.9, %for.inc35.us86.8 %arrayidx31.us79.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %39 = load i32, ptr %arrayidx31.us79.10, align 4, !tbaa !5 %cmp32.us80.10 = icmp eq i32 %39, 0 br i1 %cmp32.us80.10, label %if.then.us81.10, label %for.inc35.us86.10 if.then.us81.10: ; preds = %for.inc35.us86.9 %call34.us85.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 11) br label %for.inc35.us86.10 for.inc35.us86.10: ; preds = %if.then.us81.10, %for.inc35.us86.9 %arrayidx31.us79.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %40 = load i32, ptr %arrayidx31.us79.11, align 4, !tbaa !5 %cmp32.us80.11 = icmp eq i32 %40, 0 br i1 %cmp32.us80.11, label %if.then.us81.11, label %for.inc35.us86.11 if.then.us81.11: ; preds = %for.inc35.us86.10 %call34.us85.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 12) br label %for.inc35.us86.11 for.inc35.us86.11: ; preds = %if.then.us81.11, %for.inc35.us86.10 %arrayidx31.us79.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %41 = load i32, ptr %arrayidx31.us79.12, align 4, !tbaa !5 %cmp32.us80.12 = icmp eq i32 %41, 0 br i1 %cmp32.us80.12, label %for.inc38.sink.split, label %for.inc38 if.then: ; preds = %for.body27.preheader %call34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 1) br label %for.inc35 for.inc35: ; preds = %for.body27.preheader, %if.then %arrayidx31.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1 %42 = load i32, ptr %arrayidx31.1, align 4, !tbaa !5 %cmp32.1 = icmp eq i32 %42, 0 br i1 %cmp32.1, label %if.then.1, label %for.inc35.1 if.then.1: ; preds = %for.inc35 %call34.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 2) br label %for.inc35.1 for.inc35.1: ; preds = %if.then.1, %for.inc35 %arrayidx31.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %43 = load i32, ptr %arrayidx31.2, align 4, !tbaa !5 %cmp32.2 = icmp eq i32 %43, 0 br i1 %cmp32.2, label %if.then.2, label %for.inc35.2 if.then.2: ; preds = %for.inc35.1 %call34.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 3) br label %for.inc35.2 for.inc35.2: ; preds = %if.then.2, %for.inc35.1 %arrayidx31.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %44 = load i32, ptr %arrayidx31.3, align 4, !tbaa !5 %cmp32.3 = icmp eq i32 %44, 0 br i1 %cmp32.3, label %if.then.3, label %for.inc35.3 if.then.3: ; preds = %for.inc35.2 %call34.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 4) br label %for.inc35.3 for.inc35.3: ; preds = %if.then.3, %for.inc35.2 %arrayidx31.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %45 = load i32, ptr %arrayidx31.4, align 4, !tbaa !5 %cmp32.4 = icmp eq i32 %45, 0 br i1 %cmp32.4, label %if.then.4, label %for.inc35.4 if.then.4: ; preds = %for.inc35.3 %call34.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 5) br label %for.inc35.4 for.inc35.4: ; preds = %if.then.4, %for.inc35.3 %arrayidx31.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %46 = load i32, ptr %arrayidx31.5, align 4, !tbaa !5 %cmp32.5 = icmp eq i32 %46, 0 br i1 %cmp32.5, label %if.then.5, label %for.inc35.5 if.then.5: ; preds = %for.inc35.4 %call34.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 6) br label %for.inc35.5 for.inc35.5: ; preds = %if.then.5, %for.inc35.4 %arrayidx31.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %47 = load i32, ptr %arrayidx31.6, align 4, !tbaa !5 %cmp32.6 = icmp eq i32 %47, 0 br i1 %cmp32.6, label %if.then.6, label %for.inc35.6 if.then.6: ; preds = %for.inc35.5 %call34.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 7) br label %for.inc35.6 for.inc35.6: ; preds = %if.then.6, %for.inc35.5 %arrayidx31.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %48 = load i32, ptr %arrayidx31.7, align 4, !tbaa !5 %cmp32.7 = icmp eq i32 %48, 0 br i1 %cmp32.7, label %if.then.7, label %for.inc35.7 if.then.7: ; preds = %for.inc35.6 %call34.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 8) br label %for.inc35.7 for.inc35.7: ; preds = %if.then.7, %for.inc35.6 %arrayidx31.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %49 = load i32, ptr %arrayidx31.8, align 4, !tbaa !5 %cmp32.8 = icmp eq i32 %49, 0 br i1 %cmp32.8, label %if.then.8, label %for.inc35.8 if.then.8: ; preds = %for.inc35.7 %call34.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 9) br label %for.inc35.8 for.inc35.8: ; preds = %if.then.8, %for.inc35.7 %arrayidx31.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %50 = load i32, ptr %arrayidx31.9, align 4, !tbaa !5 %cmp32.9 = icmp eq i32 %50, 0 br i1 %cmp32.9, label %if.then.9, label %for.inc35.9 if.then.9: ; preds = %for.inc35.8 %call34.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 10) br label %for.inc35.9 for.inc35.9: ; preds = %if.then.9, %for.inc35.8 %arrayidx31.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %51 = load i32, ptr %arrayidx31.10, align 4, !tbaa !5 %cmp32.10 = icmp eq i32 %51, 0 br i1 %cmp32.10, label %if.then.10, label %for.inc35.10 if.then.10: ; preds = %for.inc35.9 %call34.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 11) br label %for.inc35.10 for.inc35.10: ; preds = %if.then.10, %for.inc35.9 %arrayidx31.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %52 = load i32, ptr %arrayidx31.11, align 4, !tbaa !5 %cmp32.11 = icmp eq i32 %52, 0 br i1 %cmp32.11, label %if.then.11, label %for.inc35.11 if.then.11: ; preds = %for.inc35.10 %call34.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 12) br label %for.inc35.11 for.inc35.11: ; preds = %if.then.11, %for.inc35.10 %arrayidx31.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %53 = load i32, ptr %arrayidx31.12, align 4, !tbaa !5 %cmp32.12 = icmp eq i32 %53, 0 br i1 %cmp32.12, label %for.inc38.sink.split, label %for.inc38 for.inc38.sink.split: ; preds = %for.inc35.11, %for.inc35.us86.11, %for.inc35.us72.11, %for.inc35.us.11 %.sink = phi i32 [ 83, %for.inc35.us.11 ], [ 72, %for.inc35.us72.11 ], [ 67, %for.inc35.us86.11 ], [ 68, %for.inc35.11 ] %call34.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.sink, i32 noundef 13) br label %for.inc38 for.inc38: ; preds = %for.inc38.sink.split, %for.inc35.11, %for.inc35.us86.11, %for.inc35.us72.11, %for.inc35.us.11 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %for.end40, label %for.cond25.preheader, !llvm.loop !12 for.end40: ; preds = %for.inc38 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #5 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %card) #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 norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @getID(i8 noundef signext %suit) local_unnamed_addr #3 { entry: switch i8 %suit, label %if.else11 [ i8 83, label %if.end13 i8 72, label %if.then5 i8 67, label %if.then10 ] if.then5: ; preds = %entry br label %if.end13 if.then10: ; preds = %entry br label %if.end13 if.else11: ; preds = %entry br label %if.end13 if.end13: ; preds = %entry, %if.then5, %if.else11, %if.then10 %id.0 = phi i32 [ 1, %if.then5 ], [ 2, %if.then10 ], [ 3, %if.else11 ], [ 0, %entry ] ret i32 %id.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local signext i8 @getSuit(i32 noundef %id) local_unnamed_addr #3 { entry: %0 = icmp ult i32 %id, 3 %switch.cast = trunc i32 %id to i24 %switch.shiftamt = shl nuw nsw i24 %switch.cast, 3 %switch.downshift = lshr i24 4409427, %switch.shiftamt %switch.masked = trunc i24 %switch.downshift to i8 %suit.0 = select i1 %0, i8 %switch.masked, i8 68 ret i8 %suit.0 } ; 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 nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #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 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include <stdio.h> int main() { int cards[4][13] = {0}; int n, num, i, j; char mark; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%s %d", &mark, &num); if (mark == 'S') { cards[0][num - 1] = 1; } else if (mark == 'H') { cards[1][num - 1] = 1; } else if (mark == 'C') { cards[2][num - 1] = 1; } else if (mark == 'D') { cards[3][num - 1] = 1; } } for (i = 0; i < 4; i++) { for (j = 0; j < 13; j++) { if (cards[i][j] == 0){ if (i == 0) { printf("S %d\n", j + 1); } else if (i == 1) { printf("H %d\n", j + 1); } else if (i == 2) { printf("C %d\n", j + 1); } else if (i == 3) { printf("D %d\n", j + 1); } } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214714/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214714/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%s %d\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"S %d\0A\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"H %d\0A\00", align 1 @.str.4 = private unnamed_addr constant [6 x i8] c"C %d\0A\00", align 1 @.str.5 = private unnamed_addr constant [6 x i8] c"D %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %cards = alloca [4 x [13 x i32]], align 16 %n = alloca i32, align 4 %num = alloca i32, align 4 %mark = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %cards) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %cards, i8 0, i64 208, i1 false) call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %mark) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp96 = icmp sgt i32 %0, 0 br i1 %cmp96, label %for.body, label %for.cond38.preheader.preheader for.body: ; preds = %entry, %for.inc %i.097 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %mark, ptr noundef nonnull %num) %1 = load i8, ptr %mark, align 1, !tbaa !9 switch i8 %1, label %for.inc [ i8 83, label %if.then i8 72, label %if.then8 i8 67, label %if.then17 i8 68, label %if.then26 ] if.then: ; preds = %for.body %2 = load i32, ptr %num, align 4, !tbaa !5 %sub = add nsw i32 %2, -1 %idxprom = sext i32 %sub to i64 %arrayidx4 = getelementptr inbounds [13 x i32], ptr %cards, i64 0, i64 %idxprom br label %for.inc.sink.split if.then8: ; preds = %for.body %3 = load i32, ptr %num, align 4, !tbaa !5 %sub10 = add nsw i32 %3, -1 %idxprom11 = sext i32 %sub10 to i64 %arrayidx12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 %idxprom11 br label %for.inc.sink.split if.then17: ; preds = %for.body %4 = load i32, ptr %num, align 4, !tbaa !5 %sub19 = add nsw i32 %4, -1 %idxprom20 = sext i32 %sub19 to i64 %arrayidx21 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 %idxprom20 br label %for.inc.sink.split if.then26: ; preds = %for.body %5 = load i32, ptr %num, align 4, !tbaa !5 %sub28 = add nsw i32 %5, -1 %idxprom29 = sext i32 %sub28 to i64 %arrayidx30 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 %idxprom29 br label %for.inc.sink.split for.inc.sink.split: ; preds = %if.then8, %if.then26, %if.then17, %if.then %arrayidx4.sink = phi ptr [ %arrayidx4, %if.then ], [ %arrayidx21, %if.then17 ], [ %arrayidx30, %if.then26 ], [ %arrayidx12, %if.then8 ] store i32 1, ptr %arrayidx4.sink, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.inc.sink.split, %for.body %inc = add nuw nsw i32 %i.097, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %6 br i1 %cmp, label %for.body, label %for.cond38.preheader.preheader, !llvm.loop !10 for.cond38.preheader.preheader: ; preds = %for.inc, %entry br label %for.cond38.preheader for.cond38.preheader: ; preds = %for.cond38.preheader.preheader, %for.inc79 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc79 ], [ 0, %for.cond38.preheader.preheader ] %7 = trunc i64 %indvars.iv to i32 switch i32 %7, label %for.inc79 [ i32 0, label %for.body41.us.preheader i32 1, label %for.body41.us100.preheader i32 2, label %for.body41.us110.preheader i32 3, label %for.body41.us120.preheader ] for.body41.us120.preheader: ; preds = %for.cond38.preheader %arrayidx45.us123 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 0 %8 = load i32, ptr %arrayidx45.us123, align 4, !tbaa !5 %cmp46.us124 = icmp eq i32 %8, 0 br i1 %cmp46.us124, label %if.then48.us125, label %for.inc76.us126 for.body41.us110.preheader: ; preds = %for.cond38.preheader %arrayidx45.us113 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 0 %9 = load i32, ptr %arrayidx45.us113, align 4, !tbaa !5 %cmp46.us114 = icmp eq i32 %9, 0 br i1 %cmp46.us114, label %if.then48.us115, label %for.inc76.us116 for.body41.us100.preheader: ; preds = %for.cond38.preheader %arrayidx45.us103 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 0 %10 = load i32, ptr %arrayidx45.us103, align 4, !tbaa !5 %cmp46.us104 = icmp eq i32 %10, 0 br i1 %cmp46.us104, label %if.then48.us105, label %for.inc76.us106 for.body41.us.preheader: ; preds = %for.cond38.preheader %arrayidx45.us = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 0 %11 = load i32, ptr %arrayidx45.us, align 4, !tbaa !5 %cmp46.us = icmp eq i32 %11, 0 br i1 %cmp46.us, label %if.then48.us, label %for.inc76.us if.then48.us: ; preds = %for.body41.us.preheader %call52.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 1) br label %for.inc76.us for.inc76.us: ; preds = %if.then48.us, %for.body41.us.preheader %arrayidx45.us.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1 %12 = load i32, ptr %arrayidx45.us.1, align 4, !tbaa !5 %cmp46.us.1 = icmp eq i32 %12, 0 br i1 %cmp46.us.1, label %if.then48.us.1, label %for.inc76.us.1 if.then48.us.1: ; preds = %for.inc76.us %call52.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 2) br label %for.inc76.us.1 for.inc76.us.1: ; preds = %if.then48.us.1, %for.inc76.us %arrayidx45.us.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2 %13 = load i32, ptr %arrayidx45.us.2, align 4, !tbaa !5 %cmp46.us.2 = icmp eq i32 %13, 0 br i1 %cmp46.us.2, label %if.then48.us.2, label %for.inc76.us.2 if.then48.us.2: ; preds = %for.inc76.us.1 %call52.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 3) br label %for.inc76.us.2 for.inc76.us.2: ; preds = %if.then48.us.2, %for.inc76.us.1 %arrayidx45.us.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3 %14 = load i32, ptr %arrayidx45.us.3, align 4, !tbaa !5 %cmp46.us.3 = icmp eq i32 %14, 0 br i1 %cmp46.us.3, label %if.then48.us.3, label %for.inc76.us.3 if.then48.us.3: ; preds = %for.inc76.us.2 %call52.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 4) br label %for.inc76.us.3 for.inc76.us.3: ; preds = %if.then48.us.3, %for.inc76.us.2 %arrayidx45.us.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4 %15 = load i32, ptr %arrayidx45.us.4, align 4, !tbaa !5 %cmp46.us.4 = icmp eq i32 %15, 0 br i1 %cmp46.us.4, label %if.then48.us.4, label %for.inc76.us.4 if.then48.us.4: ; preds = %for.inc76.us.3 %call52.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 5) br label %for.inc76.us.4 for.inc76.us.4: ; preds = %if.then48.us.4, %for.inc76.us.3 %arrayidx45.us.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5 %16 = load i32, ptr %arrayidx45.us.5, align 4, !tbaa !5 %cmp46.us.5 = icmp eq i32 %16, 0 br i1 %cmp46.us.5, label %if.then48.us.5, label %for.inc76.us.5 if.then48.us.5: ; preds = %for.inc76.us.4 %call52.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 6) br label %for.inc76.us.5 for.inc76.us.5: ; preds = %if.then48.us.5, %for.inc76.us.4 %arrayidx45.us.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6 %17 = load i32, ptr %arrayidx45.us.6, align 4, !tbaa !5 %cmp46.us.6 = icmp eq i32 %17, 0 br i1 %cmp46.us.6, label %if.then48.us.6, label %for.inc76.us.6 if.then48.us.6: ; preds = %for.inc76.us.5 %call52.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 7) br label %for.inc76.us.6 for.inc76.us.6: ; preds = %if.then48.us.6, %for.inc76.us.5 %arrayidx45.us.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7 %18 = load i32, ptr %arrayidx45.us.7, align 4, !tbaa !5 %cmp46.us.7 = icmp eq i32 %18, 0 br i1 %cmp46.us.7, label %if.then48.us.7, label %for.inc76.us.7 if.then48.us.7: ; preds = %for.inc76.us.6 %call52.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 8) br label %for.inc76.us.7 for.inc76.us.7: ; preds = %if.then48.us.7, %for.inc76.us.6 %arrayidx45.us.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8 %19 = load i32, ptr %arrayidx45.us.8, align 4, !tbaa !5 %cmp46.us.8 = icmp eq i32 %19, 0 br i1 %cmp46.us.8, label %if.then48.us.8, label %for.inc76.us.8 if.then48.us.8: ; preds = %for.inc76.us.7 %call52.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 9) br label %for.inc76.us.8 for.inc76.us.8: ; preds = %if.then48.us.8, %for.inc76.us.7 %arrayidx45.us.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9 %20 = load i32, ptr %arrayidx45.us.9, align 4, !tbaa !5 %cmp46.us.9 = icmp eq i32 %20, 0 br i1 %cmp46.us.9, label %if.then48.us.9, label %for.inc76.us.9 if.then48.us.9: ; preds = %for.inc76.us.8 %call52.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 10) br label %for.inc76.us.9 for.inc76.us.9: ; preds = %if.then48.us.9, %for.inc76.us.8 %arrayidx45.us.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10 %21 = load i32, ptr %arrayidx45.us.10, align 4, !tbaa !5 %cmp46.us.10 = icmp eq i32 %21, 0 br i1 %cmp46.us.10, label %if.then48.us.10, label %for.inc76.us.10 if.then48.us.10: ; preds = %for.inc76.us.9 %call52.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 11) br label %for.inc76.us.10 for.inc76.us.10: ; preds = %if.then48.us.10, %for.inc76.us.9 %arrayidx45.us.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11 %22 = load i32, ptr %arrayidx45.us.11, align 4, !tbaa !5 %cmp46.us.11 = icmp eq i32 %22, 0 br i1 %cmp46.us.11, label %if.then48.us.11, label %for.inc76.us.11 if.then48.us.11: ; preds = %for.inc76.us.10 %call52.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 12) br label %for.inc76.us.11 for.inc76.us.11: ; preds = %if.then48.us.11, %for.inc76.us.10 %arrayidx45.us.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12 %23 = load i32, ptr %arrayidx45.us.12, align 4, !tbaa !5 %cmp46.us.12 = icmp eq i32 %23, 0 br i1 %cmp46.us.12, label %for.inc79.sink.split, label %for.inc79 if.then48.us105: ; preds = %for.body41.us100.preheader %call58.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1) br label %for.inc76.us106 for.inc76.us106: ; preds = %if.then48.us105, %for.body41.us100.preheader %arrayidx45.us103.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1 %24 = load i32, ptr %arrayidx45.us103.1, align 4, !tbaa !5 %cmp46.us104.1 = icmp eq i32 %24, 0 br i1 %cmp46.us104.1, label %if.then48.us105.1, label %for.inc76.us106.1 if.then48.us105.1: ; preds = %for.inc76.us106 %call58.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2) br label %for.inc76.us106.1 for.inc76.us106.1: ; preds = %if.then48.us105.1, %for.inc76.us106 %arrayidx45.us103.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2 %25 = load i32, ptr %arrayidx45.us103.2, align 4, !tbaa !5 %cmp46.us104.2 = icmp eq i32 %25, 0 br i1 %cmp46.us104.2, label %if.then48.us105.2, label %for.inc76.us106.2 if.then48.us105.2: ; preds = %for.inc76.us106.1 %call58.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3) br label %for.inc76.us106.2 for.inc76.us106.2: ; preds = %if.then48.us105.2, %for.inc76.us106.1 %arrayidx45.us103.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3 %26 = load i32, ptr %arrayidx45.us103.3, align 4, !tbaa !5 %cmp46.us104.3 = icmp eq i32 %26, 0 br i1 %cmp46.us104.3, label %if.then48.us105.3, label %for.inc76.us106.3 if.then48.us105.3: ; preds = %for.inc76.us106.2 %call58.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4) br label %for.inc76.us106.3 for.inc76.us106.3: ; preds = %if.then48.us105.3, %for.inc76.us106.2 %arrayidx45.us103.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4 %27 = load i32, ptr %arrayidx45.us103.4, align 4, !tbaa !5 %cmp46.us104.4 = icmp eq i32 %27, 0 br i1 %cmp46.us104.4, label %if.then48.us105.4, label %for.inc76.us106.4 if.then48.us105.4: ; preds = %for.inc76.us106.3 %call58.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5) br label %for.inc76.us106.4 for.inc76.us106.4: ; preds = %if.then48.us105.4, %for.inc76.us106.3 %arrayidx45.us103.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5 %28 = load i32, ptr %arrayidx45.us103.5, align 4, !tbaa !5 %cmp46.us104.5 = icmp eq i32 %28, 0 br i1 %cmp46.us104.5, label %if.then48.us105.5, label %for.inc76.us106.5 if.then48.us105.5: ; preds = %for.inc76.us106.4 %call58.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6) br label %for.inc76.us106.5 for.inc76.us106.5: ; preds = %if.then48.us105.5, %for.inc76.us106.4 %arrayidx45.us103.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6 %29 = load i32, ptr %arrayidx45.us103.6, align 4, !tbaa !5 %cmp46.us104.6 = icmp eq i32 %29, 0 br i1 %cmp46.us104.6, label %if.then48.us105.6, label %for.inc76.us106.6 if.then48.us105.6: ; preds = %for.inc76.us106.5 %call58.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7) br label %for.inc76.us106.6 for.inc76.us106.6: ; preds = %if.then48.us105.6, %for.inc76.us106.5 %arrayidx45.us103.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7 %30 = load i32, ptr %arrayidx45.us103.7, align 4, !tbaa !5 %cmp46.us104.7 = icmp eq i32 %30, 0 br i1 %cmp46.us104.7, label %if.then48.us105.7, label %for.inc76.us106.7 if.then48.us105.7: ; preds = %for.inc76.us106.6 %call58.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8) br label %for.inc76.us106.7 for.inc76.us106.7: ; preds = %if.then48.us105.7, %for.inc76.us106.6 %arrayidx45.us103.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8 %31 = load i32, ptr %arrayidx45.us103.8, align 4, !tbaa !5 %cmp46.us104.8 = icmp eq i32 %31, 0 br i1 %cmp46.us104.8, label %if.then48.us105.8, label %for.inc76.us106.8 if.then48.us105.8: ; preds = %for.inc76.us106.7 %call58.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9) br label %for.inc76.us106.8 for.inc76.us106.8: ; preds = %if.then48.us105.8, %for.inc76.us106.7 %arrayidx45.us103.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9 %32 = load i32, ptr %arrayidx45.us103.9, align 4, !tbaa !5 %cmp46.us104.9 = icmp eq i32 %32, 0 br i1 %cmp46.us104.9, label %if.then48.us105.9, label %for.inc76.us106.9 if.then48.us105.9: ; preds = %for.inc76.us106.8 %call58.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10) br label %for.inc76.us106.9 for.inc76.us106.9: ; preds = %if.then48.us105.9, %for.inc76.us106.8 %arrayidx45.us103.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10 %33 = load i32, ptr %arrayidx45.us103.10, align 4, !tbaa !5 %cmp46.us104.10 = icmp eq i32 %33, 0 br i1 %cmp46.us104.10, label %if.then48.us105.10, label %for.inc76.us106.10 if.then48.us105.10: ; preds = %for.inc76.us106.9 %call58.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11) br label %for.inc76.us106.10 for.inc76.us106.10: ; preds = %if.then48.us105.10, %for.inc76.us106.9 %arrayidx45.us103.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11 %34 = load i32, ptr %arrayidx45.us103.11, align 4, !tbaa !5 %cmp46.us104.11 = icmp eq i32 %34, 0 br i1 %cmp46.us104.11, label %if.then48.us105.11, label %for.inc76.us106.11 if.then48.us105.11: ; preds = %for.inc76.us106.10 %call58.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12) br label %for.inc76.us106.11 for.inc76.us106.11: ; preds = %if.then48.us105.11, %for.inc76.us106.10 %arrayidx45.us103.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12 %35 = load i32, ptr %arrayidx45.us103.12, align 4, !tbaa !5 %cmp46.us104.12 = icmp eq i32 %35, 0 br i1 %cmp46.us104.12, label %for.inc79.sink.split, label %for.inc79 if.then48.us115: ; preds = %for.body41.us110.preheader %call64.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1) br label %for.inc76.us116 for.inc76.us116: ; preds = %if.then48.us115, %for.body41.us110.preheader %arrayidx45.us113.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1 %36 = load i32, ptr %arrayidx45.us113.1, align 4, !tbaa !5 %cmp46.us114.1 = icmp eq i32 %36, 0 br i1 %cmp46.us114.1, label %if.then48.us115.1, label %for.inc76.us116.1 if.then48.us115.1: ; preds = %for.inc76.us116 %call64.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2) br label %for.inc76.us116.1 for.inc76.us116.1: ; preds = %if.then48.us115.1, %for.inc76.us116 %arrayidx45.us113.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2 %37 = load i32, ptr %arrayidx45.us113.2, align 4, !tbaa !5 %cmp46.us114.2 = icmp eq i32 %37, 0 br i1 %cmp46.us114.2, label %if.then48.us115.2, label %for.inc76.us116.2 if.then48.us115.2: ; preds = %for.inc76.us116.1 %call64.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3) br label %for.inc76.us116.2 for.inc76.us116.2: ; preds = %if.then48.us115.2, %for.inc76.us116.1 %arrayidx45.us113.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3 %38 = load i32, ptr %arrayidx45.us113.3, align 4, !tbaa !5 %cmp46.us114.3 = icmp eq i32 %38, 0 br i1 %cmp46.us114.3, label %if.then48.us115.3, label %for.inc76.us116.3 if.then48.us115.3: ; preds = %for.inc76.us116.2 %call64.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4) br label %for.inc76.us116.3 for.inc76.us116.3: ; preds = %if.then48.us115.3, %for.inc76.us116.2 %arrayidx45.us113.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4 %39 = load i32, ptr %arrayidx45.us113.4, align 4, !tbaa !5 %cmp46.us114.4 = icmp eq i32 %39, 0 br i1 %cmp46.us114.4, label %if.then48.us115.4, label %for.inc76.us116.4 if.then48.us115.4: ; preds = %for.inc76.us116.3 %call64.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5) br label %for.inc76.us116.4 for.inc76.us116.4: ; preds = %if.then48.us115.4, %for.inc76.us116.3 %arrayidx45.us113.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5 %40 = load i32, ptr %arrayidx45.us113.5, align 4, !tbaa !5 %cmp46.us114.5 = icmp eq i32 %40, 0 br i1 %cmp46.us114.5, label %if.then48.us115.5, label %for.inc76.us116.5 if.then48.us115.5: ; preds = %for.inc76.us116.4 %call64.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6) br label %for.inc76.us116.5 for.inc76.us116.5: ; preds = %if.then48.us115.5, %for.inc76.us116.4 %arrayidx45.us113.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6 %41 = load i32, ptr %arrayidx45.us113.6, align 4, !tbaa !5 %cmp46.us114.6 = icmp eq i32 %41, 0 br i1 %cmp46.us114.6, label %if.then48.us115.6, label %for.inc76.us116.6 if.then48.us115.6: ; preds = %for.inc76.us116.5 %call64.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7) br label %for.inc76.us116.6 for.inc76.us116.6: ; preds = %if.then48.us115.6, %for.inc76.us116.5 %arrayidx45.us113.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7 %42 = load i32, ptr %arrayidx45.us113.7, align 4, !tbaa !5 %cmp46.us114.7 = icmp eq i32 %42, 0 br i1 %cmp46.us114.7, label %if.then48.us115.7, label %for.inc76.us116.7 if.then48.us115.7: ; preds = %for.inc76.us116.6 %call64.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8) br label %for.inc76.us116.7 for.inc76.us116.7: ; preds = %if.then48.us115.7, %for.inc76.us116.6 %arrayidx45.us113.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8 %43 = load i32, ptr %arrayidx45.us113.8, align 4, !tbaa !5 %cmp46.us114.8 = icmp eq i32 %43, 0 br i1 %cmp46.us114.8, label %if.then48.us115.8, label %for.inc76.us116.8 if.then48.us115.8: ; preds = %for.inc76.us116.7 %call64.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9) br label %for.inc76.us116.8 for.inc76.us116.8: ; preds = %if.then48.us115.8, %for.inc76.us116.7 %arrayidx45.us113.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9 %44 = load i32, ptr %arrayidx45.us113.9, align 4, !tbaa !5 %cmp46.us114.9 = icmp eq i32 %44, 0 br i1 %cmp46.us114.9, label %if.then48.us115.9, label %for.inc76.us116.9 if.then48.us115.9: ; preds = %for.inc76.us116.8 %call64.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10) br label %for.inc76.us116.9 for.inc76.us116.9: ; preds = %if.then48.us115.9, %for.inc76.us116.8 %arrayidx45.us113.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10 %45 = load i32, ptr %arrayidx45.us113.10, align 4, !tbaa !5 %cmp46.us114.10 = icmp eq i32 %45, 0 br i1 %cmp46.us114.10, label %if.then48.us115.10, label %for.inc76.us116.10 if.then48.us115.10: ; preds = %for.inc76.us116.9 %call64.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11) br label %for.inc76.us116.10 for.inc76.us116.10: ; preds = %if.then48.us115.10, %for.inc76.us116.9 %arrayidx45.us113.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11 %46 = load i32, ptr %arrayidx45.us113.11, align 4, !tbaa !5 %cmp46.us114.11 = icmp eq i32 %46, 0 br i1 %cmp46.us114.11, label %if.then48.us115.11, label %for.inc76.us116.11 if.then48.us115.11: ; preds = %for.inc76.us116.10 %call64.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12) br label %for.inc76.us116.11 for.inc76.us116.11: ; preds = %if.then48.us115.11, %for.inc76.us116.10 %arrayidx45.us113.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12 %47 = load i32, ptr %arrayidx45.us113.12, align 4, !tbaa !5 %cmp46.us114.12 = icmp eq i32 %47, 0 br i1 %cmp46.us114.12, label %for.inc79.sink.split, label %for.inc79 if.then48.us125: ; preds = %for.body41.us120.preheader %call70.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1) br label %for.inc76.us126 for.inc76.us126: ; preds = %if.then48.us125, %for.body41.us120.preheader %arrayidx45.us123.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1 %48 = load i32, ptr %arrayidx45.us123.1, align 4, !tbaa !5 %cmp46.us124.1 = icmp eq i32 %48, 0 br i1 %cmp46.us124.1, label %if.then48.us125.1, label %for.inc76.us126.1 if.then48.us125.1: ; preds = %for.inc76.us126 %call70.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2) br label %for.inc76.us126.1 for.inc76.us126.1: ; preds = %if.then48.us125.1, %for.inc76.us126 %arrayidx45.us123.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2 %49 = load i32, ptr %arrayidx45.us123.2, align 4, !tbaa !5 %cmp46.us124.2 = icmp eq i32 %49, 0 br i1 %cmp46.us124.2, label %if.then48.us125.2, label %for.inc76.us126.2 if.then48.us125.2: ; preds = %for.inc76.us126.1 %call70.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3) br label %for.inc76.us126.2 for.inc76.us126.2: ; preds = %if.then48.us125.2, %for.inc76.us126.1 %arrayidx45.us123.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3 %50 = load i32, ptr %arrayidx45.us123.3, align 4, !tbaa !5 %cmp46.us124.3 = icmp eq i32 %50, 0 br i1 %cmp46.us124.3, label %if.then48.us125.3, label %for.inc76.us126.3 if.then48.us125.3: ; preds = %for.inc76.us126.2 %call70.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4) br label %for.inc76.us126.3 for.inc76.us126.3: ; preds = %if.then48.us125.3, %for.inc76.us126.2 %arrayidx45.us123.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4 %51 = load i32, ptr %arrayidx45.us123.4, align 4, !tbaa !5 %cmp46.us124.4 = icmp eq i32 %51, 0 br i1 %cmp46.us124.4, label %if.then48.us125.4, label %for.inc76.us126.4 if.then48.us125.4: ; preds = %for.inc76.us126.3 %call70.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5) br label %for.inc76.us126.4 for.inc76.us126.4: ; preds = %if.then48.us125.4, %for.inc76.us126.3 %arrayidx45.us123.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5 %52 = load i32, ptr %arrayidx45.us123.5, align 4, !tbaa !5 %cmp46.us124.5 = icmp eq i32 %52, 0 br i1 %cmp46.us124.5, label %if.then48.us125.5, label %for.inc76.us126.5 if.then48.us125.5: ; preds = %for.inc76.us126.4 %call70.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6) br label %for.inc76.us126.5 for.inc76.us126.5: ; preds = %if.then48.us125.5, %for.inc76.us126.4 %arrayidx45.us123.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6 %53 = load i32, ptr %arrayidx45.us123.6, align 4, !tbaa !5 %cmp46.us124.6 = icmp eq i32 %53, 0 br i1 %cmp46.us124.6, label %if.then48.us125.6, label %for.inc76.us126.6 if.then48.us125.6: ; preds = %for.inc76.us126.5 %call70.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7) br label %for.inc76.us126.6 for.inc76.us126.6: ; preds = %if.then48.us125.6, %for.inc76.us126.5 %arrayidx45.us123.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7 %54 = load i32, ptr %arrayidx45.us123.7, align 4, !tbaa !5 %cmp46.us124.7 = icmp eq i32 %54, 0 br i1 %cmp46.us124.7, label %if.then48.us125.7, label %for.inc76.us126.7 if.then48.us125.7: ; preds = %for.inc76.us126.6 %call70.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8) br label %for.inc76.us126.7 for.inc76.us126.7: ; preds = %if.then48.us125.7, %for.inc76.us126.6 %arrayidx45.us123.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8 %55 = load i32, ptr %arrayidx45.us123.8, align 4, !tbaa !5 %cmp46.us124.8 = icmp eq i32 %55, 0 br i1 %cmp46.us124.8, label %if.then48.us125.8, label %for.inc76.us126.8 if.then48.us125.8: ; preds = %for.inc76.us126.7 %call70.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9) br label %for.inc76.us126.8 for.inc76.us126.8: ; preds = %if.then48.us125.8, %for.inc76.us126.7 %arrayidx45.us123.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9 %56 = load i32, ptr %arrayidx45.us123.9, align 4, !tbaa !5 %cmp46.us124.9 = icmp eq i32 %56, 0 br i1 %cmp46.us124.9, label %if.then48.us125.9, label %for.inc76.us126.9 if.then48.us125.9: ; preds = %for.inc76.us126.8 %call70.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10) br label %for.inc76.us126.9 for.inc76.us126.9: ; preds = %if.then48.us125.9, %for.inc76.us126.8 %arrayidx45.us123.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10 %57 = load i32, ptr %arrayidx45.us123.10, align 4, !tbaa !5 %cmp46.us124.10 = icmp eq i32 %57, 0 br i1 %cmp46.us124.10, label %if.then48.us125.10, label %for.inc76.us126.10 if.then48.us125.10: ; preds = %for.inc76.us126.9 %call70.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11) br label %for.inc76.us126.10 for.inc76.us126.10: ; preds = %if.then48.us125.10, %for.inc76.us126.9 %arrayidx45.us123.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11 %58 = load i32, ptr %arrayidx45.us123.11, align 4, !tbaa !5 %cmp46.us124.11 = icmp eq i32 %58, 0 br i1 %cmp46.us124.11, label %if.then48.us125.11, label %for.inc76.us126.11 if.then48.us125.11: ; preds = %for.inc76.us126.10 %call70.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12) br label %for.inc76.us126.11 for.inc76.us126.11: ; preds = %if.then48.us125.11, %for.inc76.us126.10 %arrayidx45.us123.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12 %59 = load i32, ptr %arrayidx45.us123.12, align 4, !tbaa !5 %cmp46.us124.12 = icmp eq i32 %59, 0 br i1 %cmp46.us124.12, label %for.inc79.sink.split, label %for.inc79 for.inc79.sink.split: ; preds = %for.inc76.us126.11, %for.inc76.us116.11, %for.inc76.us106.11, %for.inc76.us.11 %.str.5.sink = phi ptr [ @.str.2, %for.inc76.us.11 ], [ @.str.3, %for.inc76.us106.11 ], [ @.str.4, %for.inc76.us116.11 ], [ @.str.5, %for.inc76.us126.11 ] %call70.us.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink, i32 noundef 13) br label %for.inc79 for.inc79: ; preds = %for.inc79.sink.split, %for.inc76.us126.11, %for.inc76.us116.11, %for.inc76.us106.11, %for.inc76.us.11, %for.cond38.preheader %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %for.end81, label %for.cond38.preheader, !llvm.loop !12 for.end81: ; preds = %for.inc79 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %mark) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %cards) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include<stdio.h> int main(){ int card[4][14],n,i,j,d; char c; scanf("%d",&n); for(i=0; i<4; i++){ for(j=1; j<14; j++){ card[i][j]=0; } } for(i=0; i<n; i++){ scanf(" %c %d",&c,&d); if(c=='S') card[0][d]=1; else if(c=='H') card[1][d]=1; else if(c=='C') card[2][d]=1; else if(c=='D') card[3][d]=1; } for(i=0; i<4; i++){ for(j=1; j<14; j++){ if(card[i][j]==0){ if(i==0) printf("S"); else if(i==1) printf("H"); else if(i==2) printf("C"); else if(i==3) printf("D"); printf(" "); printf("%d\n",j); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214765/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214765/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c" %c %d\00", align 1 @.str.7 = 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: %card = alloca [4 x [14 x i32]], align 16 %n = alloca i32, align 4 %d = alloca i32, align 4 %c = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %card) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #5 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %scevgep = getelementptr inbounds i8, ptr %card, i64 4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %scevgep, i8 0, i64 52, i1 false), !tbaa !5 %scevgep.1 = getelementptr inbounds i8, ptr %card, i64 60 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %scevgep.1, i8 0, i64 52, i1 false), !tbaa !5 %scevgep.2 = getelementptr inbounds i8, ptr %card, i64 116 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %scevgep.2, i8 0, i64 52, i1 false), !tbaa !5 %scevgep.3 = getelementptr inbounds i8, ptr %card, i64 172 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %scevgep.3, i8 0, i64 52, i1 false), !tbaa !5 %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp10117 = icmp sgt i32 %0, 0 br i1 %cmp10117, label %for.body11, label %if.end84 for.cond47.preheader: ; preds = %for.inc44 %.pre = load i32, ptr %scevgep, align 4, !tbaa !5 %cmp59 = icmp eq i32 %.pre, 0 br i1 %cmp59, label %if.end84, label %for.inc88 for.body11: ; preds = %entry, %for.inc44 %i.1118 = phi i32 [ %inc45, %for.inc44 ], [ 0, %entry ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %c, ptr noundef nonnull %d) %1 = load i8, ptr %c, align 1, !tbaa !9 switch i8 %1, label %for.inc44 [ i8 83, label %if.then i8 72, label %if.then21 i8 67, label %if.then29 i8 68, label %if.then37 ] if.then: ; preds = %for.body11 %2 = load i32, ptr %d, align 4, !tbaa !5 %idxprom16 = sext i32 %2 to i64 %arrayidx17 = getelementptr inbounds [14 x i32], ptr %card, i64 0, i64 %idxprom16 br label %for.inc44.sink.split if.then21: ; preds = %for.body11 %3 = load i32, ptr %d, align 4, !tbaa !5 %idxprom23 = sext i32 %3 to i64 %arrayidx24 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 %idxprom23 br label %for.inc44.sink.split if.then29: ; preds = %for.body11 %4 = load i32, ptr %d, align 4, !tbaa !5 %idxprom31 = sext i32 %4 to i64 %arrayidx32 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 %idxprom31 br label %for.inc44.sink.split if.then37: ; preds = %for.body11 %5 = load i32, ptr %d, align 4, !tbaa !5 %idxprom39 = sext i32 %5 to i64 %arrayidx40 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 %idxprom39 br label %for.inc44.sink.split for.inc44.sink.split: ; preds = %if.then21, %if.then37, %if.then29, %if.then %arrayidx17.sink = phi ptr [ %arrayidx17, %if.then ], [ %arrayidx32, %if.then29 ], [ %arrayidx40, %if.then37 ], [ %arrayidx24, %if.then21 ] store i32 1, ptr %arrayidx17.sink, align 4, !tbaa !5 br label %for.inc44 for.inc44: ; preds = %for.inc44.sink.split, %for.body11 %inc45 = add nuw nsw i32 %i.1118, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc45, %6 br i1 %cmp10, label %for.body11, label %for.cond47.preheader, !llvm.loop !10 if.end84: ; preds = %entry, %for.cond47.preheader %putchar113 = call i32 @putchar(i32 83) %putchar114 = call i32 @putchar(i32 32) %call86 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 1) br label %for.inc88 for.inc88: ; preds = %for.cond47.preheader, %if.end84 %arrayidx58.1128 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 0, i64 2 %7 = load i32, ptr %arrayidx58.1128, align 8, !tbaa !5 %cmp59.1129 = icmp eq i32 %7, 0 br i1 %cmp59.1129, label %if.end84.1142, label %for.inc88.1143 if.end84.1142: ; preds = %for.inc88 %putchar113.1138 = call i32 @putchar(i32 83) %putchar114.1140 = call i32 @putchar(i32 32) %call86.1141 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 2) br label %for.inc88.1143 for.inc88.1143: ; preds = %if.end84.1142, %for.inc88 %arrayidx58.2144 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 0, i64 3 %8 = load i32, ptr %arrayidx58.2144, align 4, !tbaa !5 %cmp59.2145 = icmp eq i32 %8, 0 br i1 %cmp59.2145, label %if.end84.2158, label %for.inc88.2159 if.end84.2158: ; preds = %for.inc88.1143 %putchar113.2154 = call i32 @putchar(i32 83) %putchar114.2156 = call i32 @putchar(i32 32) %call86.2157 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 3) br label %for.inc88.2159 for.inc88.2159: ; preds = %if.end84.2158, %for.inc88.1143 %arrayidx58.3160 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 0, i64 4 %9 = load i32, ptr %arrayidx58.3160, align 16, !tbaa !5 %cmp59.3161 = icmp eq i32 %9, 0 br i1 %cmp59.3161, label %if.end84.3174, label %for.inc88.3175 if.end84.3174: ; preds = %for.inc88.2159 %putchar113.3170 = call i32 @putchar(i32 83) %putchar114.3172 = call i32 @putchar(i32 32) %call86.3173 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 4) br label %for.inc88.3175 for.inc88.3175: ; preds = %if.end84.3174, %for.inc88.2159 %arrayidx58.4 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 0, i64 5 %10 = load i32, ptr %arrayidx58.4, align 4, !tbaa !5 %cmp59.4 = icmp eq i32 %10, 0 br i1 %cmp59.4, label %if.end84.4, label %for.inc88.4 if.end84.4: ; preds = %for.inc88.3175 %putchar113.4 = call i32 @putchar(i32 83) %putchar114.4 = call i32 @putchar(i32 32) %call86.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 5) br label %for.inc88.4 for.inc88.4: ; preds = %if.end84.4, %for.inc88.3175 %arrayidx58.5 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 0, i64 6 %11 = load i32, ptr %arrayidx58.5, align 8, !tbaa !5 %cmp59.5 = icmp eq i32 %11, 0 br i1 %cmp59.5, label %if.end84.5, label %for.inc88.5 if.end84.5: ; preds = %for.inc88.4 %putchar113.5 = call i32 @putchar(i32 83) %putchar114.5 = call i32 @putchar(i32 32) %call86.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 6) br label %for.inc88.5 for.inc88.5: ; preds = %if.end84.5, %for.inc88.4 %arrayidx58.6 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 0, i64 7 %12 = load i32, ptr %arrayidx58.6, align 4, !tbaa !5 %cmp59.6 = icmp eq i32 %12, 0 br i1 %cmp59.6, label %if.end84.6, label %for.inc88.6 if.end84.6: ; preds = %for.inc88.5 %putchar113.6 = call i32 @putchar(i32 83) %putchar114.6 = call i32 @putchar(i32 32) %call86.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 7) br label %for.inc88.6 for.inc88.6: ; preds = %if.end84.6, %for.inc88.5 %arrayidx58.7 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 0, i64 8 %13 = load i32, ptr %arrayidx58.7, align 16, !tbaa !5 %cmp59.7 = icmp eq i32 %13, 0 br i1 %cmp59.7, label %if.end84.7, label %for.inc88.7 if.end84.7: ; preds = %for.inc88.6 %putchar113.7 = call i32 @putchar(i32 83) %putchar114.7 = call i32 @putchar(i32 32) %call86.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 8) br label %for.inc88.7 for.inc88.7: ; preds = %if.end84.7, %for.inc88.6 %arrayidx58.8 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 0, i64 9 %14 = load i32, ptr %arrayidx58.8, align 4, !tbaa !5 %cmp59.8 = icmp eq i32 %14, 0 br i1 %cmp59.8, label %if.end84.8, label %for.inc88.8 if.end84.8: ; preds = %for.inc88.7 %putchar113.8 = call i32 @putchar(i32 83) %putchar114.8 = call i32 @putchar(i32 32) %call86.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 9) br label %for.inc88.8 for.inc88.8: ; preds = %if.end84.8, %for.inc88.7 %arrayidx58.9 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 0, i64 10 %15 = load i32, ptr %arrayidx58.9, align 8, !tbaa !5 %cmp59.9 = icmp eq i32 %15, 0 br i1 %cmp59.9, label %if.end84.9, label %for.inc88.9 if.end84.9: ; preds = %for.inc88.8 %putchar113.9 = call i32 @putchar(i32 83) %putchar114.9 = call i32 @putchar(i32 32) %call86.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 10) br label %for.inc88.9 for.inc88.9: ; preds = %if.end84.9, %for.inc88.8 %arrayidx58.10 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 0, i64 11 %16 = load i32, ptr %arrayidx58.10, align 4, !tbaa !5 %cmp59.10 = icmp eq i32 %16, 0 br i1 %cmp59.10, label %if.end84.10, label %for.inc88.10 if.end84.10: ; preds = %for.inc88.9 %putchar113.10 = call i32 @putchar(i32 83) %putchar114.10 = call i32 @putchar(i32 32) %call86.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 11) br label %for.inc88.10 for.inc88.10: ; preds = %if.end84.10, %for.inc88.9 %arrayidx58.11 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 0, i64 12 %17 = load i32, ptr %arrayidx58.11, align 16, !tbaa !5 %cmp59.11 = icmp eq i32 %17, 0 br i1 %cmp59.11, label %if.end84.11, label %for.inc88.11 if.end84.11: ; preds = %for.inc88.10 %putchar113.11 = call i32 @putchar(i32 83) %putchar114.11 = call i32 @putchar(i32 32) %call86.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 12) br label %for.inc88.11 for.inc88.11: ; preds = %if.end84.11, %for.inc88.10 %arrayidx58.12 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 0, i64 13 %18 = load i32, ptr %arrayidx58.12, align 4, !tbaa !5 %cmp59.12 = icmp eq i32 %18, 0 br i1 %cmp59.12, label %if.end84.12, label %for.inc88.12 if.end84.12: ; preds = %for.inc88.11 %putchar113.12 = call i32 @putchar(i32 83) %putchar114.12 = call i32 @putchar(i32 32) %call86.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 13) br label %for.inc88.12 for.inc88.12: ; preds = %if.end84.12, %for.inc88.11 %19 = load i32, ptr %scevgep.1, align 4, !tbaa !5 %cmp59.1 = icmp eq i32 %19, 0 br i1 %cmp59.1, label %if.end84.1, label %for.inc88.1 if.end84.1: ; preds = %for.inc88.12 %putchar112.1 = call i32 @putchar(i32 72) %putchar114.1 = call i32 @putchar(i32 32) %call86.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 1) br label %for.inc88.1 for.inc88.1: ; preds = %if.end84.1, %for.inc88.12 %arrayidx58.1.1 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 2 %20 = load i32, ptr %arrayidx58.1.1, align 16, !tbaa !5 %cmp59.1.1 = icmp eq i32 %20, 0 br i1 %cmp59.1.1, label %if.end84.1.1, label %for.inc88.1.1 if.end84.1.1: ; preds = %for.inc88.1 %putchar112.1.1 = call i32 @putchar(i32 72) %putchar114.1.1 = call i32 @putchar(i32 32) %call86.1.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 2) br label %for.inc88.1.1 for.inc88.1.1: ; preds = %if.end84.1.1, %for.inc88.1 %arrayidx58.1.2 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 3 %21 = load i32, ptr %arrayidx58.1.2, align 4, !tbaa !5 %cmp59.1.2 = icmp eq i32 %21, 0 br i1 %cmp59.1.2, label %if.end84.1.2, label %for.inc88.1.2 if.end84.1.2: ; preds = %for.inc88.1.1 %putchar112.1.2 = call i32 @putchar(i32 72) %putchar114.1.2 = call i32 @putchar(i32 32) %call86.1.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 3) br label %for.inc88.1.2 for.inc88.1.2: ; preds = %if.end84.1.2, %for.inc88.1.1 %arrayidx58.1.3 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 4 %22 = load i32, ptr %arrayidx58.1.3, align 8, !tbaa !5 %cmp59.1.3 = icmp eq i32 %22, 0 br i1 %cmp59.1.3, label %if.end84.1.3, label %for.inc88.1.3 if.end84.1.3: ; preds = %for.inc88.1.2 %putchar112.1.3 = call i32 @putchar(i32 72) %putchar114.1.3 = call i32 @putchar(i32 32) %call86.1.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 4) br label %for.inc88.1.3 for.inc88.1.3: ; preds = %if.end84.1.3, %for.inc88.1.2 %arrayidx58.1.4 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 5 %23 = load i32, ptr %arrayidx58.1.4, align 4, !tbaa !5 %cmp59.1.4 = icmp eq i32 %23, 0 br i1 %cmp59.1.4, label %if.end84.1.4, label %for.inc88.1.4 if.end84.1.4: ; preds = %for.inc88.1.3 %putchar112.1.4 = call i32 @putchar(i32 72) %putchar114.1.4 = call i32 @putchar(i32 32) %call86.1.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 5) br label %for.inc88.1.4 for.inc88.1.4: ; preds = %if.end84.1.4, %for.inc88.1.3 %arrayidx58.1.5 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 6 %24 = load i32, ptr %arrayidx58.1.5, align 16, !tbaa !5 %cmp59.1.5 = icmp eq i32 %24, 0 br i1 %cmp59.1.5, label %if.end84.1.5, label %for.inc88.1.5 if.end84.1.5: ; preds = %for.inc88.1.4 %putchar112.1.5 = call i32 @putchar(i32 72) %putchar114.1.5 = call i32 @putchar(i32 32) %call86.1.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 6) br label %for.inc88.1.5 for.inc88.1.5: ; preds = %if.end84.1.5, %for.inc88.1.4 %arrayidx58.1.6 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 7 %25 = load i32, ptr %arrayidx58.1.6, align 4, !tbaa !5 %cmp59.1.6 = icmp eq i32 %25, 0 br i1 %cmp59.1.6, label %if.end84.1.6, label %for.inc88.1.6 if.end84.1.6: ; preds = %for.inc88.1.5 %putchar112.1.6 = call i32 @putchar(i32 72) %putchar114.1.6 = call i32 @putchar(i32 32) %call86.1.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 7) br label %for.inc88.1.6 for.inc88.1.6: ; preds = %if.end84.1.6, %for.inc88.1.5 %arrayidx58.1.7 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 8 %26 = load i32, ptr %arrayidx58.1.7, align 8, !tbaa !5 %cmp59.1.7 = icmp eq i32 %26, 0 br i1 %cmp59.1.7, label %if.end84.1.7, label %for.inc88.1.7 if.end84.1.7: ; preds = %for.inc88.1.6 %putchar112.1.7 = call i32 @putchar(i32 72) %putchar114.1.7 = call i32 @putchar(i32 32) %call86.1.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 8) br label %for.inc88.1.7 for.inc88.1.7: ; preds = %if.end84.1.7, %for.inc88.1.6 %arrayidx58.1.8 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 9 %27 = load i32, ptr %arrayidx58.1.8, align 4, !tbaa !5 %cmp59.1.8 = icmp eq i32 %27, 0 br i1 %cmp59.1.8, label %if.end84.1.8, label %for.inc88.1.8 if.end84.1.8: ; preds = %for.inc88.1.7 %putchar112.1.8 = call i32 @putchar(i32 72) %putchar114.1.8 = call i32 @putchar(i32 32) %call86.1.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 9) br label %for.inc88.1.8 for.inc88.1.8: ; preds = %if.end84.1.8, %for.inc88.1.7 %arrayidx58.1.9 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 10 %28 = load i32, ptr %arrayidx58.1.9, align 16, !tbaa !5 %cmp59.1.9 = icmp eq i32 %28, 0 br i1 %cmp59.1.9, label %if.end84.1.9, label %for.inc88.1.9 if.end84.1.9: ; preds = %for.inc88.1.8 %putchar112.1.9 = call i32 @putchar(i32 72) %putchar114.1.9 = call i32 @putchar(i32 32) %call86.1.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 10) br label %for.inc88.1.9 for.inc88.1.9: ; preds = %if.end84.1.9, %for.inc88.1.8 %arrayidx58.1.10 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 11 %29 = load i32, ptr %arrayidx58.1.10, align 4, !tbaa !5 %cmp59.1.10 = icmp eq i32 %29, 0 br i1 %cmp59.1.10, label %if.end84.1.10, label %for.inc88.1.10 if.end84.1.10: ; preds = %for.inc88.1.9 %putchar112.1.10 = call i32 @putchar(i32 72) %putchar114.1.10 = call i32 @putchar(i32 32) %call86.1.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 11) br label %for.inc88.1.10 for.inc88.1.10: ; preds = %if.end84.1.10, %for.inc88.1.9 %arrayidx58.1.11 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 12 %30 = load i32, ptr %arrayidx58.1.11, align 8, !tbaa !5 %cmp59.1.11 = icmp eq i32 %30, 0 br i1 %cmp59.1.11, label %if.end84.1.11, label %for.inc88.1.11 if.end84.1.11: ; preds = %for.inc88.1.10 %putchar112.1.11 = call i32 @putchar(i32 72) %putchar114.1.11 = call i32 @putchar(i32 32) %call86.1.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 12) br label %for.inc88.1.11 for.inc88.1.11: ; preds = %if.end84.1.11, %for.inc88.1.10 %arrayidx58.1.12 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 13 %31 = load i32, ptr %arrayidx58.1.12, align 4, !tbaa !5 %cmp59.1.12 = icmp eq i32 %31, 0 br i1 %cmp59.1.12, label %if.end84.1.12, label %for.inc88.1.12 if.end84.1.12: ; preds = %for.inc88.1.11 %putchar112.1.12 = call i32 @putchar(i32 72) %putchar114.1.12 = call i32 @putchar(i32 32) %call86.1.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 13) br label %for.inc88.1.12 for.inc88.1.12: ; preds = %if.end84.1.12, %for.inc88.1.11 %32 = load i32, ptr %scevgep.2, align 4, !tbaa !5 %cmp59.2 = icmp eq i32 %32, 0 br i1 %cmp59.2, label %if.end84.2, label %for.inc88.2 if.end84.2: ; preds = %for.inc88.1.12 %putchar111.2 = call i32 @putchar(i32 67) %putchar114.2 = call i32 @putchar(i32 32) %call86.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 1) br label %for.inc88.2 for.inc88.2: ; preds = %if.end84.2, %for.inc88.1.12 %arrayidx58.2.1 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 2 %33 = load i32, ptr %arrayidx58.2.1, align 8, !tbaa !5 %cmp59.2.1 = icmp eq i32 %33, 0 br i1 %cmp59.2.1, label %if.end84.2.1, label %for.inc88.2.1 if.end84.2.1: ; preds = %for.inc88.2 %putchar111.2.1 = call i32 @putchar(i32 67) %putchar114.2.1 = call i32 @putchar(i32 32) %call86.2.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 2) br label %for.inc88.2.1 for.inc88.2.1: ; preds = %if.end84.2.1, %for.inc88.2 %arrayidx58.2.2 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 3 %34 = load i32, ptr %arrayidx58.2.2, align 4, !tbaa !5 %cmp59.2.2 = icmp eq i32 %34, 0 br i1 %cmp59.2.2, label %if.end84.2.2, label %for.inc88.2.2 if.end84.2.2: ; preds = %for.inc88.2.1 %putchar111.2.2 = call i32 @putchar(i32 67) %putchar114.2.2 = call i32 @putchar(i32 32) %call86.2.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 3) br label %for.inc88.2.2 for.inc88.2.2: ; preds = %if.end84.2.2, %for.inc88.2.1 %arrayidx58.2.3 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 4 %35 = load i32, ptr %arrayidx58.2.3, align 16, !tbaa !5 %cmp59.2.3 = icmp eq i32 %35, 0 br i1 %cmp59.2.3, label %if.end84.2.3, label %for.inc88.2.3 if.end84.2.3: ; preds = %for.inc88.2.2 %putchar111.2.3 = call i32 @putchar(i32 67) %putchar114.2.3 = call i32 @putchar(i32 32) %call86.2.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 4) br label %for.inc88.2.3 for.inc88.2.3: ; preds = %if.end84.2.3, %for.inc88.2.2 %arrayidx58.2.4 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 5 %36 = load i32, ptr %arrayidx58.2.4, align 4, !tbaa !5 %cmp59.2.4 = icmp eq i32 %36, 0 br i1 %cmp59.2.4, label %if.end84.2.4, label %for.inc88.2.4 if.end84.2.4: ; preds = %for.inc88.2.3 %putchar111.2.4 = call i32 @putchar(i32 67) %putchar114.2.4 = call i32 @putchar(i32 32) %call86.2.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 5) br label %for.inc88.2.4 for.inc88.2.4: ; preds = %if.end84.2.4, %for.inc88.2.3 %arrayidx58.2.5 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 6 %37 = load i32, ptr %arrayidx58.2.5, align 8, !tbaa !5 %cmp59.2.5 = icmp eq i32 %37, 0 br i1 %cmp59.2.5, label %if.end84.2.5, label %for.inc88.2.5 if.end84.2.5: ; preds = %for.inc88.2.4 %putchar111.2.5 = call i32 @putchar(i32 67) %putchar114.2.5 = call i32 @putchar(i32 32) %call86.2.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 6) br label %for.inc88.2.5 for.inc88.2.5: ; preds = %if.end84.2.5, %for.inc88.2.4 %arrayidx58.2.6 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 7 %38 = load i32, ptr %arrayidx58.2.6, align 4, !tbaa !5 %cmp59.2.6 = icmp eq i32 %38, 0 br i1 %cmp59.2.6, label %if.end84.2.6, label %for.inc88.2.6 if.end84.2.6: ; preds = %for.inc88.2.5 %putchar111.2.6 = call i32 @putchar(i32 67) %putchar114.2.6 = call i32 @putchar(i32 32) %call86.2.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 7) br label %for.inc88.2.6 for.inc88.2.6: ; preds = %if.end84.2.6, %for.inc88.2.5 %arrayidx58.2.7 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 8 %39 = load i32, ptr %arrayidx58.2.7, align 16, !tbaa !5 %cmp59.2.7 = icmp eq i32 %39, 0 br i1 %cmp59.2.7, label %if.end84.2.7, label %for.inc88.2.7 if.end84.2.7: ; preds = %for.inc88.2.6 %putchar111.2.7 = call i32 @putchar(i32 67) %putchar114.2.7 = call i32 @putchar(i32 32) %call86.2.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 8) br label %for.inc88.2.7 for.inc88.2.7: ; preds = %if.end84.2.7, %for.inc88.2.6 %arrayidx58.2.8 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 9 %40 = load i32, ptr %arrayidx58.2.8, align 4, !tbaa !5 %cmp59.2.8 = icmp eq i32 %40, 0 br i1 %cmp59.2.8, label %if.end84.2.8, label %for.inc88.2.8 if.end84.2.8: ; preds = %for.inc88.2.7 %putchar111.2.8 = call i32 @putchar(i32 67) %putchar114.2.8 = call i32 @putchar(i32 32) %call86.2.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 9) br label %for.inc88.2.8 for.inc88.2.8: ; preds = %if.end84.2.8, %for.inc88.2.7 %arrayidx58.2.9 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 10 %41 = load i32, ptr %arrayidx58.2.9, align 8, !tbaa !5 %cmp59.2.9 = icmp eq i32 %41, 0 br i1 %cmp59.2.9, label %if.end84.2.9, label %for.inc88.2.9 if.end84.2.9: ; preds = %for.inc88.2.8 %putchar111.2.9 = call i32 @putchar(i32 67) %putchar114.2.9 = call i32 @putchar(i32 32) %call86.2.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 10) br label %for.inc88.2.9 for.inc88.2.9: ; preds = %if.end84.2.9, %for.inc88.2.8 %arrayidx58.2.10 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 11 %42 = load i32, ptr %arrayidx58.2.10, align 4, !tbaa !5 %cmp59.2.10 = icmp eq i32 %42, 0 br i1 %cmp59.2.10, label %if.end84.2.10, label %for.inc88.2.10 if.end84.2.10: ; preds = %for.inc88.2.9 %putchar111.2.10 = call i32 @putchar(i32 67) %putchar114.2.10 = call i32 @putchar(i32 32) %call86.2.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 11) br label %for.inc88.2.10 for.inc88.2.10: ; preds = %if.end84.2.10, %for.inc88.2.9 %arrayidx58.2.11 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 12 %43 = load i32, ptr %arrayidx58.2.11, align 16, !tbaa !5 %cmp59.2.11 = icmp eq i32 %43, 0 br i1 %cmp59.2.11, label %if.end84.2.11, label %for.inc88.2.11 if.end84.2.11: ; preds = %for.inc88.2.10 %putchar111.2.11 = call i32 @putchar(i32 67) %putchar114.2.11 = call i32 @putchar(i32 32) %call86.2.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 12) br label %for.inc88.2.11 for.inc88.2.11: ; preds = %if.end84.2.11, %for.inc88.2.10 %arrayidx58.2.12 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 13 %44 = load i32, ptr %arrayidx58.2.12, align 4, !tbaa !5 %cmp59.2.12 = icmp eq i32 %44, 0 br i1 %cmp59.2.12, label %if.end84.2.12, label %for.inc88.2.12 if.end84.2.12: ; preds = %for.inc88.2.11 %putchar111.2.12 = call i32 @putchar(i32 67) %putchar114.2.12 = call i32 @putchar(i32 32) %call86.2.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 13) br label %for.inc88.2.12 for.inc88.2.12: ; preds = %if.end84.2.12, %for.inc88.2.11 %45 = load i32, ptr %scevgep.3, align 4, !tbaa !5 %cmp59.3 = icmp eq i32 %45, 0 br i1 %cmp59.3, label %if.end84.3, label %for.inc88.3 if.end84.3: ; preds = %for.inc88.2.12 %putchar.3 = call i32 @putchar(i32 68) %putchar114.3 = call i32 @putchar(i32 32) %call86.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 1) br label %for.inc88.3 for.inc88.3: ; preds = %if.end84.3, %for.inc88.2.12 %arrayidx58.3.1 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 2 %46 = load i32, ptr %arrayidx58.3.1, align 16, !tbaa !5 %cmp59.3.1 = icmp eq i32 %46, 0 br i1 %cmp59.3.1, label %if.end84.3.1, label %for.inc88.3.1 if.end84.3.1: ; preds = %for.inc88.3 %putchar.3.1 = call i32 @putchar(i32 68) %putchar114.3.1 = call i32 @putchar(i32 32) %call86.3.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 2) br label %for.inc88.3.1 for.inc88.3.1: ; preds = %if.end84.3.1, %for.inc88.3 %arrayidx58.3.2 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 3 %47 = load i32, ptr %arrayidx58.3.2, align 4, !tbaa !5 %cmp59.3.2 = icmp eq i32 %47, 0 br i1 %cmp59.3.2, label %if.end84.3.2, label %for.inc88.3.2 if.end84.3.2: ; preds = %for.inc88.3.1 %putchar.3.2 = call i32 @putchar(i32 68) %putchar114.3.2 = call i32 @putchar(i32 32) %call86.3.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 3) br label %for.inc88.3.2 for.inc88.3.2: ; preds = %if.end84.3.2, %for.inc88.3.1 %arrayidx58.3.3 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 4 %48 = load i32, ptr %arrayidx58.3.3, align 8, !tbaa !5 %cmp59.3.3 = icmp eq i32 %48, 0 br i1 %cmp59.3.3, label %if.end84.3.3, label %for.inc88.3.3 if.end84.3.3: ; preds = %for.inc88.3.2 %putchar.3.3 = call i32 @putchar(i32 68) %putchar114.3.3 = call i32 @putchar(i32 32) %call86.3.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 4) br label %for.inc88.3.3 for.inc88.3.3: ; preds = %if.end84.3.3, %for.inc88.3.2 %arrayidx58.3.4 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 5 %49 = load i32, ptr %arrayidx58.3.4, align 4, !tbaa !5 %cmp59.3.4 = icmp eq i32 %49, 0 br i1 %cmp59.3.4, label %if.end84.3.4, label %for.inc88.3.4 if.end84.3.4: ; preds = %for.inc88.3.3 %putchar.3.4 = call i32 @putchar(i32 68) %putchar114.3.4 = call i32 @putchar(i32 32) %call86.3.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 5) br label %for.inc88.3.4 for.inc88.3.4: ; preds = %if.end84.3.4, %for.inc88.3.3 %arrayidx58.3.5 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 6 %50 = load i32, ptr %arrayidx58.3.5, align 16, !tbaa !5 %cmp59.3.5 = icmp eq i32 %50, 0 br i1 %cmp59.3.5, label %if.end84.3.5, label %for.inc88.3.5 if.end84.3.5: ; preds = %for.inc88.3.4 %putchar.3.5 = call i32 @putchar(i32 68) %putchar114.3.5 = call i32 @putchar(i32 32) %call86.3.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 6) br label %for.inc88.3.5 for.inc88.3.5: ; preds = %if.end84.3.5, %for.inc88.3.4 %arrayidx58.3.6 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 7 %51 = load i32, ptr %arrayidx58.3.6, align 4, !tbaa !5 %cmp59.3.6 = icmp eq i32 %51, 0 br i1 %cmp59.3.6, label %if.end84.3.6, label %for.inc88.3.6 if.end84.3.6: ; preds = %for.inc88.3.5 %putchar.3.6 = call i32 @putchar(i32 68) %putchar114.3.6 = call i32 @putchar(i32 32) %call86.3.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 7) br label %for.inc88.3.6 for.inc88.3.6: ; preds = %if.end84.3.6, %for.inc88.3.5 %arrayidx58.3.7 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 8 %52 = load i32, ptr %arrayidx58.3.7, align 8, !tbaa !5 %cmp59.3.7 = icmp eq i32 %52, 0 br i1 %cmp59.3.7, label %if.end84.3.7, label %for.inc88.3.7 if.end84.3.7: ; preds = %for.inc88.3.6 %putchar.3.7 = call i32 @putchar(i32 68) %putchar114.3.7 = call i32 @putchar(i32 32) %call86.3.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 8) br label %for.inc88.3.7 for.inc88.3.7: ; preds = %if.end84.3.7, %for.inc88.3.6 %arrayidx58.3.8 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 9 %53 = load i32, ptr %arrayidx58.3.8, align 4, !tbaa !5 %cmp59.3.8 = icmp eq i32 %53, 0 br i1 %cmp59.3.8, label %if.end84.3.8, label %for.inc88.3.8 if.end84.3.8: ; preds = %for.inc88.3.7 %putchar.3.8 = call i32 @putchar(i32 68) %putchar114.3.8 = call i32 @putchar(i32 32) %call86.3.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 9) br label %for.inc88.3.8 for.inc88.3.8: ; preds = %if.end84.3.8, %for.inc88.3.7 %arrayidx58.3.9 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 10 %54 = load i32, ptr %arrayidx58.3.9, align 16, !tbaa !5 %cmp59.3.9 = icmp eq i32 %54, 0 br i1 %cmp59.3.9, label %if.end84.3.9, label %for.inc88.3.9 if.end84.3.9: ; preds = %for.inc88.3.8 %putchar.3.9 = call i32 @putchar(i32 68) %putchar114.3.9 = call i32 @putchar(i32 32) %call86.3.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 10) br label %for.inc88.3.9 for.inc88.3.9: ; preds = %if.end84.3.9, %for.inc88.3.8 %arrayidx58.3.10 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 11 %55 = load i32, ptr %arrayidx58.3.10, align 4, !tbaa !5 %cmp59.3.10 = icmp eq i32 %55, 0 br i1 %cmp59.3.10, label %if.end84.3.10, label %for.inc88.3.10 if.end84.3.10: ; preds = %for.inc88.3.9 %putchar.3.10 = call i32 @putchar(i32 68) %putchar114.3.10 = call i32 @putchar(i32 32) %call86.3.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 11) br label %for.inc88.3.10 for.inc88.3.10: ; preds = %if.end84.3.10, %for.inc88.3.9 %arrayidx58.3.11 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 12 %56 = load i32, ptr %arrayidx58.3.11, align 8, !tbaa !5 %cmp59.3.11 = icmp eq i32 %56, 0 br i1 %cmp59.3.11, label %if.end84.3.11, label %for.inc88.3.11 if.end84.3.11: ; preds = %for.inc88.3.10 %putchar.3.11 = call i32 @putchar(i32 68) %putchar114.3.11 = call i32 @putchar(i32 32) %call86.3.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 12) br label %for.inc88.3.11 for.inc88.3.11: ; preds = %if.end84.3.11, %for.inc88.3.10 %arrayidx58.3.12 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 13 %57 = load i32, ptr %arrayidx58.3.12, align 4, !tbaa !5 %cmp59.3.12 = icmp eq i32 %57, 0 br i1 %cmp59.3.12, label %if.end84.3.12, label %for.inc88.3.12 if.end84.3.12: ; preds = %for.inc88.3.11 %putchar.3.12 = call i32 @putchar(i32 68) %putchar114.3.12 = call i32 @putchar(i32 32) %call86.3.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 13) br label %for.inc88.3.12 for.inc88.3.12: ; preds = %if.end84.3.12, %for.inc88.3.11 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %card) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(void){ int card[4][13]; int n,i,j; for(j=1;j<=13;j++){ for(i=1;i<=4;i++){ card[i-1][j-1]=0; //card?????????????????¨???0??? } } scanf("%d",&n); int k; //k???????????\???????????? char mark; for(k=1;k<=n;k++){ scanf("%*c%c %d",&mark,&j); //?????????????????£???????????¨???????????????%*c?????????????????¨?????????????????¨????????????????????? if(mark=='S'){ card[0][j-1]=1; //i=1 }else if(mark=='H'){ card[1][j-1]=1; //i=2 }else if(mark=='C'){ card[2][j-1]=1; //i=3 }else if(mark=='D'){ card[3][j-1]=1; //i=4 } } for(i=1 ; i<=4 ; i++){ for(j=1 ; j<=13 ; j++){ if(card[i-1][j-1]==0){{ if(i==1){ printf("S %d\n",j); }else if(i==2){ printf("H %d\n",j); }else if(i==3){ printf("C %d\n",j); }else if(i==4){ printf("D %d\n",j); } } } } } // printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214808/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214808/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [9 x i8] c"%*c%c %d\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"S %d\0A\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"H %d\0A\00", align 1 @.str.4 = private unnamed_addr constant [6 x i8] c"C %d\0A\00", align 1 @.str.5 = private unnamed_addr constant [6 x i8] c"D %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %card = alloca [4 x [13 x i32]], align 16 %n = alloca i32, align 4 %j = alloca i32, align 4 %mark = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %card) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %j) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %card, i8 0, i64 208, i1 false) store i32 14, ptr %j, align 4, !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %mark) #4 %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp11.not112 = icmp slt i32 %0, 1 br i1 %cmp11.not112, label %for.cond56.preheader, label %for.body12 for.body12: ; preds = %entry, %for.inc49 %k.0113 = phi i32 [ %inc50, %for.inc49 ], [ 1, %entry ] %call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %mark, ptr noundef nonnull %j) %1 = load i8, ptr %mark, align 1, !tbaa !9 switch i8 %1, label %for.inc49 [ i8 83, label %if.then i8 72, label %if.then23 i8 67, label %if.then32 i8 68, label %if.then41 ] if.then: ; preds = %for.body12 %2 = load i32, ptr %j, align 4, !tbaa !5 %sub17 = add nsw i32 %2, -1 %idxprom18 = sext i32 %sub17 to i64 %arrayidx19 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 %idxprom18 br label %for.inc49.sink.split if.then23: ; preds = %for.body12 %3 = load i32, ptr %j, align 4, !tbaa !5 %sub25 = add nsw i32 %3, -1 %idxprom26 = sext i32 %sub25 to i64 %arrayidx27 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 %idxprom26 br label %for.inc49.sink.split if.then32: ; preds = %for.body12 %4 = load i32, ptr %j, align 4, !tbaa !5 %sub34 = add nsw i32 %4, -1 %idxprom35 = sext i32 %sub34 to i64 %arrayidx36 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 %idxprom35 br label %for.inc49.sink.split if.then41: ; preds = %for.body12 %5 = load i32, ptr %j, align 4, !tbaa !5 %sub43 = add nsw i32 %5, -1 %idxprom44 = sext i32 %sub43 to i64 %arrayidx45 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 %idxprom44 br label %for.inc49.sink.split for.inc49.sink.split: ; preds = %if.then23, %if.then41, %if.then32, %if.then %arrayidx19.sink = phi ptr [ %arrayidx19, %if.then ], [ %arrayidx36, %if.then32 ], [ %arrayidx45, %if.then41 ], [ %arrayidx27, %if.then23 ] store i32 1, ptr %arrayidx19.sink, align 4, !tbaa !5 br label %for.inc49 for.inc49: ; preds = %for.inc49.sink.split, %for.body12 %inc50 = add nuw nsw i32 %k.0113, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp11.not.not = icmp slt i32 %k.0113, %6 br i1 %cmp11.not.not, label %for.body12, label %for.cond56.preheader, !llvm.loop !10 for.cond56.preheader: ; preds = %entry, %for.inc49 store i32 1, ptr %j, align 4, !tbaa !5 br label %for.body59.us for.body59.us: ; preds = %for.cond56.preheader, %for.inc93.us %storemerge109114.us = phi i32 [ %inc94.us, %for.inc93.us ], [ 1, %for.cond56.preheader ] %sub63.us = add nsw i32 %storemerge109114.us, -1 %idxprom64.us = sext i32 %sub63.us to i64 %arrayidx65.us = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 0, i64 %idxprom64.us %7 = load i32, ptr %arrayidx65.us, align 4, !tbaa !5 %cmp66.us = icmp eq i32 %7, 0 br i1 %cmp66.us, label %if.then68.us, label %for.inc93.us if.then68.us: ; preds = %for.body59.us %call72.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %storemerge109114.us) %.pre164 = load i32, ptr %j, align 4, !tbaa !5 br label %for.inc93.us for.inc93.us: ; preds = %if.then68.us, %for.body59.us %8 = phi i32 [ %.pre164, %if.then68.us ], [ %storemerge109114.us, %for.body59.us ] %inc94.us = add nsw i32 %8, 1 store i32 %inc94.us, ptr %j, align 4, !tbaa !5 %cmp57.us = icmp slt i32 %8, 13 br i1 %cmp57.us, label %for.body59.us, label %for.inc96, !llvm.loop !12 for.inc96: ; preds = %for.inc93.us store i32 1, ptr %j, align 4, !tbaa !5 br label %for.body59.us116.1 for.body59.us116.1: ; preds = %for.inc93.us123.1, %for.inc96 %storemerge109114.us117.1 = phi i32 [ %inc94.us124.1, %for.inc93.us123.1 ], [ 1, %for.inc96 ] %sub63.us118.1 = add nsw i32 %storemerge109114.us117.1, -1 %idxprom64.us119.1 = sext i32 %sub63.us118.1 to i64 %arrayidx65.us120.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 %idxprom64.us119.1 %9 = load i32, ptr %arrayidx65.us120.1, align 4, !tbaa !5 %cmp66.us121.1 = icmp eq i32 %9, 0 br i1 %cmp66.us121.1, label %if.then68.us122.1, label %for.inc93.us123.1 if.then68.us122.1: ; preds = %for.body59.us116.1 %call77.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %storemerge109114.us117.1) %.pre163.1 = load i32, ptr %j, align 4, !tbaa !5 br label %for.inc93.us123.1 for.inc93.us123.1: ; preds = %if.then68.us122.1, %for.body59.us116.1 %10 = phi i32 [ %.pre163.1, %if.then68.us122.1 ], [ %storemerge109114.us117.1, %for.body59.us116.1 ] %inc94.us124.1 = add nsw i32 %10, 1 store i32 %inc94.us124.1, ptr %j, align 4, !tbaa !5 %cmp57.us125.1 = icmp slt i32 %10, 13 br i1 %cmp57.us125.1, label %for.body59.us116.1, label %for.inc96.1, !llvm.loop !12 for.inc96.1: ; preds = %for.inc93.us123.1 store i32 1, ptr %j, align 4, !tbaa !5 br label %for.body59.us127.2 for.body59.us127.2: ; preds = %for.inc93.us134.2, %for.inc96.1 %storemerge109114.us128.2 = phi i32 [ %inc94.us135.2, %for.inc93.us134.2 ], [ 1, %for.inc96.1 ] %sub63.us129.2 = add nsw i32 %storemerge109114.us128.2, -1 %idxprom64.us130.2 = sext i32 %sub63.us129.2 to i64 %arrayidx65.us131.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 %idxprom64.us130.2 %11 = load i32, ptr %arrayidx65.us131.2, align 4, !tbaa !5 %cmp66.us132.2 = icmp eq i32 %11, 0 br i1 %cmp66.us132.2, label %if.then68.us133.2, label %for.inc93.us134.2 if.then68.us133.2: ; preds = %for.body59.us127.2 %call82.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %storemerge109114.us128.2) %.pre162.2 = load i32, ptr %j, align 4, !tbaa !5 br label %for.inc93.us134.2 for.inc93.us134.2: ; preds = %if.then68.us133.2, %for.body59.us127.2 %12 = phi i32 [ %.pre162.2, %if.then68.us133.2 ], [ %storemerge109114.us128.2, %for.body59.us127.2 ] %inc94.us135.2 = add nsw i32 %12, 1 store i32 %inc94.us135.2, ptr %j, align 4, !tbaa !5 %cmp57.us136.2 = icmp slt i32 %12, 13 br i1 %cmp57.us136.2, label %for.body59.us127.2, label %for.inc96.2, !llvm.loop !12 for.inc96.2: ; preds = %for.inc93.us134.2 store i32 1, ptr %j, align 4, !tbaa !5 br label %for.body59.us138.3 for.body59.us138.3: ; preds = %for.inc93.us145.3, %for.inc96.2 %storemerge109114.us139.3 = phi i32 [ %inc94.us146.3, %for.inc93.us145.3 ], [ 1, %for.inc96.2 ] %sub63.us140.3 = add nsw i32 %storemerge109114.us139.3, -1 %idxprom64.us141.3 = sext i32 %sub63.us140.3 to i64 %arrayidx65.us142.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 %idxprom64.us141.3 %13 = load i32, ptr %arrayidx65.us142.3, align 4, !tbaa !5 %cmp66.us143.3 = icmp eq i32 %13, 0 br i1 %cmp66.us143.3, label %if.then68.us144.3, label %for.inc93.us145.3 if.then68.us144.3: ; preds = %for.body59.us138.3 %call87.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %storemerge109114.us139.3) %.pre.3 = load i32, ptr %j, align 4, !tbaa !5 br label %for.inc93.us145.3 for.inc93.us145.3: ; preds = %if.then68.us144.3, %for.body59.us138.3 %14 = phi i32 [ %.pre.3, %if.then68.us144.3 ], [ %storemerge109114.us139.3, %for.body59.us138.3 ] %inc94.us146.3 = add nsw i32 %14, 1 store i32 %inc94.us146.3, ptr %j, align 4, !tbaa !5 %cmp57.us147.3 = icmp slt i32 %14, 13 br i1 %cmp57.us147.3, label %for.body59.us138.3, label %for.inc96.3, !llvm.loop !12 for.inc96.3: ; preds = %for.inc93.us145.3 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %mark) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %j) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %card) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include<stdio.h> int main(){ int n,i,j,b; int a[4][14]; char s; for(i=0;i<=13;i++){ a[0][i]=0; a[1][i]=0; a[2][i]=0; a[3][i]=0; } scanf("%d",&n); for(i=0;i<n;i++){ scanf(" %c %d",&s,&b); if(s=='S'){ a[0][b]=1; }else if(s=='H'){ a[1][b]=1; }else if(s=='C'){ a[2][b]=1; }else if(s=='D'){ a[3][b]=1; } } for(i=0;i<4;i++){ for(j=1;j<=13;j++){ if(a[i][j]!=1){ if(i==0){ s='S'; }else if(i==1){ s='H'; }else if(i==2){ s='C'; }else if(i==3){ s='D'; } printf("%c %d\n",s,j); } } } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214851/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214851/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c" %c %d\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %b = alloca i32, align 4 %a = alloca [4 x [14 x i32]], align 16 %s = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %s) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(224) %a, i8 0, i64 224, 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 %cmp12110 = icmp sgt i32 %0, 0 br i1 %cmp12110, label %for.body13, label %for.cond53.preheader.preheader for.body13: ; preds = %entry, %for.inc46 %i.1111 = phi i32 [ %inc47, %for.inc46 ], [ 0, %entry ] %call14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s, ptr noundef nonnull %b) %1 = load i8, ptr %s, align 1, !tbaa !9 switch i8 %1, label %for.inc46 [ i8 83, label %if.then i8 72, label %if.then23 i8 67, label %if.then31 i8 68, label %if.then39 ] if.then: ; preds = %for.body13 %2 = load i32, ptr %b, align 4, !tbaa !5 %idxprom18 = sext i32 %2 to i64 %arrayidx19 = getelementptr inbounds [14 x i32], ptr %a, i64 0, i64 %idxprom18 br label %for.inc46.sink.split if.then23: ; preds = %for.body13 %3 = load i32, ptr %b, align 4, !tbaa !5 %idxprom25 = sext i32 %3 to i64 %arrayidx26 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 1, i64 %idxprom25 br label %for.inc46.sink.split if.then31: ; preds = %for.body13 %4 = load i32, ptr %b, align 4, !tbaa !5 %idxprom33 = sext i32 %4 to i64 %arrayidx34 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 2, i64 %idxprom33 br label %for.inc46.sink.split if.then39: ; preds = %for.body13 %5 = load i32, ptr %b, align 4, !tbaa !5 %idxprom41 = sext i32 %5 to i64 %arrayidx42 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 3, i64 %idxprom41 br label %for.inc46.sink.split for.inc46.sink.split: ; preds = %if.then23, %if.then39, %if.then31, %if.then %arrayidx19.sink = phi ptr [ %arrayidx19, %if.then ], [ %arrayidx34, %if.then31 ], [ %arrayidx42, %if.then39 ], [ %arrayidx26, %if.then23 ] store i32 1, ptr %arrayidx19.sink, align 4, !tbaa !5 br label %for.inc46 for.inc46: ; preds = %for.inc46.sink.split, %for.body13 %inc47 = add nuw nsw i32 %i.1111, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp12 = icmp slt i32 %inc47, %6 br i1 %cmp12, label %for.body13, label %for.cond53.preheader.preheader, !llvm.loop !10 for.cond53.preheader.preheader: ; preds = %for.inc46, %entry br label %for.cond53.preheader for.cond53.preheader: ; preds = %for.cond53.preheader.preheader, %for.inc89 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc89 ], [ 0, %for.cond53.preheader.preheader ] %7 = trunc i64 %indvars.iv to i32 %arrayidx60 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 1 %8 = load i32, ptr %arrayidx60, align 4, !tbaa !5 %cmp61.not = icmp eq i32 %8, 1 switch i32 %7, label %for.body56.preheader [ i32 0, label %for.body56.us.preheader i32 1, label %for.body56.us114.preheader i32 2, label %for.body56.us127.preheader i32 3, label %for.body56.us140.preheader ] for.body56.us140.preheader: ; preds = %for.cond53.preheader br i1 %cmp61.not, label %for.inc86.us149, label %if.then63.us145 for.body56.us127.preheader: ; preds = %for.cond53.preheader br i1 %cmp61.not, label %for.inc86.us136, label %if.then63.us132 for.body56.us114.preheader: ; preds = %for.cond53.preheader br i1 %cmp61.not, label %for.inc86.us123, label %if.then63.us119 for.body56.us.preheader: ; preds = %for.cond53.preheader br i1 %cmp61.not, label %for.inc86.us, label %if.then63.us for.body56.preheader: ; preds = %for.cond53.preheader br i1 %cmp61.not, label %for.inc86, label %if.then63 if.then63.us: ; preds = %for.body56.us.preheader store i8 83, ptr %s, align 1, !tbaa !9 %call84.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 1) br label %for.inc86.us for.inc86.us: ; preds = %if.then63.us, %for.body56.us.preheader %arrayidx60.us.1 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 2 %9 = load i32, ptr %arrayidx60.us.1, align 8, !tbaa !5 %cmp61.not.us.1 = icmp eq i32 %9, 1 br i1 %cmp61.not.us.1, label %for.inc86.us.1, label %if.then63.us.1 if.then63.us.1: ; preds = %for.inc86.us store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 2) br label %for.inc86.us.1 for.inc86.us.1: ; preds = %if.then63.us.1, %for.inc86.us %arrayidx60.us.2 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 3 %10 = load i32, ptr %arrayidx60.us.2, align 4, !tbaa !5 %cmp61.not.us.2 = icmp eq i32 %10, 1 br i1 %cmp61.not.us.2, label %for.inc86.us.2, label %if.then63.us.2 if.then63.us.2: ; preds = %for.inc86.us.1 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 3) br label %for.inc86.us.2 for.inc86.us.2: ; preds = %if.then63.us.2, %for.inc86.us.1 %arrayidx60.us.3 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 4 %11 = load i32, ptr %arrayidx60.us.3, align 8, !tbaa !5 %cmp61.not.us.3 = icmp eq i32 %11, 1 br i1 %cmp61.not.us.3, label %for.inc86.us.3, label %if.then63.us.3 if.then63.us.3: ; preds = %for.inc86.us.2 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 4) br label %for.inc86.us.3 for.inc86.us.3: ; preds = %if.then63.us.3, %for.inc86.us.2 %arrayidx60.us.4 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 5 %12 = load i32, ptr %arrayidx60.us.4, align 4, !tbaa !5 %cmp61.not.us.4 = icmp eq i32 %12, 1 br i1 %cmp61.not.us.4, label %for.inc86.us.4, label %if.then63.us.4 if.then63.us.4: ; preds = %for.inc86.us.3 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 5) br label %for.inc86.us.4 for.inc86.us.4: ; preds = %if.then63.us.4, %for.inc86.us.3 %arrayidx60.us.5 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 6 %13 = load i32, ptr %arrayidx60.us.5, align 8, !tbaa !5 %cmp61.not.us.5 = icmp eq i32 %13, 1 br i1 %cmp61.not.us.5, label %for.inc86.us.5, label %if.then63.us.5 if.then63.us.5: ; preds = %for.inc86.us.4 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 6) br label %for.inc86.us.5 for.inc86.us.5: ; preds = %if.then63.us.5, %for.inc86.us.4 %arrayidx60.us.6 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 7 %14 = load i32, ptr %arrayidx60.us.6, align 4, !tbaa !5 %cmp61.not.us.6 = icmp eq i32 %14, 1 br i1 %cmp61.not.us.6, label %for.inc86.us.6, label %if.then63.us.6 if.then63.us.6: ; preds = %for.inc86.us.5 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 7) br label %for.inc86.us.6 for.inc86.us.6: ; preds = %if.then63.us.6, %for.inc86.us.5 %arrayidx60.us.7 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 8 %15 = load i32, ptr %arrayidx60.us.7, align 8, !tbaa !5 %cmp61.not.us.7 = icmp eq i32 %15, 1 br i1 %cmp61.not.us.7, label %for.inc86.us.7, label %if.then63.us.7 if.then63.us.7: ; preds = %for.inc86.us.6 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 8) br label %for.inc86.us.7 for.inc86.us.7: ; preds = %if.then63.us.7, %for.inc86.us.6 %arrayidx60.us.8 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 9 %16 = load i32, ptr %arrayidx60.us.8, align 4, !tbaa !5 %cmp61.not.us.8 = icmp eq i32 %16, 1 br i1 %cmp61.not.us.8, label %for.inc86.us.8, label %if.then63.us.8 if.then63.us.8: ; preds = %for.inc86.us.7 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 9) br label %for.inc86.us.8 for.inc86.us.8: ; preds = %if.then63.us.8, %for.inc86.us.7 %arrayidx60.us.9 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 10 %17 = load i32, ptr %arrayidx60.us.9, align 8, !tbaa !5 %cmp61.not.us.9 = icmp eq i32 %17, 1 br i1 %cmp61.not.us.9, label %for.inc86.us.9, label %if.then63.us.9 if.then63.us.9: ; preds = %for.inc86.us.8 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 10) br label %for.inc86.us.9 for.inc86.us.9: ; preds = %if.then63.us.9, %for.inc86.us.8 %arrayidx60.us.10 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 11 %18 = load i32, ptr %arrayidx60.us.10, align 4, !tbaa !5 %cmp61.not.us.10 = icmp eq i32 %18, 1 br i1 %cmp61.not.us.10, label %for.inc86.us.10, label %if.then63.us.10 if.then63.us.10: ; preds = %for.inc86.us.9 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 11) br label %for.inc86.us.10 for.inc86.us.10: ; preds = %if.then63.us.10, %for.inc86.us.9 %arrayidx60.us.11 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 12 %19 = load i32, ptr %arrayidx60.us.11, align 8, !tbaa !5 %cmp61.not.us.11 = icmp eq i32 %19, 1 br i1 %cmp61.not.us.11, label %for.inc86.us.11, label %if.then63.us.11 if.then63.us.11: ; preds = %for.inc86.us.10 store i8 83, ptr %s, align 1, !tbaa !9 %call84.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 12) br label %for.inc86.us.11 for.inc86.us.11: ; preds = %if.then63.us.11, %for.inc86.us.10 %arrayidx60.us.12 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 13 %20 = load i32, ptr %arrayidx60.us.12, align 4, !tbaa !5 %cmp61.not.us.12 = icmp eq i32 %20, 1 br i1 %cmp61.not.us.12, label %for.inc89, label %if.then63.us.12 if.then63.us.12: ; preds = %for.inc86.us.11 store i8 83, ptr %s, align 1, !tbaa !9 br label %for.inc89.sink.split if.then63.us119: ; preds = %for.body56.us114.preheader store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 1) br label %for.inc86.us123 for.inc86.us123: ; preds = %if.then63.us119, %for.body56.us114.preheader %arrayidx60.us117.1 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 2 %21 = load i32, ptr %arrayidx60.us117.1, align 8, !tbaa !5 %cmp61.not.us118.1 = icmp eq i32 %21, 1 br i1 %cmp61.not.us118.1, label %for.inc86.us123.1, label %if.then63.us119.1 if.then63.us119.1: ; preds = %for.inc86.us123 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 2) br label %for.inc86.us123.1 for.inc86.us123.1: ; preds = %if.then63.us119.1, %for.inc86.us123 %arrayidx60.us117.2 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 3 %22 = load i32, ptr %arrayidx60.us117.2, align 4, !tbaa !5 %cmp61.not.us118.2 = icmp eq i32 %22, 1 br i1 %cmp61.not.us118.2, label %for.inc86.us123.2, label %if.then63.us119.2 if.then63.us119.2: ; preds = %for.inc86.us123.1 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 3) br label %for.inc86.us123.2 for.inc86.us123.2: ; preds = %if.then63.us119.2, %for.inc86.us123.1 %arrayidx60.us117.3 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 4 %23 = load i32, ptr %arrayidx60.us117.3, align 8, !tbaa !5 %cmp61.not.us118.3 = icmp eq i32 %23, 1 br i1 %cmp61.not.us118.3, label %for.inc86.us123.3, label %if.then63.us119.3 if.then63.us119.3: ; preds = %for.inc86.us123.2 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 4) br label %for.inc86.us123.3 for.inc86.us123.3: ; preds = %if.then63.us119.3, %for.inc86.us123.2 %arrayidx60.us117.4 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 5 %24 = load i32, ptr %arrayidx60.us117.4, align 4, !tbaa !5 %cmp61.not.us118.4 = icmp eq i32 %24, 1 br i1 %cmp61.not.us118.4, label %for.inc86.us123.4, label %if.then63.us119.4 if.then63.us119.4: ; preds = %for.inc86.us123.3 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 5) br label %for.inc86.us123.4 for.inc86.us123.4: ; preds = %if.then63.us119.4, %for.inc86.us123.3 %arrayidx60.us117.5 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 6 %25 = load i32, ptr %arrayidx60.us117.5, align 8, !tbaa !5 %cmp61.not.us118.5 = icmp eq i32 %25, 1 br i1 %cmp61.not.us118.5, label %for.inc86.us123.5, label %if.then63.us119.5 if.then63.us119.5: ; preds = %for.inc86.us123.4 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 6) br label %for.inc86.us123.5 for.inc86.us123.5: ; preds = %if.then63.us119.5, %for.inc86.us123.4 %arrayidx60.us117.6 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 7 %26 = load i32, ptr %arrayidx60.us117.6, align 4, !tbaa !5 %cmp61.not.us118.6 = icmp eq i32 %26, 1 br i1 %cmp61.not.us118.6, label %for.inc86.us123.6, label %if.then63.us119.6 if.then63.us119.6: ; preds = %for.inc86.us123.5 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 7) br label %for.inc86.us123.6 for.inc86.us123.6: ; preds = %if.then63.us119.6, %for.inc86.us123.5 %arrayidx60.us117.7 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 8 %27 = load i32, ptr %arrayidx60.us117.7, align 8, !tbaa !5 %cmp61.not.us118.7 = icmp eq i32 %27, 1 br i1 %cmp61.not.us118.7, label %for.inc86.us123.7, label %if.then63.us119.7 if.then63.us119.7: ; preds = %for.inc86.us123.6 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 8) br label %for.inc86.us123.7 for.inc86.us123.7: ; preds = %if.then63.us119.7, %for.inc86.us123.6 %arrayidx60.us117.8 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 9 %28 = load i32, ptr %arrayidx60.us117.8, align 4, !tbaa !5 %cmp61.not.us118.8 = icmp eq i32 %28, 1 br i1 %cmp61.not.us118.8, label %for.inc86.us123.8, label %if.then63.us119.8 if.then63.us119.8: ; preds = %for.inc86.us123.7 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 9) br label %for.inc86.us123.8 for.inc86.us123.8: ; preds = %if.then63.us119.8, %for.inc86.us123.7 %arrayidx60.us117.9 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 10 %29 = load i32, ptr %arrayidx60.us117.9, align 8, !tbaa !5 %cmp61.not.us118.9 = icmp eq i32 %29, 1 br i1 %cmp61.not.us118.9, label %for.inc86.us123.9, label %if.then63.us119.9 if.then63.us119.9: ; preds = %for.inc86.us123.8 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 10) br label %for.inc86.us123.9 for.inc86.us123.9: ; preds = %if.then63.us119.9, %for.inc86.us123.8 %arrayidx60.us117.10 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 11 %30 = load i32, ptr %arrayidx60.us117.10, align 4, !tbaa !5 %cmp61.not.us118.10 = icmp eq i32 %30, 1 br i1 %cmp61.not.us118.10, label %for.inc86.us123.10, label %if.then63.us119.10 if.then63.us119.10: ; preds = %for.inc86.us123.9 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 11) br label %for.inc86.us123.10 for.inc86.us123.10: ; preds = %if.then63.us119.10, %for.inc86.us123.9 %arrayidx60.us117.11 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 12 %31 = load i32, ptr %arrayidx60.us117.11, align 8, !tbaa !5 %cmp61.not.us118.11 = icmp eq i32 %31, 1 br i1 %cmp61.not.us118.11, label %for.inc86.us123.11, label %if.then63.us119.11 if.then63.us119.11: ; preds = %for.inc86.us123.10 store i8 72, ptr %s, align 1, !tbaa !9 %call84.us122.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 12) br label %for.inc86.us123.11 for.inc86.us123.11: ; preds = %if.then63.us119.11, %for.inc86.us123.10 %arrayidx60.us117.12 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 13 %32 = load i32, ptr %arrayidx60.us117.12, align 4, !tbaa !5 %cmp61.not.us118.12 = icmp eq i32 %32, 1 br i1 %cmp61.not.us118.12, label %for.inc89, label %if.then63.us119.12 if.then63.us119.12: ; preds = %for.inc86.us123.11 store i8 72, ptr %s, align 1, !tbaa !9 br label %for.inc89.sink.split if.then63.us132: ; preds = %for.body56.us127.preheader store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 1) br label %for.inc86.us136 for.inc86.us136: ; preds = %if.then63.us132, %for.body56.us127.preheader %arrayidx60.us130.1 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 2 %33 = load i32, ptr %arrayidx60.us130.1, align 8, !tbaa !5 %cmp61.not.us131.1 = icmp eq i32 %33, 1 br i1 %cmp61.not.us131.1, label %for.inc86.us136.1, label %if.then63.us132.1 if.then63.us132.1: ; preds = %for.inc86.us136 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 2) br label %for.inc86.us136.1 for.inc86.us136.1: ; preds = %if.then63.us132.1, %for.inc86.us136 %arrayidx60.us130.2 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 3 %34 = load i32, ptr %arrayidx60.us130.2, align 4, !tbaa !5 %cmp61.not.us131.2 = icmp eq i32 %34, 1 br i1 %cmp61.not.us131.2, label %for.inc86.us136.2, label %if.then63.us132.2 if.then63.us132.2: ; preds = %for.inc86.us136.1 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 3) br label %for.inc86.us136.2 for.inc86.us136.2: ; preds = %if.then63.us132.2, %for.inc86.us136.1 %arrayidx60.us130.3 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 4 %35 = load i32, ptr %arrayidx60.us130.3, align 8, !tbaa !5 %cmp61.not.us131.3 = icmp eq i32 %35, 1 br i1 %cmp61.not.us131.3, label %for.inc86.us136.3, label %if.then63.us132.3 if.then63.us132.3: ; preds = %for.inc86.us136.2 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 4) br label %for.inc86.us136.3 for.inc86.us136.3: ; preds = %if.then63.us132.3, %for.inc86.us136.2 %arrayidx60.us130.4 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 5 %36 = load i32, ptr %arrayidx60.us130.4, align 4, !tbaa !5 %cmp61.not.us131.4 = icmp eq i32 %36, 1 br i1 %cmp61.not.us131.4, label %for.inc86.us136.4, label %if.then63.us132.4 if.then63.us132.4: ; preds = %for.inc86.us136.3 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 5) br label %for.inc86.us136.4 for.inc86.us136.4: ; preds = %if.then63.us132.4, %for.inc86.us136.3 %arrayidx60.us130.5 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 6 %37 = load i32, ptr %arrayidx60.us130.5, align 8, !tbaa !5 %cmp61.not.us131.5 = icmp eq i32 %37, 1 br i1 %cmp61.not.us131.5, label %for.inc86.us136.5, label %if.then63.us132.5 if.then63.us132.5: ; preds = %for.inc86.us136.4 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 6) br label %for.inc86.us136.5 for.inc86.us136.5: ; preds = %if.then63.us132.5, %for.inc86.us136.4 %arrayidx60.us130.6 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 7 %38 = load i32, ptr %arrayidx60.us130.6, align 4, !tbaa !5 %cmp61.not.us131.6 = icmp eq i32 %38, 1 br i1 %cmp61.not.us131.6, label %for.inc86.us136.6, label %if.then63.us132.6 if.then63.us132.6: ; preds = %for.inc86.us136.5 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 7) br label %for.inc86.us136.6 for.inc86.us136.6: ; preds = %if.then63.us132.6, %for.inc86.us136.5 %arrayidx60.us130.7 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 8 %39 = load i32, ptr %arrayidx60.us130.7, align 8, !tbaa !5 %cmp61.not.us131.7 = icmp eq i32 %39, 1 br i1 %cmp61.not.us131.7, label %for.inc86.us136.7, label %if.then63.us132.7 if.then63.us132.7: ; preds = %for.inc86.us136.6 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 8) br label %for.inc86.us136.7 for.inc86.us136.7: ; preds = %if.then63.us132.7, %for.inc86.us136.6 %arrayidx60.us130.8 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 9 %40 = load i32, ptr %arrayidx60.us130.8, align 4, !tbaa !5 %cmp61.not.us131.8 = icmp eq i32 %40, 1 br i1 %cmp61.not.us131.8, label %for.inc86.us136.8, label %if.then63.us132.8 if.then63.us132.8: ; preds = %for.inc86.us136.7 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 9) br label %for.inc86.us136.8 for.inc86.us136.8: ; preds = %if.then63.us132.8, %for.inc86.us136.7 %arrayidx60.us130.9 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 10 %41 = load i32, ptr %arrayidx60.us130.9, align 8, !tbaa !5 %cmp61.not.us131.9 = icmp eq i32 %41, 1 br i1 %cmp61.not.us131.9, label %for.inc86.us136.9, label %if.then63.us132.9 if.then63.us132.9: ; preds = %for.inc86.us136.8 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 10) br label %for.inc86.us136.9 for.inc86.us136.9: ; preds = %if.then63.us132.9, %for.inc86.us136.8 %arrayidx60.us130.10 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 11 %42 = load i32, ptr %arrayidx60.us130.10, align 4, !tbaa !5 %cmp61.not.us131.10 = icmp eq i32 %42, 1 br i1 %cmp61.not.us131.10, label %for.inc86.us136.10, label %if.then63.us132.10 if.then63.us132.10: ; preds = %for.inc86.us136.9 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 11) br label %for.inc86.us136.10 for.inc86.us136.10: ; preds = %if.then63.us132.10, %for.inc86.us136.9 %arrayidx60.us130.11 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 12 %43 = load i32, ptr %arrayidx60.us130.11, align 8, !tbaa !5 %cmp61.not.us131.11 = icmp eq i32 %43, 1 br i1 %cmp61.not.us131.11, label %for.inc86.us136.11, label %if.then63.us132.11 if.then63.us132.11: ; preds = %for.inc86.us136.10 store i8 67, ptr %s, align 1, !tbaa !9 %call84.us135.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 12) br label %for.inc86.us136.11 for.inc86.us136.11: ; preds = %if.then63.us132.11, %for.inc86.us136.10 %arrayidx60.us130.12 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 13 %44 = load i32, ptr %arrayidx60.us130.12, align 4, !tbaa !5 %cmp61.not.us131.12 = icmp eq i32 %44, 1 br i1 %cmp61.not.us131.12, label %for.inc89, label %if.then63.us132.12 if.then63.us132.12: ; preds = %for.inc86.us136.11 store i8 67, ptr %s, align 1, !tbaa !9 br label %for.inc89.sink.split if.then63.us145: ; preds = %for.body56.us140.preheader store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 1) br label %for.inc86.us149 for.inc86.us149: ; preds = %if.then63.us145, %for.body56.us140.preheader %arrayidx60.us143.1 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 2 %45 = load i32, ptr %arrayidx60.us143.1, align 8, !tbaa !5 %cmp61.not.us144.1 = icmp eq i32 %45, 1 br i1 %cmp61.not.us144.1, label %for.inc86.us149.1, label %if.then63.us145.1 if.then63.us145.1: ; preds = %for.inc86.us149 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 2) br label %for.inc86.us149.1 for.inc86.us149.1: ; preds = %if.then63.us145.1, %for.inc86.us149 %arrayidx60.us143.2 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 3 %46 = load i32, ptr %arrayidx60.us143.2, align 4, !tbaa !5 %cmp61.not.us144.2 = icmp eq i32 %46, 1 br i1 %cmp61.not.us144.2, label %for.inc86.us149.2, label %if.then63.us145.2 if.then63.us145.2: ; preds = %for.inc86.us149.1 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 3) br label %for.inc86.us149.2 for.inc86.us149.2: ; preds = %if.then63.us145.2, %for.inc86.us149.1 %arrayidx60.us143.3 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 4 %47 = load i32, ptr %arrayidx60.us143.3, align 8, !tbaa !5 %cmp61.not.us144.3 = icmp eq i32 %47, 1 br i1 %cmp61.not.us144.3, label %for.inc86.us149.3, label %if.then63.us145.3 if.then63.us145.3: ; preds = %for.inc86.us149.2 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 4) br label %for.inc86.us149.3 for.inc86.us149.3: ; preds = %if.then63.us145.3, %for.inc86.us149.2 %arrayidx60.us143.4 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 5 %48 = load i32, ptr %arrayidx60.us143.4, align 4, !tbaa !5 %cmp61.not.us144.4 = icmp eq i32 %48, 1 br i1 %cmp61.not.us144.4, label %for.inc86.us149.4, label %if.then63.us145.4 if.then63.us145.4: ; preds = %for.inc86.us149.3 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 5) br label %for.inc86.us149.4 for.inc86.us149.4: ; preds = %if.then63.us145.4, %for.inc86.us149.3 %arrayidx60.us143.5 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 6 %49 = load i32, ptr %arrayidx60.us143.5, align 8, !tbaa !5 %cmp61.not.us144.5 = icmp eq i32 %49, 1 br i1 %cmp61.not.us144.5, label %for.inc86.us149.5, label %if.then63.us145.5 if.then63.us145.5: ; preds = %for.inc86.us149.4 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 6) br label %for.inc86.us149.5 for.inc86.us149.5: ; preds = %if.then63.us145.5, %for.inc86.us149.4 %arrayidx60.us143.6 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 7 %50 = load i32, ptr %arrayidx60.us143.6, align 4, !tbaa !5 %cmp61.not.us144.6 = icmp eq i32 %50, 1 br i1 %cmp61.not.us144.6, label %for.inc86.us149.6, label %if.then63.us145.6 if.then63.us145.6: ; preds = %for.inc86.us149.5 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 7) br label %for.inc86.us149.6 for.inc86.us149.6: ; preds = %if.then63.us145.6, %for.inc86.us149.5 %arrayidx60.us143.7 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 8 %51 = load i32, ptr %arrayidx60.us143.7, align 8, !tbaa !5 %cmp61.not.us144.7 = icmp eq i32 %51, 1 br i1 %cmp61.not.us144.7, label %for.inc86.us149.7, label %if.then63.us145.7 if.then63.us145.7: ; preds = %for.inc86.us149.6 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 8) br label %for.inc86.us149.7 for.inc86.us149.7: ; preds = %if.then63.us145.7, %for.inc86.us149.6 %arrayidx60.us143.8 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 9 %52 = load i32, ptr %arrayidx60.us143.8, align 4, !tbaa !5 %cmp61.not.us144.8 = icmp eq i32 %52, 1 br i1 %cmp61.not.us144.8, label %for.inc86.us149.8, label %if.then63.us145.8 if.then63.us145.8: ; preds = %for.inc86.us149.7 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 9) br label %for.inc86.us149.8 for.inc86.us149.8: ; preds = %if.then63.us145.8, %for.inc86.us149.7 %arrayidx60.us143.9 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 10 %53 = load i32, ptr %arrayidx60.us143.9, align 8, !tbaa !5 %cmp61.not.us144.9 = icmp eq i32 %53, 1 br i1 %cmp61.not.us144.9, label %for.inc86.us149.9, label %if.then63.us145.9 if.then63.us145.9: ; preds = %for.inc86.us149.8 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 10) br label %for.inc86.us149.9 for.inc86.us149.9: ; preds = %if.then63.us145.9, %for.inc86.us149.8 %arrayidx60.us143.10 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 11 %54 = load i32, ptr %arrayidx60.us143.10, align 4, !tbaa !5 %cmp61.not.us144.10 = icmp eq i32 %54, 1 br i1 %cmp61.not.us144.10, label %for.inc86.us149.10, label %if.then63.us145.10 if.then63.us145.10: ; preds = %for.inc86.us149.9 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 11) br label %for.inc86.us149.10 for.inc86.us149.10: ; preds = %if.then63.us145.10, %for.inc86.us149.9 %arrayidx60.us143.11 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 12 %55 = load i32, ptr %arrayidx60.us143.11, align 8, !tbaa !5 %cmp61.not.us144.11 = icmp eq i32 %55, 1 br i1 %cmp61.not.us144.11, label %for.inc86.us149.11, label %if.then63.us145.11 if.then63.us145.11: ; preds = %for.inc86.us149.10 store i8 68, ptr %s, align 1, !tbaa !9 %call84.us148.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 12) br label %for.inc86.us149.11 for.inc86.us149.11: ; preds = %if.then63.us145.11, %for.inc86.us149.10 %arrayidx60.us143.12 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 13 %56 = load i32, ptr %arrayidx60.us143.12, align 4, !tbaa !5 %cmp61.not.us144.12 = icmp eq i32 %56, 1 br i1 %cmp61.not.us144.12, label %for.inc89, label %if.then63.us145.12 if.then63.us145.12: ; preds = %for.inc86.us149.11 store i8 68, ptr %s, align 1, !tbaa !9 br label %for.inc89.sink.split if.then63: ; preds = %for.body56.preheader %57 = load i8, ptr %s, align 1, !tbaa !9 %conv83 = sext i8 %57 to i32 %call84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83, i32 noundef 1) br label %for.inc86 for.inc86: ; preds = %for.body56.preheader, %if.then63 %arrayidx60.1 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 2 %58 = load i32, ptr %arrayidx60.1, align 8, !tbaa !5 %cmp61.not.1 = icmp eq i32 %58, 1 br i1 %cmp61.not.1, label %for.inc86.1, label %if.then63.1 if.then63.1: ; preds = %for.inc86 %59 = load i8, ptr %s, align 1, !tbaa !9 %conv83.1 = sext i8 %59 to i32 %call84.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.1, i32 noundef 2) br label %for.inc86.1 for.inc86.1: ; preds = %if.then63.1, %for.inc86 %arrayidx60.2 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 3 %60 = load i32, ptr %arrayidx60.2, align 4, !tbaa !5 %cmp61.not.2 = icmp eq i32 %60, 1 br i1 %cmp61.not.2, label %for.inc86.2, label %if.then63.2 if.then63.2: ; preds = %for.inc86.1 %61 = load i8, ptr %s, align 1, !tbaa !9 %conv83.2 = sext i8 %61 to i32 %call84.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.2, i32 noundef 3) br label %for.inc86.2 for.inc86.2: ; preds = %if.then63.2, %for.inc86.1 %arrayidx60.3 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 4 %62 = load i32, ptr %arrayidx60.3, align 8, !tbaa !5 %cmp61.not.3 = icmp eq i32 %62, 1 br i1 %cmp61.not.3, label %for.inc86.3, label %if.then63.3 if.then63.3: ; preds = %for.inc86.2 %63 = load i8, ptr %s, align 1, !tbaa !9 %conv83.3 = sext i8 %63 to i32 %call84.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.3, i32 noundef 4) br label %for.inc86.3 for.inc86.3: ; preds = %if.then63.3, %for.inc86.2 %arrayidx60.4 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 5 %64 = load i32, ptr %arrayidx60.4, align 4, !tbaa !5 %cmp61.not.4 = icmp eq i32 %64, 1 br i1 %cmp61.not.4, label %for.inc86.4, label %if.then63.4 if.then63.4: ; preds = %for.inc86.3 %65 = load i8, ptr %s, align 1, !tbaa !9 %conv83.4 = sext i8 %65 to i32 %call84.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.4, i32 noundef 5) br label %for.inc86.4 for.inc86.4: ; preds = %if.then63.4, %for.inc86.3 %arrayidx60.5 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 6 %66 = load i32, ptr %arrayidx60.5, align 8, !tbaa !5 %cmp61.not.5 = icmp eq i32 %66, 1 br i1 %cmp61.not.5, label %for.inc86.5, label %if.then63.5 if.then63.5: ; preds = %for.inc86.4 %67 = load i8, ptr %s, align 1, !tbaa !9 %conv83.5 = sext i8 %67 to i32 %call84.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.5, i32 noundef 6) br label %for.inc86.5 for.inc86.5: ; preds = %if.then63.5, %for.inc86.4 %arrayidx60.6 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 7 %68 = load i32, ptr %arrayidx60.6, align 4, !tbaa !5 %cmp61.not.6 = icmp eq i32 %68, 1 br i1 %cmp61.not.6, label %for.inc86.6, label %if.then63.6 if.then63.6: ; preds = %for.inc86.5 %69 = load i8, ptr %s, align 1, !tbaa !9 %conv83.6 = sext i8 %69 to i32 %call84.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.6, i32 noundef 7) br label %for.inc86.6 for.inc86.6: ; preds = %if.then63.6, %for.inc86.5 %arrayidx60.7 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 8 %70 = load i32, ptr %arrayidx60.7, align 8, !tbaa !5 %cmp61.not.7 = icmp eq i32 %70, 1 br i1 %cmp61.not.7, label %for.inc86.7, label %if.then63.7 if.then63.7: ; preds = %for.inc86.6 %71 = load i8, ptr %s, align 1, !tbaa !9 %conv83.7 = sext i8 %71 to i32 %call84.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.7, i32 noundef 8) br label %for.inc86.7 for.inc86.7: ; preds = %if.then63.7, %for.inc86.6 %arrayidx60.8 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 9 %72 = load i32, ptr %arrayidx60.8, align 4, !tbaa !5 %cmp61.not.8 = icmp eq i32 %72, 1 br i1 %cmp61.not.8, label %for.inc86.8, label %if.then63.8 if.then63.8: ; preds = %for.inc86.7 %73 = load i8, ptr %s, align 1, !tbaa !9 %conv83.8 = sext i8 %73 to i32 %call84.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.8, i32 noundef 9) br label %for.inc86.8 for.inc86.8: ; preds = %if.then63.8, %for.inc86.7 %arrayidx60.9 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 10 %74 = load i32, ptr %arrayidx60.9, align 8, !tbaa !5 %cmp61.not.9 = icmp eq i32 %74, 1 br i1 %cmp61.not.9, label %for.inc86.9, label %if.then63.9 if.then63.9: ; preds = %for.inc86.8 %75 = load i8, ptr %s, align 1, !tbaa !9 %conv83.9 = sext i8 %75 to i32 %call84.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.9, i32 noundef 10) br label %for.inc86.9 for.inc86.9: ; preds = %if.then63.9, %for.inc86.8 %arrayidx60.10 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 11 %76 = load i32, ptr %arrayidx60.10, align 4, !tbaa !5 %cmp61.not.10 = icmp eq i32 %76, 1 br i1 %cmp61.not.10, label %for.inc86.10, label %if.then63.10 if.then63.10: ; preds = %for.inc86.9 %77 = load i8, ptr %s, align 1, !tbaa !9 %conv83.10 = sext i8 %77 to i32 %call84.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.10, i32 noundef 11) br label %for.inc86.10 for.inc86.10: ; preds = %if.then63.10, %for.inc86.9 %arrayidx60.11 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 12 %78 = load i32, ptr %arrayidx60.11, align 8, !tbaa !5 %cmp61.not.11 = icmp eq i32 %78, 1 br i1 %cmp61.not.11, label %for.inc86.11, label %if.then63.11 if.then63.11: ; preds = %for.inc86.10 %79 = load i8, ptr %s, align 1, !tbaa !9 %conv83.11 = sext i8 %79 to i32 %call84.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.11, i32 noundef 12) br label %for.inc86.11 for.inc86.11: ; preds = %if.then63.11, %for.inc86.10 %arrayidx60.12 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 13 %80 = load i32, ptr %arrayidx60.12, align 4, !tbaa !5 %cmp61.not.12 = icmp eq i32 %80, 1 br i1 %cmp61.not.12, label %for.inc89, label %if.then63.12 if.then63.12: ; preds = %for.inc86.11 %81 = load i8, ptr %s, align 1, !tbaa !9 %conv83.12 = sext i8 %81 to i32 br label %for.inc89.sink.split for.inc89.sink.split: ; preds = %if.then63.us.12, %if.then63.us119.12, %if.then63.us132.12, %if.then63.us145.12, %if.then63.12 %conv83.12.sink = phi i32 [ %conv83.12, %if.then63.12 ], [ 68, %if.then63.us145.12 ], [ 67, %if.then63.us132.12 ], [ 72, %if.then63.us119.12 ], [ 83, %if.then63.us.12 ] %call84.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv83.12.sink, i32 noundef 13) br label %for.inc89 for.inc89: ; preds = %for.inc89.sink.split, %for.inc86.11, %for.inc86.us149.11, %for.inc86.us136.11, %for.inc86.us123.11, %for.inc86.us.11 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %for.end91, label %for.cond53.preheader, !llvm.loop !12 for.end91: ; preds = %for.inc89 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %s) #4 call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include<stdio.h> int main(void){ int n,i,j,x,f; char h; scanf("%d",&n); int c[4][13]; for(i=0;i<4;i++){ for(f=0;f<13;f++){ c[i][f]=0; } } for(i=0;i<n*2;i++){ scanf("%c %d",&h,&x); if(h=='S'){ c[0][x-1]=1; } if(h=='H'){ c[1][x-1]=1; } if(h=='C'){ c[2][x-1]=1; } if(h=='D'){ c[3][x-1]=1; } } for(i=0;i<13;i++){ if(c[0][i]==0){ printf("S %d\n",i+1); } } for(i=0;i<13;i++){ if(c[1][i]==0){ printf("H %d\n",i+1); } } for(i=0;i<13;i++){ if(c[2][i]==0){ printf("C %d\n",i+1); } } for(i=0;i<13;i++){ if(c[3][i]==0){ printf("D %d\n",i+1); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214895/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214895/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%c %d\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"S %d\0A\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"H %d\0A\00", align 1 @.str.4 = private unnamed_addr constant [6 x i8] c"C %d\0A\00", align 1 @.str.5 = private unnamed_addr constant [6 x i8] c"D %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %h = alloca i8, align 1 %c = alloca [4 x [13 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %h) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %c) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %c, i8 0, i64 208, i1 false), !tbaa !5 %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp10139 = icmp sgt i32 %0, 0 br i1 %cmp10139, label %for.body11, label %if.then57 for.cond48.preheader: ; preds = %for.inc45 %.pre = load i32, ptr %c, align 16, !tbaa !5 %cmp55 = icmp eq i32 %.pre, 0 br i1 %cmp55, label %if.then57, label %for.inc60 for.body11: ; preds = %entry, %for.inc45 %i.1140 = phi i32 [ %inc46, %for.inc45 ], [ 0, %entry ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %h, ptr noundef nonnull %x) %1 = load i8, ptr %h, align 1, !tbaa !9 switch i8 %1, label %for.inc45 [ i8 83, label %if.end.thread i8 72, label %if.then21 i8 67, label %if.then30 i8 68, label %if.then39 ] if.end.thread: ; preds = %for.body11 %2 = load i32, ptr %x, align 4, !tbaa !5 %sub = add nsw i32 %2, -1 %idxprom16 = sext i32 %sub to i64 %arrayidx17 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 %idxprom16 br label %for.inc45.sink.split if.then21: ; preds = %for.body11 %3 = load i32, ptr %x, align 4, !tbaa !5 %sub23 = add nsw i32 %3, -1 %idxprom24 = sext i32 %sub23 to i64 %arrayidx25 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 1, i64 %idxprom24 br label %for.inc45.sink.split if.then30: ; preds = %for.body11 %4 = load i32, ptr %x, align 4, !tbaa !5 %sub32 = add nsw i32 %4, -1 %idxprom33 = sext i32 %sub32 to i64 %arrayidx34 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 2, i64 %idxprom33 br label %for.inc45.sink.split if.then39: ; preds = %for.body11 %5 = load i32, ptr %x, align 4, !tbaa !5 %sub41 = add nsw i32 %5, -1 %idxprom42 = sext i32 %sub41 to i64 %arrayidx43 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 3, i64 %idxprom42 br label %for.inc45.sink.split for.inc45.sink.split: ; preds = %if.then39, %if.then30, %if.end.thread, %if.then21 %arrayidx25.sink = phi ptr [ %arrayidx25, %if.then21 ], [ %arrayidx17, %if.end.thread ], [ %arrayidx34, %if.then30 ], [ %arrayidx43, %if.then39 ] store i32 1, ptr %arrayidx25.sink, align 4, !tbaa !5 br label %for.inc45 for.inc45: ; preds = %for.inc45.sink.split, %for.body11 %inc46 = add nuw nsw i32 %i.1140, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %mul = shl nsw i32 %6, 1 %cmp10 = icmp slt i32 %inc46, %mul br i1 %cmp10, label %for.body11, label %for.cond48.preheader, !llvm.loop !10 if.then57: ; preds = %entry, %for.cond48.preheader %call58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 1) br label %for.inc60 for.inc60: ; preds = %for.cond48.preheader, %if.then57 %arrayidx54.1 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 1 %7 = load i32, ptr %arrayidx54.1, align 4, !tbaa !5 %cmp55.1 = icmp eq i32 %7, 0 br i1 %cmp55.1, label %if.then57.1, label %for.inc60.1 if.then57.1: ; preds = %for.inc60 %call58.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 2) br label %for.inc60.1 for.inc60.1: ; preds = %if.then57.1, %for.inc60 %arrayidx54.2 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 2 %8 = load i32, ptr %arrayidx54.2, align 8, !tbaa !5 %cmp55.2 = icmp eq i32 %8, 0 br i1 %cmp55.2, label %if.then57.2, label %for.inc60.2 if.then57.2: ; preds = %for.inc60.1 %call58.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 3) br label %for.inc60.2 for.inc60.2: ; preds = %if.then57.2, %for.inc60.1 %arrayidx54.3 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 3 %9 = load i32, ptr %arrayidx54.3, align 4, !tbaa !5 %cmp55.3 = icmp eq i32 %9, 0 br i1 %cmp55.3, label %if.then57.3, label %for.inc60.3 if.then57.3: ; preds = %for.inc60.2 %call58.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 4) br label %for.inc60.3 for.inc60.3: ; preds = %if.then57.3, %for.inc60.2 %arrayidx54.4 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 4 %10 = load i32, ptr %arrayidx54.4, align 16, !tbaa !5 %cmp55.4 = icmp eq i32 %10, 0 br i1 %cmp55.4, label %if.then57.4, label %for.inc60.4 if.then57.4: ; preds = %for.inc60.3 %call58.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 5) br label %for.inc60.4 for.inc60.4: ; preds = %if.then57.4, %for.inc60.3 %arrayidx54.5 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 5 %11 = load i32, ptr %arrayidx54.5, align 4, !tbaa !5 %cmp55.5 = icmp eq i32 %11, 0 br i1 %cmp55.5, label %if.then57.5, label %for.inc60.5 if.then57.5: ; preds = %for.inc60.4 %call58.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 6) br label %for.inc60.5 for.inc60.5: ; preds = %if.then57.5, %for.inc60.4 %arrayidx54.6 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 6 %12 = load i32, ptr %arrayidx54.6, align 8, !tbaa !5 %cmp55.6 = icmp eq i32 %12, 0 br i1 %cmp55.6, label %if.then57.6, label %for.inc60.6 if.then57.6: ; preds = %for.inc60.5 %call58.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 7) br label %for.inc60.6 for.inc60.6: ; preds = %if.then57.6, %for.inc60.5 %arrayidx54.7 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 7 %13 = load i32, ptr %arrayidx54.7, align 4, !tbaa !5 %cmp55.7 = icmp eq i32 %13, 0 br i1 %cmp55.7, label %if.then57.7, label %for.inc60.7 if.then57.7: ; preds = %for.inc60.6 %call58.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 8) br label %for.inc60.7 for.inc60.7: ; preds = %if.then57.7, %for.inc60.6 %arrayidx54.8 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 8 %14 = load i32, ptr %arrayidx54.8, align 16, !tbaa !5 %cmp55.8 = icmp eq i32 %14, 0 br i1 %cmp55.8, label %if.then57.8, label %for.inc60.8 if.then57.8: ; preds = %for.inc60.7 %call58.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 9) br label %for.inc60.8 for.inc60.8: ; preds = %if.then57.8, %for.inc60.7 %arrayidx54.9 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 9 %15 = load i32, ptr %arrayidx54.9, align 4, !tbaa !5 %cmp55.9 = icmp eq i32 %15, 0 br i1 %cmp55.9, label %if.then57.9, label %for.inc60.9 if.then57.9: ; preds = %for.inc60.8 %call58.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 10) br label %for.inc60.9 for.inc60.9: ; preds = %if.then57.9, %for.inc60.8 %arrayidx54.10 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 10 %16 = load i32, ptr %arrayidx54.10, align 8, !tbaa !5 %cmp55.10 = icmp eq i32 %16, 0 br i1 %cmp55.10, label %if.then57.10, label %for.inc60.10 if.then57.10: ; preds = %for.inc60.9 %call58.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 11) br label %for.inc60.10 for.inc60.10: ; preds = %if.then57.10, %for.inc60.9 %arrayidx54.11 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 11 %17 = load i32, ptr %arrayidx54.11, align 4, !tbaa !5 %cmp55.11 = icmp eq i32 %17, 0 br i1 %cmp55.11, label %if.then57.11, label %for.inc60.11 if.then57.11: ; preds = %for.inc60.10 %call58.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 12) br label %for.inc60.11 for.inc60.11: ; preds = %if.then57.11, %for.inc60.10 %arrayidx54.12 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 12 %18 = load i32, ptr %arrayidx54.12, align 16, !tbaa !5 %cmp55.12 = icmp eq i32 %18, 0 br i1 %cmp55.12, label %if.then57.12, label %for.inc60.12 if.then57.12: ; preds = %for.inc60.11 %call58.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 13) br label %for.inc60.12 for.inc60.12: ; preds = %if.then57.12, %for.inc60.11 %arrayidx69 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 1, i64 0 %19 = load i32, ptr %arrayidx69, align 4, !tbaa !5 %cmp70 = icmp eq i32 %19, 0 br i1 %cmp70, label %if.then72, label %for.inc76 if.then72: ; preds = %for.inc60.12 %call74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1) br label %for.inc76 for.inc76: ; preds = %for.inc60.12, %if.then72 %arrayidx69.1 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 1, i64 1 %20 = load i32, ptr %arrayidx69.1, align 8, !tbaa !5 %cmp70.1 = icmp eq i32 %20, 0 br i1 %cmp70.1, label %if.then72.1, label %for.inc76.1 if.then72.1: ; preds = %for.inc76 %call74.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2) br label %for.inc76.1 for.inc76.1: ; preds = %if.then72.1, %for.inc76 %arrayidx69.2 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 1, i64 2 %21 = load i32, ptr %arrayidx69.2, align 4, !tbaa !5 %cmp70.2 = icmp eq i32 %21, 0 br i1 %cmp70.2, label %if.then72.2, label %for.inc76.2 if.then72.2: ; preds = %for.inc76.1 %call74.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3) br label %for.inc76.2 for.inc76.2: ; preds = %if.then72.2, %for.inc76.1 %arrayidx69.3 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 1, i64 3 %22 = load i32, ptr %arrayidx69.3, align 16, !tbaa !5 %cmp70.3 = icmp eq i32 %22, 0 br i1 %cmp70.3, label %if.then72.3, label %for.inc76.3 if.then72.3: ; preds = %for.inc76.2 %call74.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4) br label %for.inc76.3 for.inc76.3: ; preds = %if.then72.3, %for.inc76.2 %arrayidx69.4 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 1, i64 4 %23 = load i32, ptr %arrayidx69.4, align 4, !tbaa !5 %cmp70.4 = icmp eq i32 %23, 0 br i1 %cmp70.4, label %if.then72.4, label %for.inc76.4 if.then72.4: ; preds = %for.inc76.3 %call74.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5) br label %for.inc76.4 for.inc76.4: ; preds = %if.then72.4, %for.inc76.3 %arrayidx69.5 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 1, i64 5 %24 = load i32, ptr %arrayidx69.5, align 8, !tbaa !5 %cmp70.5 = icmp eq i32 %24, 0 br i1 %cmp70.5, label %if.then72.5, label %for.inc76.5 if.then72.5: ; preds = %for.inc76.4 %call74.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6) br label %for.inc76.5 for.inc76.5: ; preds = %if.then72.5, %for.inc76.4 %arrayidx69.6 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 1, i64 6 %25 = load i32, ptr %arrayidx69.6, align 4, !tbaa !5 %cmp70.6 = icmp eq i32 %25, 0 br i1 %cmp70.6, label %if.then72.6, label %for.inc76.6 if.then72.6: ; preds = %for.inc76.5 %call74.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7) br label %for.inc76.6 for.inc76.6: ; preds = %if.then72.6, %for.inc76.5 %arrayidx69.7 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 1, i64 7 %26 = load i32, ptr %arrayidx69.7, align 16, !tbaa !5 %cmp70.7 = icmp eq i32 %26, 0 br i1 %cmp70.7, label %if.then72.7, label %for.inc76.7 if.then72.7: ; preds = %for.inc76.6 %call74.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8) br label %for.inc76.7 for.inc76.7: ; preds = %if.then72.7, %for.inc76.6 %arrayidx69.8 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 1, i64 8 %27 = load i32, ptr %arrayidx69.8, align 4, !tbaa !5 %cmp70.8 = icmp eq i32 %27, 0 br i1 %cmp70.8, label %if.then72.8, label %for.inc76.8 if.then72.8: ; preds = %for.inc76.7 %call74.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9) br label %for.inc76.8 for.inc76.8: ; preds = %if.then72.8, %for.inc76.7 %arrayidx69.9 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 1, i64 9 %28 = load i32, ptr %arrayidx69.9, align 8, !tbaa !5 %cmp70.9 = icmp eq i32 %28, 0 br i1 %cmp70.9, label %if.then72.9, label %for.inc76.9 if.then72.9: ; preds = %for.inc76.8 %call74.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10) br label %for.inc76.9 for.inc76.9: ; preds = %if.then72.9, %for.inc76.8 %arrayidx69.10 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 1, i64 10 %29 = load i32, ptr %arrayidx69.10, align 4, !tbaa !5 %cmp70.10 = icmp eq i32 %29, 0 br i1 %cmp70.10, label %if.then72.10, label %for.inc76.10 if.then72.10: ; preds = %for.inc76.9 %call74.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11) br label %for.inc76.10 for.inc76.10: ; preds = %if.then72.10, %for.inc76.9 %arrayidx69.11 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 1, i64 11 %30 = load i32, ptr %arrayidx69.11, align 16, !tbaa !5 %cmp70.11 = icmp eq i32 %30, 0 br i1 %cmp70.11, label %if.then72.11, label %for.inc76.11 if.then72.11: ; preds = %for.inc76.10 %call74.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12) br label %for.inc76.11 for.inc76.11: ; preds = %if.then72.11, %for.inc76.10 %arrayidx69.12 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 1, i64 12 %31 = load i32, ptr %arrayidx69.12, align 4, !tbaa !5 %cmp70.12 = icmp eq i32 %31, 0 br i1 %cmp70.12, label %if.then72.12, label %for.inc76.12 if.then72.12: ; preds = %for.inc76.11 %call74.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 13) br label %for.inc76.12 for.inc76.12: ; preds = %if.then72.12, %for.inc76.11 %arrayidx85 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 2, i64 0 %32 = load i32, ptr %arrayidx85, align 8, !tbaa !5 %cmp86 = icmp eq i32 %32, 0 br i1 %cmp86, label %if.then88, label %for.inc92 if.then88: ; preds = %for.inc76.12 %call90 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1) br label %for.inc92 for.inc92: ; preds = %for.inc76.12, %if.then88 %arrayidx85.1 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 2, i64 1 %33 = load i32, ptr %arrayidx85.1, align 4, !tbaa !5 %cmp86.1 = icmp eq i32 %33, 0 br i1 %cmp86.1, label %if.then88.1, label %for.inc92.1 if.then88.1: ; preds = %for.inc92 %call90.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2) br label %for.inc92.1 for.inc92.1: ; preds = %if.then88.1, %for.inc92 %arrayidx85.2 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 2, i64 2 %34 = load i32, ptr %arrayidx85.2, align 16, !tbaa !5 %cmp86.2 = icmp eq i32 %34, 0 br i1 %cmp86.2, label %if.then88.2, label %for.inc92.2 if.then88.2: ; preds = %for.inc92.1 %call90.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3) br label %for.inc92.2 for.inc92.2: ; preds = %if.then88.2, %for.inc92.1 %arrayidx85.3 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 2, i64 3 %35 = load i32, ptr %arrayidx85.3, align 4, !tbaa !5 %cmp86.3 = icmp eq i32 %35, 0 br i1 %cmp86.3, label %if.then88.3, label %for.inc92.3 if.then88.3: ; preds = %for.inc92.2 %call90.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4) br label %for.inc92.3 for.inc92.3: ; preds = %if.then88.3, %for.inc92.2 %arrayidx85.4 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 2, i64 4 %36 = load i32, ptr %arrayidx85.4, align 8, !tbaa !5 %cmp86.4 = icmp eq i32 %36, 0 br i1 %cmp86.4, label %if.then88.4, label %for.inc92.4 if.then88.4: ; preds = %for.inc92.3 %call90.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5) br label %for.inc92.4 for.inc92.4: ; preds = %if.then88.4, %for.inc92.3 %arrayidx85.5 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 2, i64 5 %37 = load i32, ptr %arrayidx85.5, align 4, !tbaa !5 %cmp86.5 = icmp eq i32 %37, 0 br i1 %cmp86.5, label %if.then88.5, label %for.inc92.5 if.then88.5: ; preds = %for.inc92.4 %call90.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6) br label %for.inc92.5 for.inc92.5: ; preds = %if.then88.5, %for.inc92.4 %arrayidx85.6 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 2, i64 6 %38 = load i32, ptr %arrayidx85.6, align 16, !tbaa !5 %cmp86.6 = icmp eq i32 %38, 0 br i1 %cmp86.6, label %if.then88.6, label %for.inc92.6 if.then88.6: ; preds = %for.inc92.5 %call90.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7) br label %for.inc92.6 for.inc92.6: ; preds = %if.then88.6, %for.inc92.5 %arrayidx85.7 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 2, i64 7 %39 = load i32, ptr %arrayidx85.7, align 4, !tbaa !5 %cmp86.7 = icmp eq i32 %39, 0 br i1 %cmp86.7, label %if.then88.7, label %for.inc92.7 if.then88.7: ; preds = %for.inc92.6 %call90.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8) br label %for.inc92.7 for.inc92.7: ; preds = %if.then88.7, %for.inc92.6 %arrayidx85.8 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 2, i64 8 %40 = load i32, ptr %arrayidx85.8, align 8, !tbaa !5 %cmp86.8 = icmp eq i32 %40, 0 br i1 %cmp86.8, label %if.then88.8, label %for.inc92.8 if.then88.8: ; preds = %for.inc92.7 %call90.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9) br label %for.inc92.8 for.inc92.8: ; preds = %if.then88.8, %for.inc92.7 %arrayidx85.9 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 2, i64 9 %41 = load i32, ptr %arrayidx85.9, align 4, !tbaa !5 %cmp86.9 = icmp eq i32 %41, 0 br i1 %cmp86.9, label %if.then88.9, label %for.inc92.9 if.then88.9: ; preds = %for.inc92.8 %call90.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10) br label %for.inc92.9 for.inc92.9: ; preds = %if.then88.9, %for.inc92.8 %arrayidx85.10 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 2, i64 10 %42 = load i32, ptr %arrayidx85.10, align 16, !tbaa !5 %cmp86.10 = icmp eq i32 %42, 0 br i1 %cmp86.10, label %if.then88.10, label %for.inc92.10 if.then88.10: ; preds = %for.inc92.9 %call90.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11) br label %for.inc92.10 for.inc92.10: ; preds = %if.then88.10, %for.inc92.9 %arrayidx85.11 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 2, i64 11 %43 = load i32, ptr %arrayidx85.11, align 4, !tbaa !5 %cmp86.11 = icmp eq i32 %43, 0 br i1 %cmp86.11, label %if.then88.11, label %for.inc92.11 if.then88.11: ; preds = %for.inc92.10 %call90.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12) br label %for.inc92.11 for.inc92.11: ; preds = %if.then88.11, %for.inc92.10 %arrayidx85.12 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 2, i64 12 %44 = load i32, ptr %arrayidx85.12, align 8, !tbaa !5 %cmp86.12 = icmp eq i32 %44, 0 br i1 %cmp86.12, label %if.then88.12, label %for.inc92.12 if.then88.12: ; preds = %for.inc92.11 %call90.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 13) br label %for.inc92.12 for.inc92.12: ; preds = %if.then88.12, %for.inc92.11 %arrayidx101 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 3, i64 0 %45 = load i32, ptr %arrayidx101, align 4, !tbaa !5 %cmp102 = icmp eq i32 %45, 0 br i1 %cmp102, label %if.then104, label %for.inc108 if.then104: ; preds = %for.inc92.12 %call106 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1) br label %for.inc108 for.inc108: ; preds = %for.inc92.12, %if.then104 %arrayidx101.1 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 3, i64 1 %46 = load i32, ptr %arrayidx101.1, align 16, !tbaa !5 %cmp102.1 = icmp eq i32 %46, 0 br i1 %cmp102.1, label %if.then104.1, label %for.inc108.1 if.then104.1: ; preds = %for.inc108 %call106.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2) br label %for.inc108.1 for.inc108.1: ; preds = %if.then104.1, %for.inc108 %arrayidx101.2 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 3, i64 2 %47 = load i32, ptr %arrayidx101.2, align 4, !tbaa !5 %cmp102.2 = icmp eq i32 %47, 0 br i1 %cmp102.2, label %if.then104.2, label %for.inc108.2 if.then104.2: ; preds = %for.inc108.1 %call106.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3) br label %for.inc108.2 for.inc108.2: ; preds = %if.then104.2, %for.inc108.1 %arrayidx101.3 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 3, i64 3 %48 = load i32, ptr %arrayidx101.3, align 8, !tbaa !5 %cmp102.3 = icmp eq i32 %48, 0 br i1 %cmp102.3, label %if.then104.3, label %for.inc108.3 if.then104.3: ; preds = %for.inc108.2 %call106.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4) br label %for.inc108.3 for.inc108.3: ; preds = %if.then104.3, %for.inc108.2 %arrayidx101.4 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 3, i64 4 %49 = load i32, ptr %arrayidx101.4, align 4, !tbaa !5 %cmp102.4 = icmp eq i32 %49, 0 br i1 %cmp102.4, label %if.then104.4, label %for.inc108.4 if.then104.4: ; preds = %for.inc108.3 %call106.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5) br label %for.inc108.4 for.inc108.4: ; preds = %if.then104.4, %for.inc108.3 %arrayidx101.5 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 3, i64 5 %50 = load i32, ptr %arrayidx101.5, align 16, !tbaa !5 %cmp102.5 = icmp eq i32 %50, 0 br i1 %cmp102.5, label %if.then104.5, label %for.inc108.5 if.then104.5: ; preds = %for.inc108.4 %call106.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6) br label %for.inc108.5 for.inc108.5: ; preds = %if.then104.5, %for.inc108.4 %arrayidx101.6 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 3, i64 6 %51 = load i32, ptr %arrayidx101.6, align 4, !tbaa !5 %cmp102.6 = icmp eq i32 %51, 0 br i1 %cmp102.6, label %if.then104.6, label %for.inc108.6 if.then104.6: ; preds = %for.inc108.5 %call106.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7) br label %for.inc108.6 for.inc108.6: ; preds = %if.then104.6, %for.inc108.5 %arrayidx101.7 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 3, i64 7 %52 = load i32, ptr %arrayidx101.7, align 8, !tbaa !5 %cmp102.7 = icmp eq i32 %52, 0 br i1 %cmp102.7, label %if.then104.7, label %for.inc108.7 if.then104.7: ; preds = %for.inc108.6 %call106.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8) br label %for.inc108.7 for.inc108.7: ; preds = %if.then104.7, %for.inc108.6 %arrayidx101.8 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 3, i64 8 %53 = load i32, ptr %arrayidx101.8, align 4, !tbaa !5 %cmp102.8 = icmp eq i32 %53, 0 br i1 %cmp102.8, label %if.then104.8, label %for.inc108.8 if.then104.8: ; preds = %for.inc108.7 %call106.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9) br label %for.inc108.8 for.inc108.8: ; preds = %if.then104.8, %for.inc108.7 %arrayidx101.9 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 3, i64 9 %54 = load i32, ptr %arrayidx101.9, align 16, !tbaa !5 %cmp102.9 = icmp eq i32 %54, 0 br i1 %cmp102.9, label %if.then104.9, label %for.inc108.9 if.then104.9: ; preds = %for.inc108.8 %call106.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10) br label %for.inc108.9 for.inc108.9: ; preds = %if.then104.9, %for.inc108.8 %arrayidx101.10 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 3, i64 10 %55 = load i32, ptr %arrayidx101.10, align 4, !tbaa !5 %cmp102.10 = icmp eq i32 %55, 0 br i1 %cmp102.10, label %if.then104.10, label %for.inc108.10 if.then104.10: ; preds = %for.inc108.9 %call106.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11) br label %for.inc108.10 for.inc108.10: ; preds = %if.then104.10, %for.inc108.9 %arrayidx101.11 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 3, i64 11 %56 = load i32, ptr %arrayidx101.11, align 8, !tbaa !5 %cmp102.11 = icmp eq i32 %56, 0 br i1 %cmp102.11, label %if.then104.11, label %for.inc108.11 if.then104.11: ; preds = %for.inc108.10 %call106.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12) br label %for.inc108.11 for.inc108.11: ; preds = %if.then104.11, %for.inc108.10 %arrayidx101.12 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 3, i64 12 %57 = load i32, ptr %arrayidx101.12, align 4, !tbaa !5 %cmp102.12 = icmp eq i32 %57, 0 br i1 %cmp102.12, label %if.then104.12, label %for.inc108.12 if.then104.12: ; preds = %for.inc108.11 %call106.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 13) br label %for.inc108.12 for.inc108.12: ; preds = %if.then104.12, %for.inc108.11 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %h) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(){ int i,k,n,num; int card[4][13]; char kind; scanf("%d", &n); for(i=0; i<4; ++i){ for(k=0; k<13; ++k){ card[i][k] = 0; } } char work; for(i=0; i<n; ++i){ scanf("%c",&work); if(work == '\n'){ scanf("%c",&kind); }else{ kind = work; } scanf("%d",&num); if(kind == 'S') card[0][num - 1] = 1; else if(kind == 'H') card[1][num - 1] = 1; else if(kind == 'C') card[2][num - 1] = 1; else card[3][num - 1] = 1; } for(i=0; i<4; ++i){ for(k=0; k<13; ++k){ if(card[i][k] == 0){ if(i == 0) printf("S %d\n",k+1); else if(i == 1)printf("H %d\n",k+1); else if(i == 2)printf("C %d\n",k+1); else if(i == 3)printf("D %d\n",k+1); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214945/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214945/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%c\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"S %d\0A\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"H %d\0A\00", align 1 @.str.4 = private unnamed_addr constant [6 x i8] c"C %d\0A\00", align 1 @.str.5 = private unnamed_addr constant [6 x i8] c"D %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %num = alloca i32, align 4 %card = alloca [4 x [13 x i32]], align 16 %kind = alloca i8, align 1 %work = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #4 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %card) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %kind) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %card, i8 0, i64 208, i1 false), !tbaa !5 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %work) #4 %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp10123 = icmp sgt i32 %0, 0 br i1 %cmp10123, label %for.body11, label %for.cond57.preheader.preheader for.body11: ; preds = %entry, %for.inc50 %i.1124 = phi i32 [ %inc51, %for.inc50 ], [ 0, %entry ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %work) %1 = load i8, ptr %work, align 1, !tbaa !9 %cmp13 = icmp eq i8 %1, 10 br i1 %cmp13, label %if.then, label %if.else if.then: ; preds = %for.body11 %call15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %kind) br label %if.end if.else: ; preds = %for.body11 store i8 %1, ptr %kind, align 1, !tbaa !9 br label %if.end if.end: ; preds = %if.else, %if.then %call16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %num) %2 = load i8, ptr %kind, align 1, !tbaa !9 %3 = load i32, ptr %num, align 4, !tbaa !5 %sub44 = add nsw i32 %3, -1 %idxprom45 = sext i32 %sub44 to i64 switch i8 %2, label %if.else42 [ i8 83, label %if.then20 i8 72, label %if.then28 i8 67, label %if.then37 ] if.then20: ; preds = %if.end %arrayidx23 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 %idxprom45 br label %for.inc50 if.then28: ; preds = %if.end %arrayidx32 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 %idxprom45 br label %for.inc50 if.then37: ; preds = %if.end %arrayidx41 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 %idxprom45 br label %for.inc50 if.else42: ; preds = %if.end %arrayidx46 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 %idxprom45 br label %for.inc50 for.inc50: ; preds = %if.then20, %if.then37, %if.else42, %if.then28 %arrayidx23.sink = phi ptr [ %arrayidx23, %if.then20 ], [ %arrayidx41, %if.then37 ], [ %arrayidx46, %if.else42 ], [ %arrayidx32, %if.then28 ] store i32 1, ptr %arrayidx23.sink, align 4, !tbaa !5 %inc51 = add nuw nsw i32 %i.1124, 1 %4 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc51, %4 br i1 %cmp10, label %for.body11, label %for.cond57.preheader.preheader, !llvm.loop !10 for.cond57.preheader.preheader: ; preds = %for.inc50, %entry br label %for.cond57.preheader for.cond57.preheader: ; preds = %for.cond57.preheader.preheader, %for.inc98 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc98 ], [ 0, %for.cond57.preheader.preheader ] %5 = trunc i64 %indvars.iv to i32 switch i32 %5, label %for.inc98 [ i32 0, label %for.body60.us.preheader i32 1, label %for.body60.us127.preheader i32 2, label %for.body60.us137.preheader i32 3, label %for.body60.us147.preheader ] for.body60.us147.preheader: ; preds = %for.cond57.preheader %arrayidx64.us150 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 0 %6 = load i32, ptr %arrayidx64.us150, align 4, !tbaa !5 %cmp65.us151 = icmp eq i32 %6, 0 br i1 %cmp65.us151, label %if.then67.us152, label %for.inc95.us153 for.body60.us137.preheader: ; preds = %for.cond57.preheader %arrayidx64.us140 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 0 %7 = load i32, ptr %arrayidx64.us140, align 4, !tbaa !5 %cmp65.us141 = icmp eq i32 %7, 0 br i1 %cmp65.us141, label %if.then67.us142, label %for.inc95.us143 for.body60.us127.preheader: ; preds = %for.cond57.preheader %arrayidx64.us130 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 0 %8 = load i32, ptr %arrayidx64.us130, align 4, !tbaa !5 %cmp65.us131 = icmp eq i32 %8, 0 br i1 %cmp65.us131, label %if.then67.us132, label %for.inc95.us133 for.body60.us.preheader: ; preds = %for.cond57.preheader %arrayidx64.us = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 0 %9 = load i32, ptr %arrayidx64.us, align 4, !tbaa !5 %cmp65.us = icmp eq i32 %9, 0 br i1 %cmp65.us, label %if.then67.us, label %for.inc95.us if.then67.us: ; preds = %for.body60.us.preheader %call71.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 1) br label %for.inc95.us for.inc95.us: ; preds = %if.then67.us, %for.body60.us.preheader %arrayidx64.us.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1 %10 = load i32, ptr %arrayidx64.us.1, align 4, !tbaa !5 %cmp65.us.1 = icmp eq i32 %10, 0 br i1 %cmp65.us.1, label %if.then67.us.1, label %for.inc95.us.1 if.then67.us.1: ; preds = %for.inc95.us %call71.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 2) br label %for.inc95.us.1 for.inc95.us.1: ; preds = %if.then67.us.1, %for.inc95.us %arrayidx64.us.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %11 = load i32, ptr %arrayidx64.us.2, align 4, !tbaa !5 %cmp65.us.2 = icmp eq i32 %11, 0 br i1 %cmp65.us.2, label %if.then67.us.2, label %for.inc95.us.2 if.then67.us.2: ; preds = %for.inc95.us.1 %call71.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 3) br label %for.inc95.us.2 for.inc95.us.2: ; preds = %if.then67.us.2, %for.inc95.us.1 %arrayidx64.us.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %12 = load i32, ptr %arrayidx64.us.3, align 4, !tbaa !5 %cmp65.us.3 = icmp eq i32 %12, 0 br i1 %cmp65.us.3, label %if.then67.us.3, label %for.inc95.us.3 if.then67.us.3: ; preds = %for.inc95.us.2 %call71.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 4) br label %for.inc95.us.3 for.inc95.us.3: ; preds = %if.then67.us.3, %for.inc95.us.2 %arrayidx64.us.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %13 = load i32, ptr %arrayidx64.us.4, align 4, !tbaa !5 %cmp65.us.4 = icmp eq i32 %13, 0 br i1 %cmp65.us.4, label %if.then67.us.4, label %for.inc95.us.4 if.then67.us.4: ; preds = %for.inc95.us.3 %call71.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 5) br label %for.inc95.us.4 for.inc95.us.4: ; preds = %if.then67.us.4, %for.inc95.us.3 %arrayidx64.us.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %14 = load i32, ptr %arrayidx64.us.5, align 4, !tbaa !5 %cmp65.us.5 = icmp eq i32 %14, 0 br i1 %cmp65.us.5, label %if.then67.us.5, label %for.inc95.us.5 if.then67.us.5: ; preds = %for.inc95.us.4 %call71.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 6) br label %for.inc95.us.5 for.inc95.us.5: ; preds = %if.then67.us.5, %for.inc95.us.4 %arrayidx64.us.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %15 = load i32, ptr %arrayidx64.us.6, align 4, !tbaa !5 %cmp65.us.6 = icmp eq i32 %15, 0 br i1 %cmp65.us.6, label %if.then67.us.6, label %for.inc95.us.6 if.then67.us.6: ; preds = %for.inc95.us.5 %call71.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 7) br label %for.inc95.us.6 for.inc95.us.6: ; preds = %if.then67.us.6, %for.inc95.us.5 %arrayidx64.us.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %16 = load i32, ptr %arrayidx64.us.7, align 4, !tbaa !5 %cmp65.us.7 = icmp eq i32 %16, 0 br i1 %cmp65.us.7, label %if.then67.us.7, label %for.inc95.us.7 if.then67.us.7: ; preds = %for.inc95.us.6 %call71.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 8) br label %for.inc95.us.7 for.inc95.us.7: ; preds = %if.then67.us.7, %for.inc95.us.6 %arrayidx64.us.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %17 = load i32, ptr %arrayidx64.us.8, align 4, !tbaa !5 %cmp65.us.8 = icmp eq i32 %17, 0 br i1 %cmp65.us.8, label %if.then67.us.8, label %for.inc95.us.8 if.then67.us.8: ; preds = %for.inc95.us.7 %call71.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 9) br label %for.inc95.us.8 for.inc95.us.8: ; preds = %if.then67.us.8, %for.inc95.us.7 %arrayidx64.us.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %18 = load i32, ptr %arrayidx64.us.9, align 4, !tbaa !5 %cmp65.us.9 = icmp eq i32 %18, 0 br i1 %cmp65.us.9, label %if.then67.us.9, label %for.inc95.us.9 if.then67.us.9: ; preds = %for.inc95.us.8 %call71.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 10) br label %for.inc95.us.9 for.inc95.us.9: ; preds = %if.then67.us.9, %for.inc95.us.8 %arrayidx64.us.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %19 = load i32, ptr %arrayidx64.us.10, align 4, !tbaa !5 %cmp65.us.10 = icmp eq i32 %19, 0 br i1 %cmp65.us.10, label %if.then67.us.10, label %for.inc95.us.10 if.then67.us.10: ; preds = %for.inc95.us.9 %call71.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 11) br label %for.inc95.us.10 for.inc95.us.10: ; preds = %if.then67.us.10, %for.inc95.us.9 %arrayidx64.us.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %20 = load i32, ptr %arrayidx64.us.11, align 4, !tbaa !5 %cmp65.us.11 = icmp eq i32 %20, 0 br i1 %cmp65.us.11, label %if.then67.us.11, label %for.inc95.us.11 if.then67.us.11: ; preds = %for.inc95.us.10 %call71.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 12) br label %for.inc95.us.11 for.inc95.us.11: ; preds = %if.then67.us.11, %for.inc95.us.10 %arrayidx64.us.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %21 = load i32, ptr %arrayidx64.us.12, align 4, !tbaa !5 %cmp65.us.12 = icmp eq i32 %21, 0 br i1 %cmp65.us.12, label %for.inc98.sink.split, label %for.inc98 if.then67.us132: ; preds = %for.body60.us127.preheader %call77.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1) br label %for.inc95.us133 for.inc95.us133: ; preds = %if.then67.us132, %for.body60.us127.preheader %arrayidx64.us130.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1 %22 = load i32, ptr %arrayidx64.us130.1, align 4, !tbaa !5 %cmp65.us131.1 = icmp eq i32 %22, 0 br i1 %cmp65.us131.1, label %if.then67.us132.1, label %for.inc95.us133.1 if.then67.us132.1: ; preds = %for.inc95.us133 %call77.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2) br label %for.inc95.us133.1 for.inc95.us133.1: ; preds = %if.then67.us132.1, %for.inc95.us133 %arrayidx64.us130.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %23 = load i32, ptr %arrayidx64.us130.2, align 4, !tbaa !5 %cmp65.us131.2 = icmp eq i32 %23, 0 br i1 %cmp65.us131.2, label %if.then67.us132.2, label %for.inc95.us133.2 if.then67.us132.2: ; preds = %for.inc95.us133.1 %call77.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3) br label %for.inc95.us133.2 for.inc95.us133.2: ; preds = %if.then67.us132.2, %for.inc95.us133.1 %arrayidx64.us130.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %24 = load i32, ptr %arrayidx64.us130.3, align 4, !tbaa !5 %cmp65.us131.3 = icmp eq i32 %24, 0 br i1 %cmp65.us131.3, label %if.then67.us132.3, label %for.inc95.us133.3 if.then67.us132.3: ; preds = %for.inc95.us133.2 %call77.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4) br label %for.inc95.us133.3 for.inc95.us133.3: ; preds = %if.then67.us132.3, %for.inc95.us133.2 %arrayidx64.us130.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %25 = load i32, ptr %arrayidx64.us130.4, align 4, !tbaa !5 %cmp65.us131.4 = icmp eq i32 %25, 0 br i1 %cmp65.us131.4, label %if.then67.us132.4, label %for.inc95.us133.4 if.then67.us132.4: ; preds = %for.inc95.us133.3 %call77.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5) br label %for.inc95.us133.4 for.inc95.us133.4: ; preds = %if.then67.us132.4, %for.inc95.us133.3 %arrayidx64.us130.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %26 = load i32, ptr %arrayidx64.us130.5, align 4, !tbaa !5 %cmp65.us131.5 = icmp eq i32 %26, 0 br i1 %cmp65.us131.5, label %if.then67.us132.5, label %for.inc95.us133.5 if.then67.us132.5: ; preds = %for.inc95.us133.4 %call77.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6) br label %for.inc95.us133.5 for.inc95.us133.5: ; preds = %if.then67.us132.5, %for.inc95.us133.4 %arrayidx64.us130.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %27 = load i32, ptr %arrayidx64.us130.6, align 4, !tbaa !5 %cmp65.us131.6 = icmp eq i32 %27, 0 br i1 %cmp65.us131.6, label %if.then67.us132.6, label %for.inc95.us133.6 if.then67.us132.6: ; preds = %for.inc95.us133.5 %call77.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7) br label %for.inc95.us133.6 for.inc95.us133.6: ; preds = %if.then67.us132.6, %for.inc95.us133.5 %arrayidx64.us130.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %28 = load i32, ptr %arrayidx64.us130.7, align 4, !tbaa !5 %cmp65.us131.7 = icmp eq i32 %28, 0 br i1 %cmp65.us131.7, label %if.then67.us132.7, label %for.inc95.us133.7 if.then67.us132.7: ; preds = %for.inc95.us133.6 %call77.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8) br label %for.inc95.us133.7 for.inc95.us133.7: ; preds = %if.then67.us132.7, %for.inc95.us133.6 %arrayidx64.us130.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %29 = load i32, ptr %arrayidx64.us130.8, align 4, !tbaa !5 %cmp65.us131.8 = icmp eq i32 %29, 0 br i1 %cmp65.us131.8, label %if.then67.us132.8, label %for.inc95.us133.8 if.then67.us132.8: ; preds = %for.inc95.us133.7 %call77.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9) br label %for.inc95.us133.8 for.inc95.us133.8: ; preds = %if.then67.us132.8, %for.inc95.us133.7 %arrayidx64.us130.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %30 = load i32, ptr %arrayidx64.us130.9, align 4, !tbaa !5 %cmp65.us131.9 = icmp eq i32 %30, 0 br i1 %cmp65.us131.9, label %if.then67.us132.9, label %for.inc95.us133.9 if.then67.us132.9: ; preds = %for.inc95.us133.8 %call77.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10) br label %for.inc95.us133.9 for.inc95.us133.9: ; preds = %if.then67.us132.9, %for.inc95.us133.8 %arrayidx64.us130.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %31 = load i32, ptr %arrayidx64.us130.10, align 4, !tbaa !5 %cmp65.us131.10 = icmp eq i32 %31, 0 br i1 %cmp65.us131.10, label %if.then67.us132.10, label %for.inc95.us133.10 if.then67.us132.10: ; preds = %for.inc95.us133.9 %call77.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11) br label %for.inc95.us133.10 for.inc95.us133.10: ; preds = %if.then67.us132.10, %for.inc95.us133.9 %arrayidx64.us130.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %32 = load i32, ptr %arrayidx64.us130.11, align 4, !tbaa !5 %cmp65.us131.11 = icmp eq i32 %32, 0 br i1 %cmp65.us131.11, label %if.then67.us132.11, label %for.inc95.us133.11 if.then67.us132.11: ; preds = %for.inc95.us133.10 %call77.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12) br label %for.inc95.us133.11 for.inc95.us133.11: ; preds = %if.then67.us132.11, %for.inc95.us133.10 %arrayidx64.us130.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %33 = load i32, ptr %arrayidx64.us130.12, align 4, !tbaa !5 %cmp65.us131.12 = icmp eq i32 %33, 0 br i1 %cmp65.us131.12, label %for.inc98.sink.split, label %for.inc98 if.then67.us142: ; preds = %for.body60.us137.preheader %call83.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1) br label %for.inc95.us143 for.inc95.us143: ; preds = %if.then67.us142, %for.body60.us137.preheader %arrayidx64.us140.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1 %34 = load i32, ptr %arrayidx64.us140.1, align 4, !tbaa !5 %cmp65.us141.1 = icmp eq i32 %34, 0 br i1 %cmp65.us141.1, label %if.then67.us142.1, label %for.inc95.us143.1 if.then67.us142.1: ; preds = %for.inc95.us143 %call83.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2) br label %for.inc95.us143.1 for.inc95.us143.1: ; preds = %if.then67.us142.1, %for.inc95.us143 %arrayidx64.us140.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %35 = load i32, ptr %arrayidx64.us140.2, align 4, !tbaa !5 %cmp65.us141.2 = icmp eq i32 %35, 0 br i1 %cmp65.us141.2, label %if.then67.us142.2, label %for.inc95.us143.2 if.then67.us142.2: ; preds = %for.inc95.us143.1 %call83.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3) br label %for.inc95.us143.2 for.inc95.us143.2: ; preds = %if.then67.us142.2, %for.inc95.us143.1 %arrayidx64.us140.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %36 = load i32, ptr %arrayidx64.us140.3, align 4, !tbaa !5 %cmp65.us141.3 = icmp eq i32 %36, 0 br i1 %cmp65.us141.3, label %if.then67.us142.3, label %for.inc95.us143.3 if.then67.us142.3: ; preds = %for.inc95.us143.2 %call83.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4) br label %for.inc95.us143.3 for.inc95.us143.3: ; preds = %if.then67.us142.3, %for.inc95.us143.2 %arrayidx64.us140.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %37 = load i32, ptr %arrayidx64.us140.4, align 4, !tbaa !5 %cmp65.us141.4 = icmp eq i32 %37, 0 br i1 %cmp65.us141.4, label %if.then67.us142.4, label %for.inc95.us143.4 if.then67.us142.4: ; preds = %for.inc95.us143.3 %call83.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5) br label %for.inc95.us143.4 for.inc95.us143.4: ; preds = %if.then67.us142.4, %for.inc95.us143.3 %arrayidx64.us140.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %38 = load i32, ptr %arrayidx64.us140.5, align 4, !tbaa !5 %cmp65.us141.5 = icmp eq i32 %38, 0 br i1 %cmp65.us141.5, label %if.then67.us142.5, label %for.inc95.us143.5 if.then67.us142.5: ; preds = %for.inc95.us143.4 %call83.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6) br label %for.inc95.us143.5 for.inc95.us143.5: ; preds = %if.then67.us142.5, %for.inc95.us143.4 %arrayidx64.us140.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %39 = load i32, ptr %arrayidx64.us140.6, align 4, !tbaa !5 %cmp65.us141.6 = icmp eq i32 %39, 0 br i1 %cmp65.us141.6, label %if.then67.us142.6, label %for.inc95.us143.6 if.then67.us142.6: ; preds = %for.inc95.us143.5 %call83.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7) br label %for.inc95.us143.6 for.inc95.us143.6: ; preds = %if.then67.us142.6, %for.inc95.us143.5 %arrayidx64.us140.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %40 = load i32, ptr %arrayidx64.us140.7, align 4, !tbaa !5 %cmp65.us141.7 = icmp eq i32 %40, 0 br i1 %cmp65.us141.7, label %if.then67.us142.7, label %for.inc95.us143.7 if.then67.us142.7: ; preds = %for.inc95.us143.6 %call83.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8) br label %for.inc95.us143.7 for.inc95.us143.7: ; preds = %if.then67.us142.7, %for.inc95.us143.6 %arrayidx64.us140.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %41 = load i32, ptr %arrayidx64.us140.8, align 4, !tbaa !5 %cmp65.us141.8 = icmp eq i32 %41, 0 br i1 %cmp65.us141.8, label %if.then67.us142.8, label %for.inc95.us143.8 if.then67.us142.8: ; preds = %for.inc95.us143.7 %call83.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9) br label %for.inc95.us143.8 for.inc95.us143.8: ; preds = %if.then67.us142.8, %for.inc95.us143.7 %arrayidx64.us140.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %42 = load i32, ptr %arrayidx64.us140.9, align 4, !tbaa !5 %cmp65.us141.9 = icmp eq i32 %42, 0 br i1 %cmp65.us141.9, label %if.then67.us142.9, label %for.inc95.us143.9 if.then67.us142.9: ; preds = %for.inc95.us143.8 %call83.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10) br label %for.inc95.us143.9 for.inc95.us143.9: ; preds = %if.then67.us142.9, %for.inc95.us143.8 %arrayidx64.us140.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %43 = load i32, ptr %arrayidx64.us140.10, align 4, !tbaa !5 %cmp65.us141.10 = icmp eq i32 %43, 0 br i1 %cmp65.us141.10, label %if.then67.us142.10, label %for.inc95.us143.10 if.then67.us142.10: ; preds = %for.inc95.us143.9 %call83.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11) br label %for.inc95.us143.10 for.inc95.us143.10: ; preds = %if.then67.us142.10, %for.inc95.us143.9 %arrayidx64.us140.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %44 = load i32, ptr %arrayidx64.us140.11, align 4, !tbaa !5 %cmp65.us141.11 = icmp eq i32 %44, 0 br i1 %cmp65.us141.11, label %if.then67.us142.11, label %for.inc95.us143.11 if.then67.us142.11: ; preds = %for.inc95.us143.10 %call83.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12) br label %for.inc95.us143.11 for.inc95.us143.11: ; preds = %if.then67.us142.11, %for.inc95.us143.10 %arrayidx64.us140.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %45 = load i32, ptr %arrayidx64.us140.12, align 4, !tbaa !5 %cmp65.us141.12 = icmp eq i32 %45, 0 br i1 %cmp65.us141.12, label %for.inc98.sink.split, label %for.inc98 if.then67.us152: ; preds = %for.body60.us147.preheader %call89.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1) br label %for.inc95.us153 for.inc95.us153: ; preds = %if.then67.us152, %for.body60.us147.preheader %arrayidx64.us150.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1 %46 = load i32, ptr %arrayidx64.us150.1, align 4, !tbaa !5 %cmp65.us151.1 = icmp eq i32 %46, 0 br i1 %cmp65.us151.1, label %if.then67.us152.1, label %for.inc95.us153.1 if.then67.us152.1: ; preds = %for.inc95.us153 %call89.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2) br label %for.inc95.us153.1 for.inc95.us153.1: ; preds = %if.then67.us152.1, %for.inc95.us153 %arrayidx64.us150.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %47 = load i32, ptr %arrayidx64.us150.2, align 4, !tbaa !5 %cmp65.us151.2 = icmp eq i32 %47, 0 br i1 %cmp65.us151.2, label %if.then67.us152.2, label %for.inc95.us153.2 if.then67.us152.2: ; preds = %for.inc95.us153.1 %call89.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3) br label %for.inc95.us153.2 for.inc95.us153.2: ; preds = %if.then67.us152.2, %for.inc95.us153.1 %arrayidx64.us150.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %48 = load i32, ptr %arrayidx64.us150.3, align 4, !tbaa !5 %cmp65.us151.3 = icmp eq i32 %48, 0 br i1 %cmp65.us151.3, label %if.then67.us152.3, label %for.inc95.us153.3 if.then67.us152.3: ; preds = %for.inc95.us153.2 %call89.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4) br label %for.inc95.us153.3 for.inc95.us153.3: ; preds = %if.then67.us152.3, %for.inc95.us153.2 %arrayidx64.us150.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %49 = load i32, ptr %arrayidx64.us150.4, align 4, !tbaa !5 %cmp65.us151.4 = icmp eq i32 %49, 0 br i1 %cmp65.us151.4, label %if.then67.us152.4, label %for.inc95.us153.4 if.then67.us152.4: ; preds = %for.inc95.us153.3 %call89.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5) br label %for.inc95.us153.4 for.inc95.us153.4: ; preds = %if.then67.us152.4, %for.inc95.us153.3 %arrayidx64.us150.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %50 = load i32, ptr %arrayidx64.us150.5, align 4, !tbaa !5 %cmp65.us151.5 = icmp eq i32 %50, 0 br i1 %cmp65.us151.5, label %if.then67.us152.5, label %for.inc95.us153.5 if.then67.us152.5: ; preds = %for.inc95.us153.4 %call89.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6) br label %for.inc95.us153.5 for.inc95.us153.5: ; preds = %if.then67.us152.5, %for.inc95.us153.4 %arrayidx64.us150.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %51 = load i32, ptr %arrayidx64.us150.6, align 4, !tbaa !5 %cmp65.us151.6 = icmp eq i32 %51, 0 br i1 %cmp65.us151.6, label %if.then67.us152.6, label %for.inc95.us153.6 if.then67.us152.6: ; preds = %for.inc95.us153.5 %call89.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7) br label %for.inc95.us153.6 for.inc95.us153.6: ; preds = %if.then67.us152.6, %for.inc95.us153.5 %arrayidx64.us150.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %52 = load i32, ptr %arrayidx64.us150.7, align 4, !tbaa !5 %cmp65.us151.7 = icmp eq i32 %52, 0 br i1 %cmp65.us151.7, label %if.then67.us152.7, label %for.inc95.us153.7 if.then67.us152.7: ; preds = %for.inc95.us153.6 %call89.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8) br label %for.inc95.us153.7 for.inc95.us153.7: ; preds = %if.then67.us152.7, %for.inc95.us153.6 %arrayidx64.us150.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %53 = load i32, ptr %arrayidx64.us150.8, align 4, !tbaa !5 %cmp65.us151.8 = icmp eq i32 %53, 0 br i1 %cmp65.us151.8, label %if.then67.us152.8, label %for.inc95.us153.8 if.then67.us152.8: ; preds = %for.inc95.us153.7 %call89.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9) br label %for.inc95.us153.8 for.inc95.us153.8: ; preds = %if.then67.us152.8, %for.inc95.us153.7 %arrayidx64.us150.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %54 = load i32, ptr %arrayidx64.us150.9, align 4, !tbaa !5 %cmp65.us151.9 = icmp eq i32 %54, 0 br i1 %cmp65.us151.9, label %if.then67.us152.9, label %for.inc95.us153.9 if.then67.us152.9: ; preds = %for.inc95.us153.8 %call89.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10) br label %for.inc95.us153.9 for.inc95.us153.9: ; preds = %if.then67.us152.9, %for.inc95.us153.8 %arrayidx64.us150.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %55 = load i32, ptr %arrayidx64.us150.10, align 4, !tbaa !5 %cmp65.us151.10 = icmp eq i32 %55, 0 br i1 %cmp65.us151.10, label %if.then67.us152.10, label %for.inc95.us153.10 if.then67.us152.10: ; preds = %for.inc95.us153.9 %call89.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11) br label %for.inc95.us153.10 for.inc95.us153.10: ; preds = %if.then67.us152.10, %for.inc95.us153.9 %arrayidx64.us150.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %56 = load i32, ptr %arrayidx64.us150.11, align 4, !tbaa !5 %cmp65.us151.11 = icmp eq i32 %56, 0 br i1 %cmp65.us151.11, label %if.then67.us152.11, label %for.inc95.us153.11 if.then67.us152.11: ; preds = %for.inc95.us153.10 %call89.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12) br label %for.inc95.us153.11 for.inc95.us153.11: ; preds = %if.then67.us152.11, %for.inc95.us153.10 %arrayidx64.us150.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %57 = load i32, ptr %arrayidx64.us150.12, align 4, !tbaa !5 %cmp65.us151.12 = icmp eq i32 %57, 0 br i1 %cmp65.us151.12, label %for.inc98.sink.split, label %for.inc98 for.inc98.sink.split: ; preds = %for.inc95.us153.11, %for.inc95.us143.11, %for.inc95.us133.11, %for.inc95.us.11 %.str.5.sink = phi ptr [ @.str.2, %for.inc95.us.11 ], [ @.str.3, %for.inc95.us133.11 ], [ @.str.4, %for.inc95.us143.11 ], [ @.str.5, %for.inc95.us153.11 ] %call89.us.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink, i32 noundef 13) br label %for.inc98 for.inc98: ; preds = %for.inc98.sink.split, %for.inc95.us153.11, %for.inc95.us143.11, %for.inc95.us133.11, %for.inc95.us.11, %for.cond57.preheader %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %for.end100, label %for.cond57.preheader, !llvm.loop !12 for.end100: ; preds = %for.inc98 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %work) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %kind) #4 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %card) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include <stdio.h> int main () { int n; char p,dummy; //char型は文字列を入れる型 int input; int arr[4][13]; //int[a][b]でa*bの二次元配列に記録する int i,j; for(i = 0; i < 4; i++){ for(j = 0; j < 13; j++){ arr[i][j] = 0; } } scanf("%d",&n); for(i = 0; i < n; i++){ scanf("%c",&dummy); scanf("%c %d",&p,&input); switch(p){ case 'S': arr[0][input -1] = 1; break; case 'H': arr[1][input -1] = 1; break; case 'C': arr[2][input -1] = 1; break; case 'D': arr[3][input -1] = 1; break; } } for(i = 0; i < 4; i++){ for(j = 0; j < 13; j++){ if(arr[i][j] == 0){ switch(i) { case 0: printf("S %d\n",j + 1); break; case 1: printf("H %d\n",j +1); break; case 2: printf("C %d\n",j +1); break; case 3: printf("D %d\n",j + 1); break; } } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214989/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214989/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%c\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"%c %d\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"S %d\0A\00", align 1 @.str.4 = private unnamed_addr constant [6 x i8] c"H %d\0A\00", align 1 @.str.5 = private unnamed_addr constant [6 x i8] c"C %d\0A\00", align 1 @.str.6 = private unnamed_addr constant [6 x i8] c"D %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %p = alloca i8, align 1 %dummy = alloca i8, align 1 %input = alloca i32, align 4 %arr = alloca [4 x [13 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %p) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %dummy) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %input) #4 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %arr) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %arr, i8 0, i64 208, i1 false), !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp1086 = icmp sgt i32 %0, 0 br i1 %cmp1086, label %for.body11, label %for.cond39.preheader.preheader for.body11: ; preds = %entry, %for.inc32 %i.187 = phi i32 [ %inc33, %for.inc32 ], [ 0, %entry ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %dummy) %call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %p, ptr noundef nonnull %input) %1 = load i8, ptr %p, align 1, !tbaa !9 %conv = sext i8 %1 to i32 switch i32 %conv, label %for.inc32 [ i32 83, label %sw.bb i32 72, label %sw.bb17 i32 67, label %sw.bb22 i32 68, label %sw.bb27 ] sw.bb: ; preds = %for.body11 %2 = load i32, ptr %input, align 4, !tbaa !5 %sub = add nsw i32 %2, -1 %idxprom15 = sext i32 %sub to i64 %arrayidx16 = getelementptr inbounds [13 x i32], ptr %arr, i64 0, i64 %idxprom15 br label %for.inc32.sink.split sw.bb17: ; preds = %for.body11 %3 = load i32, ptr %input, align 4, !tbaa !5 %sub19 = add nsw i32 %3, -1 %idxprom20 = sext i32 %sub19 to i64 %arrayidx21 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 1, i64 %idxprom20 br label %for.inc32.sink.split sw.bb22: ; preds = %for.body11 %4 = load i32, ptr %input, align 4, !tbaa !5 %sub24 = add nsw i32 %4, -1 %idxprom25 = sext i32 %sub24 to i64 %arrayidx26 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 2, i64 %idxprom25 br label %for.inc32.sink.split sw.bb27: ; preds = %for.body11 %5 = load i32, ptr %input, align 4, !tbaa !5 %sub29 = add nsw i32 %5, -1 %idxprom30 = sext i32 %sub29 to i64 %arrayidx31 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 3, i64 %idxprom30 br label %for.inc32.sink.split for.inc32.sink.split: ; preds = %sw.bb27, %sw.bb22, %sw.bb17, %sw.bb %arrayidx16.sink = phi ptr [ %arrayidx16, %sw.bb ], [ %arrayidx21, %sw.bb17 ], [ %arrayidx26, %sw.bb22 ], [ %arrayidx31, %sw.bb27 ] store i32 1, ptr %arrayidx16.sink, align 4, !tbaa !5 br label %for.inc32 for.inc32: ; preds = %for.inc32.sink.split, %for.body11 %inc33 = add nuw nsw i32 %i.187, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc33, %6 br i1 %cmp10, label %for.body11, label %for.cond39.preheader.preheader, !llvm.loop !10 for.cond39.preheader.preheader: ; preds = %for.inc32, %entry br label %for.cond39.preheader for.cond39.preheader: ; preds = %for.cond39.preheader.preheader, %for.inc64 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc64 ], [ 0, %for.cond39.preheader.preheader ] %7 = trunc i64 %indvars.iv to i32 switch i32 %7, label %for.inc64 [ i32 0, label %for.body42.us.preheader i32 1, label %for.body42.us90.preheader i32 2, label %for.body42.us100.preheader i32 3, label %for.body42.us110.preheader ] for.body42.us110.preheader: ; preds = %for.cond39.preheader %arrayidx46.us113 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 0 %8 = load i32, ptr %arrayidx46.us113, align 4, !tbaa !5 %cmp47.us114 = icmp eq i32 %8, 0 br i1 %cmp47.us114, label %if.then.us115, label %for.inc61.us116 for.body42.us100.preheader: ; preds = %for.cond39.preheader %arrayidx46.us103 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 0 %9 = load i32, ptr %arrayidx46.us103, align 4, !tbaa !5 %cmp47.us104 = icmp eq i32 %9, 0 br i1 %cmp47.us104, label %if.then.us105, label %for.inc61.us106 for.body42.us90.preheader: ; preds = %for.cond39.preheader %arrayidx46.us93 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 0 %10 = load i32, ptr %arrayidx46.us93, align 4, !tbaa !5 %cmp47.us94 = icmp eq i32 %10, 0 br i1 %cmp47.us94, label %if.then.us95, label %for.inc61.us96 for.body42.us.preheader: ; preds = %for.cond39.preheader %arrayidx46.us = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 0 %11 = load i32, ptr %arrayidx46.us, align 4, !tbaa !5 %cmp47.us = icmp eq i32 %11, 0 br i1 %cmp47.us, label %if.then.us, label %for.inc61.us if.then.us: ; preds = %for.body42.us.preheader %call50.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1) br label %for.inc61.us for.inc61.us: ; preds = %if.then.us, %for.body42.us.preheader %arrayidx46.us.1 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 1 %12 = load i32, ptr %arrayidx46.us.1, align 4, !tbaa !5 %cmp47.us.1 = icmp eq i32 %12, 0 br i1 %cmp47.us.1, label %if.then.us.1, label %for.inc61.us.1 if.then.us.1: ; preds = %for.inc61.us %call50.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2) br label %for.inc61.us.1 for.inc61.us.1: ; preds = %if.then.us.1, %for.inc61.us %arrayidx46.us.2 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 2 %13 = load i32, ptr %arrayidx46.us.2, align 4, !tbaa !5 %cmp47.us.2 = icmp eq i32 %13, 0 br i1 %cmp47.us.2, label %if.then.us.2, label %for.inc61.us.2 if.then.us.2: ; preds = %for.inc61.us.1 %call50.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3) br label %for.inc61.us.2 for.inc61.us.2: ; preds = %if.then.us.2, %for.inc61.us.1 %arrayidx46.us.3 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 3 %14 = load i32, ptr %arrayidx46.us.3, align 4, !tbaa !5 %cmp47.us.3 = icmp eq i32 %14, 0 br i1 %cmp47.us.3, label %if.then.us.3, label %for.inc61.us.3 if.then.us.3: ; preds = %for.inc61.us.2 %call50.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4) br label %for.inc61.us.3 for.inc61.us.3: ; preds = %if.then.us.3, %for.inc61.us.2 %arrayidx46.us.4 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 4 %15 = load i32, ptr %arrayidx46.us.4, align 4, !tbaa !5 %cmp47.us.4 = icmp eq i32 %15, 0 br i1 %cmp47.us.4, label %if.then.us.4, label %for.inc61.us.4 if.then.us.4: ; preds = %for.inc61.us.3 %call50.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5) br label %for.inc61.us.4 for.inc61.us.4: ; preds = %if.then.us.4, %for.inc61.us.3 %arrayidx46.us.5 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 5 %16 = load i32, ptr %arrayidx46.us.5, align 4, !tbaa !5 %cmp47.us.5 = icmp eq i32 %16, 0 br i1 %cmp47.us.5, label %if.then.us.5, label %for.inc61.us.5 if.then.us.5: ; preds = %for.inc61.us.4 %call50.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6) br label %for.inc61.us.5 for.inc61.us.5: ; preds = %if.then.us.5, %for.inc61.us.4 %arrayidx46.us.6 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 6 %17 = load i32, ptr %arrayidx46.us.6, align 4, !tbaa !5 %cmp47.us.6 = icmp eq i32 %17, 0 br i1 %cmp47.us.6, label %if.then.us.6, label %for.inc61.us.6 if.then.us.6: ; preds = %for.inc61.us.5 %call50.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7) br label %for.inc61.us.6 for.inc61.us.6: ; preds = %if.then.us.6, %for.inc61.us.5 %arrayidx46.us.7 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 7 %18 = load i32, ptr %arrayidx46.us.7, align 4, !tbaa !5 %cmp47.us.7 = icmp eq i32 %18, 0 br i1 %cmp47.us.7, label %if.then.us.7, label %for.inc61.us.7 if.then.us.7: ; preds = %for.inc61.us.6 %call50.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8) br label %for.inc61.us.7 for.inc61.us.7: ; preds = %if.then.us.7, %for.inc61.us.6 %arrayidx46.us.8 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 8 %19 = load i32, ptr %arrayidx46.us.8, align 4, !tbaa !5 %cmp47.us.8 = icmp eq i32 %19, 0 br i1 %cmp47.us.8, label %if.then.us.8, label %for.inc61.us.8 if.then.us.8: ; preds = %for.inc61.us.7 %call50.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9) br label %for.inc61.us.8 for.inc61.us.8: ; preds = %if.then.us.8, %for.inc61.us.7 %arrayidx46.us.9 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 9 %20 = load i32, ptr %arrayidx46.us.9, align 4, !tbaa !5 %cmp47.us.9 = icmp eq i32 %20, 0 br i1 %cmp47.us.9, label %if.then.us.9, label %for.inc61.us.9 if.then.us.9: ; preds = %for.inc61.us.8 %call50.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10) br label %for.inc61.us.9 for.inc61.us.9: ; preds = %if.then.us.9, %for.inc61.us.8 %arrayidx46.us.10 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 10 %21 = load i32, ptr %arrayidx46.us.10, align 4, !tbaa !5 %cmp47.us.10 = icmp eq i32 %21, 0 br i1 %cmp47.us.10, label %if.then.us.10, label %for.inc61.us.10 if.then.us.10: ; preds = %for.inc61.us.9 %call50.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11) br label %for.inc61.us.10 for.inc61.us.10: ; preds = %if.then.us.10, %for.inc61.us.9 %arrayidx46.us.11 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 11 %22 = load i32, ptr %arrayidx46.us.11, align 4, !tbaa !5 %cmp47.us.11 = icmp eq i32 %22, 0 br i1 %cmp47.us.11, label %if.then.us.11, label %for.inc61.us.11 if.then.us.11: ; preds = %for.inc61.us.10 %call50.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12) br label %for.inc61.us.11 for.inc61.us.11: ; preds = %if.then.us.11, %for.inc61.us.10 %arrayidx46.us.12 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 12 %23 = load i32, ptr %arrayidx46.us.12, align 4, !tbaa !5 %cmp47.us.12 = icmp eq i32 %23, 0 br i1 %cmp47.us.12, label %for.inc64.sink.split, label %for.inc64 if.then.us95: ; preds = %for.body42.us90.preheader %call53.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1) br label %for.inc61.us96 for.inc61.us96: ; preds = %if.then.us95, %for.body42.us90.preheader %arrayidx46.us93.1 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 1 %24 = load i32, ptr %arrayidx46.us93.1, align 4, !tbaa !5 %cmp47.us94.1 = icmp eq i32 %24, 0 br i1 %cmp47.us94.1, label %if.then.us95.1, label %for.inc61.us96.1 if.then.us95.1: ; preds = %for.inc61.us96 %call53.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2) br label %for.inc61.us96.1 for.inc61.us96.1: ; preds = %if.then.us95.1, %for.inc61.us96 %arrayidx46.us93.2 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 2 %25 = load i32, ptr %arrayidx46.us93.2, align 4, !tbaa !5 %cmp47.us94.2 = icmp eq i32 %25, 0 br i1 %cmp47.us94.2, label %if.then.us95.2, label %for.inc61.us96.2 if.then.us95.2: ; preds = %for.inc61.us96.1 %call53.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3) br label %for.inc61.us96.2 for.inc61.us96.2: ; preds = %if.then.us95.2, %for.inc61.us96.1 %arrayidx46.us93.3 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 3 %26 = load i32, ptr %arrayidx46.us93.3, align 4, !tbaa !5 %cmp47.us94.3 = icmp eq i32 %26, 0 br i1 %cmp47.us94.3, label %if.then.us95.3, label %for.inc61.us96.3 if.then.us95.3: ; preds = %for.inc61.us96.2 %call53.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4) br label %for.inc61.us96.3 for.inc61.us96.3: ; preds = %if.then.us95.3, %for.inc61.us96.2 %arrayidx46.us93.4 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 4 %27 = load i32, ptr %arrayidx46.us93.4, align 4, !tbaa !5 %cmp47.us94.4 = icmp eq i32 %27, 0 br i1 %cmp47.us94.4, label %if.then.us95.4, label %for.inc61.us96.4 if.then.us95.4: ; preds = %for.inc61.us96.3 %call53.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5) br label %for.inc61.us96.4 for.inc61.us96.4: ; preds = %if.then.us95.4, %for.inc61.us96.3 %arrayidx46.us93.5 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 5 %28 = load i32, ptr %arrayidx46.us93.5, align 4, !tbaa !5 %cmp47.us94.5 = icmp eq i32 %28, 0 br i1 %cmp47.us94.5, label %if.then.us95.5, label %for.inc61.us96.5 if.then.us95.5: ; preds = %for.inc61.us96.4 %call53.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6) br label %for.inc61.us96.5 for.inc61.us96.5: ; preds = %if.then.us95.5, %for.inc61.us96.4 %arrayidx46.us93.6 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 6 %29 = load i32, ptr %arrayidx46.us93.6, align 4, !tbaa !5 %cmp47.us94.6 = icmp eq i32 %29, 0 br i1 %cmp47.us94.6, label %if.then.us95.6, label %for.inc61.us96.6 if.then.us95.6: ; preds = %for.inc61.us96.5 %call53.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7) br label %for.inc61.us96.6 for.inc61.us96.6: ; preds = %if.then.us95.6, %for.inc61.us96.5 %arrayidx46.us93.7 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 7 %30 = load i32, ptr %arrayidx46.us93.7, align 4, !tbaa !5 %cmp47.us94.7 = icmp eq i32 %30, 0 br i1 %cmp47.us94.7, label %if.then.us95.7, label %for.inc61.us96.7 if.then.us95.7: ; preds = %for.inc61.us96.6 %call53.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8) br label %for.inc61.us96.7 for.inc61.us96.7: ; preds = %if.then.us95.7, %for.inc61.us96.6 %arrayidx46.us93.8 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 8 %31 = load i32, ptr %arrayidx46.us93.8, align 4, !tbaa !5 %cmp47.us94.8 = icmp eq i32 %31, 0 br i1 %cmp47.us94.8, label %if.then.us95.8, label %for.inc61.us96.8 if.then.us95.8: ; preds = %for.inc61.us96.7 %call53.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9) br label %for.inc61.us96.8 for.inc61.us96.8: ; preds = %if.then.us95.8, %for.inc61.us96.7 %arrayidx46.us93.9 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 9 %32 = load i32, ptr %arrayidx46.us93.9, align 4, !tbaa !5 %cmp47.us94.9 = icmp eq i32 %32, 0 br i1 %cmp47.us94.9, label %if.then.us95.9, label %for.inc61.us96.9 if.then.us95.9: ; preds = %for.inc61.us96.8 %call53.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10) br label %for.inc61.us96.9 for.inc61.us96.9: ; preds = %if.then.us95.9, %for.inc61.us96.8 %arrayidx46.us93.10 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 10 %33 = load i32, ptr %arrayidx46.us93.10, align 4, !tbaa !5 %cmp47.us94.10 = icmp eq i32 %33, 0 br i1 %cmp47.us94.10, label %if.then.us95.10, label %for.inc61.us96.10 if.then.us95.10: ; preds = %for.inc61.us96.9 %call53.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11) br label %for.inc61.us96.10 for.inc61.us96.10: ; preds = %if.then.us95.10, %for.inc61.us96.9 %arrayidx46.us93.11 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 11 %34 = load i32, ptr %arrayidx46.us93.11, align 4, !tbaa !5 %cmp47.us94.11 = icmp eq i32 %34, 0 br i1 %cmp47.us94.11, label %if.then.us95.11, label %for.inc61.us96.11 if.then.us95.11: ; preds = %for.inc61.us96.10 %call53.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12) br label %for.inc61.us96.11 for.inc61.us96.11: ; preds = %if.then.us95.11, %for.inc61.us96.10 %arrayidx46.us93.12 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 12 %35 = load i32, ptr %arrayidx46.us93.12, align 4, !tbaa !5 %cmp47.us94.12 = icmp eq i32 %35, 0 br i1 %cmp47.us94.12, label %for.inc64.sink.split, label %for.inc64 if.then.us105: ; preds = %for.body42.us100.preheader %call56.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1) br label %for.inc61.us106 for.inc61.us106: ; preds = %if.then.us105, %for.body42.us100.preheader %arrayidx46.us103.1 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 1 %36 = load i32, ptr %arrayidx46.us103.1, align 4, !tbaa !5 %cmp47.us104.1 = icmp eq i32 %36, 0 br i1 %cmp47.us104.1, label %if.then.us105.1, label %for.inc61.us106.1 if.then.us105.1: ; preds = %for.inc61.us106 %call56.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2) br label %for.inc61.us106.1 for.inc61.us106.1: ; preds = %if.then.us105.1, %for.inc61.us106 %arrayidx46.us103.2 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 2 %37 = load i32, ptr %arrayidx46.us103.2, align 4, !tbaa !5 %cmp47.us104.2 = icmp eq i32 %37, 0 br i1 %cmp47.us104.2, label %if.then.us105.2, label %for.inc61.us106.2 if.then.us105.2: ; preds = %for.inc61.us106.1 %call56.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3) br label %for.inc61.us106.2 for.inc61.us106.2: ; preds = %if.then.us105.2, %for.inc61.us106.1 %arrayidx46.us103.3 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 3 %38 = load i32, ptr %arrayidx46.us103.3, align 4, !tbaa !5 %cmp47.us104.3 = icmp eq i32 %38, 0 br i1 %cmp47.us104.3, label %if.then.us105.3, label %for.inc61.us106.3 if.then.us105.3: ; preds = %for.inc61.us106.2 %call56.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4) br label %for.inc61.us106.3 for.inc61.us106.3: ; preds = %if.then.us105.3, %for.inc61.us106.2 %arrayidx46.us103.4 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 4 %39 = load i32, ptr %arrayidx46.us103.4, align 4, !tbaa !5 %cmp47.us104.4 = icmp eq i32 %39, 0 br i1 %cmp47.us104.4, label %if.then.us105.4, label %for.inc61.us106.4 if.then.us105.4: ; preds = %for.inc61.us106.3 %call56.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5) br label %for.inc61.us106.4 for.inc61.us106.4: ; preds = %if.then.us105.4, %for.inc61.us106.3 %arrayidx46.us103.5 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 5 %40 = load i32, ptr %arrayidx46.us103.5, align 4, !tbaa !5 %cmp47.us104.5 = icmp eq i32 %40, 0 br i1 %cmp47.us104.5, label %if.then.us105.5, label %for.inc61.us106.5 if.then.us105.5: ; preds = %for.inc61.us106.4 %call56.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6) br label %for.inc61.us106.5 for.inc61.us106.5: ; preds = %if.then.us105.5, %for.inc61.us106.4 %arrayidx46.us103.6 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 6 %41 = load i32, ptr %arrayidx46.us103.6, align 4, !tbaa !5 %cmp47.us104.6 = icmp eq i32 %41, 0 br i1 %cmp47.us104.6, label %if.then.us105.6, label %for.inc61.us106.6 if.then.us105.6: ; preds = %for.inc61.us106.5 %call56.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7) br label %for.inc61.us106.6 for.inc61.us106.6: ; preds = %if.then.us105.6, %for.inc61.us106.5 %arrayidx46.us103.7 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 7 %42 = load i32, ptr %arrayidx46.us103.7, align 4, !tbaa !5 %cmp47.us104.7 = icmp eq i32 %42, 0 br i1 %cmp47.us104.7, label %if.then.us105.7, label %for.inc61.us106.7 if.then.us105.7: ; preds = %for.inc61.us106.6 %call56.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8) br label %for.inc61.us106.7 for.inc61.us106.7: ; preds = %if.then.us105.7, %for.inc61.us106.6 %arrayidx46.us103.8 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 8 %43 = load i32, ptr %arrayidx46.us103.8, align 4, !tbaa !5 %cmp47.us104.8 = icmp eq i32 %43, 0 br i1 %cmp47.us104.8, label %if.then.us105.8, label %for.inc61.us106.8 if.then.us105.8: ; preds = %for.inc61.us106.7 %call56.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9) br label %for.inc61.us106.8 for.inc61.us106.8: ; preds = %if.then.us105.8, %for.inc61.us106.7 %arrayidx46.us103.9 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 9 %44 = load i32, ptr %arrayidx46.us103.9, align 4, !tbaa !5 %cmp47.us104.9 = icmp eq i32 %44, 0 br i1 %cmp47.us104.9, label %if.then.us105.9, label %for.inc61.us106.9 if.then.us105.9: ; preds = %for.inc61.us106.8 %call56.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10) br label %for.inc61.us106.9 for.inc61.us106.9: ; preds = %if.then.us105.9, %for.inc61.us106.8 %arrayidx46.us103.10 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 10 %45 = load i32, ptr %arrayidx46.us103.10, align 4, !tbaa !5 %cmp47.us104.10 = icmp eq i32 %45, 0 br i1 %cmp47.us104.10, label %if.then.us105.10, label %for.inc61.us106.10 if.then.us105.10: ; preds = %for.inc61.us106.9 %call56.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11) br label %for.inc61.us106.10 for.inc61.us106.10: ; preds = %if.then.us105.10, %for.inc61.us106.9 %arrayidx46.us103.11 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 11 %46 = load i32, ptr %arrayidx46.us103.11, align 4, !tbaa !5 %cmp47.us104.11 = icmp eq i32 %46, 0 br i1 %cmp47.us104.11, label %if.then.us105.11, label %for.inc61.us106.11 if.then.us105.11: ; preds = %for.inc61.us106.10 %call56.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12) br label %for.inc61.us106.11 for.inc61.us106.11: ; preds = %if.then.us105.11, %for.inc61.us106.10 %arrayidx46.us103.12 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 12 %47 = load i32, ptr %arrayidx46.us103.12, align 4, !tbaa !5 %cmp47.us104.12 = icmp eq i32 %47, 0 br i1 %cmp47.us104.12, label %for.inc64.sink.split, label %for.inc64 if.then.us115: ; preds = %for.body42.us110.preheader %call59.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 1) br label %for.inc61.us116 for.inc61.us116: ; preds = %if.then.us115, %for.body42.us110.preheader %arrayidx46.us113.1 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 1 %48 = load i32, ptr %arrayidx46.us113.1, align 4, !tbaa !5 %cmp47.us114.1 = icmp eq i32 %48, 0 br i1 %cmp47.us114.1, label %if.then.us115.1, label %for.inc61.us116.1 if.then.us115.1: ; preds = %for.inc61.us116 %call59.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 2) br label %for.inc61.us116.1 for.inc61.us116.1: ; preds = %if.then.us115.1, %for.inc61.us116 %arrayidx46.us113.2 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 2 %49 = load i32, ptr %arrayidx46.us113.2, align 4, !tbaa !5 %cmp47.us114.2 = icmp eq i32 %49, 0 br i1 %cmp47.us114.2, label %if.then.us115.2, label %for.inc61.us116.2 if.then.us115.2: ; preds = %for.inc61.us116.1 %call59.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 3) br label %for.inc61.us116.2 for.inc61.us116.2: ; preds = %if.then.us115.2, %for.inc61.us116.1 %arrayidx46.us113.3 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 3 %50 = load i32, ptr %arrayidx46.us113.3, align 4, !tbaa !5 %cmp47.us114.3 = icmp eq i32 %50, 0 br i1 %cmp47.us114.3, label %if.then.us115.3, label %for.inc61.us116.3 if.then.us115.3: ; preds = %for.inc61.us116.2 %call59.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 4) br label %for.inc61.us116.3 for.inc61.us116.3: ; preds = %if.then.us115.3, %for.inc61.us116.2 %arrayidx46.us113.4 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 4 %51 = load i32, ptr %arrayidx46.us113.4, align 4, !tbaa !5 %cmp47.us114.4 = icmp eq i32 %51, 0 br i1 %cmp47.us114.4, label %if.then.us115.4, label %for.inc61.us116.4 if.then.us115.4: ; preds = %for.inc61.us116.3 %call59.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 5) br label %for.inc61.us116.4 for.inc61.us116.4: ; preds = %if.then.us115.4, %for.inc61.us116.3 %arrayidx46.us113.5 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 5 %52 = load i32, ptr %arrayidx46.us113.5, align 4, !tbaa !5 %cmp47.us114.5 = icmp eq i32 %52, 0 br i1 %cmp47.us114.5, label %if.then.us115.5, label %for.inc61.us116.5 if.then.us115.5: ; preds = %for.inc61.us116.4 %call59.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 6) br label %for.inc61.us116.5 for.inc61.us116.5: ; preds = %if.then.us115.5, %for.inc61.us116.4 %arrayidx46.us113.6 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 6 %53 = load i32, ptr %arrayidx46.us113.6, align 4, !tbaa !5 %cmp47.us114.6 = icmp eq i32 %53, 0 br i1 %cmp47.us114.6, label %if.then.us115.6, label %for.inc61.us116.6 if.then.us115.6: ; preds = %for.inc61.us116.5 %call59.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 7) br label %for.inc61.us116.6 for.inc61.us116.6: ; preds = %if.then.us115.6, %for.inc61.us116.5 %arrayidx46.us113.7 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 7 %54 = load i32, ptr %arrayidx46.us113.7, align 4, !tbaa !5 %cmp47.us114.7 = icmp eq i32 %54, 0 br i1 %cmp47.us114.7, label %if.then.us115.7, label %for.inc61.us116.7 if.then.us115.7: ; preds = %for.inc61.us116.6 %call59.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 8) br label %for.inc61.us116.7 for.inc61.us116.7: ; preds = %if.then.us115.7, %for.inc61.us116.6 %arrayidx46.us113.8 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 8 %55 = load i32, ptr %arrayidx46.us113.8, align 4, !tbaa !5 %cmp47.us114.8 = icmp eq i32 %55, 0 br i1 %cmp47.us114.8, label %if.then.us115.8, label %for.inc61.us116.8 if.then.us115.8: ; preds = %for.inc61.us116.7 %call59.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 9) br label %for.inc61.us116.8 for.inc61.us116.8: ; preds = %if.then.us115.8, %for.inc61.us116.7 %arrayidx46.us113.9 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 9 %56 = load i32, ptr %arrayidx46.us113.9, align 4, !tbaa !5 %cmp47.us114.9 = icmp eq i32 %56, 0 br i1 %cmp47.us114.9, label %if.then.us115.9, label %for.inc61.us116.9 if.then.us115.9: ; preds = %for.inc61.us116.8 %call59.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 10) br label %for.inc61.us116.9 for.inc61.us116.9: ; preds = %if.then.us115.9, %for.inc61.us116.8 %arrayidx46.us113.10 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 10 %57 = load i32, ptr %arrayidx46.us113.10, align 4, !tbaa !5 %cmp47.us114.10 = icmp eq i32 %57, 0 br i1 %cmp47.us114.10, label %if.then.us115.10, label %for.inc61.us116.10 if.then.us115.10: ; preds = %for.inc61.us116.9 %call59.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 11) br label %for.inc61.us116.10 for.inc61.us116.10: ; preds = %if.then.us115.10, %for.inc61.us116.9 %arrayidx46.us113.11 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 11 %58 = load i32, ptr %arrayidx46.us113.11, align 4, !tbaa !5 %cmp47.us114.11 = icmp eq i32 %58, 0 br i1 %cmp47.us114.11, label %if.then.us115.11, label %for.inc61.us116.11 if.then.us115.11: ; preds = %for.inc61.us116.10 %call59.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 12) br label %for.inc61.us116.11 for.inc61.us116.11: ; preds = %if.then.us115.11, %for.inc61.us116.10 %arrayidx46.us113.12 = getelementptr inbounds [4 x [13 x i32]], ptr %arr, i64 0, i64 %indvars.iv, i64 12 %59 = load i32, ptr %arrayidx46.us113.12, align 4, !tbaa !5 %cmp47.us114.12 = icmp eq i32 %59, 0 br i1 %cmp47.us114.12, label %for.inc64.sink.split, label %for.inc64 for.inc64.sink.split: ; preds = %for.inc61.us116.11, %for.inc61.us106.11, %for.inc61.us96.11, %for.inc61.us.11 %.str.6.sink = phi ptr [ @.str.3, %for.inc61.us.11 ], [ @.str.4, %for.inc61.us96.11 ], [ @.str.5, %for.inc61.us106.11 ], [ @.str.6, %for.inc61.us116.11 ] %call59.us.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.6.sink, i32 noundef 13) br label %for.inc64 for.inc64: ; preds = %for.inc64.sink.split, %for.inc61.us116.11, %for.inc61.us106.11, %for.inc61.us96.11, %for.inc61.us.11, %for.cond39.preheader %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %for.end66, label %for.cond39.preheader, !llvm.loop !12 for.end66: ; preds = %for.inc64 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %arr) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %input) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %dummy) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %p) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include<stdio.h> int main(){ int cards[4][14]; int n, i,j,c; char m, d; for(i=0; i < 4; i++){ for(j=0; j < 14; j++){ cards[i][j]=0; } } scanf("%d", &c); for(i = 0; i < c; i++){ scanf("%c", &d); scanf("%c %d", &m, &n); if(m == 'S'){ cards[0][n] = 1; } else if(m == 'H'){ cards[1][n] = 1; } else if(m == 'C'){ cards[2][n] = 1; } else if(m == 'D'){ cards[3][n] = 1; } } for(j=1; j < 14; j++){ if(cards[0][j] != 1){ printf("S %d\n", j); } } for(j=1; j < 14; j++){ if(cards[1][j] != 1){ printf("H %d\n", j); } } for(j=1; j < 14; j++){ if(cards[2][j] != 1){ printf("C %d\n", j); } } for(j=1; j < 14; j++){ if(cards[3][j] != 1){ printf("D %d\n", j); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215030/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215030/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%c\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"%c %d\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"S %d\0A\00", align 1 @.str.4 = private unnamed_addr constant [6 x i8] c"H %d\0A\00", align 1 @.str.5 = private unnamed_addr constant [6 x i8] c"C %d\0A\00", align 1 @.str.6 = private unnamed_addr constant [6 x i8] c"D %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %cards = alloca [4 x [14 x i32]], align 16 %n = alloca i32, align 4 %c = alloca i32, align 4 %m = alloca i8, align 1 %d = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %cards) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %m) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %d) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(224) %cards, i8 0, i64 224, i1 false), !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c) %0 = load i32, ptr %c, align 4, !tbaa !5 %cmp10132 = icmp sgt i32 %0, 0 br i1 %cmp10132, label %for.body11, label %for.cond48.preheader for.cond48.preheader: ; preds = %for.inc45, %entry %arrayidx54 = getelementptr inbounds [14 x i32], ptr %cards, i64 0, i64 1 %1 = load i32, ptr %arrayidx54, align 4, !tbaa !5 %cmp55.not = icmp eq i32 %1, 1 br i1 %cmp55.not, label %for.inc60, label %if.then57 for.body11: ; preds = %entry, %for.inc45 %i.1133 = phi i32 [ %inc46, %for.inc45 ], [ 0, %entry ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %d) %call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %m, ptr noundef nonnull %n) %2 = load i8, ptr %m, align 1, !tbaa !9 switch i8 %2, label %for.inc45 [ i8 83, label %if.then i8 72, label %if.then22 i8 67, label %if.then30 i8 68, label %if.then38 ] if.then: ; preds = %for.body11 %3 = load i32, ptr %n, align 4, !tbaa !5 %idxprom17 = sext i32 %3 to i64 %arrayidx18 = getelementptr inbounds [14 x i32], ptr %cards, i64 0, i64 %idxprom17 br label %for.inc45.sink.split if.then22: ; preds = %for.body11 %4 = load i32, ptr %n, align 4, !tbaa !5 %idxprom24 = sext i32 %4 to i64 %arrayidx25 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 1, i64 %idxprom24 br label %for.inc45.sink.split if.then30: ; preds = %for.body11 %5 = load i32, ptr %n, align 4, !tbaa !5 %idxprom32 = sext i32 %5 to i64 %arrayidx33 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 2, i64 %idxprom32 br label %for.inc45.sink.split if.then38: ; preds = %for.body11 %6 = load i32, ptr %n, align 4, !tbaa !5 %idxprom40 = sext i32 %6 to i64 %arrayidx41 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 3, i64 %idxprom40 br label %for.inc45.sink.split for.inc45.sink.split: ; preds = %if.then22, %if.then38, %if.then30, %if.then %arrayidx18.sink = phi ptr [ %arrayidx18, %if.then ], [ %arrayidx33, %if.then30 ], [ %arrayidx41, %if.then38 ], [ %arrayidx25, %if.then22 ] store i32 1, ptr %arrayidx18.sink, align 4, !tbaa !5 br label %for.inc45 for.inc45: ; preds = %for.inc45.sink.split, %for.body11 %inc46 = add nuw nsw i32 %i.1133, 1 %7 = load i32, ptr %c, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc46, %7 br i1 %cmp10, label %for.body11, label %for.cond48.preheader, !llvm.loop !10 if.then57: ; preds = %for.cond48.preheader %call58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1) br label %for.inc60 for.inc60: ; preds = %for.cond48.preheader, %if.then57 %arrayidx54.1 = getelementptr inbounds [14 x i32], ptr %cards, i64 0, i64 2 %8 = load i32, ptr %arrayidx54.1, align 8, !tbaa !5 %cmp55.not.1 = icmp eq i32 %8, 1 br i1 %cmp55.not.1, label %for.inc60.1, label %if.then57.1 if.then57.1: ; preds = %for.inc60 %call58.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2) br label %for.inc60.1 for.inc60.1: ; preds = %if.then57.1, %for.inc60 %arrayidx54.2 = getelementptr inbounds [14 x i32], ptr %cards, i64 0, i64 3 %9 = load i32, ptr %arrayidx54.2, align 4, !tbaa !5 %cmp55.not.2 = icmp eq i32 %9, 1 br i1 %cmp55.not.2, label %for.inc60.2, label %if.then57.2 if.then57.2: ; preds = %for.inc60.1 %call58.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3) br label %for.inc60.2 for.inc60.2: ; preds = %if.then57.2, %for.inc60.1 %arrayidx54.3 = getelementptr inbounds [14 x i32], ptr %cards, i64 0, i64 4 %10 = load i32, ptr %arrayidx54.3, align 16, !tbaa !5 %cmp55.not.3 = icmp eq i32 %10, 1 br i1 %cmp55.not.3, label %for.inc60.3, label %if.then57.3 if.then57.3: ; preds = %for.inc60.2 %call58.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4) br label %for.inc60.3 for.inc60.3: ; preds = %if.then57.3, %for.inc60.2 %arrayidx54.4 = getelementptr inbounds [14 x i32], ptr %cards, i64 0, i64 5 %11 = load i32, ptr %arrayidx54.4, align 4, !tbaa !5 %cmp55.not.4 = icmp eq i32 %11, 1 br i1 %cmp55.not.4, label %for.inc60.4, label %if.then57.4 if.then57.4: ; preds = %for.inc60.3 %call58.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5) br label %for.inc60.4 for.inc60.4: ; preds = %if.then57.4, %for.inc60.3 %arrayidx54.5 = getelementptr inbounds [14 x i32], ptr %cards, i64 0, i64 6 %12 = load i32, ptr %arrayidx54.5, align 8, !tbaa !5 %cmp55.not.5 = icmp eq i32 %12, 1 br i1 %cmp55.not.5, label %for.inc60.5, label %if.then57.5 if.then57.5: ; preds = %for.inc60.4 %call58.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6) br label %for.inc60.5 for.inc60.5: ; preds = %if.then57.5, %for.inc60.4 %arrayidx54.6 = getelementptr inbounds [14 x i32], ptr %cards, i64 0, i64 7 %13 = load i32, ptr %arrayidx54.6, align 4, !tbaa !5 %cmp55.not.6 = icmp eq i32 %13, 1 br i1 %cmp55.not.6, label %for.inc60.6, label %if.then57.6 if.then57.6: ; preds = %for.inc60.5 %call58.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7) br label %for.inc60.6 for.inc60.6: ; preds = %if.then57.6, %for.inc60.5 %arrayidx54.7 = getelementptr inbounds [14 x i32], ptr %cards, i64 0, i64 8 %14 = load i32, ptr %arrayidx54.7, align 16, !tbaa !5 %cmp55.not.7 = icmp eq i32 %14, 1 br i1 %cmp55.not.7, label %for.inc60.7, label %if.then57.7 if.then57.7: ; preds = %for.inc60.6 %call58.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8) br label %for.inc60.7 for.inc60.7: ; preds = %if.then57.7, %for.inc60.6 %arrayidx54.8 = getelementptr inbounds [14 x i32], ptr %cards, i64 0, i64 9 %15 = load i32, ptr %arrayidx54.8, align 4, !tbaa !5 %cmp55.not.8 = icmp eq i32 %15, 1 br i1 %cmp55.not.8, label %for.inc60.8, label %if.then57.8 if.then57.8: ; preds = %for.inc60.7 %call58.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9) br label %for.inc60.8 for.inc60.8: ; preds = %if.then57.8, %for.inc60.7 %arrayidx54.9 = getelementptr inbounds [14 x i32], ptr %cards, i64 0, i64 10 %16 = load i32, ptr %arrayidx54.9, align 8, !tbaa !5 %cmp55.not.9 = icmp eq i32 %16, 1 br i1 %cmp55.not.9, label %for.inc60.9, label %if.then57.9 if.then57.9: ; preds = %for.inc60.8 %call58.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10) br label %for.inc60.9 for.inc60.9: ; preds = %if.then57.9, %for.inc60.8 %arrayidx54.10 = getelementptr inbounds [14 x i32], ptr %cards, i64 0, i64 11 %17 = load i32, ptr %arrayidx54.10, align 4, !tbaa !5 %cmp55.not.10 = icmp eq i32 %17, 1 br i1 %cmp55.not.10, label %for.inc60.10, label %if.then57.10 if.then57.10: ; preds = %for.inc60.9 %call58.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11) br label %for.inc60.10 for.inc60.10: ; preds = %if.then57.10, %for.inc60.9 %arrayidx54.11 = getelementptr inbounds [14 x i32], ptr %cards, i64 0, i64 12 %18 = load i32, ptr %arrayidx54.11, align 16, !tbaa !5 %cmp55.not.11 = icmp eq i32 %18, 1 br i1 %cmp55.not.11, label %for.inc60.11, label %if.then57.11 if.then57.11: ; preds = %for.inc60.10 %call58.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12) br label %for.inc60.11 for.inc60.11: ; preds = %if.then57.11, %for.inc60.10 %arrayidx54.12 = getelementptr inbounds [14 x i32], ptr %cards, i64 0, i64 13 %19 = load i32, ptr %arrayidx54.12, align 4, !tbaa !5 %cmp55.not.12 = icmp eq i32 %19, 1 br i1 %cmp55.not.12, label %for.inc60.12, label %if.then57.12 if.then57.12: ; preds = %for.inc60.11 %call58.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 13) br label %for.inc60.12 for.inc60.12: ; preds = %if.then57.12, %for.inc60.11 %arrayidx69 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 1, i64 1 %20 = load i32, ptr %arrayidx69, align 4, !tbaa !5 %cmp70.not = icmp eq i32 %20, 1 br i1 %cmp70.not, label %for.inc75, label %if.then72 if.then72: ; preds = %for.inc60.12 %call73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1) br label %for.inc75 for.inc75: ; preds = %for.inc60.12, %if.then72 %arrayidx69.1 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 1, i64 2 %21 = load i32, ptr %arrayidx69.1, align 16, !tbaa !5 %cmp70.not.1 = icmp eq i32 %21, 1 br i1 %cmp70.not.1, label %for.inc75.1, label %if.then72.1 if.then72.1: ; preds = %for.inc75 %call73.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2) br label %for.inc75.1 for.inc75.1: ; preds = %if.then72.1, %for.inc75 %arrayidx69.2 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 1, i64 3 %22 = load i32, ptr %arrayidx69.2, align 4, !tbaa !5 %cmp70.not.2 = icmp eq i32 %22, 1 br i1 %cmp70.not.2, label %for.inc75.2, label %if.then72.2 if.then72.2: ; preds = %for.inc75.1 %call73.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3) br label %for.inc75.2 for.inc75.2: ; preds = %if.then72.2, %for.inc75.1 %arrayidx69.3 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 1, i64 4 %23 = load i32, ptr %arrayidx69.3, align 8, !tbaa !5 %cmp70.not.3 = icmp eq i32 %23, 1 br i1 %cmp70.not.3, label %for.inc75.3, label %if.then72.3 if.then72.3: ; preds = %for.inc75.2 %call73.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4) br label %for.inc75.3 for.inc75.3: ; preds = %if.then72.3, %for.inc75.2 %arrayidx69.4 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 1, i64 5 %24 = load i32, ptr %arrayidx69.4, align 4, !tbaa !5 %cmp70.not.4 = icmp eq i32 %24, 1 br i1 %cmp70.not.4, label %for.inc75.4, label %if.then72.4 if.then72.4: ; preds = %for.inc75.3 %call73.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5) br label %for.inc75.4 for.inc75.4: ; preds = %if.then72.4, %for.inc75.3 %arrayidx69.5 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 1, i64 6 %25 = load i32, ptr %arrayidx69.5, align 16, !tbaa !5 %cmp70.not.5 = icmp eq i32 %25, 1 br i1 %cmp70.not.5, label %for.inc75.5, label %if.then72.5 if.then72.5: ; preds = %for.inc75.4 %call73.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6) br label %for.inc75.5 for.inc75.5: ; preds = %if.then72.5, %for.inc75.4 %arrayidx69.6 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 1, i64 7 %26 = load i32, ptr %arrayidx69.6, align 4, !tbaa !5 %cmp70.not.6 = icmp eq i32 %26, 1 br i1 %cmp70.not.6, label %for.inc75.6, label %if.then72.6 if.then72.6: ; preds = %for.inc75.5 %call73.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7) br label %for.inc75.6 for.inc75.6: ; preds = %if.then72.6, %for.inc75.5 %arrayidx69.7 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 1, i64 8 %27 = load i32, ptr %arrayidx69.7, align 8, !tbaa !5 %cmp70.not.7 = icmp eq i32 %27, 1 br i1 %cmp70.not.7, label %for.inc75.7, label %if.then72.7 if.then72.7: ; preds = %for.inc75.6 %call73.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8) br label %for.inc75.7 for.inc75.7: ; preds = %if.then72.7, %for.inc75.6 %arrayidx69.8 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 1, i64 9 %28 = load i32, ptr %arrayidx69.8, align 4, !tbaa !5 %cmp70.not.8 = icmp eq i32 %28, 1 br i1 %cmp70.not.8, label %for.inc75.8, label %if.then72.8 if.then72.8: ; preds = %for.inc75.7 %call73.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9) br label %for.inc75.8 for.inc75.8: ; preds = %if.then72.8, %for.inc75.7 %arrayidx69.9 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 1, i64 10 %29 = load i32, ptr %arrayidx69.9, align 16, !tbaa !5 %cmp70.not.9 = icmp eq i32 %29, 1 br i1 %cmp70.not.9, label %for.inc75.9, label %if.then72.9 if.then72.9: ; preds = %for.inc75.8 %call73.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10) br label %for.inc75.9 for.inc75.9: ; preds = %if.then72.9, %for.inc75.8 %arrayidx69.10 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 1, i64 11 %30 = load i32, ptr %arrayidx69.10, align 4, !tbaa !5 %cmp70.not.10 = icmp eq i32 %30, 1 br i1 %cmp70.not.10, label %for.inc75.10, label %if.then72.10 if.then72.10: ; preds = %for.inc75.9 %call73.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11) br label %for.inc75.10 for.inc75.10: ; preds = %if.then72.10, %for.inc75.9 %arrayidx69.11 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 1, i64 12 %31 = load i32, ptr %arrayidx69.11, align 8, !tbaa !5 %cmp70.not.11 = icmp eq i32 %31, 1 br i1 %cmp70.not.11, label %for.inc75.11, label %if.then72.11 if.then72.11: ; preds = %for.inc75.10 %call73.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12) br label %for.inc75.11 for.inc75.11: ; preds = %if.then72.11, %for.inc75.10 %arrayidx69.12 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 1, i64 13 %32 = load i32, ptr %arrayidx69.12, align 4, !tbaa !5 %cmp70.not.12 = icmp eq i32 %32, 1 br i1 %cmp70.not.12, label %for.inc75.12, label %if.then72.12 if.then72.12: ; preds = %for.inc75.11 %call73.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 13) br label %for.inc75.12 for.inc75.12: ; preds = %if.then72.12, %for.inc75.11 %arrayidx84 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 2, i64 1 %33 = load i32, ptr %arrayidx84, align 4, !tbaa !5 %cmp85.not = icmp eq i32 %33, 1 br i1 %cmp85.not, label %for.inc90, label %if.then87 if.then87: ; preds = %for.inc75.12 %call88 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1) br label %for.inc90 for.inc90: ; preds = %for.inc75.12, %if.then87 %arrayidx84.1 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 2, i64 2 %34 = load i32, ptr %arrayidx84.1, align 8, !tbaa !5 %cmp85.not.1 = icmp eq i32 %34, 1 br i1 %cmp85.not.1, label %for.inc90.1, label %if.then87.1 if.then87.1: ; preds = %for.inc90 %call88.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2) br label %for.inc90.1 for.inc90.1: ; preds = %if.then87.1, %for.inc90 %arrayidx84.2 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 2, i64 3 %35 = load i32, ptr %arrayidx84.2, align 4, !tbaa !5 %cmp85.not.2 = icmp eq i32 %35, 1 br i1 %cmp85.not.2, label %for.inc90.2, label %if.then87.2 if.then87.2: ; preds = %for.inc90.1 %call88.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3) br label %for.inc90.2 for.inc90.2: ; preds = %if.then87.2, %for.inc90.1 %arrayidx84.3 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 2, i64 4 %36 = load i32, ptr %arrayidx84.3, align 16, !tbaa !5 %cmp85.not.3 = icmp eq i32 %36, 1 br i1 %cmp85.not.3, label %for.inc90.3, label %if.then87.3 if.then87.3: ; preds = %for.inc90.2 %call88.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4) br label %for.inc90.3 for.inc90.3: ; preds = %if.then87.3, %for.inc90.2 %arrayidx84.4 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 2, i64 5 %37 = load i32, ptr %arrayidx84.4, align 4, !tbaa !5 %cmp85.not.4 = icmp eq i32 %37, 1 br i1 %cmp85.not.4, label %for.inc90.4, label %if.then87.4 if.then87.4: ; preds = %for.inc90.3 %call88.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5) br label %for.inc90.4 for.inc90.4: ; preds = %if.then87.4, %for.inc90.3 %arrayidx84.5 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 2, i64 6 %38 = load i32, ptr %arrayidx84.5, align 8, !tbaa !5 %cmp85.not.5 = icmp eq i32 %38, 1 br i1 %cmp85.not.5, label %for.inc90.5, label %if.then87.5 if.then87.5: ; preds = %for.inc90.4 %call88.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6) br label %for.inc90.5 for.inc90.5: ; preds = %if.then87.5, %for.inc90.4 %arrayidx84.6 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 2, i64 7 %39 = load i32, ptr %arrayidx84.6, align 4, !tbaa !5 %cmp85.not.6 = icmp eq i32 %39, 1 br i1 %cmp85.not.6, label %for.inc90.6, label %if.then87.6 if.then87.6: ; preds = %for.inc90.5 %call88.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7) br label %for.inc90.6 for.inc90.6: ; preds = %if.then87.6, %for.inc90.5 %arrayidx84.7 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 2, i64 8 %40 = load i32, ptr %arrayidx84.7, align 16, !tbaa !5 %cmp85.not.7 = icmp eq i32 %40, 1 br i1 %cmp85.not.7, label %for.inc90.7, label %if.then87.7 if.then87.7: ; preds = %for.inc90.6 %call88.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8) br label %for.inc90.7 for.inc90.7: ; preds = %if.then87.7, %for.inc90.6 %arrayidx84.8 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 2, i64 9 %41 = load i32, ptr %arrayidx84.8, align 4, !tbaa !5 %cmp85.not.8 = icmp eq i32 %41, 1 br i1 %cmp85.not.8, label %for.inc90.8, label %if.then87.8 if.then87.8: ; preds = %for.inc90.7 %call88.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9) br label %for.inc90.8 for.inc90.8: ; preds = %if.then87.8, %for.inc90.7 %arrayidx84.9 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 2, i64 10 %42 = load i32, ptr %arrayidx84.9, align 8, !tbaa !5 %cmp85.not.9 = icmp eq i32 %42, 1 br i1 %cmp85.not.9, label %for.inc90.9, label %if.then87.9 if.then87.9: ; preds = %for.inc90.8 %call88.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10) br label %for.inc90.9 for.inc90.9: ; preds = %if.then87.9, %for.inc90.8 %arrayidx84.10 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 2, i64 11 %43 = load i32, ptr %arrayidx84.10, align 4, !tbaa !5 %cmp85.not.10 = icmp eq i32 %43, 1 br i1 %cmp85.not.10, label %for.inc90.10, label %if.then87.10 if.then87.10: ; preds = %for.inc90.9 %call88.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11) br label %for.inc90.10 for.inc90.10: ; preds = %if.then87.10, %for.inc90.9 %arrayidx84.11 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 2, i64 12 %44 = load i32, ptr %arrayidx84.11, align 16, !tbaa !5 %cmp85.not.11 = icmp eq i32 %44, 1 br i1 %cmp85.not.11, label %for.inc90.11, label %if.then87.11 if.then87.11: ; preds = %for.inc90.10 %call88.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12) br label %for.inc90.11 for.inc90.11: ; preds = %if.then87.11, %for.inc90.10 %arrayidx84.12 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 2, i64 13 %45 = load i32, ptr %arrayidx84.12, align 4, !tbaa !5 %cmp85.not.12 = icmp eq i32 %45, 1 br i1 %cmp85.not.12, label %for.inc90.12, label %if.then87.12 if.then87.12: ; preds = %for.inc90.11 %call88.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 13) br label %for.inc90.12 for.inc90.12: ; preds = %if.then87.12, %for.inc90.11 %arrayidx99 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 3, i64 1 %46 = load i32, ptr %arrayidx99, align 4, !tbaa !5 %cmp100.not = icmp eq i32 %46, 1 br i1 %cmp100.not, label %for.inc105, label %if.then102 if.then102: ; preds = %for.inc90.12 %call103 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 1) br label %for.inc105 for.inc105: ; preds = %for.inc90.12, %if.then102 %arrayidx99.1 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 3, i64 2 %47 = load i32, ptr %arrayidx99.1, align 16, !tbaa !5 %cmp100.not.1 = icmp eq i32 %47, 1 br i1 %cmp100.not.1, label %for.inc105.1, label %if.then102.1 if.then102.1: ; preds = %for.inc105 %call103.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 2) br label %for.inc105.1 for.inc105.1: ; preds = %if.then102.1, %for.inc105 %arrayidx99.2 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 3, i64 3 %48 = load i32, ptr %arrayidx99.2, align 4, !tbaa !5 %cmp100.not.2 = icmp eq i32 %48, 1 br i1 %cmp100.not.2, label %for.inc105.2, label %if.then102.2 if.then102.2: ; preds = %for.inc105.1 %call103.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 3) br label %for.inc105.2 for.inc105.2: ; preds = %if.then102.2, %for.inc105.1 %arrayidx99.3 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 3, i64 4 %49 = load i32, ptr %arrayidx99.3, align 8, !tbaa !5 %cmp100.not.3 = icmp eq i32 %49, 1 br i1 %cmp100.not.3, label %for.inc105.3, label %if.then102.3 if.then102.3: ; preds = %for.inc105.2 %call103.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 4) br label %for.inc105.3 for.inc105.3: ; preds = %if.then102.3, %for.inc105.2 %arrayidx99.4 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 3, i64 5 %50 = load i32, ptr %arrayidx99.4, align 4, !tbaa !5 %cmp100.not.4 = icmp eq i32 %50, 1 br i1 %cmp100.not.4, label %for.inc105.4, label %if.then102.4 if.then102.4: ; preds = %for.inc105.3 %call103.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 5) br label %for.inc105.4 for.inc105.4: ; preds = %if.then102.4, %for.inc105.3 %arrayidx99.5 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 3, i64 6 %51 = load i32, ptr %arrayidx99.5, align 16, !tbaa !5 %cmp100.not.5 = icmp eq i32 %51, 1 br i1 %cmp100.not.5, label %for.inc105.5, label %if.then102.5 if.then102.5: ; preds = %for.inc105.4 %call103.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 6) br label %for.inc105.5 for.inc105.5: ; preds = %if.then102.5, %for.inc105.4 %arrayidx99.6 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 3, i64 7 %52 = load i32, ptr %arrayidx99.6, align 4, !tbaa !5 %cmp100.not.6 = icmp eq i32 %52, 1 br i1 %cmp100.not.6, label %for.inc105.6, label %if.then102.6 if.then102.6: ; preds = %for.inc105.5 %call103.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 7) br label %for.inc105.6 for.inc105.6: ; preds = %if.then102.6, %for.inc105.5 %arrayidx99.7 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 3, i64 8 %53 = load i32, ptr %arrayidx99.7, align 8, !tbaa !5 %cmp100.not.7 = icmp eq i32 %53, 1 br i1 %cmp100.not.7, label %for.inc105.7, label %if.then102.7 if.then102.7: ; preds = %for.inc105.6 %call103.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 8) br label %for.inc105.7 for.inc105.7: ; preds = %if.then102.7, %for.inc105.6 %arrayidx99.8 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 3, i64 9 %54 = load i32, ptr %arrayidx99.8, align 4, !tbaa !5 %cmp100.not.8 = icmp eq i32 %54, 1 br i1 %cmp100.not.8, label %for.inc105.8, label %if.then102.8 if.then102.8: ; preds = %for.inc105.7 %call103.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 9) br label %for.inc105.8 for.inc105.8: ; preds = %if.then102.8, %for.inc105.7 %arrayidx99.9 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 3, i64 10 %55 = load i32, ptr %arrayidx99.9, align 16, !tbaa !5 %cmp100.not.9 = icmp eq i32 %55, 1 br i1 %cmp100.not.9, label %for.inc105.9, label %if.then102.9 if.then102.9: ; preds = %for.inc105.8 %call103.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 10) br label %for.inc105.9 for.inc105.9: ; preds = %if.then102.9, %for.inc105.8 %arrayidx99.10 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 3, i64 11 %56 = load i32, ptr %arrayidx99.10, align 4, !tbaa !5 %cmp100.not.10 = icmp eq i32 %56, 1 br i1 %cmp100.not.10, label %for.inc105.10, label %if.then102.10 if.then102.10: ; preds = %for.inc105.9 %call103.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 11) br label %for.inc105.10 for.inc105.10: ; preds = %if.then102.10, %for.inc105.9 %arrayidx99.11 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 3, i64 12 %57 = load i32, ptr %arrayidx99.11, align 8, !tbaa !5 %cmp100.not.11 = icmp eq i32 %57, 1 br i1 %cmp100.not.11, label %for.inc105.11, label %if.then102.11 if.then102.11: ; preds = %for.inc105.10 %call103.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 12) br label %for.inc105.11 for.inc105.11: ; preds = %if.then102.11, %for.inc105.10 %arrayidx99.12 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 3, i64 13 %58 = load i32, ptr %arrayidx99.12, align 4, !tbaa !5 %cmp100.not.12 = icmp eq i32 %58, 1 br i1 %cmp100.not.12, label %for.inc105.12, label %if.then102.12 if.then102.12: ; preds = %for.inc105.11 %call103.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 13) br label %for.inc105.12 for.inc105.12: ; preds = %if.then102.12, %for.inc105.11 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %d) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %m) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %cards) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int markForInt(char c){ int n; if(c == 'S'){ n = 0; }else if(c == 'H'){ n = 1; }else if(c == 'C'){ n = 2; }else if(c == 'D'){ n = 3; } return n; } char intForMark(int n){ char c; if(n == 0){ c = 'S'; }else if(n == 1){ c = 'H'; }else if(n == 2){ c = 'C'; }else if(n == 3){ c = 'D'; } return c; } int main() { int n; int cards[4][13]; int i, j; scanf("%d", &n); for(i = 0; i < 4; ++i){ for(j = 0; j < 13; ++j){ cards[i][j] = 0; } } for(i = 0; i < n; ++i){ char mark; int num; scanf(" %c %d", &mark, &num); cards[markForInt(mark)][num - 1] = 1; } for(i = 0; i < 4; ++i){ for(j = 0; j < 13; ++j){ if(cards[i][j] == 0)printf("%c %d\n", intForMark(i), j + 1); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215074/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215074/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c" %c %d\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 @switch.table.markForInt = private unnamed_addr constant [6 x i32] [i32 2, i32 3, i32 0, i32 0, i32 0, i32 1], align 4 @switch.table.main = private unnamed_addr constant [6 x i64] [i64 2, i64 3, i64 0, i64 0, i64 0, i64 1], align 8 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @markForInt(i8 noundef signext %c) local_unnamed_addr #0 { entry: %switch.tableidx = add i8 %c, -67 %0 = icmp ult i8 %switch.tableidx, 6 br i1 %0, label %switch.lookup, label %if.end18 switch.lookup: ; preds = %entry %1 = sext i8 %switch.tableidx to i64 %switch.gep = getelementptr inbounds [6 x i32], ptr @switch.table.markForInt, i64 0, i64 %1 %switch.load = load i32, ptr %switch.gep, align 4 br label %if.end18 if.end18: ; preds = %switch.lookup, %entry %n.0 = phi i32 [ 0, %entry ], [ %switch.load, %switch.lookup ] ret i32 %n.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local signext i8 @intForMark(i32 noundef %n) local_unnamed_addr #0 { entry: %0 = icmp ult i32 %n, 4 %switch.shiftamt = shl nuw nsw i32 %n, 3 %switch.downshift = lshr i32 1145260115, %switch.shiftamt %switch.masked = trunc i32 %switch.downshift to i8 %c.0 = select i1 %0, i8 %switch.masked, i8 83 ret i8 %c.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %n = alloca i32, align 4 %cards = alloca [4 x [13 x i32]], align 16 %mark = alloca i8, align 1 %num = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %cards) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %cards, i8 0, i64 208, i1 false), !tbaa !5 %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp1057 = icmp sgt i32 %0, 0 br i1 %cmp1057, label %for.body11, label %for.cond24.preheader.preheader for.body11: ; preds = %entry, %markForInt.exit %i.158 = phi i32 [ %inc19, %markForInt.exit ], [ 0, %entry ] call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %mark) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #5 %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %mark, ptr noundef nonnull %num) %1 = load i8, ptr %mark, align 1, !tbaa !9 %switch.tableidx = add i8 %1, -67 %2 = icmp ult i8 %switch.tableidx, 6 br i1 %2, label %switch.lookup, label %markForInt.exit switch.lookup: ; preds = %for.body11 %3 = sext i8 %switch.tableidx to i64 %switch.gep = getelementptr inbounds [6 x i64], ptr @switch.table.main, i64 0, i64 %3 %switch.load = load i64, ptr %switch.gep, align 8 br label %markForInt.exit markForInt.exit: ; preds = %switch.lookup, %for.body11 %n.0.i = phi i64 [ 0, %for.body11 ], [ %switch.load, %switch.lookup ] %4 = load i32, ptr %num, align 4, !tbaa !5 %sub = add nsw i32 %4, -1 %idxprom16 = sext i32 %sub to i64 %arrayidx17 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %n.0.i, i64 %idxprom16 store i32 1, ptr %arrayidx17, align 4, !tbaa !5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #5 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %mark) #5 %inc19 = add nuw nsw i32 %i.158, 1 %5 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc19, %5 br i1 %cmp10, label %for.body11, label %for.cond24.preheader.preheader, !llvm.loop !10 for.cond24.preheader.preheader: ; preds = %markForInt.exit, %entry br label %for.cond24.preheader for.cond24.preheader: ; preds = %for.cond24.preheader.preheader, %for.inc37 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc37 ], [ 0, %for.cond24.preheader.preheader ] %6 = trunc i64 %indvars.iv to i32 %arrayidx30 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 0 %7 = load i32, ptr %arrayidx30, align 4, !tbaa !5 %cmp31 = icmp eq i32 %7, 0 switch i32 %6, label %for.body26.preheader [ i32 3, label %for.body26.us.preheader i32 1, label %for.body26.us61.preheader i32 2, label %for.body26.us75.preheader ] for.body26.us75.preheader: ; preds = %for.cond24.preheader br i1 %cmp31, label %if.then.us80, label %for.inc34.us85 for.body26.us61.preheader: ; preds = %for.cond24.preheader br i1 %cmp31, label %if.then.us66, label %for.inc34.us71 for.body26.us.preheader: ; preds = %for.cond24.preheader br i1 %cmp31, label %if.then.us, label %for.inc34.us for.body26.preheader: ; preds = %for.cond24.preheader br i1 %cmp31, label %if.then, label %for.inc34 if.then.us: ; preds = %for.body26.us.preheader %call33.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 1) br label %for.inc34.us for.inc34.us: ; preds = %if.then.us, %for.body26.us.preheader %arrayidx30.us.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1 %8 = load i32, ptr %arrayidx30.us.1, align 4, !tbaa !5 %cmp31.us.1 = icmp eq i32 %8, 0 br i1 %cmp31.us.1, label %if.then.us.1, label %for.inc34.us.1 if.then.us.1: ; preds = %for.inc34.us %call33.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 2) br label %for.inc34.us.1 for.inc34.us.1: ; preds = %if.then.us.1, %for.inc34.us %arrayidx30.us.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2 %9 = load i32, ptr %arrayidx30.us.2, align 4, !tbaa !5 %cmp31.us.2 = icmp eq i32 %9, 0 br i1 %cmp31.us.2, label %if.then.us.2, label %for.inc34.us.2 if.then.us.2: ; preds = %for.inc34.us.1 %call33.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 3) br label %for.inc34.us.2 for.inc34.us.2: ; preds = %if.then.us.2, %for.inc34.us.1 %arrayidx30.us.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3 %10 = load i32, ptr %arrayidx30.us.3, align 4, !tbaa !5 %cmp31.us.3 = icmp eq i32 %10, 0 br i1 %cmp31.us.3, label %if.then.us.3, label %for.inc34.us.3 if.then.us.3: ; preds = %for.inc34.us.2 %call33.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 4) br label %for.inc34.us.3 for.inc34.us.3: ; preds = %if.then.us.3, %for.inc34.us.2 %arrayidx30.us.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4 %11 = load i32, ptr %arrayidx30.us.4, align 4, !tbaa !5 %cmp31.us.4 = icmp eq i32 %11, 0 br i1 %cmp31.us.4, label %if.then.us.4, label %for.inc34.us.4 if.then.us.4: ; preds = %for.inc34.us.3 %call33.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 5) br label %for.inc34.us.4 for.inc34.us.4: ; preds = %if.then.us.4, %for.inc34.us.3 %arrayidx30.us.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5 %12 = load i32, ptr %arrayidx30.us.5, align 4, !tbaa !5 %cmp31.us.5 = icmp eq i32 %12, 0 br i1 %cmp31.us.5, label %if.then.us.5, label %for.inc34.us.5 if.then.us.5: ; preds = %for.inc34.us.4 %call33.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 6) br label %for.inc34.us.5 for.inc34.us.5: ; preds = %if.then.us.5, %for.inc34.us.4 %arrayidx30.us.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6 %13 = load i32, ptr %arrayidx30.us.6, align 4, !tbaa !5 %cmp31.us.6 = icmp eq i32 %13, 0 br i1 %cmp31.us.6, label %if.then.us.6, label %for.inc34.us.6 if.then.us.6: ; preds = %for.inc34.us.5 %call33.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 7) br label %for.inc34.us.6 for.inc34.us.6: ; preds = %if.then.us.6, %for.inc34.us.5 %arrayidx30.us.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7 %14 = load i32, ptr %arrayidx30.us.7, align 4, !tbaa !5 %cmp31.us.7 = icmp eq i32 %14, 0 br i1 %cmp31.us.7, label %if.then.us.7, label %for.inc34.us.7 if.then.us.7: ; preds = %for.inc34.us.6 %call33.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 8) br label %for.inc34.us.7 for.inc34.us.7: ; preds = %if.then.us.7, %for.inc34.us.6 %arrayidx30.us.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8 %15 = load i32, ptr %arrayidx30.us.8, align 4, !tbaa !5 %cmp31.us.8 = icmp eq i32 %15, 0 br i1 %cmp31.us.8, label %if.then.us.8, label %for.inc34.us.8 if.then.us.8: ; preds = %for.inc34.us.7 %call33.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 9) br label %for.inc34.us.8 for.inc34.us.8: ; preds = %if.then.us.8, %for.inc34.us.7 %arrayidx30.us.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9 %16 = load i32, ptr %arrayidx30.us.9, align 4, !tbaa !5 %cmp31.us.9 = icmp eq i32 %16, 0 br i1 %cmp31.us.9, label %if.then.us.9, label %for.inc34.us.9 if.then.us.9: ; preds = %for.inc34.us.8 %call33.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 10) br label %for.inc34.us.9 for.inc34.us.9: ; preds = %if.then.us.9, %for.inc34.us.8 %arrayidx30.us.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10 %17 = load i32, ptr %arrayidx30.us.10, align 4, !tbaa !5 %cmp31.us.10 = icmp eq i32 %17, 0 br i1 %cmp31.us.10, label %if.then.us.10, label %for.inc34.us.10 if.then.us.10: ; preds = %for.inc34.us.9 %call33.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 11) br label %for.inc34.us.10 for.inc34.us.10: ; preds = %if.then.us.10, %for.inc34.us.9 %arrayidx30.us.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11 %18 = load i32, ptr %arrayidx30.us.11, align 4, !tbaa !5 %cmp31.us.11 = icmp eq i32 %18, 0 br i1 %cmp31.us.11, label %if.then.us.11, label %for.inc34.us.11 if.then.us.11: ; preds = %for.inc34.us.10 %call33.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 12) br label %for.inc34.us.11 for.inc34.us.11: ; preds = %if.then.us.11, %for.inc34.us.10 %arrayidx30.us.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12 %19 = load i32, ptr %arrayidx30.us.12, align 4, !tbaa !5 %cmp31.us.12 = icmp eq i32 %19, 0 br i1 %cmp31.us.12, label %for.inc37.sink.split, label %for.inc37 if.then.us66: ; preds = %for.body26.us61.preheader %call33.us70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 1) br label %for.inc34.us71 for.inc34.us71: ; preds = %if.then.us66, %for.body26.us61.preheader %arrayidx30.us64.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1 %20 = load i32, ptr %arrayidx30.us64.1, align 4, !tbaa !5 %cmp31.us65.1 = icmp eq i32 %20, 0 br i1 %cmp31.us65.1, label %if.then.us66.1, label %for.inc34.us71.1 if.then.us66.1: ; preds = %for.inc34.us71 %call33.us70.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 2) br label %for.inc34.us71.1 for.inc34.us71.1: ; preds = %if.then.us66.1, %for.inc34.us71 %arrayidx30.us64.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2 %21 = load i32, ptr %arrayidx30.us64.2, align 4, !tbaa !5 %cmp31.us65.2 = icmp eq i32 %21, 0 br i1 %cmp31.us65.2, label %if.then.us66.2, label %for.inc34.us71.2 if.then.us66.2: ; preds = %for.inc34.us71.1 %call33.us70.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 3) br label %for.inc34.us71.2 for.inc34.us71.2: ; preds = %if.then.us66.2, %for.inc34.us71.1 %arrayidx30.us64.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3 %22 = load i32, ptr %arrayidx30.us64.3, align 4, !tbaa !5 %cmp31.us65.3 = icmp eq i32 %22, 0 br i1 %cmp31.us65.3, label %if.then.us66.3, label %for.inc34.us71.3 if.then.us66.3: ; preds = %for.inc34.us71.2 %call33.us70.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 4) br label %for.inc34.us71.3 for.inc34.us71.3: ; preds = %if.then.us66.3, %for.inc34.us71.2 %arrayidx30.us64.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4 %23 = load i32, ptr %arrayidx30.us64.4, align 4, !tbaa !5 %cmp31.us65.4 = icmp eq i32 %23, 0 br i1 %cmp31.us65.4, label %if.then.us66.4, label %for.inc34.us71.4 if.then.us66.4: ; preds = %for.inc34.us71.3 %call33.us70.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 5) br label %for.inc34.us71.4 for.inc34.us71.4: ; preds = %if.then.us66.4, %for.inc34.us71.3 %arrayidx30.us64.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5 %24 = load i32, ptr %arrayidx30.us64.5, align 4, !tbaa !5 %cmp31.us65.5 = icmp eq i32 %24, 0 br i1 %cmp31.us65.5, label %if.then.us66.5, label %for.inc34.us71.5 if.then.us66.5: ; preds = %for.inc34.us71.4 %call33.us70.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 6) br label %for.inc34.us71.5 for.inc34.us71.5: ; preds = %if.then.us66.5, %for.inc34.us71.4 %arrayidx30.us64.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6 %25 = load i32, ptr %arrayidx30.us64.6, align 4, !tbaa !5 %cmp31.us65.6 = icmp eq i32 %25, 0 br i1 %cmp31.us65.6, label %if.then.us66.6, label %for.inc34.us71.6 if.then.us66.6: ; preds = %for.inc34.us71.5 %call33.us70.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 7) br label %for.inc34.us71.6 for.inc34.us71.6: ; preds = %if.then.us66.6, %for.inc34.us71.5 %arrayidx30.us64.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7 %26 = load i32, ptr %arrayidx30.us64.7, align 4, !tbaa !5 %cmp31.us65.7 = icmp eq i32 %26, 0 br i1 %cmp31.us65.7, label %if.then.us66.7, label %for.inc34.us71.7 if.then.us66.7: ; preds = %for.inc34.us71.6 %call33.us70.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 8) br label %for.inc34.us71.7 for.inc34.us71.7: ; preds = %if.then.us66.7, %for.inc34.us71.6 %arrayidx30.us64.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8 %27 = load i32, ptr %arrayidx30.us64.8, align 4, !tbaa !5 %cmp31.us65.8 = icmp eq i32 %27, 0 br i1 %cmp31.us65.8, label %if.then.us66.8, label %for.inc34.us71.8 if.then.us66.8: ; preds = %for.inc34.us71.7 %call33.us70.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 9) br label %for.inc34.us71.8 for.inc34.us71.8: ; preds = %if.then.us66.8, %for.inc34.us71.7 %arrayidx30.us64.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9 %28 = load i32, ptr %arrayidx30.us64.9, align 4, !tbaa !5 %cmp31.us65.9 = icmp eq i32 %28, 0 br i1 %cmp31.us65.9, label %if.then.us66.9, label %for.inc34.us71.9 if.then.us66.9: ; preds = %for.inc34.us71.8 %call33.us70.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 10) br label %for.inc34.us71.9 for.inc34.us71.9: ; preds = %if.then.us66.9, %for.inc34.us71.8 %arrayidx30.us64.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10 %29 = load i32, ptr %arrayidx30.us64.10, align 4, !tbaa !5 %cmp31.us65.10 = icmp eq i32 %29, 0 br i1 %cmp31.us65.10, label %if.then.us66.10, label %for.inc34.us71.10 if.then.us66.10: ; preds = %for.inc34.us71.9 %call33.us70.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 11) br label %for.inc34.us71.10 for.inc34.us71.10: ; preds = %if.then.us66.10, %for.inc34.us71.9 %arrayidx30.us64.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11 %30 = load i32, ptr %arrayidx30.us64.11, align 4, !tbaa !5 %cmp31.us65.11 = icmp eq i32 %30, 0 br i1 %cmp31.us65.11, label %if.then.us66.11, label %for.inc34.us71.11 if.then.us66.11: ; preds = %for.inc34.us71.10 %call33.us70.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 12) br label %for.inc34.us71.11 for.inc34.us71.11: ; preds = %if.then.us66.11, %for.inc34.us71.10 %arrayidx30.us64.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12 %31 = load i32, ptr %arrayidx30.us64.12, align 4, !tbaa !5 %cmp31.us65.12 = icmp eq i32 %31, 0 br i1 %cmp31.us65.12, label %for.inc37.sink.split, label %for.inc37 if.then.us80: ; preds = %for.body26.us75.preheader %call33.us84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 1) br label %for.inc34.us85 for.inc34.us85: ; preds = %if.then.us80, %for.body26.us75.preheader %arrayidx30.us78.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1 %32 = load i32, ptr %arrayidx30.us78.1, align 4, !tbaa !5 %cmp31.us79.1 = icmp eq i32 %32, 0 br i1 %cmp31.us79.1, label %if.then.us80.1, label %for.inc34.us85.1 if.then.us80.1: ; preds = %for.inc34.us85 %call33.us84.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 2) br label %for.inc34.us85.1 for.inc34.us85.1: ; preds = %if.then.us80.1, %for.inc34.us85 %arrayidx30.us78.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2 %33 = load i32, ptr %arrayidx30.us78.2, align 4, !tbaa !5 %cmp31.us79.2 = icmp eq i32 %33, 0 br i1 %cmp31.us79.2, label %if.then.us80.2, label %for.inc34.us85.2 if.then.us80.2: ; preds = %for.inc34.us85.1 %call33.us84.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 3) br label %for.inc34.us85.2 for.inc34.us85.2: ; preds = %if.then.us80.2, %for.inc34.us85.1 %arrayidx30.us78.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3 %34 = load i32, ptr %arrayidx30.us78.3, align 4, !tbaa !5 %cmp31.us79.3 = icmp eq i32 %34, 0 br i1 %cmp31.us79.3, label %if.then.us80.3, label %for.inc34.us85.3 if.then.us80.3: ; preds = %for.inc34.us85.2 %call33.us84.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 4) br label %for.inc34.us85.3 for.inc34.us85.3: ; preds = %if.then.us80.3, %for.inc34.us85.2 %arrayidx30.us78.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4 %35 = load i32, ptr %arrayidx30.us78.4, align 4, !tbaa !5 %cmp31.us79.4 = icmp eq i32 %35, 0 br i1 %cmp31.us79.4, label %if.then.us80.4, label %for.inc34.us85.4 if.then.us80.4: ; preds = %for.inc34.us85.3 %call33.us84.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 5) br label %for.inc34.us85.4 for.inc34.us85.4: ; preds = %if.then.us80.4, %for.inc34.us85.3 %arrayidx30.us78.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5 %36 = load i32, ptr %arrayidx30.us78.5, align 4, !tbaa !5 %cmp31.us79.5 = icmp eq i32 %36, 0 br i1 %cmp31.us79.5, label %if.then.us80.5, label %for.inc34.us85.5 if.then.us80.5: ; preds = %for.inc34.us85.4 %call33.us84.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 6) br label %for.inc34.us85.5 for.inc34.us85.5: ; preds = %if.then.us80.5, %for.inc34.us85.4 %arrayidx30.us78.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6 %37 = load i32, ptr %arrayidx30.us78.6, align 4, !tbaa !5 %cmp31.us79.6 = icmp eq i32 %37, 0 br i1 %cmp31.us79.6, label %if.then.us80.6, label %for.inc34.us85.6 if.then.us80.6: ; preds = %for.inc34.us85.5 %call33.us84.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 7) br label %for.inc34.us85.6 for.inc34.us85.6: ; preds = %if.then.us80.6, %for.inc34.us85.5 %arrayidx30.us78.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7 %38 = load i32, ptr %arrayidx30.us78.7, align 4, !tbaa !5 %cmp31.us79.7 = icmp eq i32 %38, 0 br i1 %cmp31.us79.7, label %if.then.us80.7, label %for.inc34.us85.7 if.then.us80.7: ; preds = %for.inc34.us85.6 %call33.us84.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 8) br label %for.inc34.us85.7 for.inc34.us85.7: ; preds = %if.then.us80.7, %for.inc34.us85.6 %arrayidx30.us78.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8 %39 = load i32, ptr %arrayidx30.us78.8, align 4, !tbaa !5 %cmp31.us79.8 = icmp eq i32 %39, 0 br i1 %cmp31.us79.8, label %if.then.us80.8, label %for.inc34.us85.8 if.then.us80.8: ; preds = %for.inc34.us85.7 %call33.us84.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 9) br label %for.inc34.us85.8 for.inc34.us85.8: ; preds = %if.then.us80.8, %for.inc34.us85.7 %arrayidx30.us78.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9 %40 = load i32, ptr %arrayidx30.us78.9, align 4, !tbaa !5 %cmp31.us79.9 = icmp eq i32 %40, 0 br i1 %cmp31.us79.9, label %if.then.us80.9, label %for.inc34.us85.9 if.then.us80.9: ; preds = %for.inc34.us85.8 %call33.us84.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 10) br label %for.inc34.us85.9 for.inc34.us85.9: ; preds = %if.then.us80.9, %for.inc34.us85.8 %arrayidx30.us78.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10 %41 = load i32, ptr %arrayidx30.us78.10, align 4, !tbaa !5 %cmp31.us79.10 = icmp eq i32 %41, 0 br i1 %cmp31.us79.10, label %if.then.us80.10, label %for.inc34.us85.10 if.then.us80.10: ; preds = %for.inc34.us85.9 %call33.us84.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 11) br label %for.inc34.us85.10 for.inc34.us85.10: ; preds = %if.then.us80.10, %for.inc34.us85.9 %arrayidx30.us78.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11 %42 = load i32, ptr %arrayidx30.us78.11, align 4, !tbaa !5 %cmp31.us79.11 = icmp eq i32 %42, 0 br i1 %cmp31.us79.11, label %if.then.us80.11, label %for.inc34.us85.11 if.then.us80.11: ; preds = %for.inc34.us85.10 %call33.us84.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 12) br label %for.inc34.us85.11 for.inc34.us85.11: ; preds = %if.then.us80.11, %for.inc34.us85.10 %arrayidx30.us78.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12 %43 = load i32, ptr %arrayidx30.us78.12, align 4, !tbaa !5 %cmp31.us79.12 = icmp eq i32 %43, 0 br i1 %cmp31.us79.12, label %for.inc37.sink.split, label %for.inc37 if.then: ; preds = %for.body26.preheader %call33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 1) br label %for.inc34 for.inc34: ; preds = %for.body26.preheader, %if.then %arrayidx30.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1 %44 = load i32, ptr %arrayidx30.1, align 4, !tbaa !5 %cmp31.1 = icmp eq i32 %44, 0 br i1 %cmp31.1, label %if.then.1, label %for.inc34.1 if.then.1: ; preds = %for.inc34 %call33.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 2) br label %for.inc34.1 for.inc34.1: ; preds = %if.then.1, %for.inc34 %arrayidx30.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2 %45 = load i32, ptr %arrayidx30.2, align 4, !tbaa !5 %cmp31.2 = icmp eq i32 %45, 0 br i1 %cmp31.2, label %if.then.2, label %for.inc34.2 if.then.2: ; preds = %for.inc34.1 %call33.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 3) br label %for.inc34.2 for.inc34.2: ; preds = %if.then.2, %for.inc34.1 %arrayidx30.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3 %46 = load i32, ptr %arrayidx30.3, align 4, !tbaa !5 %cmp31.3 = icmp eq i32 %46, 0 br i1 %cmp31.3, label %if.then.3, label %for.inc34.3 if.then.3: ; preds = %for.inc34.2 %call33.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 4) br label %for.inc34.3 for.inc34.3: ; preds = %if.then.3, %for.inc34.2 %arrayidx30.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4 %47 = load i32, ptr %arrayidx30.4, align 4, !tbaa !5 %cmp31.4 = icmp eq i32 %47, 0 br i1 %cmp31.4, label %if.then.4, label %for.inc34.4 if.then.4: ; preds = %for.inc34.3 %call33.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 5) br label %for.inc34.4 for.inc34.4: ; preds = %if.then.4, %for.inc34.3 %arrayidx30.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5 %48 = load i32, ptr %arrayidx30.5, align 4, !tbaa !5 %cmp31.5 = icmp eq i32 %48, 0 br i1 %cmp31.5, label %if.then.5, label %for.inc34.5 if.then.5: ; preds = %for.inc34.4 %call33.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 6) br label %for.inc34.5 for.inc34.5: ; preds = %if.then.5, %for.inc34.4 %arrayidx30.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6 %49 = load i32, ptr %arrayidx30.6, align 4, !tbaa !5 %cmp31.6 = icmp eq i32 %49, 0 br i1 %cmp31.6, label %if.then.6, label %for.inc34.6 if.then.6: ; preds = %for.inc34.5 %call33.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 7) br label %for.inc34.6 for.inc34.6: ; preds = %if.then.6, %for.inc34.5 %arrayidx30.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7 %50 = load i32, ptr %arrayidx30.7, align 4, !tbaa !5 %cmp31.7 = icmp eq i32 %50, 0 br i1 %cmp31.7, label %if.then.7, label %for.inc34.7 if.then.7: ; preds = %for.inc34.6 %call33.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 8) br label %for.inc34.7 for.inc34.7: ; preds = %if.then.7, %for.inc34.6 %arrayidx30.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8 %51 = load i32, ptr %arrayidx30.8, align 4, !tbaa !5 %cmp31.8 = icmp eq i32 %51, 0 br i1 %cmp31.8, label %if.then.8, label %for.inc34.8 if.then.8: ; preds = %for.inc34.7 %call33.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 9) br label %for.inc34.8 for.inc34.8: ; preds = %if.then.8, %for.inc34.7 %arrayidx30.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9 %52 = load i32, ptr %arrayidx30.9, align 4, !tbaa !5 %cmp31.9 = icmp eq i32 %52, 0 br i1 %cmp31.9, label %if.then.9, label %for.inc34.9 if.then.9: ; preds = %for.inc34.8 %call33.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 10) br label %for.inc34.9 for.inc34.9: ; preds = %if.then.9, %for.inc34.8 %arrayidx30.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10 %53 = load i32, ptr %arrayidx30.10, align 4, !tbaa !5 %cmp31.10 = icmp eq i32 %53, 0 br i1 %cmp31.10, label %if.then.10, label %for.inc34.10 if.then.10: ; preds = %for.inc34.9 %call33.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 11) br label %for.inc34.10 for.inc34.10: ; preds = %if.then.10, %for.inc34.9 %arrayidx30.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11 %54 = load i32, ptr %arrayidx30.11, align 4, !tbaa !5 %cmp31.11 = icmp eq i32 %54, 0 br i1 %cmp31.11, label %if.then.11, label %for.inc34.11 if.then.11: ; preds = %for.inc34.10 %call33.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 12) br label %for.inc34.11 for.inc34.11: ; preds = %if.then.11, %for.inc34.10 %arrayidx30.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12 %55 = load i32, ptr %arrayidx30.12, align 4, !tbaa !5 %cmp31.12 = icmp eq i32 %55, 0 br i1 %cmp31.12, label %for.inc37.sink.split, label %for.inc37 for.inc37.sink.split: ; preds = %for.inc34.11, %for.inc34.us85.11, %for.inc34.us71.11, %for.inc34.us.11 %.sink = phi i32 [ 68, %for.inc34.us.11 ], [ 72, %for.inc34.us71.11 ], [ 67, %for.inc34.us85.11 ], [ 83, %for.inc34.11 ] %call33.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.sink, i32 noundef 13) br label %for.inc37 for.inc37: ; preds = %for.inc37.sink.split, %for.inc34.11, %for.inc34.us85.11, %for.inc34.us71.11, %for.inc34.us.11 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %for.end39, label %for.cond24.preheader, !llvm.loop !12 for.end39: ; preds = %for.inc37 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %cards) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @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 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { 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 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include<stdio.h> int main(){ int cards[4][14] = {}; char mark; int num,n; scanf("%d",&n); for(int i=0;i<n;i++){ scanf("%c %c %d",&mark,&mark,&num); //printf("%c %d\n",mark,num); int q = 0; if(mark == 'S')q=0; else if(mark == 'H')q=1; else if(mark == 'C')q=2; else if(mark == 'D')q=3; cards[q][num] = 1; } for(int i=0;i<4;i++){ if(i == 0)mark='S'; else if(i == 1)mark='H'; else if(i == 2)mark='C'; else if(i == 3)mark='D'; for(int j=1;j<14;j++){ if(cards[i][j]==0)printf("%c %d\n",mark,j); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215117/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215117/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [9 x i8] c"%c %c %d\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 @switch.table.main = private unnamed_addr constant [6 x i64] [i64 2, i64 3, i64 0, i64 0, i64 0, i64 1], align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %cards = alloca [4 x [14 x i32]], align 16 %mark = alloca i8, align 1 %num = alloca i32, align 4 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %cards) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(224) %cards, i8 0, i64 224, i1 false) call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %mark) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #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 %cmp79 = icmp sgt i32 %0, 0 br i1 %cmp79, label %for.body, label %for.body28.preheader for.body28.preheader: ; preds = %if.end20, %entry br label %for.body28 for.body: ; preds = %entry, %if.end20 %i.080 = phi i32 [ %inc, %if.end20 ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %mark, ptr noundef nonnull %mark, ptr noundef nonnull %num) %1 = load i8, ptr %mark, align 1, !tbaa !9 %switch.tableidx = add i8 %1, -67 %2 = icmp ult i8 %switch.tableidx, 6 br i1 %2, label %switch.lookup, label %if.end20 switch.lookup: ; preds = %for.body %3 = sext i8 %switch.tableidx to i64 %switch.gep = getelementptr inbounds [6 x i64], ptr @switch.table.main, i64 0, i64 %3 %switch.load = load i64, ptr %switch.gep, align 8 br label %if.end20 if.end20: ; preds = %switch.lookup, %for.body %q.0 = phi i64 [ 0, %for.body ], [ %switch.load, %switch.lookup ] %4 = load i32, ptr %num, align 4, !tbaa !5 %idxprom21 = sext i32 %4 to i64 %arrayidx22 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 %q.0, i64 %idxprom21 store i32 1, ptr %arrayidx22, align 4, !tbaa !5 %inc = add nuw nsw i32 %i.080, 1 %5 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %5 br i1 %cmp, label %for.body, label %for.body28.preheader, !llvm.loop !10 for.cond.cleanup27: ; preds = %for.inc63.12 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %mark) #4 call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %cards) #4 ret i32 0 for.body28: ; preds = %for.body28.preheader, %for.inc63.12 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc63.12 ], [ 0, %for.body28.preheader ] %6 = trunc i64 %indvars.iv to i32 switch i32 %6, label %if.end47 [ i32 0, label %if.then31 i32 1, label %if.then35 i32 2, label %if.then39 i32 3, label %if.then43 ] if.then31: ; preds = %for.body28 store i8 83, ptr %mark, align 1, !tbaa !9 br label %if.end47 if.then35: ; preds = %for.body28 store i8 72, ptr %mark, align 1, !tbaa !9 br label %if.end47 if.then39: ; preds = %for.body28 store i8 67, ptr %mark, align 1, !tbaa !9 br label %if.end47 if.then43: ; preds = %for.body28 store i8 68, ptr %mark, align 1, !tbaa !9 br label %if.end47 if.end47: ; preds = %for.body28, %if.then35, %if.then43, %if.then39, %if.then31 %arrayidx56 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1 %7 = load i32, ptr %arrayidx56, align 4, !tbaa !5 %cmp57 = icmp eq i32 %7, 0 br i1 %cmp57, label %if.then59, label %for.inc63 if.then59: ; preds = %if.end47 %8 = load i8, ptr %mark, align 1, !tbaa !9 %conv60 = sext i8 %8 to i32 %call61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv60, i32 noundef 1) br label %for.inc63 for.inc63: ; preds = %if.end47, %if.then59 %arrayidx56.1 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2 %9 = load i32, ptr %arrayidx56.1, align 8, !tbaa !5 %cmp57.1 = icmp eq i32 %9, 0 br i1 %cmp57.1, label %if.then59.1, label %for.inc63.1 if.then59.1: ; preds = %for.inc63 %10 = load i8, ptr %mark, align 1, !tbaa !9 %conv60.1 = sext i8 %10 to i32 %call61.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv60.1, i32 noundef 2) br label %for.inc63.1 for.inc63.1: ; preds = %if.then59.1, %for.inc63 %arrayidx56.2 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3 %11 = load i32, ptr %arrayidx56.2, align 4, !tbaa !5 %cmp57.2 = icmp eq i32 %11, 0 br i1 %cmp57.2, label %if.then59.2, label %for.inc63.2 if.then59.2: ; preds = %for.inc63.1 %12 = load i8, ptr %mark, align 1, !tbaa !9 %conv60.2 = sext i8 %12 to i32 %call61.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv60.2, i32 noundef 3) br label %for.inc63.2 for.inc63.2: ; preds = %if.then59.2, %for.inc63.1 %arrayidx56.3 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4 %13 = load i32, ptr %arrayidx56.3, align 8, !tbaa !5 %cmp57.3 = icmp eq i32 %13, 0 br i1 %cmp57.3, label %if.then59.3, label %for.inc63.3 if.then59.3: ; preds = %for.inc63.2 %14 = load i8, ptr %mark, align 1, !tbaa !9 %conv60.3 = sext i8 %14 to i32 %call61.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv60.3, i32 noundef 4) br label %for.inc63.3 for.inc63.3: ; preds = %if.then59.3, %for.inc63.2 %arrayidx56.4 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5 %15 = load i32, ptr %arrayidx56.4, align 4, !tbaa !5 %cmp57.4 = icmp eq i32 %15, 0 br i1 %cmp57.4, label %if.then59.4, label %for.inc63.4 if.then59.4: ; preds = %for.inc63.3 %16 = load i8, ptr %mark, align 1, !tbaa !9 %conv60.4 = sext i8 %16 to i32 %call61.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv60.4, i32 noundef 5) br label %for.inc63.4 for.inc63.4: ; preds = %if.then59.4, %for.inc63.3 %arrayidx56.5 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6 %17 = load i32, ptr %arrayidx56.5, align 8, !tbaa !5 %cmp57.5 = icmp eq i32 %17, 0 br i1 %cmp57.5, label %if.then59.5, label %for.inc63.5 if.then59.5: ; preds = %for.inc63.4 %18 = load i8, ptr %mark, align 1, !tbaa !9 %conv60.5 = sext i8 %18 to i32 %call61.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv60.5, i32 noundef 6) br label %for.inc63.5 for.inc63.5: ; preds = %if.then59.5, %for.inc63.4 %arrayidx56.6 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7 %19 = load i32, ptr %arrayidx56.6, align 4, !tbaa !5 %cmp57.6 = icmp eq i32 %19, 0 br i1 %cmp57.6, label %if.then59.6, label %for.inc63.6 if.then59.6: ; preds = %for.inc63.5 %20 = load i8, ptr %mark, align 1, !tbaa !9 %conv60.6 = sext i8 %20 to i32 %call61.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv60.6, i32 noundef 7) br label %for.inc63.6 for.inc63.6: ; preds = %if.then59.6, %for.inc63.5 %arrayidx56.7 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8 %21 = load i32, ptr %arrayidx56.7, align 8, !tbaa !5 %cmp57.7 = icmp eq i32 %21, 0 br i1 %cmp57.7, label %if.then59.7, label %for.inc63.7 if.then59.7: ; preds = %for.inc63.6 %22 = load i8, ptr %mark, align 1, !tbaa !9 %conv60.7 = sext i8 %22 to i32 %call61.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv60.7, i32 noundef 8) br label %for.inc63.7 for.inc63.7: ; preds = %if.then59.7, %for.inc63.6 %arrayidx56.8 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9 %23 = load i32, ptr %arrayidx56.8, align 4, !tbaa !5 %cmp57.8 = icmp eq i32 %23, 0 br i1 %cmp57.8, label %if.then59.8, label %for.inc63.8 if.then59.8: ; preds = %for.inc63.7 %24 = load i8, ptr %mark, align 1, !tbaa !9 %conv60.8 = sext i8 %24 to i32 %call61.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv60.8, i32 noundef 9) br label %for.inc63.8 for.inc63.8: ; preds = %if.then59.8, %for.inc63.7 %arrayidx56.9 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10 %25 = load i32, ptr %arrayidx56.9, align 8, !tbaa !5 %cmp57.9 = icmp eq i32 %25, 0 br i1 %cmp57.9, label %if.then59.9, label %for.inc63.9 if.then59.9: ; preds = %for.inc63.8 %26 = load i8, ptr %mark, align 1, !tbaa !9 %conv60.9 = sext i8 %26 to i32 %call61.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv60.9, i32 noundef 10) br label %for.inc63.9 for.inc63.9: ; preds = %if.then59.9, %for.inc63.8 %arrayidx56.10 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11 %27 = load i32, ptr %arrayidx56.10, align 4, !tbaa !5 %cmp57.10 = icmp eq i32 %27, 0 br i1 %cmp57.10, label %if.then59.10, label %for.inc63.10 if.then59.10: ; preds = %for.inc63.9 %28 = load i8, ptr %mark, align 1, !tbaa !9 %conv60.10 = sext i8 %28 to i32 %call61.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv60.10, i32 noundef 11) br label %for.inc63.10 for.inc63.10: ; preds = %if.then59.10, %for.inc63.9 %arrayidx56.11 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12 %29 = load i32, ptr %arrayidx56.11, align 8, !tbaa !5 %cmp57.11 = icmp eq i32 %29, 0 br i1 %cmp57.11, label %if.then59.11, label %for.inc63.11 if.then59.11: ; preds = %for.inc63.10 %30 = load i8, ptr %mark, align 1, !tbaa !9 %conv60.11 = sext i8 %30 to i32 %call61.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv60.11, i32 noundef 12) br label %for.inc63.11 for.inc63.11: ; preds = %if.then59.11, %for.inc63.10 %arrayidx56.12 = getelementptr inbounds [4 x [14 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 13 %31 = load i32, ptr %arrayidx56.12, align 4, !tbaa !5 %cmp57.12 = icmp eq i32 %31, 0 br i1 %cmp57.12, label %if.then59.12, label %for.inc63.12 if.then59.12: ; preds = %for.inc63.11 %32 = load i8, ptr %mark, align 1, !tbaa !9 %conv60.12 = sext i8 %32 to i32 %call61.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv60.12, i32 noundef 13) br label %for.inc63.12 for.inc63.12: ; preds = %if.then59.12, %for.inc63.11 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %for.cond.cleanup27, label %for.body28, !llvm.loop !12 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include<stdio.h> int main(void){ int n,i=0,j=1; scanf("%d", &n); //printf("%d\n",n); int M; M=n; int N[n]; char m[n]; for(i=0;i<M*2;i++){ //printf(" %d\n\n",i); scanf("%c %d", &m[i/2], &N[i/2]); //printf("%c %d\n",m[i],N[i]); //printf(" /%d\n\n",i); // printf("%a %d\n\n",m[i],N[i]); } for(j=1;j<=13;j++){ i=0; while(1){ if(i==n) { printf("S %d\n",j); break; } if(m[i]==83&&N[i]==j) break; i++; } } for(j=1;j<=13;j++){ i=0; while(1){ if(i==n) { printf("H %d\n",j); break; } if(m[i]==72&&N[i]==j) break; i++; } } for(j=1;j<=13;j++){ i=0; while(1){ if(i==n) { printf("C %d\n",j); break; } if(m[i]==67&&N[i]==j) break; i++; } } for(j=1;j<=13;j++){ i=0; while(1){ if(i==n) { printf("D %d\n",j); break; } if(m[i]==68&&N[i]==j) break; i++; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215168/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215168/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%c %d\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"S %d\0A\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"H %d\0A\00", align 1 @.str.4 = private unnamed_addr constant [6 x i8] c"C %d\0A\00", align 1 @.str.5 = private unnamed_addr constant [6 x i8] c"D %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = zext i32 %0 to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %n, align 4, !tbaa !5 %4 = zext i32 %3 to i64 %vla1 = alloca i8, i64 %4, align 16 %cmp144 = icmp sgt i32 %0, 0 br i1 %cmp144, label %for.body.preheader, label %for.cond6.preheader for.body.preheader: ; preds = %entry %mul = shl nuw i32 %0, 1 %smax = call i32 @llvm.smax.i32(i32 %mul, i32 1) br label %for.body for.cond6.preheader.loopexit: ; preds = %for.body %.pre = load i32, ptr %n, align 4, !tbaa !5 br label %for.cond6.preheader for.cond6.preheader: ; preds = %for.cond6.preheader.loopexit, %entry %5 = phi i32 [ %.pre, %for.cond6.preheader.loopexit ], [ %3, %entry ] %cmp9146 = icmp eq i32 %5, 0 br i1 %cmp9146, label %if.then, label %if.end.preheader for.body: ; preds = %for.body.preheader, %for.body %i.0145 = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ] %div143 = lshr i32 %i.0145, 1 %idxprom = zext i32 %div143 to i64 %arrayidx = getelementptr inbounds i8, ptr %vla1, i64 %idxprom %arrayidx4 = getelementptr inbounds i32, ptr %vla, i64 %idxprom %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx4) %inc = add nuw nsw i32 %i.0145, 1 %exitcond.not = icmp eq i32 %inc, %smax br i1 %exitcond.not, label %for.cond6.preheader.loopexit, label %for.body, !llvm.loop !9 if.end.preheader: ; preds = %for.cond6.preheader %6 = zext i32 %5 to i64 br label %if.end if.then: ; preds = %if.end20, %for.cond6.preheader %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 1) %.pre172 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc22 if.end: ; preds = %if.end.preheader, %if.end20 %indvars.iv = phi i64 [ 0, %if.end.preheader ], [ %indvars.iv.next, %if.end20 ] %arrayidx12 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv %7 = load i8, ptr %arrayidx12, align 1, !tbaa !11 %cmp13 = icmp eq i8 %7, 83 br i1 %cmp13, label %land.lhs.true, label %if.end20 land.lhs.true: ; preds = %if.end %arrayidx16 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %8 = load i32, ptr %arrayidx16, align 4, !tbaa !5 %cmp17 = icmp eq i32 %8, 1 br i1 %cmp17, label %for.inc22, label %if.end20 if.end20: ; preds = %land.lhs.true, %if.end %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %cmp9 = icmp eq i64 %indvars.iv.next, %6 br i1 %cmp9, label %if.then, label %if.end for.inc22: ; preds = %land.lhs.true, %if.then %9 = phi i32 [ %.pre172, %if.then ], [ %5, %land.lhs.true ] %cmp9146.1 = icmp eq i32 %9, 0 br i1 %cmp9146.1, label %if.then.1, label %if.end.preheader.1 if.end.preheader.1: ; preds = %for.inc22 %10 = zext i32 %9 to i64 br label %if.end.1 if.end.1: ; preds = %if.end20.1, %if.end.preheader.1 %indvars.iv.1 = phi i64 [ 0, %if.end.preheader.1 ], [ %indvars.iv.next.1, %if.end20.1 ] %arrayidx12.1 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv.1 %11 = load i8, ptr %arrayidx12.1, align 1, !tbaa !11 %cmp13.1 = icmp eq i8 %11, 83 br i1 %cmp13.1, label %land.lhs.true.1, label %if.end20.1 land.lhs.true.1: ; preds = %if.end.1 %arrayidx16.1 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.1 %12 = load i32, ptr %arrayidx16.1, align 4, !tbaa !5 %cmp17.1 = icmp eq i32 %12, 2 br i1 %cmp17.1, label %for.inc22.1, label %if.end20.1 if.end20.1: ; preds = %land.lhs.true.1, %if.end.1 %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1 %cmp9.1 = icmp eq i64 %indvars.iv.next.1, %10 br i1 %cmp9.1, label %if.then.1, label %if.end.1 if.then.1: ; preds = %if.end20.1, %for.inc22 %call10.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 2) %.pre173 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc22.1 for.inc22.1: ; preds = %land.lhs.true.1, %if.then.1 %13 = phi i32 [ %.pre173, %if.then.1 ], [ %9, %land.lhs.true.1 ] %cmp9146.2 = icmp eq i32 %13, 0 br i1 %cmp9146.2, label %if.then.2, label %if.end.preheader.2 if.end.preheader.2: ; preds = %for.inc22.1 %14 = zext i32 %13 to i64 br label %if.end.2 if.end.2: ; preds = %if.end20.2, %if.end.preheader.2 %indvars.iv.2 = phi i64 [ 0, %if.end.preheader.2 ], [ %indvars.iv.next.2, %if.end20.2 ] %arrayidx12.2 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv.2 %15 = load i8, ptr %arrayidx12.2, align 1, !tbaa !11 %cmp13.2 = icmp eq i8 %15, 83 br i1 %cmp13.2, label %land.lhs.true.2, label %if.end20.2 land.lhs.true.2: ; preds = %if.end.2 %arrayidx16.2 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.2 %16 = load i32, ptr %arrayidx16.2, align 4, !tbaa !5 %cmp17.2 = icmp eq i32 %16, 3 br i1 %cmp17.2, label %for.inc22.2, label %if.end20.2 if.end20.2: ; preds = %land.lhs.true.2, %if.end.2 %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.2, 1 %cmp9.2 = icmp eq i64 %indvars.iv.next.2, %14 br i1 %cmp9.2, label %if.then.2, label %if.end.2 if.then.2: ; preds = %if.end20.2, %for.inc22.1 %call10.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 3) %.pre174 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc22.2 for.inc22.2: ; preds = %land.lhs.true.2, %if.then.2 %17 = phi i32 [ %.pre174, %if.then.2 ], [ %13, %land.lhs.true.2 ] %cmp9146.3 = icmp eq i32 %17, 0 br i1 %cmp9146.3, label %if.then.3, label %if.end.preheader.3 if.end.preheader.3: ; preds = %for.inc22.2 %18 = zext i32 %17 to i64 br label %if.end.3 if.end.3: ; preds = %if.end20.3, %if.end.preheader.3 %indvars.iv.3 = phi i64 [ 0, %if.end.preheader.3 ], [ %indvars.iv.next.3, %if.end20.3 ] %arrayidx12.3 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv.3 %19 = load i8, ptr %arrayidx12.3, align 1, !tbaa !11 %cmp13.3 = icmp eq i8 %19, 83 br i1 %cmp13.3, label %land.lhs.true.3, label %if.end20.3 land.lhs.true.3: ; preds = %if.end.3 %arrayidx16.3 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.3 %20 = load i32, ptr %arrayidx16.3, align 4, !tbaa !5 %cmp17.3 = icmp eq i32 %20, 4 br i1 %cmp17.3, label %for.inc22.3, label %if.end20.3 if.end20.3: ; preds = %land.lhs.true.3, %if.end.3 %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv.3, 1 %cmp9.3 = icmp eq i64 %indvars.iv.next.3, %18 br i1 %cmp9.3, label %if.then.3, label %if.end.3 if.then.3: ; preds = %if.end20.3, %for.inc22.2 %call10.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 4) %.pre175 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc22.3 for.inc22.3: ; preds = %land.lhs.true.3, %if.then.3 %21 = phi i32 [ %.pre175, %if.then.3 ], [ %17, %land.lhs.true.3 ] %cmp9146.4 = icmp eq i32 %21, 0 br i1 %cmp9146.4, label %if.then.4, label %if.end.preheader.4 if.end.preheader.4: ; preds = %for.inc22.3 %22 = zext i32 %21 to i64 br label %if.end.4 if.end.4: ; preds = %if.end20.4, %if.end.preheader.4 %indvars.iv.4 = phi i64 [ 0, %if.end.preheader.4 ], [ %indvars.iv.next.4, %if.end20.4 ] %arrayidx12.4 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv.4 %23 = load i8, ptr %arrayidx12.4, align 1, !tbaa !11 %cmp13.4 = icmp eq i8 %23, 83 br i1 %cmp13.4, label %land.lhs.true.4, label %if.end20.4 land.lhs.true.4: ; preds = %if.end.4 %arrayidx16.4 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.4 %24 = load i32, ptr %arrayidx16.4, align 4, !tbaa !5 %cmp17.4 = icmp eq i32 %24, 5 br i1 %cmp17.4, label %for.inc22.4, label %if.end20.4 if.end20.4: ; preds = %land.lhs.true.4, %if.end.4 %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv.4, 1 %cmp9.4 = icmp eq i64 %indvars.iv.next.4, %22 br i1 %cmp9.4, label %if.then.4, label %if.end.4 if.then.4: ; preds = %if.end20.4, %for.inc22.3 %call10.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 5) %.pre176 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc22.4 for.inc22.4: ; preds = %land.lhs.true.4, %if.then.4 %25 = phi i32 [ %.pre176, %if.then.4 ], [ %21, %land.lhs.true.4 ] %cmp9146.5 = icmp eq i32 %25, 0 br i1 %cmp9146.5, label %if.then.5, label %if.end.preheader.5 if.end.preheader.5: ; preds = %for.inc22.4 %26 = zext i32 %25 to i64 br label %if.end.5 if.end.5: ; preds = %if.end20.5, %if.end.preheader.5 %indvars.iv.5 = phi i64 [ 0, %if.end.preheader.5 ], [ %indvars.iv.next.5, %if.end20.5 ] %arrayidx12.5 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv.5 %27 = load i8, ptr %arrayidx12.5, align 1, !tbaa !11 %cmp13.5 = icmp eq i8 %27, 83 br i1 %cmp13.5, label %land.lhs.true.5, label %if.end20.5 land.lhs.true.5: ; preds = %if.end.5 %arrayidx16.5 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.5 %28 = load i32, ptr %arrayidx16.5, align 4, !tbaa !5 %cmp17.5 = icmp eq i32 %28, 6 br i1 %cmp17.5, label %for.inc22.5, label %if.end20.5 if.end20.5: ; preds = %land.lhs.true.5, %if.end.5 %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv.5, 1 %cmp9.5 = icmp eq i64 %indvars.iv.next.5, %26 br i1 %cmp9.5, label %if.then.5, label %if.end.5 if.then.5: ; preds = %if.end20.5, %for.inc22.4 %call10.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 6) %.pre177 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc22.5 for.inc22.5: ; preds = %land.lhs.true.5, %if.then.5 %29 = phi i32 [ %.pre177, %if.then.5 ], [ %25, %land.lhs.true.5 ] %cmp9146.6 = icmp eq i32 %29, 0 br i1 %cmp9146.6, label %if.then.6, label %if.end.preheader.6 if.end.preheader.6: ; preds = %for.inc22.5 %30 = zext i32 %29 to i64 br label %if.end.6 if.end.6: ; preds = %if.end20.6, %if.end.preheader.6 %indvars.iv.6 = phi i64 [ 0, %if.end.preheader.6 ], [ %indvars.iv.next.6, %if.end20.6 ] %arrayidx12.6 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv.6 %31 = load i8, ptr %arrayidx12.6, align 1, !tbaa !11 %cmp13.6 = icmp eq i8 %31, 83 br i1 %cmp13.6, label %land.lhs.true.6, label %if.end20.6 land.lhs.true.6: ; preds = %if.end.6 %arrayidx16.6 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.6 %32 = load i32, ptr %arrayidx16.6, align 4, !tbaa !5 %cmp17.6 = icmp eq i32 %32, 7 br i1 %cmp17.6, label %for.inc22.6, label %if.end20.6 if.end20.6: ; preds = %land.lhs.true.6, %if.end.6 %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv.6, 1 %cmp9.6 = icmp eq i64 %indvars.iv.next.6, %30 br i1 %cmp9.6, label %if.then.6, label %if.end.6 if.then.6: ; preds = %if.end20.6, %for.inc22.5 %call10.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 7) %.pre178 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc22.6 for.inc22.6: ; preds = %land.lhs.true.6, %if.then.6 %33 = phi i32 [ %.pre178, %if.then.6 ], [ %29, %land.lhs.true.6 ] %cmp9146.7 = icmp eq i32 %33, 0 br i1 %cmp9146.7, label %if.then.7, label %if.end.preheader.7 if.end.preheader.7: ; preds = %for.inc22.6 %34 = zext i32 %33 to i64 br label %if.end.7 if.end.7: ; preds = %if.end20.7, %if.end.preheader.7 %indvars.iv.7 = phi i64 [ 0, %if.end.preheader.7 ], [ %indvars.iv.next.7, %if.end20.7 ] %arrayidx12.7 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv.7 %35 = load i8, ptr %arrayidx12.7, align 1, !tbaa !11 %cmp13.7 = icmp eq i8 %35, 83 br i1 %cmp13.7, label %land.lhs.true.7, label %if.end20.7 land.lhs.true.7: ; preds = %if.end.7 %arrayidx16.7 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.7 %36 = load i32, ptr %arrayidx16.7, align 4, !tbaa !5 %cmp17.7 = icmp eq i32 %36, 8 br i1 %cmp17.7, label %for.inc22.7, label %if.end20.7 if.end20.7: ; preds = %land.lhs.true.7, %if.end.7 %indvars.iv.next.7 = add nuw nsw i64 %indvars.iv.7, 1 %cmp9.7 = icmp eq i64 %indvars.iv.next.7, %34 br i1 %cmp9.7, label %if.then.7, label %if.end.7 if.then.7: ; preds = %if.end20.7, %for.inc22.6 %call10.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 8) %.pre179 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc22.7 for.inc22.7: ; preds = %land.lhs.true.7, %if.then.7 %37 = phi i32 [ %.pre179, %if.then.7 ], [ %33, %land.lhs.true.7 ] %cmp9146.8 = icmp eq i32 %37, 0 br i1 %cmp9146.8, label %if.then.8, label %if.end.preheader.8 if.end.preheader.8: ; preds = %for.inc22.7 %38 = zext i32 %37 to i64 br label %if.end.8 if.end.8: ; preds = %if.end20.8, %if.end.preheader.8 %indvars.iv.8 = phi i64 [ 0, %if.end.preheader.8 ], [ %indvars.iv.next.8, %if.end20.8 ] %arrayidx12.8 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv.8 %39 = load i8, ptr %arrayidx12.8, align 1, !tbaa !11 %cmp13.8 = icmp eq i8 %39, 83 br i1 %cmp13.8, label %land.lhs.true.8, label %if.end20.8 land.lhs.true.8: ; preds = %if.end.8 %arrayidx16.8 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.8 %40 = load i32, ptr %arrayidx16.8, align 4, !tbaa !5 %cmp17.8 = icmp eq i32 %40, 9 br i1 %cmp17.8, label %for.inc22.8, label %if.end20.8 if.end20.8: ; preds = %land.lhs.true.8, %if.end.8 %indvars.iv.next.8 = add nuw nsw i64 %indvars.iv.8, 1 %cmp9.8 = icmp eq i64 %indvars.iv.next.8, %38 br i1 %cmp9.8, label %if.then.8, label %if.end.8 if.then.8: ; preds = %if.end20.8, %for.inc22.7 %call10.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 9) %.pre180 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc22.8 for.inc22.8: ; preds = %land.lhs.true.8, %if.then.8 %41 = phi i32 [ %.pre180, %if.then.8 ], [ %37, %land.lhs.true.8 ] %cmp9146.9 = icmp eq i32 %41, 0 br i1 %cmp9146.9, label %if.then.9, label %if.end.preheader.9 if.end.preheader.9: ; preds = %for.inc22.8 %42 = zext i32 %41 to i64 br label %if.end.9 if.end.9: ; preds = %if.end20.9, %if.end.preheader.9 %indvars.iv.9 = phi i64 [ 0, %if.end.preheader.9 ], [ %indvars.iv.next.9, %if.end20.9 ] %arrayidx12.9 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv.9 %43 = load i8, ptr %arrayidx12.9, align 1, !tbaa !11 %cmp13.9 = icmp eq i8 %43, 83 br i1 %cmp13.9, label %land.lhs.true.9, label %if.end20.9 land.lhs.true.9: ; preds = %if.end.9 %arrayidx16.9 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.9 %44 = load i32, ptr %arrayidx16.9, align 4, !tbaa !5 %cmp17.9 = icmp eq i32 %44, 10 br i1 %cmp17.9, label %for.inc22.9, label %if.end20.9 if.end20.9: ; preds = %land.lhs.true.9, %if.end.9 %indvars.iv.next.9 = add nuw nsw i64 %indvars.iv.9, 1 %cmp9.9 = icmp eq i64 %indvars.iv.next.9, %42 br i1 %cmp9.9, label %if.then.9, label %if.end.9 if.then.9: ; preds = %if.end20.9, %for.inc22.8 %call10.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 10) %.pre181 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc22.9 for.inc22.9: ; preds = %land.lhs.true.9, %if.then.9 %45 = phi i32 [ %.pre181, %if.then.9 ], [ %41, %land.lhs.true.9 ] %cmp9146.10 = icmp eq i32 %45, 0 br i1 %cmp9146.10, label %if.then.10, label %if.end.preheader.10 if.end.preheader.10: ; preds = %for.inc22.9 %46 = zext i32 %45 to i64 br label %if.end.10 if.end.10: ; preds = %if.end20.10, %if.end.preheader.10 %indvars.iv.10 = phi i64 [ 0, %if.end.preheader.10 ], [ %indvars.iv.next.10, %if.end20.10 ] %arrayidx12.10 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv.10 %47 = load i8, ptr %arrayidx12.10, align 1, !tbaa !11 %cmp13.10 = icmp eq i8 %47, 83 br i1 %cmp13.10, label %land.lhs.true.10, label %if.end20.10 land.lhs.true.10: ; preds = %if.end.10 %arrayidx16.10 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.10 %48 = load i32, ptr %arrayidx16.10, align 4, !tbaa !5 %cmp17.10 = icmp eq i32 %48, 11 br i1 %cmp17.10, label %for.inc22.10, label %if.end20.10 if.end20.10: ; preds = %land.lhs.true.10, %if.end.10 %indvars.iv.next.10 = add nuw nsw i64 %indvars.iv.10, 1 %cmp9.10 = icmp eq i64 %indvars.iv.next.10, %46 br i1 %cmp9.10, label %if.then.10, label %if.end.10 if.then.10: ; preds = %if.end20.10, %for.inc22.9 %call10.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 11) %.pre182 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc22.10 for.inc22.10: ; preds = %land.lhs.true.10, %if.then.10 %49 = phi i32 [ %.pre182, %if.then.10 ], [ %45, %land.lhs.true.10 ] %cmp9146.11 = icmp eq i32 %49, 0 br i1 %cmp9146.11, label %if.then.11, label %if.end.preheader.11 if.end.preheader.11: ; preds = %for.inc22.10 %50 = zext i32 %49 to i64 br label %if.end.11 if.end.11: ; preds = %if.end20.11, %if.end.preheader.11 %indvars.iv.11 = phi i64 [ 0, %if.end.preheader.11 ], [ %indvars.iv.next.11, %if.end20.11 ] %arrayidx12.11 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv.11 %51 = load i8, ptr %arrayidx12.11, align 1, !tbaa !11 %cmp13.11 = icmp eq i8 %51, 83 br i1 %cmp13.11, label %land.lhs.true.11, label %if.end20.11 land.lhs.true.11: ; preds = %if.end.11 %arrayidx16.11 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.11 %52 = load i32, ptr %arrayidx16.11, align 4, !tbaa !5 %cmp17.11 = icmp eq i32 %52, 12 br i1 %cmp17.11, label %for.inc22.11, label %if.end20.11 if.end20.11: ; preds = %land.lhs.true.11, %if.end.11 %indvars.iv.next.11 = add nuw nsw i64 %indvars.iv.11, 1 %cmp9.11 = icmp eq i64 %indvars.iv.next.11, %50 br i1 %cmp9.11, label %if.then.11, label %if.end.11 if.then.11: ; preds = %if.end20.11, %for.inc22.10 %call10.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 12) %.pre183 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc22.11 for.inc22.11: ; preds = %land.lhs.true.11, %if.then.11 %53 = phi i32 [ %.pre183, %if.then.11 ], [ %49, %land.lhs.true.11 ] %cmp9146.12 = icmp eq i32 %53, 0 br i1 %cmp9146.12, label %if.then.12, label %if.end.preheader.12 if.end.preheader.12: ; preds = %for.inc22.11 %54 = zext i32 %53 to i64 br label %if.end.12 if.end.12: ; preds = %if.end20.12, %if.end.preheader.12 %indvars.iv.12 = phi i64 [ 0, %if.end.preheader.12 ], [ %indvars.iv.next.12, %if.end20.12 ] %arrayidx12.12 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv.12 %55 = load i8, ptr %arrayidx12.12, align 1, !tbaa !11 %cmp13.12 = icmp eq i8 %55, 83 br i1 %cmp13.12, label %land.lhs.true.12, label %if.end20.12 land.lhs.true.12: ; preds = %if.end.12 %arrayidx16.12 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.12 %56 = load i32, ptr %arrayidx16.12, align 4, !tbaa !5 %cmp17.12 = icmp eq i32 %56, 13 br i1 %cmp17.12, label %for.inc22.12, label %if.end20.12 if.end20.12: ; preds = %land.lhs.true.12, %if.end.12 %indvars.iv.next.12 = add nuw nsw i64 %indvars.iv.12, 1 %cmp9.12 = icmp eq i64 %indvars.iv.next.12, %54 br i1 %cmp9.12, label %if.then.12, label %if.end.12 if.then.12: ; preds = %if.end20.12, %for.inc22.11 %call10.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 13) %.pre184 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc22.12 for.inc22.12: ; preds = %land.lhs.true.12, %if.then.12 %57 = phi i32 [ %.pre184, %if.then.12 ], [ %53, %land.lhs.true.12 ] %cmp31149 = icmp eq i32 %57, 0 br i1 %cmp31149, label %if.then33, label %if.end35.preheader if.end35.preheader: ; preds = %for.inc22.12 %58 = zext i32 %57 to i64 br label %if.end35 if.then33: ; preds = %if.end47, %for.inc22.12 %call34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1) %.pre185 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc50 if.end35: ; preds = %if.end35.preheader, %if.end47 %indvars.iv160 = phi i64 [ 0, %if.end35.preheader ], [ %indvars.iv.next161, %if.end47 ] %arrayidx37 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv160 %59 = load i8, ptr %arrayidx37, align 1, !tbaa !11 %cmp39 = icmp eq i8 %59, 72 br i1 %cmp39, label %land.lhs.true41, label %if.end47 land.lhs.true41: ; preds = %if.end35 %arrayidx43 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv160 %60 = load i32, ptr %arrayidx43, align 4, !tbaa !5 %cmp44 = icmp eq i32 %60, 1 br i1 %cmp44, label %for.inc50, label %if.end47 if.end47: ; preds = %land.lhs.true41, %if.end35 %indvars.iv.next161 = add nuw nsw i64 %indvars.iv160, 1 %cmp31 = icmp eq i64 %indvars.iv.next161, %58 br i1 %cmp31, label %if.then33, label %if.end35 for.inc50: ; preds = %land.lhs.true41, %if.then33 %61 = phi i32 [ %.pre185, %if.then33 ], [ %57, %land.lhs.true41 ] %cmp31149.1 = icmp eq i32 %61, 0 br i1 %cmp31149.1, label %if.then33.1, label %if.end35.preheader.1 if.end35.preheader.1: ; preds = %for.inc50 %62 = zext i32 %61 to i64 br label %if.end35.1 if.end35.1: ; preds = %if.end47.1, %if.end35.preheader.1 %indvars.iv160.1 = phi i64 [ 0, %if.end35.preheader.1 ], [ %indvars.iv.next161.1, %if.end47.1 ] %arrayidx37.1 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv160.1 %63 = load i8, ptr %arrayidx37.1, align 1, !tbaa !11 %cmp39.1 = icmp eq i8 %63, 72 br i1 %cmp39.1, label %land.lhs.true41.1, label %if.end47.1 land.lhs.true41.1: ; preds = %if.end35.1 %arrayidx43.1 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv160.1 %64 = load i32, ptr %arrayidx43.1, align 4, !tbaa !5 %cmp44.1 = icmp eq i32 %64, 2 br i1 %cmp44.1, label %for.inc50.1, label %if.end47.1 if.end47.1: ; preds = %land.lhs.true41.1, %if.end35.1 %indvars.iv.next161.1 = add nuw nsw i64 %indvars.iv160.1, 1 %cmp31.1 = icmp eq i64 %indvars.iv.next161.1, %62 br i1 %cmp31.1, label %if.then33.1, label %if.end35.1 if.then33.1: ; preds = %if.end47.1, %for.inc50 %call34.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2) %.pre186 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc50.1 for.inc50.1: ; preds = %land.lhs.true41.1, %if.then33.1 %65 = phi i32 [ %.pre186, %if.then33.1 ], [ %61, %land.lhs.true41.1 ] %cmp31149.2 = icmp eq i32 %65, 0 br i1 %cmp31149.2, label %if.then33.2, label %if.end35.preheader.2 if.end35.preheader.2: ; preds = %for.inc50.1 %66 = zext i32 %65 to i64 br label %if.end35.2 if.end35.2: ; preds = %if.end47.2, %if.end35.preheader.2 %indvars.iv160.2 = phi i64 [ 0, %if.end35.preheader.2 ], [ %indvars.iv.next161.2, %if.end47.2 ] %arrayidx37.2 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv160.2 %67 = load i8, ptr %arrayidx37.2, align 1, !tbaa !11 %cmp39.2 = icmp eq i8 %67, 72 br i1 %cmp39.2, label %land.lhs.true41.2, label %if.end47.2 land.lhs.true41.2: ; preds = %if.end35.2 %arrayidx43.2 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv160.2 %68 = load i32, ptr %arrayidx43.2, align 4, !tbaa !5 %cmp44.2 = icmp eq i32 %68, 3 br i1 %cmp44.2, label %for.inc50.2, label %if.end47.2 if.end47.2: ; preds = %land.lhs.true41.2, %if.end35.2 %indvars.iv.next161.2 = add nuw nsw i64 %indvars.iv160.2, 1 %cmp31.2 = icmp eq i64 %indvars.iv.next161.2, %66 br i1 %cmp31.2, label %if.then33.2, label %if.end35.2 if.then33.2: ; preds = %if.end47.2, %for.inc50.1 %call34.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3) %.pre187 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc50.2 for.inc50.2: ; preds = %land.lhs.true41.2, %if.then33.2 %69 = phi i32 [ %.pre187, %if.then33.2 ], [ %65, %land.lhs.true41.2 ] %cmp31149.3 = icmp eq i32 %69, 0 br i1 %cmp31149.3, label %if.then33.3, label %if.end35.preheader.3 if.end35.preheader.3: ; preds = %for.inc50.2 %70 = zext i32 %69 to i64 br label %if.end35.3 if.end35.3: ; preds = %if.end47.3, %if.end35.preheader.3 %indvars.iv160.3 = phi i64 [ 0, %if.end35.preheader.3 ], [ %indvars.iv.next161.3, %if.end47.3 ] %arrayidx37.3 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv160.3 %71 = load i8, ptr %arrayidx37.3, align 1, !tbaa !11 %cmp39.3 = icmp eq i8 %71, 72 br i1 %cmp39.3, label %land.lhs.true41.3, label %if.end47.3 land.lhs.true41.3: ; preds = %if.end35.3 %arrayidx43.3 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv160.3 %72 = load i32, ptr %arrayidx43.3, align 4, !tbaa !5 %cmp44.3 = icmp eq i32 %72, 4 br i1 %cmp44.3, label %for.inc50.3, label %if.end47.3 if.end47.3: ; preds = %land.lhs.true41.3, %if.end35.3 %indvars.iv.next161.3 = add nuw nsw i64 %indvars.iv160.3, 1 %cmp31.3 = icmp eq i64 %indvars.iv.next161.3, %70 br i1 %cmp31.3, label %if.then33.3, label %if.end35.3 if.then33.3: ; preds = %if.end47.3, %for.inc50.2 %call34.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4) %.pre188 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc50.3 for.inc50.3: ; preds = %land.lhs.true41.3, %if.then33.3 %73 = phi i32 [ %.pre188, %if.then33.3 ], [ %69, %land.lhs.true41.3 ] %cmp31149.4 = icmp eq i32 %73, 0 br i1 %cmp31149.4, label %if.then33.4, label %if.end35.preheader.4 if.end35.preheader.4: ; preds = %for.inc50.3 %74 = zext i32 %73 to i64 br label %if.end35.4 if.end35.4: ; preds = %if.end47.4, %if.end35.preheader.4 %indvars.iv160.4 = phi i64 [ 0, %if.end35.preheader.4 ], [ %indvars.iv.next161.4, %if.end47.4 ] %arrayidx37.4 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv160.4 %75 = load i8, ptr %arrayidx37.4, align 1, !tbaa !11 %cmp39.4 = icmp eq i8 %75, 72 br i1 %cmp39.4, label %land.lhs.true41.4, label %if.end47.4 land.lhs.true41.4: ; preds = %if.end35.4 %arrayidx43.4 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv160.4 %76 = load i32, ptr %arrayidx43.4, align 4, !tbaa !5 %cmp44.4 = icmp eq i32 %76, 5 br i1 %cmp44.4, label %for.inc50.4, label %if.end47.4 if.end47.4: ; preds = %land.lhs.true41.4, %if.end35.4 %indvars.iv.next161.4 = add nuw nsw i64 %indvars.iv160.4, 1 %cmp31.4 = icmp eq i64 %indvars.iv.next161.4, %74 br i1 %cmp31.4, label %if.then33.4, label %if.end35.4 if.then33.4: ; preds = %if.end47.4, %for.inc50.3 %call34.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5) %.pre189 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc50.4 for.inc50.4: ; preds = %land.lhs.true41.4, %if.then33.4 %77 = phi i32 [ %.pre189, %if.then33.4 ], [ %73, %land.lhs.true41.4 ] %cmp31149.5 = icmp eq i32 %77, 0 br i1 %cmp31149.5, label %if.then33.5, label %if.end35.preheader.5 if.end35.preheader.5: ; preds = %for.inc50.4 %78 = zext i32 %77 to i64 br label %if.end35.5 if.end35.5: ; preds = %if.end47.5, %if.end35.preheader.5 %indvars.iv160.5 = phi i64 [ 0, %if.end35.preheader.5 ], [ %indvars.iv.next161.5, %if.end47.5 ] %arrayidx37.5 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv160.5 %79 = load i8, ptr %arrayidx37.5, align 1, !tbaa !11 %cmp39.5 = icmp eq i8 %79, 72 br i1 %cmp39.5, label %land.lhs.true41.5, label %if.end47.5 land.lhs.true41.5: ; preds = %if.end35.5 %arrayidx43.5 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv160.5 %80 = load i32, ptr %arrayidx43.5, align 4, !tbaa !5 %cmp44.5 = icmp eq i32 %80, 6 br i1 %cmp44.5, label %for.inc50.5, label %if.end47.5 if.end47.5: ; preds = %land.lhs.true41.5, %if.end35.5 %indvars.iv.next161.5 = add nuw nsw i64 %indvars.iv160.5, 1 %cmp31.5 = icmp eq i64 %indvars.iv.next161.5, %78 br i1 %cmp31.5, label %if.then33.5, label %if.end35.5 if.then33.5: ; preds = %if.end47.5, %for.inc50.4 %call34.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6) %.pre190 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc50.5 for.inc50.5: ; preds = %land.lhs.true41.5, %if.then33.5 %81 = phi i32 [ %.pre190, %if.then33.5 ], [ %77, %land.lhs.true41.5 ] %cmp31149.6 = icmp eq i32 %81, 0 br i1 %cmp31149.6, label %if.then33.6, label %if.end35.preheader.6 if.end35.preheader.6: ; preds = %for.inc50.5 %82 = zext i32 %81 to i64 br label %if.end35.6 if.end35.6: ; preds = %if.end47.6, %if.end35.preheader.6 %indvars.iv160.6 = phi i64 [ 0, %if.end35.preheader.6 ], [ %indvars.iv.next161.6, %if.end47.6 ] %arrayidx37.6 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv160.6 %83 = load i8, ptr %arrayidx37.6, align 1, !tbaa !11 %cmp39.6 = icmp eq i8 %83, 72 br i1 %cmp39.6, label %land.lhs.true41.6, label %if.end47.6 land.lhs.true41.6: ; preds = %if.end35.6 %arrayidx43.6 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv160.6 %84 = load i32, ptr %arrayidx43.6, align 4, !tbaa !5 %cmp44.6 = icmp eq i32 %84, 7 br i1 %cmp44.6, label %for.inc50.6, label %if.end47.6 if.end47.6: ; preds = %land.lhs.true41.6, %if.end35.6 %indvars.iv.next161.6 = add nuw nsw i64 %indvars.iv160.6, 1 %cmp31.6 = icmp eq i64 %indvars.iv.next161.6, %82 br i1 %cmp31.6, label %if.then33.6, label %if.end35.6 if.then33.6: ; preds = %if.end47.6, %for.inc50.5 %call34.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7) %.pre191 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc50.6 for.inc50.6: ; preds = %land.lhs.true41.6, %if.then33.6 %85 = phi i32 [ %.pre191, %if.then33.6 ], [ %81, %land.lhs.true41.6 ] %cmp31149.7 = icmp eq i32 %85, 0 br i1 %cmp31149.7, label %if.then33.7, label %if.end35.preheader.7 if.end35.preheader.7: ; preds = %for.inc50.6 %86 = zext i32 %85 to i64 br label %if.end35.7 if.end35.7: ; preds = %if.end47.7, %if.end35.preheader.7 %indvars.iv160.7 = phi i64 [ 0, %if.end35.preheader.7 ], [ %indvars.iv.next161.7, %if.end47.7 ] %arrayidx37.7 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv160.7 %87 = load i8, ptr %arrayidx37.7, align 1, !tbaa !11 %cmp39.7 = icmp eq i8 %87, 72 br i1 %cmp39.7, label %land.lhs.true41.7, label %if.end47.7 land.lhs.true41.7: ; preds = %if.end35.7 %arrayidx43.7 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv160.7 %88 = load i32, ptr %arrayidx43.7, align 4, !tbaa !5 %cmp44.7 = icmp eq i32 %88, 8 br i1 %cmp44.7, label %for.inc50.7, label %if.end47.7 if.end47.7: ; preds = %land.lhs.true41.7, %if.end35.7 %indvars.iv.next161.7 = add nuw nsw i64 %indvars.iv160.7, 1 %cmp31.7 = icmp eq i64 %indvars.iv.next161.7, %86 br i1 %cmp31.7, label %if.then33.7, label %if.end35.7 if.then33.7: ; preds = %if.end47.7, %for.inc50.6 %call34.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8) %.pre192 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc50.7 for.inc50.7: ; preds = %land.lhs.true41.7, %if.then33.7 %89 = phi i32 [ %.pre192, %if.then33.7 ], [ %85, %land.lhs.true41.7 ] %cmp31149.8 = icmp eq i32 %89, 0 br i1 %cmp31149.8, label %if.then33.8, label %if.end35.preheader.8 if.end35.preheader.8: ; preds = %for.inc50.7 %90 = zext i32 %89 to i64 br label %if.end35.8 if.end35.8: ; preds = %if.end47.8, %if.end35.preheader.8 %indvars.iv160.8 = phi i64 [ 0, %if.end35.preheader.8 ], [ %indvars.iv.next161.8, %if.end47.8 ] %arrayidx37.8 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv160.8 %91 = load i8, ptr %arrayidx37.8, align 1, !tbaa !11 %cmp39.8 = icmp eq i8 %91, 72 br i1 %cmp39.8, label %land.lhs.true41.8, label %if.end47.8 land.lhs.true41.8: ; preds = %if.end35.8 %arrayidx43.8 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv160.8 %92 = load i32, ptr %arrayidx43.8, align 4, !tbaa !5 %cmp44.8 = icmp eq i32 %92, 9 br i1 %cmp44.8, label %for.inc50.8, label %if.end47.8 if.end47.8: ; preds = %land.lhs.true41.8, %if.end35.8 %indvars.iv.next161.8 = add nuw nsw i64 %indvars.iv160.8, 1 %cmp31.8 = icmp eq i64 %indvars.iv.next161.8, %90 br i1 %cmp31.8, label %if.then33.8, label %if.end35.8 if.then33.8: ; preds = %if.end47.8, %for.inc50.7 %call34.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9) %.pre193 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc50.8 for.inc50.8: ; preds = %land.lhs.true41.8, %if.then33.8 %93 = phi i32 [ %.pre193, %if.then33.8 ], [ %89, %land.lhs.true41.8 ] %cmp31149.9 = icmp eq i32 %93, 0 br i1 %cmp31149.9, label %if.then33.9, label %if.end35.preheader.9 if.end35.preheader.9: ; preds = %for.inc50.8 %94 = zext i32 %93 to i64 br label %if.end35.9 if.end35.9: ; preds = %if.end47.9, %if.end35.preheader.9 %indvars.iv160.9 = phi i64 [ 0, %if.end35.preheader.9 ], [ %indvars.iv.next161.9, %if.end47.9 ] %arrayidx37.9 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv160.9 %95 = load i8, ptr %arrayidx37.9, align 1, !tbaa !11 %cmp39.9 = icmp eq i8 %95, 72 br i1 %cmp39.9, label %land.lhs.true41.9, label %if.end47.9 land.lhs.true41.9: ; preds = %if.end35.9 %arrayidx43.9 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv160.9 %96 = load i32, ptr %arrayidx43.9, align 4, !tbaa !5 %cmp44.9 = icmp eq i32 %96, 10 br i1 %cmp44.9, label %for.inc50.9, label %if.end47.9 if.end47.9: ; preds = %land.lhs.true41.9, %if.end35.9 %indvars.iv.next161.9 = add nuw nsw i64 %indvars.iv160.9, 1 %cmp31.9 = icmp eq i64 %indvars.iv.next161.9, %94 br i1 %cmp31.9, label %if.then33.9, label %if.end35.9 if.then33.9: ; preds = %if.end47.9, %for.inc50.8 %call34.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10) %.pre194 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc50.9 for.inc50.9: ; preds = %land.lhs.true41.9, %if.then33.9 %97 = phi i32 [ %.pre194, %if.then33.9 ], [ %93, %land.lhs.true41.9 ] %cmp31149.10 = icmp eq i32 %97, 0 br i1 %cmp31149.10, label %if.then33.10, label %if.end35.preheader.10 if.end35.preheader.10: ; preds = %for.inc50.9 %98 = zext i32 %97 to i64 br label %if.end35.10 if.end35.10: ; preds = %if.end47.10, %if.end35.preheader.10 %indvars.iv160.10 = phi i64 [ 0, %if.end35.preheader.10 ], [ %indvars.iv.next161.10, %if.end47.10 ] %arrayidx37.10 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv160.10 %99 = load i8, ptr %arrayidx37.10, align 1, !tbaa !11 %cmp39.10 = icmp eq i8 %99, 72 br i1 %cmp39.10, label %land.lhs.true41.10, label %if.end47.10 land.lhs.true41.10: ; preds = %if.end35.10 %arrayidx43.10 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv160.10 %100 = load i32, ptr %arrayidx43.10, align 4, !tbaa !5 %cmp44.10 = icmp eq i32 %100, 11 br i1 %cmp44.10, label %for.inc50.10, label %if.end47.10 if.end47.10: ; preds = %land.lhs.true41.10, %if.end35.10 %indvars.iv.next161.10 = add nuw nsw i64 %indvars.iv160.10, 1 %cmp31.10 = icmp eq i64 %indvars.iv.next161.10, %98 br i1 %cmp31.10, label %if.then33.10, label %if.end35.10 if.then33.10: ; preds = %if.end47.10, %for.inc50.9 %call34.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11) %.pre195 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc50.10 for.inc50.10: ; preds = %land.lhs.true41.10, %if.then33.10 %101 = phi i32 [ %.pre195, %if.then33.10 ], [ %97, %land.lhs.true41.10 ] %cmp31149.11 = icmp eq i32 %101, 0 br i1 %cmp31149.11, label %if.then33.11, label %if.end35.preheader.11 if.end35.preheader.11: ; preds = %for.inc50.10 %102 = zext i32 %101 to i64 br label %if.end35.11 if.end35.11: ; preds = %if.end47.11, %if.end35.preheader.11 %indvars.iv160.11 = phi i64 [ 0, %if.end35.preheader.11 ], [ %indvars.iv.next161.11, %if.end47.11 ] %arrayidx37.11 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv160.11 %103 = load i8, ptr %arrayidx37.11, align 1, !tbaa !11 %cmp39.11 = icmp eq i8 %103, 72 br i1 %cmp39.11, label %land.lhs.true41.11, label %if.end47.11 land.lhs.true41.11: ; preds = %if.end35.11 %arrayidx43.11 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv160.11 %104 = load i32, ptr %arrayidx43.11, align 4, !tbaa !5 %cmp44.11 = icmp eq i32 %104, 12 br i1 %cmp44.11, label %for.inc50.11, label %if.end47.11 if.end47.11: ; preds = %land.lhs.true41.11, %if.end35.11 %indvars.iv.next161.11 = add nuw nsw i64 %indvars.iv160.11, 1 %cmp31.11 = icmp eq i64 %indvars.iv.next161.11, %102 br i1 %cmp31.11, label %if.then33.11, label %if.end35.11 if.then33.11: ; preds = %if.end47.11, %for.inc50.10 %call34.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12) %.pre196 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc50.11 for.inc50.11: ; preds = %land.lhs.true41.11, %if.then33.11 %105 = phi i32 [ %.pre196, %if.then33.11 ], [ %101, %land.lhs.true41.11 ] %cmp31149.12 = icmp eq i32 %105, 0 br i1 %cmp31149.12, label %if.then33.12, label %if.end35.preheader.12 if.end35.preheader.12: ; preds = %for.inc50.11 %106 = zext i32 %105 to i64 br label %if.end35.12 if.end35.12: ; preds = %if.end47.12, %if.end35.preheader.12 %indvars.iv160.12 = phi i64 [ 0, %if.end35.preheader.12 ], [ %indvars.iv.next161.12, %if.end47.12 ] %arrayidx37.12 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv160.12 %107 = load i8, ptr %arrayidx37.12, align 1, !tbaa !11 %cmp39.12 = icmp eq i8 %107, 72 br i1 %cmp39.12, label %land.lhs.true41.12, label %if.end47.12 land.lhs.true41.12: ; preds = %if.end35.12 %arrayidx43.12 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv160.12 %108 = load i32, ptr %arrayidx43.12, align 4, !tbaa !5 %cmp44.12 = icmp eq i32 %108, 13 br i1 %cmp44.12, label %for.inc50.12, label %if.end47.12 if.end47.12: ; preds = %land.lhs.true41.12, %if.end35.12 %indvars.iv.next161.12 = add nuw nsw i64 %indvars.iv160.12, 1 %cmp31.12 = icmp eq i64 %indvars.iv.next161.12, %106 br i1 %cmp31.12, label %if.then33.12, label %if.end35.12 if.then33.12: ; preds = %if.end47.12, %for.inc50.11 %call34.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 13) %.pre197 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc50.12 for.inc50.12: ; preds = %land.lhs.true41.12, %if.then33.12 %109 = phi i32 [ %.pre197, %if.then33.12 ], [ %105, %land.lhs.true41.12 ] %cmp59152 = icmp eq i32 %109, 0 br i1 %cmp59152, label %if.then61, label %if.end63.preheader if.end63.preheader: ; preds = %for.inc50.12 %110 = zext i32 %109 to i64 br label %if.end63 if.then61: ; preds = %if.end75, %for.inc50.12 %call62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1) %.pre198 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc78 if.end63: ; preds = %if.end63.preheader, %if.end75 %indvars.iv164 = phi i64 [ 0, %if.end63.preheader ], [ %indvars.iv.next165, %if.end75 ] %arrayidx65 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv164 %111 = load i8, ptr %arrayidx65, align 1, !tbaa !11 %cmp67 = icmp eq i8 %111, 67 br i1 %cmp67, label %land.lhs.true69, label %if.end75 land.lhs.true69: ; preds = %if.end63 %arrayidx71 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv164 %112 = load i32, ptr %arrayidx71, align 4, !tbaa !5 %cmp72 = icmp eq i32 %112, 1 br i1 %cmp72, label %for.inc78, label %if.end75 if.end75: ; preds = %land.lhs.true69, %if.end63 %indvars.iv.next165 = add nuw nsw i64 %indvars.iv164, 1 %cmp59 = icmp eq i64 %indvars.iv.next165, %110 br i1 %cmp59, label %if.then61, label %if.end63 for.inc78: ; preds = %land.lhs.true69, %if.then61 %113 = phi i32 [ %.pre198, %if.then61 ], [ %109, %land.lhs.true69 ] %cmp59152.1 = icmp eq i32 %113, 0 br i1 %cmp59152.1, label %if.then61.1, label %if.end63.preheader.1 if.end63.preheader.1: ; preds = %for.inc78 %114 = zext i32 %113 to i64 br label %if.end63.1 if.end63.1: ; preds = %if.end75.1, %if.end63.preheader.1 %indvars.iv164.1 = phi i64 [ 0, %if.end63.preheader.1 ], [ %indvars.iv.next165.1, %if.end75.1 ] %arrayidx65.1 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv164.1 %115 = load i8, ptr %arrayidx65.1, align 1, !tbaa !11 %cmp67.1 = icmp eq i8 %115, 67 br i1 %cmp67.1, label %land.lhs.true69.1, label %if.end75.1 land.lhs.true69.1: ; preds = %if.end63.1 %arrayidx71.1 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv164.1 %116 = load i32, ptr %arrayidx71.1, align 4, !tbaa !5 %cmp72.1 = icmp eq i32 %116, 2 br i1 %cmp72.1, label %for.inc78.1, label %if.end75.1 if.end75.1: ; preds = %land.lhs.true69.1, %if.end63.1 %indvars.iv.next165.1 = add nuw nsw i64 %indvars.iv164.1, 1 %cmp59.1 = icmp eq i64 %indvars.iv.next165.1, %114 br i1 %cmp59.1, label %if.then61.1, label %if.end63.1 if.then61.1: ; preds = %if.end75.1, %for.inc78 %call62.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2) %.pre199 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc78.1 for.inc78.1: ; preds = %land.lhs.true69.1, %if.then61.1 %117 = phi i32 [ %.pre199, %if.then61.1 ], [ %113, %land.lhs.true69.1 ] %cmp59152.2 = icmp eq i32 %117, 0 br i1 %cmp59152.2, label %if.then61.2, label %if.end63.preheader.2 if.end63.preheader.2: ; preds = %for.inc78.1 %118 = zext i32 %117 to i64 br label %if.end63.2 if.end63.2: ; preds = %if.end75.2, %if.end63.preheader.2 %indvars.iv164.2 = phi i64 [ 0, %if.end63.preheader.2 ], [ %indvars.iv.next165.2, %if.end75.2 ] %arrayidx65.2 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv164.2 %119 = load i8, ptr %arrayidx65.2, align 1, !tbaa !11 %cmp67.2 = icmp eq i8 %119, 67 br i1 %cmp67.2, label %land.lhs.true69.2, label %if.end75.2 land.lhs.true69.2: ; preds = %if.end63.2 %arrayidx71.2 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv164.2 %120 = load i32, ptr %arrayidx71.2, align 4, !tbaa !5 %cmp72.2 = icmp eq i32 %120, 3 br i1 %cmp72.2, label %for.inc78.2, label %if.end75.2 if.end75.2: ; preds = %land.lhs.true69.2, %if.end63.2 %indvars.iv.next165.2 = add nuw nsw i64 %indvars.iv164.2, 1 %cmp59.2 = icmp eq i64 %indvars.iv.next165.2, %118 br i1 %cmp59.2, label %if.then61.2, label %if.end63.2 if.then61.2: ; preds = %if.end75.2, %for.inc78.1 %call62.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3) br label %for.inc78.2 for.inc78.2: ; preds = %land.lhs.true69.2, %if.then61.2 %121 = load i32, ptr %n, align 4, !tbaa !5 %cmp59152.3 = icmp eq i32 %121, 0 br i1 %cmp59152.3, label %if.then61.3, label %if.end63.preheader.3 if.end63.preheader.3: ; preds = %for.inc78.2 %122 = zext i32 %121 to i64 br label %if.end63.3 if.end63.3: ; preds = %if.end75.3, %if.end63.preheader.3 %indvars.iv164.3 = phi i64 [ 0, %if.end63.preheader.3 ], [ %indvars.iv.next165.3, %if.end75.3 ] %arrayidx65.3 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv164.3 %123 = load i8, ptr %arrayidx65.3, align 1, !tbaa !11 %cmp67.3 = icmp eq i8 %123, 67 br i1 %cmp67.3, label %land.lhs.true69.3, label %if.end75.3 land.lhs.true69.3: ; preds = %if.end63.3 %arrayidx71.3 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv164.3 %124 = load i32, ptr %arrayidx71.3, align 4, !tbaa !5 %cmp72.3 = icmp eq i32 %124, 4 br i1 %cmp72.3, label %for.inc78.3, label %if.end75.3 if.end75.3: ; preds = %land.lhs.true69.3, %if.end63.3 %indvars.iv.next165.3 = add nuw nsw i64 %indvars.iv164.3, 1 %cmp59.3 = icmp eq i64 %indvars.iv.next165.3, %122 br i1 %cmp59.3, label %if.then61.3, label %if.end63.3 if.then61.3: ; preds = %if.end75.3, %for.inc78.2 %call62.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4) %.pre200 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc78.3 for.inc78.3: ; preds = %land.lhs.true69.3, %if.then61.3 %125 = phi i32 [ %.pre200, %if.then61.3 ], [ %121, %land.lhs.true69.3 ] %cmp59152.4 = icmp eq i32 %125, 0 br i1 %cmp59152.4, label %if.then61.4, label %if.end63.preheader.4 if.end63.preheader.4: ; preds = %for.inc78.3 %126 = zext i32 %125 to i64 br label %if.end63.4 if.end63.4: ; preds = %if.end75.4, %if.end63.preheader.4 %indvars.iv164.4 = phi i64 [ 0, %if.end63.preheader.4 ], [ %indvars.iv.next165.4, %if.end75.4 ] %arrayidx65.4 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv164.4 %127 = load i8, ptr %arrayidx65.4, align 1, !tbaa !11 %cmp67.4 = icmp eq i8 %127, 67 br i1 %cmp67.4, label %land.lhs.true69.4, label %if.end75.4 land.lhs.true69.4: ; preds = %if.end63.4 %arrayidx71.4 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv164.4 %128 = load i32, ptr %arrayidx71.4, align 4, !tbaa !5 %cmp72.4 = icmp eq i32 %128, 5 br i1 %cmp72.4, label %for.inc78.4, label %if.end75.4 if.end75.4: ; preds = %land.lhs.true69.4, %if.end63.4 %indvars.iv.next165.4 = add nuw nsw i64 %indvars.iv164.4, 1 %cmp59.4 = icmp eq i64 %indvars.iv.next165.4, %126 br i1 %cmp59.4, label %if.then61.4, label %if.end63.4 if.then61.4: ; preds = %if.end75.4, %for.inc78.3 %call62.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5) %.pre201 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc78.4 for.inc78.4: ; preds = %land.lhs.true69.4, %if.then61.4 %129 = phi i32 [ %.pre201, %if.then61.4 ], [ %125, %land.lhs.true69.4 ] %cmp59152.5 = icmp eq i32 %129, 0 br i1 %cmp59152.5, label %if.then61.5, label %if.end63.preheader.5 if.end63.preheader.5: ; preds = %for.inc78.4 %130 = zext i32 %129 to i64 br label %if.end63.5 if.end63.5: ; preds = %if.end75.5, %if.end63.preheader.5 %indvars.iv164.5 = phi i64 [ 0, %if.end63.preheader.5 ], [ %indvars.iv.next165.5, %if.end75.5 ] %arrayidx65.5 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv164.5 %131 = load i8, ptr %arrayidx65.5, align 1, !tbaa !11 %cmp67.5 = icmp eq i8 %131, 67 br i1 %cmp67.5, label %land.lhs.true69.5, label %if.end75.5 land.lhs.true69.5: ; preds = %if.end63.5 %arrayidx71.5 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv164.5 %132 = load i32, ptr %arrayidx71.5, align 4, !tbaa !5 %cmp72.5 = icmp eq i32 %132, 6 br i1 %cmp72.5, label %for.inc78.5, label %if.end75.5 if.end75.5: ; preds = %land.lhs.true69.5, %if.end63.5 %indvars.iv.next165.5 = add nuw nsw i64 %indvars.iv164.5, 1 %cmp59.5 = icmp eq i64 %indvars.iv.next165.5, %130 br i1 %cmp59.5, label %if.then61.5, label %if.end63.5 if.then61.5: ; preds = %if.end75.5, %for.inc78.4 %call62.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6) %.pre202 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc78.5 for.inc78.5: ; preds = %land.lhs.true69.5, %if.then61.5 %133 = phi i32 [ %.pre202, %if.then61.5 ], [ %129, %land.lhs.true69.5 ] %cmp59152.6 = icmp eq i32 %133, 0 br i1 %cmp59152.6, label %if.then61.6, label %if.end63.preheader.6 if.end63.preheader.6: ; preds = %for.inc78.5 %134 = zext i32 %133 to i64 br label %if.end63.6 if.end63.6: ; preds = %if.end75.6, %if.end63.preheader.6 %indvars.iv164.6 = phi i64 [ 0, %if.end63.preheader.6 ], [ %indvars.iv.next165.6, %if.end75.6 ] %arrayidx65.6 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv164.6 %135 = load i8, ptr %arrayidx65.6, align 1, !tbaa !11 %cmp67.6 = icmp eq i8 %135, 67 br i1 %cmp67.6, label %land.lhs.true69.6, label %if.end75.6 land.lhs.true69.6: ; preds = %if.end63.6 %arrayidx71.6 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv164.6 %136 = load i32, ptr %arrayidx71.6, align 4, !tbaa !5 %cmp72.6 = icmp eq i32 %136, 7 br i1 %cmp72.6, label %for.inc78.6, label %if.end75.6 if.end75.6: ; preds = %land.lhs.true69.6, %if.end63.6 %indvars.iv.next165.6 = add nuw nsw i64 %indvars.iv164.6, 1 %cmp59.6 = icmp eq i64 %indvars.iv.next165.6, %134 br i1 %cmp59.6, label %if.then61.6, label %if.end63.6 if.then61.6: ; preds = %if.end75.6, %for.inc78.5 %call62.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7) %.pre203 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc78.6 for.inc78.6: ; preds = %land.lhs.true69.6, %if.then61.6 %137 = phi i32 [ %.pre203, %if.then61.6 ], [ %133, %land.lhs.true69.6 ] %cmp59152.7 = icmp eq i32 %137, 0 br i1 %cmp59152.7, label %if.then61.7, label %if.end63.preheader.7 if.end63.preheader.7: ; preds = %for.inc78.6 %138 = zext i32 %137 to i64 br label %if.end63.7 if.end63.7: ; preds = %if.end75.7, %if.end63.preheader.7 %indvars.iv164.7 = phi i64 [ 0, %if.end63.preheader.7 ], [ %indvars.iv.next165.7, %if.end75.7 ] %arrayidx65.7 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv164.7 %139 = load i8, ptr %arrayidx65.7, align 1, !tbaa !11 %cmp67.7 = icmp eq i8 %139, 67 br i1 %cmp67.7, label %land.lhs.true69.7, label %if.end75.7 land.lhs.true69.7: ; preds = %if.end63.7 %arrayidx71.7 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv164.7 %140 = load i32, ptr %arrayidx71.7, align 4, !tbaa !5 %cmp72.7 = icmp eq i32 %140, 8 br i1 %cmp72.7, label %for.inc78.7, label %if.end75.7 if.end75.7: ; preds = %land.lhs.true69.7, %if.end63.7 %indvars.iv.next165.7 = add nuw nsw i64 %indvars.iv164.7, 1 %cmp59.7 = icmp eq i64 %indvars.iv.next165.7, %138 br i1 %cmp59.7, label %if.then61.7, label %if.end63.7 if.then61.7: ; preds = %if.end75.7, %for.inc78.6 %call62.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8) %.pre204 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc78.7 for.inc78.7: ; preds = %land.lhs.true69.7, %if.then61.7 %141 = phi i32 [ %.pre204, %if.then61.7 ], [ %137, %land.lhs.true69.7 ] %cmp59152.8 = icmp eq i32 %141, 0 br i1 %cmp59152.8, label %if.then61.8, label %if.end63.preheader.8 if.end63.preheader.8: ; preds = %for.inc78.7 %142 = zext i32 %141 to i64 br label %if.end63.8 if.end63.8: ; preds = %if.end75.8, %if.end63.preheader.8 %indvars.iv164.8 = phi i64 [ 0, %if.end63.preheader.8 ], [ %indvars.iv.next165.8, %if.end75.8 ] %arrayidx65.8 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv164.8 %143 = load i8, ptr %arrayidx65.8, align 1, !tbaa !11 %cmp67.8 = icmp eq i8 %143, 67 br i1 %cmp67.8, label %land.lhs.true69.8, label %if.end75.8 land.lhs.true69.8: ; preds = %if.end63.8 %arrayidx71.8 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv164.8 %144 = load i32, ptr %arrayidx71.8, align 4, !tbaa !5 %cmp72.8 = icmp eq i32 %144, 9 br i1 %cmp72.8, label %for.inc78.8, label %if.end75.8 if.end75.8: ; preds = %land.lhs.true69.8, %if.end63.8 %indvars.iv.next165.8 = add nuw nsw i64 %indvars.iv164.8, 1 %cmp59.8 = icmp eq i64 %indvars.iv.next165.8, %142 br i1 %cmp59.8, label %if.then61.8, label %if.end63.8 if.then61.8: ; preds = %if.end75.8, %for.inc78.7 %call62.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9) %.pre205 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc78.8 for.inc78.8: ; preds = %land.lhs.true69.8, %if.then61.8 %145 = phi i32 [ %.pre205, %if.then61.8 ], [ %141, %land.lhs.true69.8 ] %cmp59152.9 = icmp eq i32 %145, 0 br i1 %cmp59152.9, label %if.then61.9, label %if.end63.preheader.9 if.end63.preheader.9: ; preds = %for.inc78.8 %146 = zext i32 %145 to i64 br label %if.end63.9 if.end63.9: ; preds = %if.end75.9, %if.end63.preheader.9 %indvars.iv164.9 = phi i64 [ 0, %if.end63.preheader.9 ], [ %indvars.iv.next165.9, %if.end75.9 ] %arrayidx65.9 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv164.9 %147 = load i8, ptr %arrayidx65.9, align 1, !tbaa !11 %cmp67.9 = icmp eq i8 %147, 67 br i1 %cmp67.9, label %land.lhs.true69.9, label %if.end75.9 land.lhs.true69.9: ; preds = %if.end63.9 %arrayidx71.9 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv164.9 %148 = load i32, ptr %arrayidx71.9, align 4, !tbaa !5 %cmp72.9 = icmp eq i32 %148, 10 br i1 %cmp72.9, label %for.inc78.9, label %if.end75.9 if.end75.9: ; preds = %land.lhs.true69.9, %if.end63.9 %indvars.iv.next165.9 = add nuw nsw i64 %indvars.iv164.9, 1 %cmp59.9 = icmp eq i64 %indvars.iv.next165.9, %146 br i1 %cmp59.9, label %if.then61.9, label %if.end63.9 if.then61.9: ; preds = %if.end75.9, %for.inc78.8 %call62.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10) %.pre206 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc78.9 for.inc78.9: ; preds = %land.lhs.true69.9, %if.then61.9 %149 = phi i32 [ %.pre206, %if.then61.9 ], [ %145, %land.lhs.true69.9 ] %cmp59152.10 = icmp eq i32 %149, 0 br i1 %cmp59152.10, label %if.then61.10, label %if.end63.preheader.10 if.end63.preheader.10: ; preds = %for.inc78.9 %150 = zext i32 %149 to i64 br label %if.end63.10 if.end63.10: ; preds = %if.end75.10, %if.end63.preheader.10 %indvars.iv164.10 = phi i64 [ 0, %if.end63.preheader.10 ], [ %indvars.iv.next165.10, %if.end75.10 ] %arrayidx65.10 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv164.10 %151 = load i8, ptr %arrayidx65.10, align 1, !tbaa !11 %cmp67.10 = icmp eq i8 %151, 67 br i1 %cmp67.10, label %land.lhs.true69.10, label %if.end75.10 land.lhs.true69.10: ; preds = %if.end63.10 %arrayidx71.10 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv164.10 %152 = load i32, ptr %arrayidx71.10, align 4, !tbaa !5 %cmp72.10 = icmp eq i32 %152, 11 br i1 %cmp72.10, label %for.inc78.10, label %if.end75.10 if.end75.10: ; preds = %land.lhs.true69.10, %if.end63.10 %indvars.iv.next165.10 = add nuw nsw i64 %indvars.iv164.10, 1 %cmp59.10 = icmp eq i64 %indvars.iv.next165.10, %150 br i1 %cmp59.10, label %if.then61.10, label %if.end63.10 if.then61.10: ; preds = %if.end75.10, %for.inc78.9 %call62.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11) %.pre207 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc78.10 for.inc78.10: ; preds = %land.lhs.true69.10, %if.then61.10 %153 = phi i32 [ %.pre207, %if.then61.10 ], [ %149, %land.lhs.true69.10 ] %cmp59152.11 = icmp eq i32 %153, 0 br i1 %cmp59152.11, label %if.then61.11, label %if.end63.preheader.11 if.end63.preheader.11: ; preds = %for.inc78.10 %154 = zext i32 %153 to i64 br label %if.end63.11 if.end63.11: ; preds = %if.end75.11, %if.end63.preheader.11 %indvars.iv164.11 = phi i64 [ 0, %if.end63.preheader.11 ], [ %indvars.iv.next165.11, %if.end75.11 ] %arrayidx65.11 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv164.11 %155 = load i8, ptr %arrayidx65.11, align 1, !tbaa !11 %cmp67.11 = icmp eq i8 %155, 67 br i1 %cmp67.11, label %land.lhs.true69.11, label %if.end75.11 land.lhs.true69.11: ; preds = %if.end63.11 %arrayidx71.11 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv164.11 %156 = load i32, ptr %arrayidx71.11, align 4, !tbaa !5 %cmp72.11 = icmp eq i32 %156, 12 br i1 %cmp72.11, label %for.inc78.11, label %if.end75.11 if.end75.11: ; preds = %land.lhs.true69.11, %if.end63.11 %indvars.iv.next165.11 = add nuw nsw i64 %indvars.iv164.11, 1 %cmp59.11 = icmp eq i64 %indvars.iv.next165.11, %154 br i1 %cmp59.11, label %if.then61.11, label %if.end63.11 if.then61.11: ; preds = %if.end75.11, %for.inc78.10 %call62.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12) %.pre208 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc78.11 for.inc78.11: ; preds = %land.lhs.true69.11, %if.then61.11 %157 = phi i32 [ %.pre208, %if.then61.11 ], [ %153, %land.lhs.true69.11 ] %cmp59152.12 = icmp eq i32 %157, 0 br i1 %cmp59152.12, label %if.then61.12, label %if.end63.preheader.12 if.end63.preheader.12: ; preds = %for.inc78.11 %158 = zext i32 %157 to i64 br label %if.end63.12 if.end63.12: ; preds = %if.end75.12, %if.end63.preheader.12 %indvars.iv164.12 = phi i64 [ 0, %if.end63.preheader.12 ], [ %indvars.iv.next165.12, %if.end75.12 ] %arrayidx65.12 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv164.12 %159 = load i8, ptr %arrayidx65.12, align 1, !tbaa !11 %cmp67.12 = icmp eq i8 %159, 67 br i1 %cmp67.12, label %land.lhs.true69.12, label %if.end75.12 land.lhs.true69.12: ; preds = %if.end63.12 %arrayidx71.12 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv164.12 %160 = load i32, ptr %arrayidx71.12, align 4, !tbaa !5 %cmp72.12 = icmp eq i32 %160, 13 br i1 %cmp72.12, label %for.inc78.12, label %if.end75.12 if.end75.12: ; preds = %land.lhs.true69.12, %if.end63.12 %indvars.iv.next165.12 = add nuw nsw i64 %indvars.iv164.12, 1 %cmp59.12 = icmp eq i64 %indvars.iv.next165.12, %158 br i1 %cmp59.12, label %if.then61.12, label %if.end63.12 if.then61.12: ; preds = %if.end75.12, %for.inc78.11 %call62.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 13) %.pre209 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc78.12 for.inc78.12: ; preds = %land.lhs.true69.12, %if.then61.12 %161 = phi i32 [ %.pre209, %if.then61.12 ], [ %157, %land.lhs.true69.12 ] %cmp87155 = icmp eq i32 %161, 0 br i1 %cmp87155, label %if.then89, label %if.end91.preheader if.end91.preheader: ; preds = %for.inc78.12 %162 = zext i32 %161 to i64 br label %if.end91 if.then89: ; preds = %if.end103, %for.inc78.12 %call90 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1) %.pre210 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc106 if.end91: ; preds = %if.end91.preheader, %if.end103 %indvars.iv168 = phi i64 [ 0, %if.end91.preheader ], [ %indvars.iv.next169, %if.end103 ] %arrayidx93 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv168 %163 = load i8, ptr %arrayidx93, align 1, !tbaa !11 %cmp95 = icmp eq i8 %163, 68 br i1 %cmp95, label %land.lhs.true97, label %if.end103 land.lhs.true97: ; preds = %if.end91 %arrayidx99 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv168 %164 = load i32, ptr %arrayidx99, align 4, !tbaa !5 %cmp100 = icmp eq i32 %164, 1 br i1 %cmp100, label %for.inc106, label %if.end103 if.end103: ; preds = %land.lhs.true97, %if.end91 %indvars.iv.next169 = add nuw nsw i64 %indvars.iv168, 1 %cmp87 = icmp eq i64 %indvars.iv.next169, %162 br i1 %cmp87, label %if.then89, label %if.end91 for.inc106: ; preds = %land.lhs.true97, %if.then89 %165 = phi i32 [ %.pre210, %if.then89 ], [ %161, %land.lhs.true97 ] %cmp87155.1 = icmp eq i32 %165, 0 br i1 %cmp87155.1, label %if.then89.1, label %if.end91.preheader.1 if.end91.preheader.1: ; preds = %for.inc106 %166 = zext i32 %165 to i64 br label %if.end91.1 if.end91.1: ; preds = %if.end103.1, %if.end91.preheader.1 %indvars.iv168.1 = phi i64 [ 0, %if.end91.preheader.1 ], [ %indvars.iv.next169.1, %if.end103.1 ] %arrayidx93.1 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv168.1 %167 = load i8, ptr %arrayidx93.1, align 1, !tbaa !11 %cmp95.1 = icmp eq i8 %167, 68 br i1 %cmp95.1, label %land.lhs.true97.1, label %if.end103.1 land.lhs.true97.1: ; preds = %if.end91.1 %arrayidx99.1 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv168.1 %168 = load i32, ptr %arrayidx99.1, align 4, !tbaa !5 %cmp100.1 = icmp eq i32 %168, 2 br i1 %cmp100.1, label %for.inc106.1, label %if.end103.1 if.end103.1: ; preds = %land.lhs.true97.1, %if.end91.1 %indvars.iv.next169.1 = add nuw nsw i64 %indvars.iv168.1, 1 %cmp87.1 = icmp eq i64 %indvars.iv.next169.1, %166 br i1 %cmp87.1, label %if.then89.1, label %if.end91.1 if.then89.1: ; preds = %if.end103.1, %for.inc106 %call90.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2) %.pre211 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc106.1 for.inc106.1: ; preds = %land.lhs.true97.1, %if.then89.1 %169 = phi i32 [ %.pre211, %if.then89.1 ], [ %165, %land.lhs.true97.1 ] %cmp87155.2 = icmp eq i32 %169, 0 br i1 %cmp87155.2, label %if.then89.2, label %if.end91.preheader.2 if.end91.preheader.2: ; preds = %for.inc106.1 %170 = zext i32 %169 to i64 br label %if.end91.2 if.end91.2: ; preds = %if.end103.2, %if.end91.preheader.2 %indvars.iv168.2 = phi i64 [ 0, %if.end91.preheader.2 ], [ %indvars.iv.next169.2, %if.end103.2 ] %arrayidx93.2 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv168.2 %171 = load i8, ptr %arrayidx93.2, align 1, !tbaa !11 %cmp95.2 = icmp eq i8 %171, 68 br i1 %cmp95.2, label %land.lhs.true97.2, label %if.end103.2 land.lhs.true97.2: ; preds = %if.end91.2 %arrayidx99.2 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv168.2 %172 = load i32, ptr %arrayidx99.2, align 4, !tbaa !5 %cmp100.2 = icmp eq i32 %172, 3 br i1 %cmp100.2, label %for.inc106.2, label %if.end103.2 if.end103.2: ; preds = %land.lhs.true97.2, %if.end91.2 %indvars.iv.next169.2 = add nuw nsw i64 %indvars.iv168.2, 1 %cmp87.2 = icmp eq i64 %indvars.iv.next169.2, %170 br i1 %cmp87.2, label %if.then89.2, label %if.end91.2 if.then89.2: ; preds = %if.end103.2, %for.inc106.1 %call90.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3) %.pre212 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc106.2 for.inc106.2: ; preds = %land.lhs.true97.2, %if.then89.2 %173 = phi i32 [ %.pre212, %if.then89.2 ], [ %169, %land.lhs.true97.2 ] %cmp87155.3 = icmp eq i32 %173, 0 br i1 %cmp87155.3, label %if.then89.3, label %if.end91.preheader.3 if.end91.preheader.3: ; preds = %for.inc106.2 %174 = zext i32 %173 to i64 br label %if.end91.3 if.end91.3: ; preds = %if.end103.3, %if.end91.preheader.3 %indvars.iv168.3 = phi i64 [ 0, %if.end91.preheader.3 ], [ %indvars.iv.next169.3, %if.end103.3 ] %arrayidx93.3 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv168.3 %175 = load i8, ptr %arrayidx93.3, align 1, !tbaa !11 %cmp95.3 = icmp eq i8 %175, 68 br i1 %cmp95.3, label %land.lhs.true97.3, label %if.end103.3 land.lhs.true97.3: ; preds = %if.end91.3 %arrayidx99.3 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv168.3 %176 = load i32, ptr %arrayidx99.3, align 4, !tbaa !5 %cmp100.3 = icmp eq i32 %176, 4 br i1 %cmp100.3, label %for.inc106.3, label %if.end103.3 if.end103.3: ; preds = %land.lhs.true97.3, %if.end91.3 %indvars.iv.next169.3 = add nuw nsw i64 %indvars.iv168.3, 1 %cmp87.3 = icmp eq i64 %indvars.iv.next169.3, %174 br i1 %cmp87.3, label %if.then89.3, label %if.end91.3 if.then89.3: ; preds = %if.end103.3, %for.inc106.2 %call90.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4) %.pre213 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc106.3 for.inc106.3: ; preds = %land.lhs.true97.3, %if.then89.3 %177 = phi i32 [ %.pre213, %if.then89.3 ], [ %173, %land.lhs.true97.3 ] %cmp87155.4 = icmp eq i32 %177, 0 br i1 %cmp87155.4, label %if.then89.4, label %if.end91.preheader.4 if.end91.preheader.4: ; preds = %for.inc106.3 %178 = zext i32 %177 to i64 br label %if.end91.4 if.end91.4: ; preds = %if.end103.4, %if.end91.preheader.4 %indvars.iv168.4 = phi i64 [ 0, %if.end91.preheader.4 ], [ %indvars.iv.next169.4, %if.end103.4 ] %arrayidx93.4 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv168.4 %179 = load i8, ptr %arrayidx93.4, align 1, !tbaa !11 %cmp95.4 = icmp eq i8 %179, 68 br i1 %cmp95.4, label %land.lhs.true97.4, label %if.end103.4 land.lhs.true97.4: ; preds = %if.end91.4 %arrayidx99.4 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv168.4 %180 = load i32, ptr %arrayidx99.4, align 4, !tbaa !5 %cmp100.4 = icmp eq i32 %180, 5 br i1 %cmp100.4, label %for.inc106.4, label %if.end103.4 if.end103.4: ; preds = %land.lhs.true97.4, %if.end91.4 %indvars.iv.next169.4 = add nuw nsw i64 %indvars.iv168.4, 1 %cmp87.4 = icmp eq i64 %indvars.iv.next169.4, %178 br i1 %cmp87.4, label %if.then89.4, label %if.end91.4 if.then89.4: ; preds = %if.end103.4, %for.inc106.3 %call90.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5) %.pre214 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc106.4 for.inc106.4: ; preds = %land.lhs.true97.4, %if.then89.4 %181 = phi i32 [ %.pre214, %if.then89.4 ], [ %177, %land.lhs.true97.4 ] %cmp87155.5 = icmp eq i32 %181, 0 br i1 %cmp87155.5, label %if.then89.5, label %if.end91.preheader.5 if.end91.preheader.5: ; preds = %for.inc106.4 %182 = zext i32 %181 to i64 br label %if.end91.5 if.end91.5: ; preds = %if.end103.5, %if.end91.preheader.5 %indvars.iv168.5 = phi i64 [ 0, %if.end91.preheader.5 ], [ %indvars.iv.next169.5, %if.end103.5 ] %arrayidx93.5 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv168.5 %183 = load i8, ptr %arrayidx93.5, align 1, !tbaa !11 %cmp95.5 = icmp eq i8 %183, 68 br i1 %cmp95.5, label %land.lhs.true97.5, label %if.end103.5 land.lhs.true97.5: ; preds = %if.end91.5 %arrayidx99.5 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv168.5 %184 = load i32, ptr %arrayidx99.5, align 4, !tbaa !5 %cmp100.5 = icmp eq i32 %184, 6 br i1 %cmp100.5, label %for.inc106.5, label %if.end103.5 if.end103.5: ; preds = %land.lhs.true97.5, %if.end91.5 %indvars.iv.next169.5 = add nuw nsw i64 %indvars.iv168.5, 1 %cmp87.5 = icmp eq i64 %indvars.iv.next169.5, %182 br i1 %cmp87.5, label %if.then89.5, label %if.end91.5 if.then89.5: ; preds = %if.end103.5, %for.inc106.4 %call90.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6) %.pre215 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc106.5 for.inc106.5: ; preds = %land.lhs.true97.5, %if.then89.5 %185 = phi i32 [ %.pre215, %if.then89.5 ], [ %181, %land.lhs.true97.5 ] %cmp87155.6 = icmp eq i32 %185, 0 br i1 %cmp87155.6, label %if.then89.6, label %if.end91.preheader.6 if.end91.preheader.6: ; preds = %for.inc106.5 %186 = zext i32 %185 to i64 br label %if.end91.6 if.end91.6: ; preds = %if.end103.6, %if.end91.preheader.6 %indvars.iv168.6 = phi i64 [ 0, %if.end91.preheader.6 ], [ %indvars.iv.next169.6, %if.end103.6 ] %arrayidx93.6 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv168.6 %187 = load i8, ptr %arrayidx93.6, align 1, !tbaa !11 %cmp95.6 = icmp eq i8 %187, 68 br i1 %cmp95.6, label %land.lhs.true97.6, label %if.end103.6 land.lhs.true97.6: ; preds = %if.end91.6 %arrayidx99.6 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv168.6 %188 = load i32, ptr %arrayidx99.6, align 4, !tbaa !5 %cmp100.6 = icmp eq i32 %188, 7 br i1 %cmp100.6, label %for.inc106.6, label %if.end103.6 if.end103.6: ; preds = %land.lhs.true97.6, %if.end91.6 %indvars.iv.next169.6 = add nuw nsw i64 %indvars.iv168.6, 1 %cmp87.6 = icmp eq i64 %indvars.iv.next169.6, %186 br i1 %cmp87.6, label %if.then89.6, label %if.end91.6 if.then89.6: ; preds = %if.end103.6, %for.inc106.5 %call90.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7) %.pre216 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc106.6 for.inc106.6: ; preds = %land.lhs.true97.6, %if.then89.6 %189 = phi i32 [ %.pre216, %if.then89.6 ], [ %185, %land.lhs.true97.6 ] %cmp87155.7 = icmp eq i32 %189, 0 br i1 %cmp87155.7, label %if.then89.7, label %if.end91.preheader.7 if.end91.preheader.7: ; preds = %for.inc106.6 %190 = zext i32 %189 to i64 br label %if.end91.7 if.end91.7: ; preds = %if.end103.7, %if.end91.preheader.7 %indvars.iv168.7 = phi i64 [ 0, %if.end91.preheader.7 ], [ %indvars.iv.next169.7, %if.end103.7 ] %arrayidx93.7 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv168.7 %191 = load i8, ptr %arrayidx93.7, align 1, !tbaa !11 %cmp95.7 = icmp eq i8 %191, 68 br i1 %cmp95.7, label %land.lhs.true97.7, label %if.end103.7 land.lhs.true97.7: ; preds = %if.end91.7 %arrayidx99.7 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv168.7 %192 = load i32, ptr %arrayidx99.7, align 4, !tbaa !5 %cmp100.7 = icmp eq i32 %192, 8 br i1 %cmp100.7, label %for.inc106.7, label %if.end103.7 if.end103.7: ; preds = %land.lhs.true97.7, %if.end91.7 %indvars.iv.next169.7 = add nuw nsw i64 %indvars.iv168.7, 1 %cmp87.7 = icmp eq i64 %indvars.iv.next169.7, %190 br i1 %cmp87.7, label %if.then89.7, label %if.end91.7 if.then89.7: ; preds = %if.end103.7, %for.inc106.6 %call90.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8) %.pre217 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc106.7 for.inc106.7: ; preds = %land.lhs.true97.7, %if.then89.7 %193 = phi i32 [ %.pre217, %if.then89.7 ], [ %189, %land.lhs.true97.7 ] %cmp87155.8 = icmp eq i32 %193, 0 br i1 %cmp87155.8, label %if.then89.8, label %if.end91.preheader.8 if.end91.preheader.8: ; preds = %for.inc106.7 %194 = zext i32 %193 to i64 br label %if.end91.8 if.end91.8: ; preds = %if.end103.8, %if.end91.preheader.8 %indvars.iv168.8 = phi i64 [ 0, %if.end91.preheader.8 ], [ %indvars.iv.next169.8, %if.end103.8 ] %arrayidx93.8 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv168.8 %195 = load i8, ptr %arrayidx93.8, align 1, !tbaa !11 %cmp95.8 = icmp eq i8 %195, 68 br i1 %cmp95.8, label %land.lhs.true97.8, label %if.end103.8 land.lhs.true97.8: ; preds = %if.end91.8 %arrayidx99.8 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv168.8 %196 = load i32, ptr %arrayidx99.8, align 4, !tbaa !5 %cmp100.8 = icmp eq i32 %196, 9 br i1 %cmp100.8, label %for.inc106.8, label %if.end103.8 if.end103.8: ; preds = %land.lhs.true97.8, %if.end91.8 %indvars.iv.next169.8 = add nuw nsw i64 %indvars.iv168.8, 1 %cmp87.8 = icmp eq i64 %indvars.iv.next169.8, %194 br i1 %cmp87.8, label %if.then89.8, label %if.end91.8 if.then89.8: ; preds = %if.end103.8, %for.inc106.7 %call90.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9) %.pre218 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc106.8 for.inc106.8: ; preds = %land.lhs.true97.8, %if.then89.8 %197 = phi i32 [ %.pre218, %if.then89.8 ], [ %193, %land.lhs.true97.8 ] %cmp87155.9 = icmp eq i32 %197, 0 br i1 %cmp87155.9, label %if.then89.9, label %if.end91.preheader.9 if.end91.preheader.9: ; preds = %for.inc106.8 %198 = zext i32 %197 to i64 br label %if.end91.9 if.end91.9: ; preds = %if.end103.9, %if.end91.preheader.9 %indvars.iv168.9 = phi i64 [ 0, %if.end91.preheader.9 ], [ %indvars.iv.next169.9, %if.end103.9 ] %arrayidx93.9 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv168.9 %199 = load i8, ptr %arrayidx93.9, align 1, !tbaa !11 %cmp95.9 = icmp eq i8 %199, 68 br i1 %cmp95.9, label %land.lhs.true97.9, label %if.end103.9 land.lhs.true97.9: ; preds = %if.end91.9 %arrayidx99.9 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv168.9 %200 = load i32, ptr %arrayidx99.9, align 4, !tbaa !5 %cmp100.9 = icmp eq i32 %200, 10 br i1 %cmp100.9, label %for.inc106.9, label %if.end103.9 if.end103.9: ; preds = %land.lhs.true97.9, %if.end91.9 %indvars.iv.next169.9 = add nuw nsw i64 %indvars.iv168.9, 1 %cmp87.9 = icmp eq i64 %indvars.iv.next169.9, %198 br i1 %cmp87.9, label %if.then89.9, label %if.end91.9 if.then89.9: ; preds = %if.end103.9, %for.inc106.8 %call90.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10) %.pre219 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc106.9 for.inc106.9: ; preds = %land.lhs.true97.9, %if.then89.9 %201 = phi i32 [ %.pre219, %if.then89.9 ], [ %197, %land.lhs.true97.9 ] %cmp87155.10 = icmp eq i32 %201, 0 br i1 %cmp87155.10, label %if.then89.10, label %if.end91.preheader.10 if.end91.preheader.10: ; preds = %for.inc106.9 %202 = zext i32 %201 to i64 br label %if.end91.10 if.end91.10: ; preds = %if.end103.10, %if.end91.preheader.10 %indvars.iv168.10 = phi i64 [ 0, %if.end91.preheader.10 ], [ %indvars.iv.next169.10, %if.end103.10 ] %arrayidx93.10 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv168.10 %203 = load i8, ptr %arrayidx93.10, align 1, !tbaa !11 %cmp95.10 = icmp eq i8 %203, 68 br i1 %cmp95.10, label %land.lhs.true97.10, label %if.end103.10 land.lhs.true97.10: ; preds = %if.end91.10 %arrayidx99.10 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv168.10 %204 = load i32, ptr %arrayidx99.10, align 4, !tbaa !5 %cmp100.10 = icmp eq i32 %204, 11 br i1 %cmp100.10, label %for.inc106.10, label %if.end103.10 if.end103.10: ; preds = %land.lhs.true97.10, %if.end91.10 %indvars.iv.next169.10 = add nuw nsw i64 %indvars.iv168.10, 1 %cmp87.10 = icmp eq i64 %indvars.iv.next169.10, %202 br i1 %cmp87.10, label %if.then89.10, label %if.end91.10 if.then89.10: ; preds = %if.end103.10, %for.inc106.9 %call90.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11) %.pre220 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc106.10 for.inc106.10: ; preds = %land.lhs.true97.10, %if.then89.10 %205 = phi i32 [ %.pre220, %if.then89.10 ], [ %201, %land.lhs.true97.10 ] %cmp87155.11 = icmp eq i32 %205, 0 br i1 %cmp87155.11, label %if.then89.11, label %if.end91.preheader.11 if.end91.preheader.11: ; preds = %for.inc106.10 %206 = zext i32 %205 to i64 br label %if.end91.11 if.end91.11: ; preds = %if.end103.11, %if.end91.preheader.11 %indvars.iv168.11 = phi i64 [ 0, %if.end91.preheader.11 ], [ %indvars.iv.next169.11, %if.end103.11 ] %arrayidx93.11 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv168.11 %207 = load i8, ptr %arrayidx93.11, align 1, !tbaa !11 %cmp95.11 = icmp eq i8 %207, 68 br i1 %cmp95.11, label %land.lhs.true97.11, label %if.end103.11 land.lhs.true97.11: ; preds = %if.end91.11 %arrayidx99.11 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv168.11 %208 = load i32, ptr %arrayidx99.11, align 4, !tbaa !5 %cmp100.11 = icmp eq i32 %208, 12 br i1 %cmp100.11, label %for.inc106.11, label %if.end103.11 if.end103.11: ; preds = %land.lhs.true97.11, %if.end91.11 %indvars.iv.next169.11 = add nuw nsw i64 %indvars.iv168.11, 1 %cmp87.11 = icmp eq i64 %indvars.iv.next169.11, %206 br i1 %cmp87.11, label %if.then89.11, label %if.end91.11 if.then89.11: ; preds = %if.end103.11, %for.inc106.10 %call90.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12) %.pre221 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc106.11 for.inc106.11: ; preds = %land.lhs.true97.11, %if.then89.11 %209 = phi i32 [ %.pre221, %if.then89.11 ], [ %205, %land.lhs.true97.11 ] %cmp87155.12 = icmp eq i32 %209, 0 br i1 %cmp87155.12, label %if.then89.12, label %if.end91.preheader.12 if.end91.preheader.12: ; preds = %for.inc106.11 %210 = zext i32 %209 to i64 br label %if.end91.12 if.end91.12: ; preds = %if.end103.12, %if.end91.preheader.12 %indvars.iv168.12 = phi i64 [ 0, %if.end91.preheader.12 ], [ %indvars.iv.next169.12, %if.end103.12 ] %arrayidx93.12 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv168.12 %211 = load i8, ptr %arrayidx93.12, align 1, !tbaa !11 %cmp95.12 = icmp eq i8 %211, 68 br i1 %cmp95.12, label %land.lhs.true97.12, label %if.end103.12 land.lhs.true97.12: ; preds = %if.end91.12 %arrayidx99.12 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv168.12 %212 = load i32, ptr %arrayidx99.12, align 4, !tbaa !5 %cmp100.12 = icmp eq i32 %212, 13 br i1 %cmp100.12, label %for.inc106.12, label %if.end103.12 if.end103.12: ; preds = %land.lhs.true97.12, %if.end91.12 %indvars.iv.next169.12 = add nuw nsw i64 %indvars.iv168.12, 1 %cmp87.12 = icmp eq i64 %indvars.iv.next169.12, %210 br i1 %cmp87.12, label %if.then89.12, label %if.end91.12 if.then89.12: ; preds = %if.end103.12, %for.inc106.11 %call90.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 13) br label %for.inc106.12 for.inc106.12: ; preds = %land.lhs.true97.12, %if.then89.12 call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!7, !7, i64 0}
#include <stdio.h> #define RANK_N 4 #define CARD_N 13 int main(void){ int c[RANK_N][CARD_N]; int n; char rank; int i,j,k; for (i = 0; i < RANK_N; i++) { for (j = 0; j < CARD_N; j++) { c[i][j] = 0; } } scanf("%d", &n); for (k = 0; k < n; k++) { scanf("%*c%c %d", &rank, &j); if (rank == 'S') i = 0; else if (rank == 'H') i = 1; else if (rank == 'C') i = 2; else if (rank == 'D') i = 3; c[i][j-1] = 1; } for (i = 0; i < RANK_N; i++) { for (j = 0; j < CARD_N; j++) { if (c[i][j] == 1) continue; if (i == 0) rank = 'S'; else if (i == 1) rank = 'H'; else if (i == 2) rank = 'C'; else if (i == 3) rank = 'D'; printf("%c %d\n", rank, j+1); } } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215210/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215210/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [9 x i8] c"%*c%c %d\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %c = alloca [4 x [13 x i32]], align 16 %n = alloca i32, align 4 %rank = alloca i8, align 1 %j = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %c) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %rank) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %j) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %c, i8 0, i64 208, i1 false), !tbaa !5 store i32 13, ptr %j, align 4, !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp1098 = icmp sgt i32 %0, 0 br i1 %cmp1098, label %for.body11, label %for.cond39.preheader for.cond39.preheader: ; preds = %if.end31, %entry store i32 0, ptr %j, align 4, !tbaa !5 br label %for.body46 for.body11: ; preds = %entry, %if.end31 %k.0100 = phi i32 [ %inc37, %if.end31 ], [ 0, %entry ] %i.199 = phi i32 [ %i.2, %if.end31 ], [ 4, %entry ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %rank, ptr noundef nonnull %j) %1 = load i8, ptr %rank, align 1, !tbaa !9 switch i8 %1, label %if.end31.fold.split [ i8 83, label %if.end31 i8 72, label %if.then18 i8 67, label %if.then23 i8 68, label %if.then28 ] if.then18: ; preds = %for.body11 br label %if.end31 if.then23: ; preds = %for.body11 br label %if.end31 if.then28: ; preds = %for.body11 br label %if.end31 if.end31.fold.split: ; preds = %for.body11 br label %if.end31 if.end31: ; preds = %for.body11, %if.end31.fold.split, %if.then18, %if.then28, %if.then23 %i.2 = phi i32 [ 1, %if.then18 ], [ 2, %if.then23 ], [ 3, %if.then28 ], [ 0, %for.body11 ], [ %i.199, %if.end31.fold.split ] %idxprom32 = zext i32 %i.2 to i64 %2 = load i32, ptr %j, align 4, !tbaa !5 %sub = add nsw i32 %2, -1 %idxprom34 = sext i32 %sub to i64 %arrayidx35 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 %idxprom32, i64 %idxprom34 store i32 1, ptr %arrayidx35, align 4, !tbaa !5 %inc37 = add nuw nsw i32 %k.0100, 1 %3 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc37, %3 br i1 %cmp10, label %for.body11, label %for.cond39.preheader, !llvm.loop !10 for.body46: ; preds = %for.cond39.preheader, %for.inc76 %storemerge101 = phi i32 [ 0, %for.cond39.preheader ], [ %inc77, %for.inc76 ] %idxprom49 = sext i32 %storemerge101 to i64 %arrayidx50 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 0, i64 %idxprom49 %4 = load i32, ptr %arrayidx50, align 4, !tbaa !5 %cmp51 = icmp eq i32 %4, 1 br i1 %cmp51, label %for.inc76, label %if.end73 if.end73: ; preds = %for.body46 store i8 83, ptr %rank, align 1, !tbaa !9 %add = add nsw i32 %storemerge101, 1 %call75 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef %add) %.pre106 = load i32, ptr %j, align 4, !tbaa !5 br label %for.inc76 for.inc76: ; preds = %for.body46, %if.end73 %5 = phi i32 [ %storemerge101, %for.body46 ], [ %.pre106, %if.end73 ] %inc77 = add nsw i32 %5, 1 store i32 %inc77, ptr %j, align 4, !tbaa !5 %cmp44 = icmp slt i32 %5, 12 br i1 %cmp44, label %for.body46, label %for.inc79, !llvm.loop !12 for.inc79: ; preds = %for.inc76 store i32 0, ptr %j, align 4, !tbaa !5 br label %for.body46.1 for.body46.1: ; preds = %for.inc76.1, %for.inc79 %storemerge101.1 = phi i32 [ 0, %for.inc79 ], [ %inc77.1, %for.inc76.1 ] %idxprom49.1 = sext i32 %storemerge101.1 to i64 %arrayidx50.1 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 1, i64 %idxprom49.1 %6 = load i32, ptr %arrayidx50.1, align 4, !tbaa !5 %cmp51.1 = icmp eq i32 %6, 1 br i1 %cmp51.1, label %for.inc76.1, label %if.end73.1 if.end73.1: ; preds = %for.body46.1 store i8 72, ptr %rank, align 1, !tbaa !9 %add.1 = add nsw i32 %storemerge101.1, 1 %call75.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef %add.1) %.pre108 = load i32, ptr %j, align 4, !tbaa !5 br label %for.inc76.1 for.inc76.1: ; preds = %if.end73.1, %for.body46.1 %7 = phi i32 [ %.pre108, %if.end73.1 ], [ %storemerge101.1, %for.body46.1 ] %inc77.1 = add nsw i32 %7, 1 store i32 %inc77.1, ptr %j, align 4, !tbaa !5 %cmp44.1 = icmp slt i32 %7, 12 br i1 %cmp44.1, label %for.body46.1, label %for.inc79.1, !llvm.loop !12 for.inc79.1: ; preds = %for.inc76.1 store i32 0, ptr %j, align 4, !tbaa !5 br label %for.body46.2 for.body46.2: ; preds = %for.inc76.2, %for.inc79.1 %storemerge101.2 = phi i32 [ 0, %for.inc79.1 ], [ %inc77.2, %for.inc76.2 ] %idxprom49.2 = sext i32 %storemerge101.2 to i64 %arrayidx50.2 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 2, i64 %idxprom49.2 %8 = load i32, ptr %arrayidx50.2, align 4, !tbaa !5 %cmp51.2 = icmp eq i32 %8, 1 br i1 %cmp51.2, label %for.inc76.2, label %if.end73.2 if.end73.2: ; preds = %for.body46.2 store i8 67, ptr %rank, align 1, !tbaa !9 %add.2 = add nsw i32 %storemerge101.2, 1 %call75.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef %add.2) %.pre110 = load i32, ptr %j, align 4, !tbaa !5 br label %for.inc76.2 for.inc76.2: ; preds = %if.end73.2, %for.body46.2 %9 = phi i32 [ %.pre110, %if.end73.2 ], [ %storemerge101.2, %for.body46.2 ] %inc77.2 = add nsw i32 %9, 1 store i32 %inc77.2, ptr %j, align 4, !tbaa !5 %cmp44.2 = icmp slt i32 %9, 12 br i1 %cmp44.2, label %for.body46.2, label %for.inc79.2, !llvm.loop !12 for.inc79.2: ; preds = %for.inc76.2 store i32 0, ptr %j, align 4, !tbaa !5 br label %for.body46.3 for.body46.3: ; preds = %for.inc76.3, %for.inc79.2 %storemerge101.3 = phi i32 [ 0, %for.inc79.2 ], [ %inc77.3, %for.inc76.3 ] %idxprom49.3 = sext i32 %storemerge101.3 to i64 %arrayidx50.3 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 3, i64 %idxprom49.3 %10 = load i32, ptr %arrayidx50.3, align 4, !tbaa !5 %cmp51.3 = icmp eq i32 %10, 1 br i1 %cmp51.3, label %for.inc76.3, label %if.end73.3 if.end73.3: ; preds = %for.body46.3 store i8 68, ptr %rank, align 1, !tbaa !9 %add.3 = add nsw i32 %storemerge101.3, 1 %call75.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef %add.3) %.pre112 = load i32, ptr %j, align 4, !tbaa !5 br label %for.inc76.3 for.inc76.3: ; preds = %if.end73.3, %for.body46.3 %11 = phi i32 [ %.pre112, %if.end73.3 ], [ %storemerge101.3, %for.body46.3 ] %inc77.3 = add nsw i32 %11, 1 store i32 %inc77.3, ptr %j, align 4, !tbaa !5 %cmp44.3 = icmp slt i32 %11, 12 br i1 %cmp44.3, label %for.body46.3, label %for.inc79.3, !llvm.loop !12 for.inc79.3: ; preds = %for.inc76.3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %j) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %rank) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %c) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include <stdio.h> #include <stdlib.h> int main(){ int n,a[4][14]; char s[2]; int h; for(int i=0;i<4;i++){ for(int j=1;j<14;j++){ a[i][j]=0; } } scanf("%d",&n); for(int i=0;i<n;i++){ scanf("%s %d",s,&h); switch(s[0]){ case 'S': a[0][h]=1; break; case 'H': a[1][h]=1; break; case 'C': a[2][h]=1; break; case 'D': a[3][h]=1; break; } } char S[4]={'S','H','C','D'}; for(int i=0;i<4;i++){ for(int j=1;j<14;j++){ if(a[i][j]==0){ printf("%c %d\n",S[i],j); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215269/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215269/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%s %d\00", align 1 @__const.main.S = private unnamed_addr constant [4 x i8] c"SHCD", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %a = alloca [4 x [14 x i32]], align 16 %s = alloca [2 x i8], align 1 %h = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %s) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 %scevgep = getelementptr inbounds i8, ptr %a, i64 4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %scevgep, i8 0, i64 52, i1 false), !tbaa !5 %scevgep.1 = getelementptr inbounds i8, ptr %a, i64 60 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %scevgep.1, i8 0, i64 52, i1 false), !tbaa !5 %scevgep.2 = getelementptr inbounds i8, ptr %a, i64 116 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %scevgep.2, i8 0, i64 52, i1 false), !tbaa !5 %scevgep.3 = getelementptr inbounds i8, ptr %a, i64 172 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %scevgep.3, i8 0, i64 52, i1 false), !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp1276 = icmp sgt i32 %0, 0 br i1 %cmp1276, label %for.body14, label %for.cond42.preheader.preheader for.body14: ; preds = %entry, %for.inc32 %i10.077 = phi i32 [ %inc33, %for.inc32 ], [ 0, %entry ] %call15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s, ptr noundef nonnull %h) %1 = load i8, ptr %s, align 1, !tbaa !9 %conv = sext i8 %1 to i32 switch i32 %conv, label %for.inc32 [ i32 83, label %sw.bb i32 72, label %sw.bb20 i32 67, label %sw.bb24 i32 68, label %sw.bb28 ] sw.bb: ; preds = %for.body14 %2 = load i32, ptr %h, align 4, !tbaa !5 %idxprom18 = sext i32 %2 to i64 %arrayidx19 = getelementptr inbounds [14 x i32], ptr %a, i64 0, i64 %idxprom18 br label %for.inc32.sink.split sw.bb20: ; preds = %for.body14 %3 = load i32, ptr %h, align 4, !tbaa !5 %idxprom22 = sext i32 %3 to i64 %arrayidx23 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 1, i64 %idxprom22 br label %for.inc32.sink.split sw.bb24: ; preds = %for.body14 %4 = load i32, ptr %h, align 4, !tbaa !5 %idxprom26 = sext i32 %4 to i64 %arrayidx27 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 2, i64 %idxprom26 br label %for.inc32.sink.split sw.bb28: ; preds = %for.body14 %5 = load i32, ptr %h, align 4, !tbaa !5 %idxprom30 = sext i32 %5 to i64 %arrayidx31 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 3, i64 %idxprom30 br label %for.inc32.sink.split for.inc32.sink.split: ; preds = %sw.bb28, %sw.bb24, %sw.bb20, %sw.bb %arrayidx19.sink = phi ptr [ %arrayidx19, %sw.bb ], [ %arrayidx23, %sw.bb20 ], [ %arrayidx27, %sw.bb24 ], [ %arrayidx31, %sw.bb28 ] store i32 1, ptr %arrayidx19.sink, align 4, !tbaa !5 br label %for.inc32 for.inc32: ; preds = %for.inc32.sink.split, %for.body14 %inc33 = add nuw nsw i32 %i10.077, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp12 = icmp slt i32 %inc33, %6 br i1 %cmp12, label %for.body14, label %for.cond42.preheader.preheader, !llvm.loop !10 for.cond42.preheader.preheader: ; preds = %for.inc32, %entry br label %for.cond42.preheader for.cond42.preheader: ; preds = %for.cond42.preheader.preheader, %for.inc57.12 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc57.12 ], [ 0, %for.cond42.preheader.preheader ] %arrayidx54 = getelementptr inbounds [4 x i8], ptr @__const.main.S, i64 0, i64 %indvars.iv %arrayidx50 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 1 %7 = load i32, ptr %arrayidx50, align 4, !tbaa !5 %cmp51 = icmp eq i32 %7, 0 br i1 %cmp51, label %if.then, label %for.inc57 for.cond.cleanup39: ; preds = %for.inc57.12 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %s) #4 call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 if.then: ; preds = %for.cond42.preheader %8 = load i8, ptr %arrayidx54, align 1, !tbaa !9 %conv55 = sext i8 %8 to i32 %call56 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv55, i32 noundef 1) br label %for.inc57 for.inc57: ; preds = %for.cond42.preheader, %if.then %arrayidx50.1 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 2 %9 = load i32, ptr %arrayidx50.1, align 8, !tbaa !5 %cmp51.1 = icmp eq i32 %9, 0 br i1 %cmp51.1, label %if.then.1, label %for.inc57.1 if.then.1: ; preds = %for.inc57 %10 = load i8, ptr %arrayidx54, align 1, !tbaa !9 %conv55.1 = sext i8 %10 to i32 %call56.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv55.1, i32 noundef 2) br label %for.inc57.1 for.inc57.1: ; preds = %if.then.1, %for.inc57 %arrayidx50.2 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 3 %11 = load i32, ptr %arrayidx50.2, align 4, !tbaa !5 %cmp51.2 = icmp eq i32 %11, 0 br i1 %cmp51.2, label %if.then.2, label %for.inc57.2 if.then.2: ; preds = %for.inc57.1 %12 = load i8, ptr %arrayidx54, align 1, !tbaa !9 %conv55.2 = sext i8 %12 to i32 %call56.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv55.2, i32 noundef 3) br label %for.inc57.2 for.inc57.2: ; preds = %if.then.2, %for.inc57.1 %arrayidx50.3 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 4 %13 = load i32, ptr %arrayidx50.3, align 8, !tbaa !5 %cmp51.3 = icmp eq i32 %13, 0 br i1 %cmp51.3, label %if.then.3, label %for.inc57.3 if.then.3: ; preds = %for.inc57.2 %14 = load i8, ptr %arrayidx54, align 1, !tbaa !9 %conv55.3 = sext i8 %14 to i32 %call56.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv55.3, i32 noundef 4) br label %for.inc57.3 for.inc57.3: ; preds = %if.then.3, %for.inc57.2 %arrayidx50.4 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 5 %15 = load i32, ptr %arrayidx50.4, align 4, !tbaa !5 %cmp51.4 = icmp eq i32 %15, 0 br i1 %cmp51.4, label %if.then.4, label %for.inc57.4 if.then.4: ; preds = %for.inc57.3 %16 = load i8, ptr %arrayidx54, align 1, !tbaa !9 %conv55.4 = sext i8 %16 to i32 %call56.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv55.4, i32 noundef 5) br label %for.inc57.4 for.inc57.4: ; preds = %if.then.4, %for.inc57.3 %arrayidx50.5 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 6 %17 = load i32, ptr %arrayidx50.5, align 8, !tbaa !5 %cmp51.5 = icmp eq i32 %17, 0 br i1 %cmp51.5, label %if.then.5, label %for.inc57.5 if.then.5: ; preds = %for.inc57.4 %18 = load i8, ptr %arrayidx54, align 1, !tbaa !9 %conv55.5 = sext i8 %18 to i32 %call56.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv55.5, i32 noundef 6) br label %for.inc57.5 for.inc57.5: ; preds = %if.then.5, %for.inc57.4 %arrayidx50.6 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 7 %19 = load i32, ptr %arrayidx50.6, align 4, !tbaa !5 %cmp51.6 = icmp eq i32 %19, 0 br i1 %cmp51.6, label %if.then.6, label %for.inc57.6 if.then.6: ; preds = %for.inc57.5 %20 = load i8, ptr %arrayidx54, align 1, !tbaa !9 %conv55.6 = sext i8 %20 to i32 %call56.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv55.6, i32 noundef 7) br label %for.inc57.6 for.inc57.6: ; preds = %if.then.6, %for.inc57.5 %arrayidx50.7 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 8 %21 = load i32, ptr %arrayidx50.7, align 8, !tbaa !5 %cmp51.7 = icmp eq i32 %21, 0 br i1 %cmp51.7, label %if.then.7, label %for.inc57.7 if.then.7: ; preds = %for.inc57.6 %22 = load i8, ptr %arrayidx54, align 1, !tbaa !9 %conv55.7 = sext i8 %22 to i32 %call56.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv55.7, i32 noundef 8) br label %for.inc57.7 for.inc57.7: ; preds = %if.then.7, %for.inc57.6 %arrayidx50.8 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 9 %23 = load i32, ptr %arrayidx50.8, align 4, !tbaa !5 %cmp51.8 = icmp eq i32 %23, 0 br i1 %cmp51.8, label %if.then.8, label %for.inc57.8 if.then.8: ; preds = %for.inc57.7 %24 = load i8, ptr %arrayidx54, align 1, !tbaa !9 %conv55.8 = sext i8 %24 to i32 %call56.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv55.8, i32 noundef 9) br label %for.inc57.8 for.inc57.8: ; preds = %if.then.8, %for.inc57.7 %arrayidx50.9 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 10 %25 = load i32, ptr %arrayidx50.9, align 8, !tbaa !5 %cmp51.9 = icmp eq i32 %25, 0 br i1 %cmp51.9, label %if.then.9, label %for.inc57.9 if.then.9: ; preds = %for.inc57.8 %26 = load i8, ptr %arrayidx54, align 1, !tbaa !9 %conv55.9 = sext i8 %26 to i32 %call56.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv55.9, i32 noundef 10) br label %for.inc57.9 for.inc57.9: ; preds = %if.then.9, %for.inc57.8 %arrayidx50.10 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 11 %27 = load i32, ptr %arrayidx50.10, align 4, !tbaa !5 %cmp51.10 = icmp eq i32 %27, 0 br i1 %cmp51.10, label %if.then.10, label %for.inc57.10 if.then.10: ; preds = %for.inc57.9 %28 = load i8, ptr %arrayidx54, align 1, !tbaa !9 %conv55.10 = sext i8 %28 to i32 %call56.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv55.10, i32 noundef 11) br label %for.inc57.10 for.inc57.10: ; preds = %if.then.10, %for.inc57.9 %arrayidx50.11 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 12 %29 = load i32, ptr %arrayidx50.11, align 8, !tbaa !5 %cmp51.11 = icmp eq i32 %29, 0 br i1 %cmp51.11, label %if.then.11, label %for.inc57.11 if.then.11: ; preds = %for.inc57.10 %30 = load i8, ptr %arrayidx54, align 1, !tbaa !9 %conv55.11 = sext i8 %30 to i32 %call56.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv55.11, i32 noundef 12) br label %for.inc57.11 for.inc57.11: ; preds = %if.then.11, %for.inc57.10 %arrayidx50.12 = getelementptr inbounds [4 x [14 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 13 %31 = load i32, ptr %arrayidx50.12, align 4, !tbaa !5 %cmp51.12 = icmp eq i32 %31, 0 br i1 %cmp51.12, label %if.then.12, label %for.inc57.12 if.then.12: ; preds = %for.inc57.11 %32 = load i8, ptr %arrayidx54, align 1, !tbaa !9 %conv55.12 = sext i8 %32 to i32 %call56.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv55.12, i32 noundef 13) br label %for.inc57.12 for.inc57.12: ; preds = %if.then.12, %for.inc57.11 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %for.cond.cleanup39, label %for.cond42.preheader, !llvm.loop !12 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: 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 @__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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include <stdio.h> int main() { int a[4][13], n, m, i, j; char ch, d; for (i = 0; i < 4; i++) { for (j = 0; j < 13; j++) { a[i][j] = 0; } } scanf("%d",&n); for (int h = 1; h <= n; h++) { //所持しているトランプを出力する getchar(); scanf("%c %d",&ch,&m); if (ch == 'S') a[0][m] = 1; else if (ch == 'H') a[1][m] = 1; else if (ch == 'C') a[2][m] = 1; else if (ch == 'D') a[3][m] = 1; } for (j = 1; j <= 13; j++) { if (a[0][j] != 1) printf("S %d\n", j); } for (j = 1; j <= 13; j++) { if (a[1][j] != 1) printf("H %d\n", j); } for (j = 1; j <= 13; j++) { if (a[2][j] != 1) printf("C %d\n", j); } for (j = 1; j <= 13; j++) { if (a[3][j] != 1) printf("D %d\n", j); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215311/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215311/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%c %d\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"S %d\0A\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"H %d\0A\00", align 1 @.str.4 = private unnamed_addr constant [6 x i8] c"C %d\0A\00", align 1 @.str.5 = private unnamed_addr constant [6 x i8] c"D %d\0A\00", align 1 @stdin = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca [4 x [13 x i32]], align 16 %n = alloca i32, align 4 %m = alloca i32, align 4 %ch = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %ch) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %a, i8 0, i64 208, i1 false), !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp10.not131 = icmp slt i32 %0, 1 br i1 %cmp10.not131, label %for.cond48.preheader, label %for.body11 for.cond48.preheader: ; preds = %for.inc45, %entry %arrayidx54 = getelementptr inbounds [13 x i32], ptr %a, i64 0, i64 1 %1 = load i32, ptr %arrayidx54, align 4, !tbaa !5 %cmp55.not = icmp eq i32 %1, 1 br i1 %cmp55.not, label %for.inc60, label %if.then57 for.body11: ; preds = %entry, %for.inc45 %h.0132 = phi i32 [ %inc46, %for.inc45 ], [ 1, %entry ] %2 = load ptr, ptr @stdin, align 8, !tbaa !9 %call.i = call i32 @getc(ptr noundef %2) %call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %ch, ptr noundef nonnull %m) %3 = load i8, ptr %ch, align 1, !tbaa !11 switch i8 %3, label %for.inc45 [ i8 83, label %if.then i8 72, label %if.then22 i8 67, label %if.then30 i8 68, label %if.then38 ] if.then: ; preds = %for.body11 %4 = load i32, ptr %m, align 4, !tbaa !5 %idxprom17 = sext i32 %4 to i64 %arrayidx18 = getelementptr inbounds [13 x i32], ptr %a, i64 0, i64 %idxprom17 br label %for.inc45.sink.split if.then22: ; preds = %for.body11 %5 = load i32, ptr %m, align 4, !tbaa !5 %idxprom24 = sext i32 %5 to i64 %arrayidx25 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 1, i64 %idxprom24 br label %for.inc45.sink.split if.then30: ; preds = %for.body11 %6 = load i32, ptr %m, align 4, !tbaa !5 %idxprom32 = sext i32 %6 to i64 %arrayidx33 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 2, i64 %idxprom32 br label %for.inc45.sink.split if.then38: ; preds = %for.body11 %7 = load i32, ptr %m, align 4, !tbaa !5 %idxprom40 = sext i32 %7 to i64 %arrayidx41 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 3, i64 %idxprom40 br label %for.inc45.sink.split for.inc45.sink.split: ; preds = %if.then22, %if.then38, %if.then30, %if.then %arrayidx18.sink = phi ptr [ %arrayidx18, %if.then ], [ %arrayidx33, %if.then30 ], [ %arrayidx41, %if.then38 ], [ %arrayidx25, %if.then22 ] store i32 1, ptr %arrayidx18.sink, align 4, !tbaa !5 br label %for.inc45 for.inc45: ; preds = %for.inc45.sink.split, %for.body11 %inc46 = add nuw nsw i32 %h.0132, 1 %8 = load i32, ptr %n, align 4, !tbaa !5 %cmp10.not.not = icmp slt i32 %h.0132, %8 br i1 %cmp10.not.not, label %for.body11, label %for.cond48.preheader, !llvm.loop !12 if.then57: ; preds = %for.cond48.preheader %call58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 1) br label %for.inc60 for.inc60: ; preds = %for.cond48.preheader, %if.then57 %arrayidx54.1 = getelementptr inbounds [13 x i32], ptr %a, i64 0, i64 2 %9 = load i32, ptr %arrayidx54.1, align 8, !tbaa !5 %cmp55.not.1 = icmp eq i32 %9, 1 br i1 %cmp55.not.1, label %for.inc60.1, label %if.then57.1 if.then57.1: ; preds = %for.inc60 %call58.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 2) br label %for.inc60.1 for.inc60.1: ; preds = %if.then57.1, %for.inc60 %arrayidx54.2 = getelementptr inbounds [13 x i32], ptr %a, i64 0, i64 3 %10 = load i32, ptr %arrayidx54.2, align 4, !tbaa !5 %cmp55.not.2 = icmp eq i32 %10, 1 br i1 %cmp55.not.2, label %for.inc60.2, label %if.then57.2 if.then57.2: ; preds = %for.inc60.1 %call58.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 3) br label %for.inc60.2 for.inc60.2: ; preds = %if.then57.2, %for.inc60.1 %arrayidx54.3 = getelementptr inbounds [13 x i32], ptr %a, i64 0, i64 4 %11 = load i32, ptr %arrayidx54.3, align 16, !tbaa !5 %cmp55.not.3 = icmp eq i32 %11, 1 br i1 %cmp55.not.3, label %for.inc60.3, label %if.then57.3 if.then57.3: ; preds = %for.inc60.2 %call58.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 4) br label %for.inc60.3 for.inc60.3: ; preds = %if.then57.3, %for.inc60.2 %arrayidx54.4 = getelementptr inbounds [13 x i32], ptr %a, i64 0, i64 5 %12 = load i32, ptr %arrayidx54.4, align 4, !tbaa !5 %cmp55.not.4 = icmp eq i32 %12, 1 br i1 %cmp55.not.4, label %for.inc60.4, label %if.then57.4 if.then57.4: ; preds = %for.inc60.3 %call58.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 5) br label %for.inc60.4 for.inc60.4: ; preds = %if.then57.4, %for.inc60.3 %arrayidx54.5 = getelementptr inbounds [13 x i32], ptr %a, i64 0, i64 6 %13 = load i32, ptr %arrayidx54.5, align 8, !tbaa !5 %cmp55.not.5 = icmp eq i32 %13, 1 br i1 %cmp55.not.5, label %for.inc60.5, label %if.then57.5 if.then57.5: ; preds = %for.inc60.4 %call58.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 6) br label %for.inc60.5 for.inc60.5: ; preds = %if.then57.5, %for.inc60.4 %arrayidx54.6 = getelementptr inbounds [13 x i32], ptr %a, i64 0, i64 7 %14 = load i32, ptr %arrayidx54.6, align 4, !tbaa !5 %cmp55.not.6 = icmp eq i32 %14, 1 br i1 %cmp55.not.6, label %for.inc60.6, label %if.then57.6 if.then57.6: ; preds = %for.inc60.5 %call58.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 7) br label %for.inc60.6 for.inc60.6: ; preds = %if.then57.6, %for.inc60.5 %arrayidx54.7 = getelementptr inbounds [13 x i32], ptr %a, i64 0, i64 8 %15 = load i32, ptr %arrayidx54.7, align 16, !tbaa !5 %cmp55.not.7 = icmp eq i32 %15, 1 br i1 %cmp55.not.7, label %for.inc60.7, label %if.then57.7 if.then57.7: ; preds = %for.inc60.6 %call58.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 8) br label %for.inc60.7 for.inc60.7: ; preds = %if.then57.7, %for.inc60.6 %arrayidx54.8 = getelementptr inbounds [13 x i32], ptr %a, i64 0, i64 9 %16 = load i32, ptr %arrayidx54.8, align 4, !tbaa !5 %cmp55.not.8 = icmp eq i32 %16, 1 br i1 %cmp55.not.8, label %for.inc60.8, label %if.then57.8 if.then57.8: ; preds = %for.inc60.7 %call58.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 9) br label %for.inc60.8 for.inc60.8: ; preds = %if.then57.8, %for.inc60.7 %arrayidx54.9 = getelementptr inbounds [13 x i32], ptr %a, i64 0, i64 10 %17 = load i32, ptr %arrayidx54.9, align 8, !tbaa !5 %cmp55.not.9 = icmp eq i32 %17, 1 br i1 %cmp55.not.9, label %for.inc60.9, label %if.then57.9 if.then57.9: ; preds = %for.inc60.8 %call58.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 10) br label %for.inc60.9 for.inc60.9: ; preds = %if.then57.9, %for.inc60.8 %arrayidx54.10 = getelementptr inbounds [13 x i32], ptr %a, i64 0, i64 11 %18 = load i32, ptr %arrayidx54.10, align 4, !tbaa !5 %cmp55.not.10 = icmp eq i32 %18, 1 br i1 %cmp55.not.10, label %for.inc60.10, label %if.then57.10 if.then57.10: ; preds = %for.inc60.9 %call58.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 11) br label %for.inc60.10 for.inc60.10: ; preds = %if.then57.10, %for.inc60.9 %arrayidx54.11 = getelementptr inbounds [13 x i32], ptr %a, i64 0, i64 12 %19 = load i32, ptr %arrayidx54.11, align 16, !tbaa !5 %cmp55.not.11 = icmp eq i32 %19, 1 br i1 %cmp55.not.11, label %for.inc60.11, label %if.then57.11 if.then57.11: ; preds = %for.inc60.10 %call58.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 12) br label %for.inc60.11 for.inc60.11: ; preds = %if.then57.11, %for.inc60.10 %arrayidx54.12 = getelementptr inbounds [13 x i32], ptr %a, i64 0, i64 13 %20 = load i32, ptr %arrayidx54.12, align 4, !tbaa !5 %cmp55.not.12 = icmp eq i32 %20, 1 br i1 %cmp55.not.12, label %for.inc60.12, label %if.then57.12 if.then57.12: ; preds = %for.inc60.11 %call58.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 13) br label %for.inc60.12 for.inc60.12: ; preds = %if.then57.12, %for.inc60.11 %arrayidx69 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 1, i64 1 %21 = load i32, ptr %arrayidx69, align 8, !tbaa !5 %cmp70.not = icmp eq i32 %21, 1 br i1 %cmp70.not, label %for.inc75, label %if.then72 if.then72: ; preds = %for.inc60.12 %call73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1) br label %for.inc75 for.inc75: ; preds = %for.inc60.12, %if.then72 %arrayidx69.1 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 1, i64 2 %22 = load i32, ptr %arrayidx69.1, align 4, !tbaa !5 %cmp70.not.1 = icmp eq i32 %22, 1 br i1 %cmp70.not.1, label %for.inc75.1, label %if.then72.1 if.then72.1: ; preds = %for.inc75 %call73.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2) br label %for.inc75.1 for.inc75.1: ; preds = %if.then72.1, %for.inc75 %arrayidx69.2 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 1, i64 3 %23 = load i32, ptr %arrayidx69.2, align 16, !tbaa !5 %cmp70.not.2 = icmp eq i32 %23, 1 br i1 %cmp70.not.2, label %for.inc75.2, label %if.then72.2 if.then72.2: ; preds = %for.inc75.1 %call73.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3) br label %for.inc75.2 for.inc75.2: ; preds = %if.then72.2, %for.inc75.1 %arrayidx69.3 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 1, i64 4 %24 = load i32, ptr %arrayidx69.3, align 4, !tbaa !5 %cmp70.not.3 = icmp eq i32 %24, 1 br i1 %cmp70.not.3, label %for.inc75.3, label %if.then72.3 if.then72.3: ; preds = %for.inc75.2 %call73.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4) br label %for.inc75.3 for.inc75.3: ; preds = %if.then72.3, %for.inc75.2 %arrayidx69.4 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 1, i64 5 %25 = load i32, ptr %arrayidx69.4, align 8, !tbaa !5 %cmp70.not.4 = icmp eq i32 %25, 1 br i1 %cmp70.not.4, label %for.inc75.4, label %if.then72.4 if.then72.4: ; preds = %for.inc75.3 %call73.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5) br label %for.inc75.4 for.inc75.4: ; preds = %if.then72.4, %for.inc75.3 %arrayidx69.5 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 1, i64 6 %26 = load i32, ptr %arrayidx69.5, align 4, !tbaa !5 %cmp70.not.5 = icmp eq i32 %26, 1 br i1 %cmp70.not.5, label %for.inc75.5, label %if.then72.5 if.then72.5: ; preds = %for.inc75.4 %call73.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6) br label %for.inc75.5 for.inc75.5: ; preds = %if.then72.5, %for.inc75.4 %arrayidx69.6 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 1, i64 7 %27 = load i32, ptr %arrayidx69.6, align 16, !tbaa !5 %cmp70.not.6 = icmp eq i32 %27, 1 br i1 %cmp70.not.6, label %for.inc75.6, label %if.then72.6 if.then72.6: ; preds = %for.inc75.5 %call73.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7) br label %for.inc75.6 for.inc75.6: ; preds = %if.then72.6, %for.inc75.5 %arrayidx69.7 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 1, i64 8 %28 = load i32, ptr %arrayidx69.7, align 4, !tbaa !5 %cmp70.not.7 = icmp eq i32 %28, 1 br i1 %cmp70.not.7, label %for.inc75.7, label %if.then72.7 if.then72.7: ; preds = %for.inc75.6 %call73.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8) br label %for.inc75.7 for.inc75.7: ; preds = %if.then72.7, %for.inc75.6 %arrayidx69.8 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 1, i64 9 %29 = load i32, ptr %arrayidx69.8, align 8, !tbaa !5 %cmp70.not.8 = icmp eq i32 %29, 1 br i1 %cmp70.not.8, label %for.inc75.8, label %if.then72.8 if.then72.8: ; preds = %for.inc75.7 %call73.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9) br label %for.inc75.8 for.inc75.8: ; preds = %if.then72.8, %for.inc75.7 %arrayidx69.9 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 1, i64 10 %30 = load i32, ptr %arrayidx69.9, align 4, !tbaa !5 %cmp70.not.9 = icmp eq i32 %30, 1 br i1 %cmp70.not.9, label %for.inc75.9, label %if.then72.9 if.then72.9: ; preds = %for.inc75.8 %call73.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10) br label %for.inc75.9 for.inc75.9: ; preds = %if.then72.9, %for.inc75.8 %arrayidx69.10 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 1, i64 11 %31 = load i32, ptr %arrayidx69.10, align 16, !tbaa !5 %cmp70.not.10 = icmp eq i32 %31, 1 br i1 %cmp70.not.10, label %for.inc75.10, label %if.then72.10 if.then72.10: ; preds = %for.inc75.9 %call73.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11) br label %for.inc75.10 for.inc75.10: ; preds = %if.then72.10, %for.inc75.9 %arrayidx69.11 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 1, i64 12 %32 = load i32, ptr %arrayidx69.11, align 4, !tbaa !5 %cmp70.not.11 = icmp eq i32 %32, 1 br i1 %cmp70.not.11, label %for.inc75.11, label %if.then72.11 if.then72.11: ; preds = %for.inc75.10 %call73.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12) br label %for.inc75.11 for.inc75.11: ; preds = %if.then72.11, %for.inc75.10 %arrayidx69.12 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 1, i64 13 %33 = load i32, ptr %arrayidx69.12, align 8, !tbaa !5 %cmp70.not.12 = icmp eq i32 %33, 1 br i1 %cmp70.not.12, label %for.inc75.12, label %if.then72.12 if.then72.12: ; preds = %for.inc75.11 %call73.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 13) br label %for.inc75.12 for.inc75.12: ; preds = %if.then72.12, %for.inc75.11 %arrayidx84 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 2, i64 1 %34 = load i32, ptr %arrayidx84, align 4, !tbaa !5 %cmp85.not = icmp eq i32 %34, 1 br i1 %cmp85.not, label %for.inc90, label %if.then87 if.then87: ; preds = %for.inc75.12 %call88 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1) br label %for.inc90 for.inc90: ; preds = %for.inc75.12, %if.then87 %arrayidx84.1 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 2, i64 2 %35 = load i32, ptr %arrayidx84.1, align 16, !tbaa !5 %cmp85.not.1 = icmp eq i32 %35, 1 br i1 %cmp85.not.1, label %for.inc90.1, label %if.then87.1 if.then87.1: ; preds = %for.inc90 %call88.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2) br label %for.inc90.1 for.inc90.1: ; preds = %if.then87.1, %for.inc90 %arrayidx84.2 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 2, i64 3 %36 = load i32, ptr %arrayidx84.2, align 4, !tbaa !5 %cmp85.not.2 = icmp eq i32 %36, 1 br i1 %cmp85.not.2, label %for.inc90.2, label %if.then87.2 if.then87.2: ; preds = %for.inc90.1 %call88.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3) br label %for.inc90.2 for.inc90.2: ; preds = %if.then87.2, %for.inc90.1 %arrayidx84.3 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 2, i64 4 %37 = load i32, ptr %arrayidx84.3, align 8, !tbaa !5 %cmp85.not.3 = icmp eq i32 %37, 1 br i1 %cmp85.not.3, label %for.inc90.3, label %if.then87.3 if.then87.3: ; preds = %for.inc90.2 %call88.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4) br label %for.inc90.3 for.inc90.3: ; preds = %if.then87.3, %for.inc90.2 %arrayidx84.4 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 2, i64 5 %38 = load i32, ptr %arrayidx84.4, align 4, !tbaa !5 %cmp85.not.4 = icmp eq i32 %38, 1 br i1 %cmp85.not.4, label %for.inc90.4, label %if.then87.4 if.then87.4: ; preds = %for.inc90.3 %call88.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5) br label %for.inc90.4 for.inc90.4: ; preds = %if.then87.4, %for.inc90.3 %arrayidx84.5 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 2, i64 6 %39 = load i32, ptr %arrayidx84.5, align 16, !tbaa !5 %cmp85.not.5 = icmp eq i32 %39, 1 br i1 %cmp85.not.5, label %for.inc90.5, label %if.then87.5 if.then87.5: ; preds = %for.inc90.4 %call88.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6) br label %for.inc90.5 for.inc90.5: ; preds = %if.then87.5, %for.inc90.4 %arrayidx84.6 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 2, i64 7 %40 = load i32, ptr %arrayidx84.6, align 4, !tbaa !5 %cmp85.not.6 = icmp eq i32 %40, 1 br i1 %cmp85.not.6, label %for.inc90.6, label %if.then87.6 if.then87.6: ; preds = %for.inc90.5 %call88.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7) br label %for.inc90.6 for.inc90.6: ; preds = %if.then87.6, %for.inc90.5 %arrayidx84.7 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 2, i64 8 %41 = load i32, ptr %arrayidx84.7, align 8, !tbaa !5 %cmp85.not.7 = icmp eq i32 %41, 1 br i1 %cmp85.not.7, label %for.inc90.7, label %if.then87.7 if.then87.7: ; preds = %for.inc90.6 %call88.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8) br label %for.inc90.7 for.inc90.7: ; preds = %if.then87.7, %for.inc90.6 %arrayidx84.8 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 2, i64 9 %42 = load i32, ptr %arrayidx84.8, align 4, !tbaa !5 %cmp85.not.8 = icmp eq i32 %42, 1 br i1 %cmp85.not.8, label %for.inc90.8, label %if.then87.8 if.then87.8: ; preds = %for.inc90.7 %call88.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9) br label %for.inc90.8 for.inc90.8: ; preds = %if.then87.8, %for.inc90.7 %arrayidx84.9 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 2, i64 10 %43 = load i32, ptr %arrayidx84.9, align 16, !tbaa !5 %cmp85.not.9 = icmp eq i32 %43, 1 br i1 %cmp85.not.9, label %for.inc90.9, label %if.then87.9 if.then87.9: ; preds = %for.inc90.8 %call88.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10) br label %for.inc90.9 for.inc90.9: ; preds = %if.then87.9, %for.inc90.8 %arrayidx84.10 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 2, i64 11 %44 = load i32, ptr %arrayidx84.10, align 4, !tbaa !5 %cmp85.not.10 = icmp eq i32 %44, 1 br i1 %cmp85.not.10, label %for.inc90.10, label %if.then87.10 if.then87.10: ; preds = %for.inc90.9 %call88.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11) br label %for.inc90.10 for.inc90.10: ; preds = %if.then87.10, %for.inc90.9 %arrayidx84.11 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 2, i64 12 %45 = load i32, ptr %arrayidx84.11, align 8, !tbaa !5 %cmp85.not.11 = icmp eq i32 %45, 1 br i1 %cmp85.not.11, label %for.inc90.11, label %if.then87.11 if.then87.11: ; preds = %for.inc90.10 %call88.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12) br label %for.inc90.11 for.inc90.11: ; preds = %if.then87.11, %for.inc90.10 %arrayidx84.12 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 2, i64 13 %46 = load i32, ptr %arrayidx84.12, align 4, !tbaa !5 %cmp85.not.12 = icmp eq i32 %46, 1 br i1 %cmp85.not.12, label %for.inc90.12, label %if.then87.12 if.then87.12: ; preds = %for.inc90.11 %call88.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 13) br label %for.inc90.12 for.inc90.12: ; preds = %if.then87.12, %for.inc90.11 %arrayidx99 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 3, i64 1 %47 = load i32, ptr %arrayidx99, align 16, !tbaa !5 %cmp100.not = icmp eq i32 %47, 1 br i1 %cmp100.not, label %for.inc105, label %if.then102 if.then102: ; preds = %for.inc90.12 %call103 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1) br label %for.inc105 for.inc105: ; preds = %for.inc90.12, %if.then102 %arrayidx99.1 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 3, i64 2 %48 = load i32, ptr %arrayidx99.1, align 4, !tbaa !5 %cmp100.not.1 = icmp eq i32 %48, 1 br i1 %cmp100.not.1, label %for.inc105.1, label %if.then102.1 if.then102.1: ; preds = %for.inc105 %call103.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2) br label %for.inc105.1 for.inc105.1: ; preds = %if.then102.1, %for.inc105 %arrayidx99.2 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 3, i64 3 %49 = load i32, ptr %arrayidx99.2, align 8, !tbaa !5 %cmp100.not.2 = icmp eq i32 %49, 1 br i1 %cmp100.not.2, label %for.inc105.2, label %if.then102.2 if.then102.2: ; preds = %for.inc105.1 %call103.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3) br label %for.inc105.2 for.inc105.2: ; preds = %if.then102.2, %for.inc105.1 %arrayidx99.3 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 3, i64 4 %50 = load i32, ptr %arrayidx99.3, align 4, !tbaa !5 %cmp100.not.3 = icmp eq i32 %50, 1 br i1 %cmp100.not.3, label %for.inc105.3, label %if.then102.3 if.then102.3: ; preds = %for.inc105.2 %call103.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4) br label %for.inc105.3 for.inc105.3: ; preds = %if.then102.3, %for.inc105.2 %arrayidx99.4 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 3, i64 5 %51 = load i32, ptr %arrayidx99.4, align 16, !tbaa !5 %cmp100.not.4 = icmp eq i32 %51, 1 br i1 %cmp100.not.4, label %for.inc105.4, label %if.then102.4 if.then102.4: ; preds = %for.inc105.3 %call103.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5) br label %for.inc105.4 for.inc105.4: ; preds = %if.then102.4, %for.inc105.3 %arrayidx99.5 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 3, i64 6 %52 = load i32, ptr %arrayidx99.5, align 4, !tbaa !5 %cmp100.not.5 = icmp eq i32 %52, 1 br i1 %cmp100.not.5, label %for.inc105.5, label %if.then102.5 if.then102.5: ; preds = %for.inc105.4 %call103.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6) br label %for.inc105.5 for.inc105.5: ; preds = %if.then102.5, %for.inc105.4 %arrayidx99.6 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 3, i64 7 %53 = load i32, ptr %arrayidx99.6, align 8, !tbaa !5 %cmp100.not.6 = icmp eq i32 %53, 1 br i1 %cmp100.not.6, label %for.inc105.6, label %if.then102.6 if.then102.6: ; preds = %for.inc105.5 %call103.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7) br label %for.inc105.6 for.inc105.6: ; preds = %if.then102.6, %for.inc105.5 %arrayidx99.7 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 3, i64 8 %54 = load i32, ptr %arrayidx99.7, align 4, !tbaa !5 %cmp100.not.7 = icmp eq i32 %54, 1 br i1 %cmp100.not.7, label %for.inc105.7, label %if.then102.7 if.then102.7: ; preds = %for.inc105.6 %call103.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8) br label %for.inc105.7 for.inc105.7: ; preds = %if.then102.7, %for.inc105.6 %arrayidx99.8 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 3, i64 9 %55 = load i32, ptr %arrayidx99.8, align 16, !tbaa !5 %cmp100.not.8 = icmp eq i32 %55, 1 br i1 %cmp100.not.8, label %for.inc105.8, label %if.then102.8 if.then102.8: ; preds = %for.inc105.7 %call103.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9) br label %for.inc105.8 for.inc105.8: ; preds = %if.then102.8, %for.inc105.7 %arrayidx99.9 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 3, i64 10 %56 = load i32, ptr %arrayidx99.9, align 4, !tbaa !5 %cmp100.not.9 = icmp eq i32 %56, 1 br i1 %cmp100.not.9, label %for.inc105.9, label %if.then102.9 if.then102.9: ; preds = %for.inc105.8 %call103.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10) br label %for.inc105.9 for.inc105.9: ; preds = %if.then102.9, %for.inc105.8 %arrayidx99.10 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 3, i64 11 %57 = load i32, ptr %arrayidx99.10, align 8, !tbaa !5 %cmp100.not.10 = icmp eq i32 %57, 1 br i1 %cmp100.not.10, label %for.inc105.10, label %if.then102.10 if.then102.10: ; preds = %for.inc105.9 %call103.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11) br label %for.inc105.10 for.inc105.10: ; preds = %if.then102.10, %for.inc105.9 %arrayidx99.11 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 3, i64 12 %58 = load i32, ptr %arrayidx99.11, align 4, !tbaa !5 %cmp100.not.11 = icmp eq i32 %58, 1 br i1 %cmp100.not.11, label %for.inc105.11, label %if.then102.11 if.then102.11: ; preds = %for.inc105.10 %call103.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12) br label %for.inc105.11 for.inc105.11: ; preds = %if.then102.11, %for.inc105.10 %arrayidx99.12 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 3, i64 13 %59 = load i32, ptr %arrayidx99.12, align 16, !tbaa !5 %cmp100.not.12 = icmp eq i32 %59, 1 br i1 %cmp100.not.12, label %for.inc105.12, label %if.then102.12 if.then102.12: ; preds = %for.inc105.11 %call103.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 13) br label %for.inc105.12 for.inc105.12: ; preds = %if.then102.12, %for.inc105.11 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %ch) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @getc(ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"any pointer", !7, i64 0} !11 = !{!7, !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(void){ int s[13],h[13],c[13],d[13]; int n,i,j,num; char sort; for(i=0;i<13;i++){ s[i]=i+1; h[i]=i+1; c[i]=i+1; d[i]=i+1; } scanf("%d",&n); for(i=0;i<n*2;i++){ scanf("%c %d",&sort,&num); switch(sort){ case 'S':s[num-1]=0; break; case 'H':h[num-1]=0; break; case 'C':c[num-1]=0; break; case 'D':d[num-1]=0; break; } } for(i=0;i<13;i++){ if(s[i]==0)continue; printf("S %d\n",s[i]); } for(i=0;i<13;i++){ if(h[i]==0)continue; printf("H %d\n",h[i]); } for(i=0;i<13;i++){ if(c[i]==0)continue; printf("C %d\n",c[i]); } for(i=0;i<13;i++){ if(d[i]==0)continue; printf("D %d\n",d[i]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215355/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215355/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%c %d\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"S %d\0A\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"H %d\0A\00", align 1 @.str.4 = private unnamed_addr constant [6 x i8] c"C %d\0A\00", align 1 @.str.5 = private unnamed_addr constant [6 x i8] c"D %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [13 x i32], align 16 %h = alloca [13 x i32], align 16 %c = alloca [13 x i32], align 16 %d = alloca [13 x i32], align 16 %n = alloca i32, align 4 %num = alloca i32, align 4 %sort = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %s) #3 call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %h) #3 call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %c) #3 call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %d) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #3 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %sort) #3 %arrayidx.1 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 1 %arrayidx3.1 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 1 %arrayidx6.1 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 1 %arrayidx9.1 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 1 %arrayidx.2 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 2 %arrayidx3.2 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 2 %arrayidx6.2 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 2 %arrayidx9.2 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 2 %arrayidx.3 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 3 store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, ptr %s, align 16, !tbaa !5 %arrayidx3.3 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 3 store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, ptr %h, align 16, !tbaa !5 %arrayidx6.3 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 3 store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, ptr %c, align 16, !tbaa !5 %arrayidx9.3 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 3 store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, ptr %d, align 16, !tbaa !5 %arrayidx.4 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 4 %arrayidx3.4 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 4 %arrayidx6.4 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 4 %arrayidx9.4 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 4 %arrayidx.5 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 5 %arrayidx3.5 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 5 %arrayidx6.5 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 5 %arrayidx9.5 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 5 %arrayidx.6 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 6 %arrayidx3.6 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 6 %arrayidx6.6 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 6 %arrayidx9.6 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 6 %arrayidx.7 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 7 store <4 x i32> <i32 5, i32 6, i32 7, i32 8>, ptr %arrayidx.4, align 16, !tbaa !5 %arrayidx3.7 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 7 store <4 x i32> <i32 5, i32 6, i32 7, i32 8>, ptr %arrayidx3.4, align 16, !tbaa !5 %arrayidx6.7 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 7 store <4 x i32> <i32 5, i32 6, i32 7, i32 8>, ptr %arrayidx6.4, align 16, !tbaa !5 %arrayidx9.7 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 7 store <4 x i32> <i32 5, i32 6, i32 7, i32 8>, ptr %arrayidx9.4, align 16, !tbaa !5 %arrayidx.8 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 8 %arrayidx3.8 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 8 %arrayidx6.8 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 8 %arrayidx9.8 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 8 %arrayidx.9 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 9 %arrayidx3.9 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 9 %arrayidx6.9 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 9 %arrayidx9.9 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 9 %arrayidx.10 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 10 %arrayidx3.10 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 10 %arrayidx6.10 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 10 %arrayidx9.10 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 10 %arrayidx.11 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 11 store <4 x i32> <i32 9, i32 10, i32 11, i32 12>, ptr %arrayidx.8, align 16, !tbaa !5 %arrayidx3.11 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 11 store <4 x i32> <i32 9, i32 10, i32 11, i32 12>, ptr %arrayidx3.8, align 16, !tbaa !5 %arrayidx6.11 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 11 store <4 x i32> <i32 9, i32 10, i32 11, i32 12>, ptr %arrayidx6.8, align 16, !tbaa !5 %arrayidx9.11 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 11 store <4 x i32> <i32 9, i32 10, i32 11, i32 12>, ptr %arrayidx9.8, align 16, !tbaa !5 %arrayidx.12 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 12 store i32 13, ptr %arrayidx.12, align 16, !tbaa !5 %arrayidx3.12 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 12 store i32 13, ptr %arrayidx3.12, align 16, !tbaa !5 %arrayidx6.12 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 12 store i32 13, ptr %arrayidx6.12, align 16, !tbaa !5 %arrayidx9.12 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 12 store i32 13, ptr %arrayidx9.12, align 16, !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp11125 = icmp sgt i32 %0, 0 br i1 %cmp11125, label %for.body12, label %for.cond31.preheader for.cond31.preheader: ; preds = %for.inc28, %entry %1 = load i32, ptr %s, align 16, !tbaa !5 %cmp37 = icmp eq i32 %1, 0 br i1 %cmp37, label %for.inc42, label %if.end for.body12: ; preds = %entry, %for.inc28 %i.1126 = phi i32 [ %inc29, %for.inc28 ], [ 0, %entry ] %call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %sort, ptr noundef nonnull %num) %2 = load i8, ptr %sort, align 1, !tbaa !9 %conv = sext i8 %2 to i32 switch i32 %conv, label %for.inc28 [ i32 83, label %for.inc28.sink.split i32 72, label %sw.bb16 i32 67, label %sw.bb20 i32 68, label %sw.bb24 ] sw.bb16: ; preds = %for.body12 br label %for.inc28.sink.split sw.bb20: ; preds = %for.body12 br label %for.inc28.sink.split sw.bb24: ; preds = %for.body12 br label %for.inc28.sink.split for.inc28.sink.split: ; preds = %for.body12, %sw.bb24, %sw.bb20, %sw.bb16 %s.sink = phi ptr [ %h, %sw.bb16 ], [ %c, %sw.bb20 ], [ %d, %sw.bb24 ], [ %s, %for.body12 ] %.sink = load i32, ptr %num, align 4, !tbaa !5 %sub = add nsw i32 %.sink, -1 %idxprom14 = sext i32 %sub to i64 %arrayidx15 = getelementptr inbounds [13 x i32], ptr %s.sink, i64 0, i64 %idxprom14 store i32 0, ptr %arrayidx15, align 4, !tbaa !5 br label %for.inc28 for.inc28: ; preds = %for.inc28.sink.split, %for.body12 %inc29 = add nuw nsw i32 %i.1126, 1 %3 = load i32, ptr %n, align 4, !tbaa !5 %mul = shl nsw i32 %3, 1 %cmp11 = icmp slt i32 %inc29, %mul br i1 %cmp11, label %for.body12, label %for.cond31.preheader, !llvm.loop !10 if.end: ; preds = %for.cond31.preheader %call41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %1) br label %for.inc42 for.inc42: ; preds = %for.cond31.preheader, %if.end %4 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %cmp37.1 = icmp eq i32 %4, 0 br i1 %cmp37.1, label %for.inc42.1, label %if.end.1 if.end.1: ; preds = %for.inc42 %call41.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %4) br label %for.inc42.1 for.inc42.1: ; preds = %if.end.1, %for.inc42 %5 = load i32, ptr %arrayidx.2, align 8, !tbaa !5 %cmp37.2 = icmp eq i32 %5, 0 br i1 %cmp37.2, label %for.inc42.2, label %if.end.2 if.end.2: ; preds = %for.inc42.1 %call41.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %5) br label %for.inc42.2 for.inc42.2: ; preds = %if.end.2, %for.inc42.1 %6 = load i32, ptr %arrayidx.3, align 4, !tbaa !5 %cmp37.3 = icmp eq i32 %6, 0 br i1 %cmp37.3, label %for.inc42.3, label %if.end.3 if.end.3: ; preds = %for.inc42.2 %call41.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %6) br label %for.inc42.3 for.inc42.3: ; preds = %if.end.3, %for.inc42.2 %7 = load i32, ptr %arrayidx.4, align 16, !tbaa !5 %cmp37.4 = icmp eq i32 %7, 0 br i1 %cmp37.4, label %for.inc42.4, label %if.end.4 if.end.4: ; preds = %for.inc42.3 %call41.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %7) br label %for.inc42.4 for.inc42.4: ; preds = %if.end.4, %for.inc42.3 %8 = load i32, ptr %arrayidx.5, align 4, !tbaa !5 %cmp37.5 = icmp eq i32 %8, 0 br i1 %cmp37.5, label %for.inc42.5, label %if.end.5 if.end.5: ; preds = %for.inc42.4 %call41.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %8) br label %for.inc42.5 for.inc42.5: ; preds = %if.end.5, %for.inc42.4 %9 = load i32, ptr %arrayidx.6, align 8, !tbaa !5 %cmp37.6 = icmp eq i32 %9, 0 br i1 %cmp37.6, label %for.inc42.6, label %if.end.6 if.end.6: ; preds = %for.inc42.5 %call41.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %9) br label %for.inc42.6 for.inc42.6: ; preds = %if.end.6, %for.inc42.5 %10 = load i32, ptr %arrayidx.7, align 4, !tbaa !5 %cmp37.7 = icmp eq i32 %10, 0 br i1 %cmp37.7, label %for.inc42.7, label %if.end.7 if.end.7: ; preds = %for.inc42.6 %call41.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %10) br label %for.inc42.7 for.inc42.7: ; preds = %if.end.7, %for.inc42.6 %11 = load i32, ptr %arrayidx.8, align 16, !tbaa !5 %cmp37.8 = icmp eq i32 %11, 0 br i1 %cmp37.8, label %for.inc42.8, label %if.end.8 if.end.8: ; preds = %for.inc42.7 %call41.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %11) br label %for.inc42.8 for.inc42.8: ; preds = %if.end.8, %for.inc42.7 %12 = load i32, ptr %arrayidx.9, align 4, !tbaa !5 %cmp37.9 = icmp eq i32 %12, 0 br i1 %cmp37.9, label %for.inc42.9, label %if.end.9 if.end.9: ; preds = %for.inc42.8 %call41.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %12) br label %for.inc42.9 for.inc42.9: ; preds = %if.end.9, %for.inc42.8 %13 = load i32, ptr %arrayidx.10, align 8, !tbaa !5 %cmp37.10 = icmp eq i32 %13, 0 br i1 %cmp37.10, label %for.inc42.10, label %if.end.10 if.end.10: ; preds = %for.inc42.9 %call41.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %13) br label %for.inc42.10 for.inc42.10: ; preds = %if.end.10, %for.inc42.9 %14 = load i32, ptr %arrayidx.11, align 4, !tbaa !5 %cmp37.11 = icmp eq i32 %14, 0 br i1 %cmp37.11, label %for.inc42.11, label %if.end.11 if.end.11: ; preds = %for.inc42.10 %call41.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %14) br label %for.inc42.11 for.inc42.11: ; preds = %if.end.11, %for.inc42.10 %15 = load i32, ptr %arrayidx.12, align 16, !tbaa !5 %cmp37.12 = icmp eq i32 %15, 0 br i1 %cmp37.12, label %for.inc42.12, label %if.end.12 if.end.12: ; preds = %for.inc42.11 %call41.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %15) br label %for.inc42.12 for.inc42.12: ; preds = %if.end.12, %for.inc42.11 %16 = load i32, ptr %h, align 16, !tbaa !5 %cmp51 = icmp eq i32 %16, 0 br i1 %cmp51, label %for.inc58, label %if.end54 if.end54: ; preds = %for.inc42.12 %call57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %16) br label %for.inc58 for.inc58: ; preds = %for.inc42.12, %if.end54 %17 = load i32, ptr %arrayidx3.1, align 4, !tbaa !5 %cmp51.1 = icmp eq i32 %17, 0 br i1 %cmp51.1, label %for.inc58.1, label %if.end54.1 if.end54.1: ; preds = %for.inc58 %call57.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %17) br label %for.inc58.1 for.inc58.1: ; preds = %if.end54.1, %for.inc58 %18 = load i32, ptr %arrayidx3.2, align 8, !tbaa !5 %cmp51.2 = icmp eq i32 %18, 0 br i1 %cmp51.2, label %for.inc58.2, label %if.end54.2 if.end54.2: ; preds = %for.inc58.1 %call57.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %18) br label %for.inc58.2 for.inc58.2: ; preds = %if.end54.2, %for.inc58.1 %19 = load i32, ptr %arrayidx3.3, align 4, !tbaa !5 %cmp51.3 = icmp eq i32 %19, 0 br i1 %cmp51.3, label %for.inc58.3, label %if.end54.3 if.end54.3: ; preds = %for.inc58.2 %call57.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %19) br label %for.inc58.3 for.inc58.3: ; preds = %if.end54.3, %for.inc58.2 %20 = load i32, ptr %arrayidx3.4, align 16, !tbaa !5 %cmp51.4 = icmp eq i32 %20, 0 br i1 %cmp51.4, label %for.inc58.4, label %if.end54.4 if.end54.4: ; preds = %for.inc58.3 %call57.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %20) br label %for.inc58.4 for.inc58.4: ; preds = %if.end54.4, %for.inc58.3 %21 = load i32, ptr %arrayidx3.5, align 4, !tbaa !5 %cmp51.5 = icmp eq i32 %21, 0 br i1 %cmp51.5, label %for.inc58.5, label %if.end54.5 if.end54.5: ; preds = %for.inc58.4 %call57.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %21) br label %for.inc58.5 for.inc58.5: ; preds = %if.end54.5, %for.inc58.4 %22 = load i32, ptr %arrayidx3.6, align 8, !tbaa !5 %cmp51.6 = icmp eq i32 %22, 0 br i1 %cmp51.6, label %for.inc58.6, label %if.end54.6 if.end54.6: ; preds = %for.inc58.5 %call57.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %22) br label %for.inc58.6 for.inc58.6: ; preds = %if.end54.6, %for.inc58.5 %23 = load i32, ptr %arrayidx3.7, align 4, !tbaa !5 %cmp51.7 = icmp eq i32 %23, 0 br i1 %cmp51.7, label %for.inc58.7, label %if.end54.7 if.end54.7: ; preds = %for.inc58.6 %call57.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %23) br label %for.inc58.7 for.inc58.7: ; preds = %if.end54.7, %for.inc58.6 %24 = load i32, ptr %arrayidx3.8, align 16, !tbaa !5 %cmp51.8 = icmp eq i32 %24, 0 br i1 %cmp51.8, label %for.inc58.8, label %if.end54.8 if.end54.8: ; preds = %for.inc58.7 %call57.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %24) br label %for.inc58.8 for.inc58.8: ; preds = %if.end54.8, %for.inc58.7 %25 = load i32, ptr %arrayidx3.9, align 4, !tbaa !5 %cmp51.9 = icmp eq i32 %25, 0 br i1 %cmp51.9, label %for.inc58.9, label %if.end54.9 if.end54.9: ; preds = %for.inc58.8 %call57.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %25) br label %for.inc58.9 for.inc58.9: ; preds = %if.end54.9, %for.inc58.8 %26 = load i32, ptr %arrayidx3.10, align 8, !tbaa !5 %cmp51.10 = icmp eq i32 %26, 0 br i1 %cmp51.10, label %for.inc58.10, label %if.end54.10 if.end54.10: ; preds = %for.inc58.9 %call57.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %26) br label %for.inc58.10 for.inc58.10: ; preds = %if.end54.10, %for.inc58.9 %27 = load i32, ptr %arrayidx3.11, align 4, !tbaa !5 %cmp51.11 = icmp eq i32 %27, 0 br i1 %cmp51.11, label %for.inc58.11, label %if.end54.11 if.end54.11: ; preds = %for.inc58.10 %call57.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %27) br label %for.inc58.11 for.inc58.11: ; preds = %if.end54.11, %for.inc58.10 %28 = load i32, ptr %arrayidx3.12, align 16, !tbaa !5 %cmp51.12 = icmp eq i32 %28, 0 br i1 %cmp51.12, label %for.inc58.12, label %if.end54.12 if.end54.12: ; preds = %for.inc58.11 %call57.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %28) br label %for.inc58.12 for.inc58.12: ; preds = %if.end54.12, %for.inc58.11 %29 = load i32, ptr %c, align 16, !tbaa !5 %cmp67 = icmp eq i32 %29, 0 br i1 %cmp67, label %for.inc74, label %if.end70 if.end70: ; preds = %for.inc58.12 %call73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %29) br label %for.inc74 for.inc74: ; preds = %for.inc58.12, %if.end70 %30 = load i32, ptr %arrayidx6.1, align 4, !tbaa !5 %cmp67.1 = icmp eq i32 %30, 0 br i1 %cmp67.1, label %for.inc74.1, label %if.end70.1 if.end70.1: ; preds = %for.inc74 %call73.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %30) br label %for.inc74.1 for.inc74.1: ; preds = %if.end70.1, %for.inc74 %31 = load i32, ptr %arrayidx6.2, align 8, !tbaa !5 %cmp67.2 = icmp eq i32 %31, 0 br i1 %cmp67.2, label %for.inc74.2, label %if.end70.2 if.end70.2: ; preds = %for.inc74.1 %call73.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %31) br label %for.inc74.2 for.inc74.2: ; preds = %if.end70.2, %for.inc74.1 %32 = load i32, ptr %arrayidx6.3, align 4, !tbaa !5 %cmp67.3 = icmp eq i32 %32, 0 br i1 %cmp67.3, label %for.inc74.3, label %if.end70.3 if.end70.3: ; preds = %for.inc74.2 %call73.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %32) br label %for.inc74.3 for.inc74.3: ; preds = %if.end70.3, %for.inc74.2 %33 = load i32, ptr %arrayidx6.4, align 16, !tbaa !5 %cmp67.4 = icmp eq i32 %33, 0 br i1 %cmp67.4, label %for.inc74.4, label %if.end70.4 if.end70.4: ; preds = %for.inc74.3 %call73.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %33) br label %for.inc74.4 for.inc74.4: ; preds = %if.end70.4, %for.inc74.3 %34 = load i32, ptr %arrayidx6.5, align 4, !tbaa !5 %cmp67.5 = icmp eq i32 %34, 0 br i1 %cmp67.5, label %for.inc74.5, label %if.end70.5 if.end70.5: ; preds = %for.inc74.4 %call73.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %34) br label %for.inc74.5 for.inc74.5: ; preds = %if.end70.5, %for.inc74.4 %35 = load i32, ptr %arrayidx6.6, align 8, !tbaa !5 %cmp67.6 = icmp eq i32 %35, 0 br i1 %cmp67.6, label %for.inc74.6, label %if.end70.6 if.end70.6: ; preds = %for.inc74.5 %call73.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %35) br label %for.inc74.6 for.inc74.6: ; preds = %if.end70.6, %for.inc74.5 %36 = load i32, ptr %arrayidx6.7, align 4, !tbaa !5 %cmp67.7 = icmp eq i32 %36, 0 br i1 %cmp67.7, label %for.inc74.7, label %if.end70.7 if.end70.7: ; preds = %for.inc74.6 %call73.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %36) br label %for.inc74.7 for.inc74.7: ; preds = %if.end70.7, %for.inc74.6 %37 = load i32, ptr %arrayidx6.8, align 16, !tbaa !5 %cmp67.8 = icmp eq i32 %37, 0 br i1 %cmp67.8, label %for.inc74.8, label %if.end70.8 if.end70.8: ; preds = %for.inc74.7 %call73.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %37) br label %for.inc74.8 for.inc74.8: ; preds = %if.end70.8, %for.inc74.7 %38 = load i32, ptr %arrayidx6.9, align 4, !tbaa !5 %cmp67.9 = icmp eq i32 %38, 0 br i1 %cmp67.9, label %for.inc74.9, label %if.end70.9 if.end70.9: ; preds = %for.inc74.8 %call73.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %38) br label %for.inc74.9 for.inc74.9: ; preds = %if.end70.9, %for.inc74.8 %39 = load i32, ptr %arrayidx6.10, align 8, !tbaa !5 %cmp67.10 = icmp eq i32 %39, 0 br i1 %cmp67.10, label %for.inc74.10, label %if.end70.10 if.end70.10: ; preds = %for.inc74.9 %call73.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %39) br label %for.inc74.10 for.inc74.10: ; preds = %if.end70.10, %for.inc74.9 %40 = load i32, ptr %arrayidx6.11, align 4, !tbaa !5 %cmp67.11 = icmp eq i32 %40, 0 br i1 %cmp67.11, label %for.inc74.11, label %if.end70.11 if.end70.11: ; preds = %for.inc74.10 %call73.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %40) br label %for.inc74.11 for.inc74.11: ; preds = %if.end70.11, %for.inc74.10 %41 = load i32, ptr %arrayidx6.12, align 16, !tbaa !5 %cmp67.12 = icmp eq i32 %41, 0 br i1 %cmp67.12, label %for.inc74.12, label %if.end70.12 if.end70.12: ; preds = %for.inc74.11 %call73.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %41) br label %for.inc74.12 for.inc74.12: ; preds = %if.end70.12, %for.inc74.11 %42 = load i32, ptr %d, align 16, !tbaa !5 %cmp83 = icmp eq i32 %42, 0 br i1 %cmp83, label %for.inc90, label %if.end86 if.end86: ; preds = %for.inc74.12 %call89 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %42) br label %for.inc90 for.inc90: ; preds = %for.inc74.12, %if.end86 %43 = load i32, ptr %arrayidx9.1, align 4, !tbaa !5 %cmp83.1 = icmp eq i32 %43, 0 br i1 %cmp83.1, label %for.inc90.1, label %if.end86.1 if.end86.1: ; preds = %for.inc90 %call89.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %43) br label %for.inc90.1 for.inc90.1: ; preds = %if.end86.1, %for.inc90 %44 = load i32, ptr %arrayidx9.2, align 8, !tbaa !5 %cmp83.2 = icmp eq i32 %44, 0 br i1 %cmp83.2, label %for.inc90.2, label %if.end86.2 if.end86.2: ; preds = %for.inc90.1 %call89.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %44) br label %for.inc90.2 for.inc90.2: ; preds = %if.end86.2, %for.inc90.1 %45 = load i32, ptr %arrayidx9.3, align 4, !tbaa !5 %cmp83.3 = icmp eq i32 %45, 0 br i1 %cmp83.3, label %for.inc90.3, label %if.end86.3 if.end86.3: ; preds = %for.inc90.2 %call89.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %45) br label %for.inc90.3 for.inc90.3: ; preds = %if.end86.3, %for.inc90.2 %46 = load i32, ptr %arrayidx9.4, align 16, !tbaa !5 %cmp83.4 = icmp eq i32 %46, 0 br i1 %cmp83.4, label %for.inc90.4, label %if.end86.4 if.end86.4: ; preds = %for.inc90.3 %call89.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %46) br label %for.inc90.4 for.inc90.4: ; preds = %if.end86.4, %for.inc90.3 %47 = load i32, ptr %arrayidx9.5, align 4, !tbaa !5 %cmp83.5 = icmp eq i32 %47, 0 br i1 %cmp83.5, label %for.inc90.5, label %if.end86.5 if.end86.5: ; preds = %for.inc90.4 %call89.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %47) br label %for.inc90.5 for.inc90.5: ; preds = %if.end86.5, %for.inc90.4 %48 = load i32, ptr %arrayidx9.6, align 8, !tbaa !5 %cmp83.6 = icmp eq i32 %48, 0 br i1 %cmp83.6, label %for.inc90.6, label %if.end86.6 if.end86.6: ; preds = %for.inc90.5 %call89.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %48) br label %for.inc90.6 for.inc90.6: ; preds = %if.end86.6, %for.inc90.5 %49 = load i32, ptr %arrayidx9.7, align 4, !tbaa !5 %cmp83.7 = icmp eq i32 %49, 0 br i1 %cmp83.7, label %for.inc90.7, label %if.end86.7 if.end86.7: ; preds = %for.inc90.6 %call89.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %49) br label %for.inc90.7 for.inc90.7: ; preds = %if.end86.7, %for.inc90.6 %50 = load i32, ptr %arrayidx9.8, align 16, !tbaa !5 %cmp83.8 = icmp eq i32 %50, 0 br i1 %cmp83.8, label %for.inc90.8, label %if.end86.8 if.end86.8: ; preds = %for.inc90.7 %call89.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %50) br label %for.inc90.8 for.inc90.8: ; preds = %if.end86.8, %for.inc90.7 %51 = load i32, ptr %arrayidx9.9, align 4, !tbaa !5 %cmp83.9 = icmp eq i32 %51, 0 br i1 %cmp83.9, label %for.inc90.9, label %if.end86.9 if.end86.9: ; preds = %for.inc90.8 %call89.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %51) br label %for.inc90.9 for.inc90.9: ; preds = %if.end86.9, %for.inc90.8 %52 = load i32, ptr %arrayidx9.10, align 8, !tbaa !5 %cmp83.10 = icmp eq i32 %52, 0 br i1 %cmp83.10, label %for.inc90.10, label %if.end86.10 if.end86.10: ; preds = %for.inc90.9 %call89.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %52) br label %for.inc90.10 for.inc90.10: ; preds = %if.end86.10, %for.inc90.9 %53 = load i32, ptr %arrayidx9.11, align 4, !tbaa !5 %cmp83.11 = icmp eq i32 %53, 0 br i1 %cmp83.11, label %for.inc90.11, label %if.end86.11 if.end86.11: ; preds = %for.inc90.10 %call89.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %53) br label %for.inc90.11 for.inc90.11: ; preds = %if.end86.11, %for.inc90.10 %54 = load i32, ptr %arrayidx9.12, align 16, !tbaa !5 %cmp83.12 = icmp eq i32 %54, 0 br i1 %cmp83.12, label %for.inc90.12, label %if.end86.12 if.end86.12: ; preds = %for.inc90.11 %call89.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %54) br label %for.inc90.12 for.inc90.12: ; preds = %if.end86.12, %for.inc90.11 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %sort) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %d) #3 call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %h) #3 call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %s) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"}
#include "stdio.h" int main(){ int A,B,K,i=0; scanf("%d%d%d",&A,&B,&K); if(B-A+1<2*K){ for(i=A;i<=B;i++){ printf("%d\n",i); } } else{ for(i=0;i<K;i++){ printf("%d\n",A); A++; } B-=K; for(i=0;i<K;i++){ B++; printf("%d\n",B); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215405/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215405/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %A = alloca i32, align 4 %B = alloca i32, align 4 %K = 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 %K) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B, ptr noundef nonnull %K) %0 = load i32, ptr %B, align 4, !tbaa !5 %1 = load i32, ptr %A, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %2 = load i32, ptr %K, align 4, !tbaa !5 %mul = shl nsw i32 %2, 1 %cmp = icmp slt i32 %add, %mul br i1 %cmp, label %for.cond.preheader, label %for.cond3.preheader for.cond3.preheader: ; preds = %entry %cmp427 = icmp sgt i32 %2, 0 br i1 %cmp427, label %for.body5, label %if.end for.cond.preheader: ; preds = %entry %cmp1.not31 = icmp sgt i32 %1, %0 br i1 %cmp1.not31, label %if.end, label %for.body for.body: ; preds = %for.cond.preheader, %for.body %i.032 = phi i32 [ %inc, %for.body ], [ %1, %for.cond.preheader ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.032) %inc = add nsw i32 %i.032, 1 %3 = load i32, ptr %B, align 4, !tbaa !5 %cmp1.not.not = icmp slt i32 %i.032, %3 br i1 %cmp1.not.not, label %for.body, label %if.end, !llvm.loop !9 for.body5: ; preds = %for.cond3.preheader, %for.body5 %4 = phi i32 [ %inc7, %for.body5 ], [ %1, %for.cond3.preheader ] %i.128 = phi i32 [ %inc9, %for.body5 ], [ 0, %for.cond3.preheader ] %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) %5 = load i32, ptr %A, align 4, !tbaa !5 %inc7 = add nsw i32 %5, 1 store i32 %inc7, ptr %A, align 4, !tbaa !5 %inc9 = add nuw nsw i32 %i.128, 1 %6 = load i32, ptr %K, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc9, %6 br i1 %cmp4, label %for.body5, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.body5 %.pre = load i32, ptr %B, align 4, !tbaa !5 %sub11 = sub nsw i32 %.pre, %6 store i32 %sub11, ptr %B, align 4, !tbaa !5 %cmp1329 = icmp sgt i32 %6, 0 br i1 %cmp1329, label %for.body14, label %if.end for.body14: ; preds = %for.end10, %for.body14 %i.230 = phi i32 [ %inc18, %for.body14 ], [ 0, %for.end10 ] %7 = load i32, ptr %B, align 4, !tbaa !5 %inc15 = add nsw i32 %7, 1 store i32 %inc15, ptr %B, align 4, !tbaa !5 %call16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %inc15) %inc18 = add nuw nsw i32 %i.230, 1 %8 = load i32, ptr %K, align 4, !tbaa !5 %cmp13 = icmp slt i32 %inc18, %8 br i1 %cmp13, label %for.body14, label %if.end, !llvm.loop !12 if.end: ; preds = %for.body14, %for.body, %for.cond3.preheader, %for.end10, %for.cond.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %K) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %B) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %A) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #define ll long long #define rep(i,n) for(ll i=0;i<(n);i++) #define max(p,q) ((p)>(q)?(p):(q)) #define min(p,q) ((p)<(q)?(p):(q)) #define chmax(a,b) ((a)=(a)>(b)?(a):(b)) #define chmin(a,b) ((a)=(a)<(b)?(a):(b)) #define abs(p) ((p)>=(0)?(p):(-(p))) #define swap(a,b) do{ll w=(a);(a)=(b);(b)=w;}while(0) #define swapd(a,b) do{double w=(a);(a)=(b);(b)=w}while(0) #define in(a) scanf("%lld", &(a)) #define in2(a,b) scanf("%lld %lld",&(a),&(b)) #define in3(a,b,c) scanf("%lld %lld %lld",&(a),&(b),&(c)) #define ind(a) scanf("%lf", &(a)) #define put(a) printf("%lld\n", (a)) #define putd(a) printf("%.15f\n", (a)) //def puts(a) printf("%s\n", a) 文字はこっち #define MOD 1000000007 ll powll(ll a,ll b){ll r=1;rep(i,b){r*=a;}return r;} //your code here! int main(void){ ll A, B, K, i; in3(A, B, K); for(i=A; i<=B; i++){ if(i-A<K || B-i<K) put(i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215449/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215449/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [15 x i8] c"%lld %lld %lld\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @powll(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %cmp3 = icmp sgt i64 %b, 0 br i1 %cmp3, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %entry %xtraiter = and i64 %b, 7 %0 = icmp ult i64 %b, 8 br i1 %0, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %b, -8 br label %for.body for.cond.cleanup.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %mul.lcssa.ph = phi i64 [ undef, %for.body.preheader ], [ %mul.7, %for.body ] %r.04.unr = phi i64 [ 1, %for.body.preheader ], [ %mul.7, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup, label %for.body.epil for.body.epil: ; preds = %for.cond.cleanup.loopexit.unr-lcssa, %for.body.epil %r.04.epil = phi i64 [ %mul.epil, %for.body.epil ], [ %r.04.unr, %for.cond.cleanup.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.cond.cleanup.loopexit.unr-lcssa ] %mul.epil = mul nsw i64 %r.04.epil, %a %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.cond.cleanup, label %for.body.epil, !llvm.loop !5 for.cond.cleanup: ; preds = %for.cond.cleanup.loopexit.unr-lcssa, %for.body.epil, %entry %r.0.lcssa = phi i64 [ 1, %entry ], [ %mul.lcssa.ph, %for.cond.cleanup.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ] ret i64 %r.0.lcssa for.body: ; preds = %for.body, %for.body.preheader.new %r.04 = phi i64 [ 1, %for.body.preheader.new ], [ %mul.7, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.7, %for.body ] %mul = mul nsw i64 %r.04, %a %mul.1 = mul nsw i64 %mul, %a %mul.2 = mul nsw i64 %mul.1, %a %mul.3 = mul nsw i64 %mul.2, %a %mul.4 = mul nsw i64 %mul.3, %a %mul.5 = mul nsw i64 %mul.4, %a %mul.6 = mul nsw i64 %mul.5, %a %mul.7 = mul nsw i64 %mul.6, %a %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body, !llvm.loop !7 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %A = alloca i64, align 8 %B = alloca i64, align 8 %K = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %A) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %B) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %K) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B, ptr noundef nonnull %K) %0 = load i64, ptr %A, align 8, !tbaa !9 %1 = load i64, ptr %B, align 8, !tbaa !9 %cmp.not10 = icmp sgt i64 %0, %1 br i1 %cmp.not10, label %for.end, label %for.body for.body: ; preds = %entry, %for.inc %2 = phi i64 [ %5, %for.inc ], [ %1, %entry ] %i.011 = phi i64 [ %inc, %for.inc ], [ %0, %entry ] %3 = load i64, ptr %A, align 8, !tbaa !9 %sub = sub nsw i64 %i.011, %3 %4 = load i64, ptr %K, align 8, !tbaa !9 %cmp1 = icmp slt i64 %sub, %4 %sub2 = sub nsw i64 %2, %i.011 %cmp3 = icmp slt i64 %sub2, %4 %or.cond = select i1 %cmp1, i1 true, i1 %cmp3 br i1 %or.cond, label %if.then, label %for.inc if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %i.011) %.pre = load i64, ptr %B, align 8, !tbaa !9 br label %for.inc for.inc: ; preds = %for.body, %if.then %5 = phi i64 [ %2, %for.body ], [ %.pre, %if.then ] %inc = add nsw i64 %i.011, 1 %cmp.not.not = icmp slt i64 %i.011, %5 br i1 %cmp.not.not, label %for.body, label %for.end, !llvm.loop !13 for.end: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %K) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %B) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %A) #4 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 attributes #0 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"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.unroll.disable"} !7 = distinct !{!7, !8} !8 = !{!"llvm.loop.mustprogress"} !9 = !{!10, !10, i64 0} !10 = !{!"long long", !11, i64 0} !11 = !{!"omnipotent char", !12, i64 0} !12 = !{!"Simple C/C++ TBAA"} !13 = distinct !{!13, !8}
#include<stdio.h> #include<stdlib.h> #include<math.h> typedef long long int int64; #define MAX(a,b) ((a)>(b)?(a):(b)) #define MIN(a,b) ((a)<(b)?(a):(b)) #define ABS(a) ((a)>(0)?(a):-(a)) void run(void){ int a,b,k; scanf("%d%d%d",&a,&b,&k); int i; if(a+k-1<b+1-k){ for(i=1;i<=k;i++) printf("%d\n",a+i-1); for(i=k;i>=1;i--) printf("%d\n",b+1-i); } else { for(i=a;i<=b;i++) printf("%d\n",i); } } int main(void){ run(); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215492/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215492/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local void @run() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %k = 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 %k) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %k) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %k, align 4, !tbaa !5 %add = add nsw i32 %1, %0 %2 = load i32, ptr %b, align 4, !tbaa !5 %reass.sub = sub i32 %2, %1 %sub2 = add i32 %reass.sub, 1 %cmp.not = icmp sgt i32 %add, %sub2 br i1 %cmp.not, label %for.cond15.preheader, label %for.cond.preheader for.cond.preheader: ; preds = %entry %cmp3.not31 = icmp slt i32 %1, 1 br i1 %cmp3.not31, label %if.end, label %for.body for.cond15.preheader: ; preds = %entry %cmp16.not35 = icmp sgt i32 %0, %2 br i1 %cmp16.not35, label %if.end, label %for.body17 for.cond7.preheader: ; preds = %for.body %cmp833 = icmp sgt i32 %4, 0 br i1 %cmp833, label %for.body9, label %if.end for.body: ; preds = %for.cond.preheader, %for.body %i.032 = phi i32 [ %inc, %for.body ], [ 1, %for.cond.preheader ] %3 = load i32, ptr %a, align 4, !tbaa !5 %add4 = add nsw i32 %i.032, -1 %sub5 = add i32 %add4, %3 %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub5) %inc = add nuw nsw i32 %i.032, 1 %4 = load i32, ptr %k, align 4, !tbaa !5 %cmp3.not.not = icmp slt i32 %i.032, %4 br i1 %cmp3.not.not, label %for.body, label %for.cond7.preheader, !llvm.loop !9 for.body9: ; preds = %for.cond7.preheader, %for.body9 %i.134 = phi i32 [ %dec, %for.body9 ], [ %4, %for.cond7.preheader ] %5 = load i32, ptr %b, align 4, !tbaa !5 %reass.sub37 = sub i32 %5, %i.134 %sub11 = add i32 %reass.sub37, 1 %call12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub11) %dec = add nsw i32 %i.134, -1 %cmp8 = icmp ugt i32 %i.134, 1 br i1 %cmp8, label %for.body9, label %if.end, !llvm.loop !11 for.body17: ; preds = %for.cond15.preheader, %for.body17 %i.236 = phi i32 [ %inc20, %for.body17 ], [ %0, %for.cond15.preheader ] %call18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.236) %inc20 = add nsw i32 %i.236, 1 %6 = load i32, ptr %b, align 4, !tbaa !5 %cmp16.not.not = icmp slt i32 %i.236, %6 br i1 %cmp16.not.not, label %for.body17, label %if.end, !llvm.loop !12 if.end: ; preds = %for.body9, %for.body17, %for.cond.preheader, %for.cond7.preheader, %for.cond15.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #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 void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: tail call void @run() ret i32 0 } attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include<stdio.h> #include<stdlib.h> int main(void){ int start, end, K; int i; scanf("%d %d %d",&start , &end, &K); if(end - start + 1 > 2*K){ for(i = start; i < start + K; i++){ printf("%d\n",i); } for(i = end - K + 1; i <= end; i++){ printf("%d\n",i); } }else{ for(i = start; i<end+1; i++) { printf("%d\n",i); } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215535/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215535/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %start = alloca i32, align 4 %end = alloca i32, align 4 %K = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %start) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %end) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %K) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %start, ptr noundef nonnull %end, ptr noundef nonnull %K) %0 = load i32, ptr %end, align 4, !tbaa !5 %1 = load i32, ptr %start, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 %2 = load i32, ptr %K, align 4, !tbaa !5 %mul = shl nsw i32 %2, 1 %cmp.not = icmp slt i32 %sub, %mul br i1 %cmp.not, label %for.cond13.preheader, label %for.cond.preheader for.cond.preheader: ; preds = %entry %cmp231 = icmp sgt i32 %2, 0 br i1 %cmp231, label %for.body, label %if.end for.cond13.preheader: ; preds = %entry %cmp15.not35 = icmp sgt i32 %1, %0 br i1 %cmp15.not35, label %if.end, label %for.body16 for.body: ; preds = %for.cond.preheader, %for.body %i.032 = phi i32 [ %inc, %for.body ], [ %1, %for.cond.preheader ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.032) %inc = add nsw i32 %i.032, 1 %3 = load i32, ptr %start, align 4, !tbaa !5 %4 = load i32, ptr %K, align 4, !tbaa !5 %add1 = add nsw i32 %4, %3 %cmp2 = icmp slt i32 %inc, %add1 br i1 %cmp2, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body %cmp7.not.not33 = icmp sgt i32 %4, 0 br i1 %cmp7.not.not33, label %for.body8.preheader, label %if.end for.body8.preheader: ; preds = %for.end %.pre = load i32, ptr %end, align 4, !tbaa !5 %sub4 = sub nsw i32 %.pre, %4 br label %for.body8 for.body8: ; preds = %for.body8.preheader, %for.body8 %i.1.in34 = phi i32 [ %i.1, %for.body8 ], [ %sub4, %for.body8.preheader ] %i.1 = add nsw i32 %i.1.in34, 1 %call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.1) %5 = load i32, ptr %end, align 4, !tbaa !5 %cmp7.not.not = icmp slt i32 %i.1, %5 br i1 %cmp7.not.not, label %for.body8, label %if.end, !llvm.loop !11 for.body16: ; preds = %for.cond13.preheader, %for.body16 %i.236 = phi i32 [ %inc19, %for.body16 ], [ %1, %for.cond13.preheader ] %call17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.236) %inc19 = add nsw i32 %i.236, 1 %6 = load i32, ptr %end, align 4, !tbaa !5 %cmp15.not.not = icmp slt i32 %i.236, %6 br i1 %cmp15.not.not, label %for.body16, label %if.end, !llvm.loop !12 if.end: ; preds = %for.body8, %for.body16, %for.cond.preheader, %for.end, %for.cond13.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %K) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %end) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %start) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}