Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#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;
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);
}
}
else{
if(u->right != NIL){
printf(" %d", u->key);
inorder(u->right);
}
else{
printf(" %d", u->key);
}
}
}
void preorder(Node u){
printf(" %d", u->key);
if(u->left != NIL){
preorder(u->left);
if(u->right != NIL){
preorder(u->right);
}
}
else{
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_212389/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212389/source.c"
target datalayout = "e-m:e-p270: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 = %tailrecurse.backedge, %entry
%u.tr = phi ptr [ %u, %entry ], [ %u.tr.be, %tailrecurse.backedge ]
%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.else, label %if.then
if.then: ; preds = %tailrecurse
tail call void @inorder(ptr noundef nonnull %0)
%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.end15, label %tailrecurse.backedge
if.else: ; preds = %tailrecurse
%3 = load ptr, ptr %u.tr, align 8, !tbaa !16
%cmp6.not = icmp eq ptr %3, null
%key12 = getelementptr inbounds %struct.node, ptr %u.tr, i64 0, i32 3
%4 = load i32, ptr %key12, align 8, !tbaa !9
%call13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %4)
br i1 %cmp6.not, label %if.end15, label %if.then7
if.then7: ; preds = %if.else
%5 = load ptr, ptr %u.tr, align 8, !tbaa !16
br label %tailrecurse.backedge
tailrecurse.backedge: ; preds = %if.then7, %if.then
%u.tr.be = phi ptr [ %5, %if.then7 ], [ %2, %if.then ]
br label %tailrecurse
if.end15: ; preds = %if.then, %if.else
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 = %tailrecurse.backedge, %entry
%u.tr = phi ptr [ %u, %entry ], [ %u.tr.be, %tailrecurse.backedge ]
%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.else, label %if.then
if.then: ; preds = %tailrecurse
tail call void @preorder(ptr noundef nonnull %1)
%2 = load ptr, ptr %u.tr, align 8, !tbaa !16
%cmp2.not = icmp eq ptr %2, null
br i1 %cmp2.not, label %if.end10, label %tailrecurse.backedge
tailrecurse.backedge: ; preds = %if.then, %if.else
%u.tr.be = phi ptr [ %2, %if.then ], [ %3, %if.else ]
br label %tailrecurse
if.else: ; preds = %tailrecurse
%3 = load ptr, ptr %u.tr, align 8, !tbaa !16
%cmp6.not = icmp eq ptr %3, null
br i1 %cmp6.not, label %if.end10, label %tailrecurse.backedge
if.end10: ; preds = %if.else, %if.then
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 key;
};
typedef struct node * Node;
Node root;
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;
else {
inorder(u->left);
printf(" %d", u->key);
inorder(u->right);
}
}
void preorder(Node u){
if(u == NIL) return;
else{
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");*/
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_212439/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212439/source.c"
target datalayout = "e-m:e-p270: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 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 %if.end, label %if.else
if.else: ; preds = %entry, %if.else
%u.tr5 = phi ptr [ %2, %if.else ], [ %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 %if.end, label %if.else
if.end: ; preds = %if.else, %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 %if.end, label %if.else
if.else: ; preds = %entry, %if.else
%u.tr5 = phi ptr [ %2, %if.else ], [ %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 %if.end, label %if.else
if.end: ; preds = %if.else, %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
%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 = { 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<string.h>
#include <stdlib.h>
struct NODE{
int k;
struct NODE *p;
struct NODE *l;
struct NODE *ri;
};
struct NODE *N,*r;
void ins(int o){
struct NODE *a=N;
struct NODE *b=r;
struct NODE *c;
c=(struct NODE*)malloc(sizeof(struct NODE));
c->k = o;
c->l = N;
c->ri = N;
while(b!=N){
a = b;
if(c->k < b->k){
b=b->l;
}
else{
b=b->ri;
}
}
c->p=a;
if(a==N){
r=c;
}
else{
if(c->k < a->k){
a->l=c;
}
else{
a->ri=c;
}
}
}
void T(struct NODE *R){
if(R==N)return;
T(R->l);
printf(" %d",R->k);
T(R->ri);
}
void S(struct NODE *R){
if(R==N)return;
printf(" %d",R->k);
S(R->l);
S(R->ri);
}
int main(){
int i,j,o,h;
char O[10];
scanf("%d",&o);
for(i=0;i<o;i++){
scanf("%s",O);
if(strlen(O)==6){
scanf("%d",&h);
ins(h);
}
else{
T(r);
printf("\n");
S(r);
printf("\n");
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212482/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212482/source.c"
target datalayout = "e-m:e-p270: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 }
@N = dso_local local_unnamed_addr global ptr null, align 8
@r = 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 @ins(i32 noundef %o) local_unnamed_addr #0 {
entry:
%0 = load ptr, ptr @N, align 8, !tbaa !5
%1 = load ptr, ptr @r, align 8, !tbaa !5
%call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #6
store i32 %o, ptr %call, align 8, !tbaa !9
%l = getelementptr inbounds %struct.NODE, ptr %call, i64 0, i32 2
store ptr %0, ptr %l, align 8, !tbaa !12
%ri = getelementptr inbounds %struct.NODE, ptr %call, i64 0, i32 3
store ptr %0, ptr %ri, 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
%p37 = getelementptr inbounds %struct.NODE, ptr %call, i64 0, i32 1
store ptr %0, ptr %p37, align 8, !tbaa !14
br label %if.end17
while.body: ; preds = %entry, %while.body
%b.035 = phi ptr [ %b.1, %while.body ], [ %1, %entry ]
%2 = load i32, ptr %b.035, align 8, !tbaa !9
%cmp3 = icmp sgt i32 %2, %o
%l4 = getelementptr inbounds %struct.NODE, ptr %b.035, i64 0, i32 2
%ri5 = getelementptr inbounds %struct.NODE, ptr %b.035, i64 0, i32 3
%b.1.in = select i1 %cmp3, ptr %l4, ptr %ri5
%b.1 = load ptr, ptr %b.1.in, align 8, !tbaa !5
%cmp.not = icmp eq ptr %b.1, %0
br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !15
while.end: ; preds = %while.body
%p = getelementptr inbounds %struct.NODE, ptr %call, i64 0, i32 1
store ptr %b.035, ptr %p, align 8, !tbaa !14
%cmp6 = icmp eq ptr %b.035, %0
br i1 %cmp6, label %if.end17, label %if.else8
if.else8: ; preds = %while.end
%3 = load i32, ptr %b.035, align 8, !tbaa !9
%cmp11 = icmp sgt i32 %3, %o
br i1 %cmp11, label %if.then12, label %if.else14
if.then12: ; preds = %if.else8
%l13 = getelementptr inbounds %struct.NODE, ptr %b.035, i64 0, i32 2
br label %if.end17
if.else14: ; preds = %if.else8
%ri15 = getelementptr inbounds %struct.NODE, ptr %b.035, i64 0, i32 3
br label %if.end17
if.end17: ; preds = %while.end, %while.end.thread, %if.then12, %if.else14
%l13.sink = phi ptr [ %l13, %if.then12 ], [ %ri15, %if.else14 ], [ @r, %while.end.thread ], [ @r, %while.end ]
store ptr %call, ptr %l13.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 @T(ptr noundef readonly %R) local_unnamed_addr #0 {
entry:
%0 = load ptr, ptr @N, align 8, !tbaa !5
%cmp4 = icmp eq ptr %0, %R
br i1 %cmp4, label %return, label %if.end
if.end: ; preds = %entry, %if.end
%R.tr5 = phi ptr [ %3, %if.end ], [ %R, %entry ]
%l = getelementptr inbounds %struct.NODE, ptr %R.tr5, i64 0, i32 2
%1 = load ptr, ptr %l, align 8, !tbaa !12
tail call void @T(ptr noundef %1)
%2 = load i32, ptr %R.tr5, align 8, !tbaa !9
%call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %2)
%ri = getelementptr inbounds %struct.NODE, ptr %R.tr5, i64 0, i32 3
%3 = load ptr, ptr %ri, align 8, !tbaa !13
%4 = load ptr, ptr @N, 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 @S(ptr noundef readonly %R) local_unnamed_addr #0 {
entry:
%0 = load ptr, ptr @N, align 8, !tbaa !5
%cmp4 = icmp eq ptr %0, %R
br i1 %cmp4, label %return, label %if.end
if.end: ; preds = %entry, %if.end
%R.tr5 = phi ptr [ %3, %if.end ], [ %R, %entry ]
%1 = load i32, ptr %R.tr5, align 8, !tbaa !9
%call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %1)
%l = getelementptr inbounds %struct.NODE, ptr %R.tr5, i64 0, i32 2
%2 = load ptr, ptr %l, align 8, !tbaa !12
tail call void @S(ptr noundef %2)
%ri = getelementptr inbounds %struct.NODE, ptr %R.tr5, i64 0, i32 3
%3 = load ptr, ptr %ri, align 8, !tbaa !13
%4 = load ptr, ptr @N, 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:
%o = alloca i32, align 4
%h = alloca i32, align 4
%O = alloca [10 x i8], align 1
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %o) #7
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #7
call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %O) #7
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %o)
%0 = load i32, ptr %o, align 4, !tbaa !17
%cmp11 = icmp sgt i32 %0, 0
br i1 %cmp11, label %for.body, label %for.end
for.body: ; preds = %entry, %for.inc
%i.012 = phi i32 [ %inc, %for.inc ], [ 0, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %O)
%call3 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %O) #8
%cmp4 = icmp eq i64 %call3, 6
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 %h)
%1 = load i32, ptr %h, align 4, !tbaa !17
%2 = load ptr, ptr @N, align 8, !tbaa !5
%3 = load ptr, ptr @r, 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
%l.i = getelementptr inbounds %struct.NODE, ptr %call.i, i64 0, i32 2
store ptr %2, ptr %l.i, align 8, !tbaa !12
%ri.i = getelementptr inbounds %struct.NODE, ptr %call.i, i64 0, i32 3
store ptr %2, ptr %ri.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
%p37.i = getelementptr inbounds %struct.NODE, ptr %call.i, i64 0, i32 1
store ptr %2, ptr %p37.i, align 8, !tbaa !14
br label %ins.exit
while.body.i: ; preds = %if.then, %while.body.i
%b.035.i = phi ptr [ %b.1.i, %while.body.i ], [ %3, %if.then ]
%4 = load i32, ptr %b.035.i, align 8, !tbaa !9
%cmp3.i = icmp sgt i32 %4, %1
%l4.i = getelementptr inbounds %struct.NODE, ptr %b.035.i, i64 0, i32 2
%ri5.i = getelementptr inbounds %struct.NODE, ptr %b.035.i, i64 0, i32 3
%b.1.in.i = select i1 %cmp3.i, ptr %l4.i, ptr %ri5.i
%b.1.i = load ptr, ptr %b.1.in.i, align 8, !tbaa !5
%cmp.not.i = icmp eq ptr %b.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
%p.i = getelementptr inbounds %struct.NODE, ptr %call.i, i64 0, i32 1
store ptr %b.035.i, ptr %p.i, align 8, !tbaa !14
%cmp6.i = icmp eq ptr %b.035.i, %2
%spec.select10 = select i1 %cmp6.i, ptr @r, ptr %b.1.in.i
br label %ins.exit
ins.exit: ; preds = %while.end.i, %while.end.thread.i
%l13.sink.i = phi ptr [ @r, %while.end.thread.i ], [ %spec.select10, %while.end.i ]
store ptr %call.i, ptr %l13.sink.i, align 8, !tbaa !5
br label %for.inc
if.else: ; preds = %for.body
%5 = load ptr, ptr @r, align 8, !tbaa !5
call void @T(ptr noundef %5)
%putchar = call i32 @putchar(i32 10)
%6 = load ptr, ptr @r, align 8, !tbaa !5
call void @S(ptr noundef %6)
%putchar9 = call i32 @putchar(i32 10)
br label %for.inc
for.inc: ; preds = %ins.exit, %if.else
%inc = add nuw nsw i32 %i.012, 1
%7 = load i32, ptr %o, 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 10, ptr nonnull %O) #7
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #7
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %o) #7
ret i32 0
}
; 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 @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 = { 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 }
attributes #6 = { nounwind allocsize(0) }
attributes #7 = { nounwind }
attributes #8 = { 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 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 24}
!14 = !{!10, !6, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!11, !11, i64 0}
!18 = distinct !{!18, !16}
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
struct Node
{
int key;
struct Node *parent;
struct Node *left;
struct Node *right;
};
typedef struct Node *NodePointer;
void insert(NodePointer t, int w)
{
NodePointer x;
if (t->key <= w)
{
if (t->right == NULL)
{
x = (NodePointer)malloc(sizeof(struct Node));
x->key = w;
x->right = NULL;
x->left = NULL;
t->right = x;
}
else
{
insert(t->right, w);
}
}
else
{
if (t->left == NULL)
{
x = (NodePointer)malloc(sizeof(struct Node));
x->key = w;
x->right = NULL;
x->left = NULL;
t->left = x;
}
else
{
insert(t->left, w);
}
}
};
void preorder(NodePointer t)
{
if (t == NULL)
{
return;
}
printf(" %d", t->key);
preorder(t->left);
preorder(t->right);
};
void inorder(NodePointer t)
{
if (t == NULL)
{
return;
}
inorder(t->left);
printf(" %d", t->key);
inorder(t->right);
};
void postorder(NodePointer t)
{
if (t == NULL)
{
return;
}
postorder(t->left);
postorder(t->right);
printf(" %d", t->key);
};
int main()
{
int n;
scanf("%d\n", &n);
NodePointer tree = (NodePointer)malloc(sizeof(struct Node));
char input[8];
int k;
for (int i = 0; i < n; i++)
{
scanf("%s", &input);
if (strcmp(input, "insert") == 0)
{
scanf("%d\n", &k);
if (i == 0)
{
tree->key = k;
tree->right = NULL;
tree->left = NULL;
}
else
{
insert(tree, k);
}
}
else
{
inorder(tree);
printf("\n");
preorder(tree);
printf("\n");
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212532/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212532/source.c"
target datalayout = "e-m:e-p270: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 [4 x i8] c" %d\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"%s\00", align 1
@.str.3 = private unnamed_addr constant [7 x i8] c"insert\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local void @insert(ptr nocapture noundef %t, i32 noundef %w) local_unnamed_addr #0 {
entry:
br label %tailrecurse
tailrecurse: ; preds = %tailrecurse.backedge, %entry
%t.tr = phi ptr [ %t, %entry ], [ %t.tr.be, %tailrecurse.backedge ]
%0 = load i32, ptr %t.tr, align 8, !tbaa !5
%cmp.not = icmp sgt i32 %0, %w
br i1 %cmp.not, label %if.else7, label %if.then
if.then: ; preds = %tailrecurse
%right = getelementptr inbounds %struct.Node, ptr %t.tr, i64 0, i32 3
%1 = load ptr, ptr %right, align 8, !tbaa !11
%cmp1 = icmp eq ptr %1, null
br i1 %cmp1, label %if.then2, label %tailrecurse.backedge
tailrecurse.backedge: ; preds = %if.then, %if.else7
%t.tr.be = phi ptr [ %1, %if.then ], [ %2, %if.else7 ]
br label %tailrecurse
if.then2: ; preds = %if.then
%right.le = getelementptr inbounds %struct.Node, ptr %t.tr, i64 0, i32 3
%call = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7
store i32 %w, ptr %call, align 8, !tbaa !5
%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)
store ptr %call, ptr %right.le, align 8, !tbaa !11
br label %if.end19
if.else7: ; preds = %tailrecurse
%left8 = getelementptr inbounds %struct.Node, ptr %t.tr, i64 0, i32 2
%2 = load ptr, ptr %left8, align 8, !tbaa !12
%cmp9 = icmp eq ptr %2, null
br i1 %cmp9, label %if.then10, label %tailrecurse.backedge
if.then10: ; preds = %if.else7
%left8.le = getelementptr inbounds %struct.Node, ptr %t.tr, i64 0, i32 2
%call11 = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7
store i32 %w, ptr %call11, align 8, !tbaa !5
%left14 = getelementptr inbounds %struct.Node, ptr %call11, i64 0, i32 2
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %left14, i8 0, i64 16, i1 false)
store ptr %call11, ptr %left8.le, align 8, !tbaa !12
br label %if.end19
if.end19: ; preds = %if.then10, %if.then2
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 @preorder(ptr noundef readonly %t) local_unnamed_addr #0 {
entry:
%cmp4 = icmp eq ptr %t, null
br i1 %cmp4, label %return, label %if.end
if.end: ; preds = %entry, %if.end
%t.tr5 = phi ptr [ %2, %if.end ], [ %t, %entry ]
%0 = load i32, ptr %t.tr5, align 8, !tbaa !5
%call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0)
%left = getelementptr inbounds %struct.Node, ptr %t.tr5, i64 0, i32 2
%1 = load ptr, ptr %left, align 8, !tbaa !12
tail call void @preorder(ptr noundef %1)
%right = getelementptr inbounds %struct.Node, ptr %t.tr5, i64 0, i32 3
%2 = load ptr, ptr %right, 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 #3
; Function Attrs: nofree nounwind uwtable
define dso_local void @inorder(ptr noundef readonly %t) local_unnamed_addr #0 {
entry:
%cmp4 = icmp eq ptr %t, null
br i1 %cmp4, label %return, label %if.end
if.end: ; preds = %entry, %if.end
%t.tr5 = phi ptr [ %2, %if.end ], [ %t, %entry ]
%left = getelementptr inbounds %struct.Node, ptr %t.tr5, i64 0, i32 2
%0 = load ptr, ptr %left, align 8, !tbaa !12
tail call void @inorder(ptr noundef %0)
%1 = load i32, ptr %t.tr5, align 8, !tbaa !5
%call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %1)
%right = getelementptr inbounds %struct.Node, ptr %t.tr5, i64 0, i32 3
%2 = load ptr, ptr %right, 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 void @postorder(ptr noundef readonly %t) local_unnamed_addr #0 {
entry:
%cmp = icmp eq ptr %t, null
br i1 %cmp, label %common.ret4, label %if.end
common.ret4: ; preds = %entry, %if.end
ret void
if.end: ; preds = %entry
%left = getelementptr inbounds %struct.Node, ptr %t, i64 0, i32 2
%0 = load ptr, ptr %left, align 8, !tbaa !12
tail call void @postorder(ptr noundef %0)
%right = getelementptr inbounds %struct.Node, ptr %t, i64 0, i32 3
%1 = load ptr, ptr %right, align 8, !tbaa !11
tail call void @postorder(ptr noundef %1)
%2 = load i32, ptr %t, align 8, !tbaa !5
%call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %2)
br label %common.ret4
}
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
%input = alloca [8 x i8], align 1
%k = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #8
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n)
%call1 = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %input) #8
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #8
%0 = load i32, ptr %n, align 4, !tbaa !13
%cmp21 = icmp sgt i32 %0, 0
br i1 %cmp21, label %for.body.lr.ph, label %for.cond.cleanup
for.body.lr.ph: ; preds = %entry
%left = getelementptr inbounds %struct.Node, ptr %call1, i64 0, i32 2
br label %for.body
for.cond.cleanup: ; preds = %for.inc, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #8
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %input) #8
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #8
ret i32 0
for.body: ; preds = %for.body.lr.ph, %for.inc
%i.022 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.inc ]
%call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %input)
%bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(7) %input, ptr noundef nonnull dereferenceable(7) @.str.3, i64 7)
%cmp4 = icmp eq i32 %bcmp, 0
br i1 %cmp4, label %if.then, label %if.else8
if.then: ; preds = %for.body
%call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %k)
%cmp6 = icmp eq i32 %i.022, 0
%1 = load i32, ptr %k, align 4, !tbaa !13
br i1 %cmp6, label %if.then7, label %tailrecurse.i
if.then7: ; preds = %if.then
store i32 %1, ptr %call1, align 8, !tbaa !5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %left, i8 0, i64 16, i1 false)
br label %for.inc
tailrecurse.i: ; preds = %if.then, %tailrecurse.i.backedge
%t.tr.i = phi ptr [ %t.tr.i.be, %tailrecurse.i.backedge ], [ %call1, %if.then ]
%2 = load i32, ptr %t.tr.i, align 8, !tbaa !5
%cmp.not.i = icmp sgt i32 %2, %1
br i1 %cmp.not.i, label %if.else7.i, label %if.then.i
if.then.i: ; preds = %tailrecurse.i
%right.i = getelementptr inbounds %struct.Node, ptr %t.tr.i, i64 0, i32 3
%3 = load ptr, ptr %right.i, align 8, !tbaa !11
%cmp1.i = icmp eq ptr %3, null
br i1 %cmp1.i, label %if.then2.i, label %tailrecurse.i.backedge
if.then2.i: ; preds = %if.then.i
%right.i.le = getelementptr inbounds %struct.Node, ptr %t.tr.i, i64 0, i32 3
%call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7
store i32 %1, ptr %call.i, align 8, !tbaa !5
%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)
store ptr %call.i, ptr %right.i.le, align 8, !tbaa !11
br label %for.inc
if.else7.i: ; preds = %tailrecurse.i
%left8.i = getelementptr inbounds %struct.Node, ptr %t.tr.i, i64 0, i32 2
%4 = load ptr, ptr %left8.i, align 8, !tbaa !12
%cmp9.i = icmp eq ptr %4, null
br i1 %cmp9.i, label %if.then10.i, label %tailrecurse.i.backedge
tailrecurse.i.backedge: ; preds = %if.else7.i, %if.then.i
%t.tr.i.be = phi ptr [ %3, %if.then.i ], [ %4, %if.else7.i ]
br label %tailrecurse.i
if.then10.i: ; preds = %if.else7.i
%left8.i.le = getelementptr inbounds %struct.Node, ptr %t.tr.i, i64 0, i32 2
%call11.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7
store i32 %1, ptr %call11.i, align 8, !tbaa !5
%left14.i = getelementptr inbounds %struct.Node, ptr %call11.i, i64 0, i32 2
call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %left14.i, i8 0, i64 16, i1 false)
store ptr %call11.i, ptr %left8.i.le, align 8, !tbaa !12
br label %for.inc
if.else8: ; preds = %for.body
call void @inorder(ptr noundef %call1)
%putchar = call i32 @putchar(i32 10)
call void @preorder(ptr noundef %call1)
%putchar19 = call i32 @putchar(i32 10)
br label %for.inc
for.inc: ; preds = %if.then10.i, %if.then2.i, %if.else8, %if.then7
%inc = add nuw nsw i32 %i.022, 1
%5 = load i32, ptr %n, align 4, !tbaa !13
%cmp = icmp slt i32 %inc, %5
br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !14
}
; 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
; 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 = { 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 = { 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, !10, i64 8, !10, i64 16, !10, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 24}
!12 = !{!6, !10, i64 16}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"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;
Node treeMinimum(Node x){
while(x->left != NIL){
x = x->left;
}
return x;
}
Node treeMaximum(Node x){
while(x->right != NIL){
x = x->left;
}
return x;
}
Node treeSearch(Node x, int k){
if(x == NIL || k == x->key)
return x;
if(k < x->key)
return treeSearch(x->left,k);
else return treeSearch(x->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
}
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_212583/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212583/source.c"
target datalayout = "e-m:e-p270: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:
%0 = load ptr, ptr %x, align 8, !tbaa !13
%cmp.not3 = icmp eq ptr %0, null
br i1 %cmp.not3, label %while.end, label %while.body
while.body: ; preds = %entry, %while.body
%x.addr.04 = phi ptr [ %1, %while.body ], [ %x, %entry ]
%left = getelementptr inbounds %struct.node, ptr %x.addr.04, i64 0, i32 1
%1 = load ptr, ptr %left, align 8, !tbaa !5
%2 = load ptr, ptr %1, align 8, !tbaa !13
%cmp.not = icmp eq ptr %2, null
br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !14
while.end: ; preds = %while.body, %entry
%x.addr.0.lcssa = phi ptr [ %x, %entry ], [ %1, %while.body ]
ret ptr %x.addr.0.lcssa
}
; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable
define dso_local ptr @treeSearch(ptr noundef readonly %x, i32 noundef %k) local_unnamed_addr #0 {
entry:
%cmp14 = icmp eq ptr %x, null
br i1 %cmp14, label %return, label %lor.lhs.false
lor.lhs.false: ; preds = %entry, %if.end
%x.tr15 = phi ptr [ %x.tr.be, %if.end ], [ %x, %entry ]
%key = getelementptr inbounds %struct.node, ptr %x.tr15, i64 0, i32 3
%0 = load i32, ptr %key, align 8, !tbaa !15
%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 %x.tr15, i64 0, i32 1
%spec.select = select i1 %cmp3, ptr %left, ptr %x.tr15
%x.tr.be = load ptr, ptr %spec.select, align 8, !tbaa !16
%cmp = icmp eq ptr %x.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 ], [ %x.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 !13
%cmp.not = icmp eq ptr %0, null
br i1 %cmp.not, label %if.end, 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
if.end: ; preds = %entry
%parent = getelementptr inbounds %struct.node, ptr %x, i64 0, i32 2
%2 = load ptr, ptr %parent, align 8, !tbaa !17
%cmp2.not = icmp eq ptr %2, null
br i1 %cmp2.not, label %cleanup, label %land.rhs
land.rhs: ; preds = %if.end
%3 = load ptr, ptr %2, align 8, !tbaa !13
%cmp4 = icmp eq ptr %3, %x
br i1 %cmp4, label %while.body, label %cleanup
while.body: ; preds = %land.rhs
%parent5 = getelementptr inbounds %struct.node, ptr %2, i64 0, i32 2
%4 = load ptr, ptr %parent5, align 8, !tbaa !17
br label %cleanup
cleanup: ; preds = %while.cond.i, %land.rhs, %if.end, %while.body
%retval.0 = phi ptr [ %4, %while.body ], [ undef, %if.end ], [ undef, %land.rhs ], [ %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: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
define dso_local void @treeDelete(ptr nocapture noundef readnone %z) local_unnamed_addr #2 {
entry:
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) #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 !16
%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 !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:
%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 #5
; Function Attrs: nofree nounwind uwtable
define dso_local void @preorder(ptr noundef readonly %u) local_unnamed_addr #3 {
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: 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 !19
%cmp59 = icmp sgt i32 %0, 0
br i1 %cmp59, label %for.body, label %for.end
for.body: ; preds = %entry, %for.inc
%i.060 = 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 !16
%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
%x.tr15.i = phi ptr [ %x.tr.be.i, %if.end.i ], [ %2, %if.then ]
%key.i = getelementptr inbounds %struct.node, ptr %x.tr15.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
%left.i = getelementptr inbounds %struct.node, ptr %x.tr15.i, i64 0, i32 1
%spec.select.i = select i1 %cmp3.i, ptr %left.i, ptr %x.tr15.i
%x.tr.be.i = load ptr, ptr %spec.select.i, align 8, !tbaa !16
%cmp.i = icmp eq ptr %x.tr.be.i, 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.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 !16
%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 %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.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 !15
%cmp3.i42 = 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.i42, 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 !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 !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 ptr, ptr @root, align 8, !tbaa !16
%11 = load i32, ptr %x, align 4, !tbaa !19
%cmp14.i44 = icmp eq ptr %10, null
br i1 %cmp14.i44, label %for.inc, label %lor.lhs.false.i45
lor.lhs.false.i45: ; preds = %if.then31, %if.end.i49
%x.tr15.i46 = phi ptr [ %x.tr.be.i53, %if.end.i49 ], [ %10, %if.then31 ]
%key.i47 = getelementptr inbounds %struct.node, ptr %x.tr15.i46, i64 0, i32 3
%12 = load i32, ptr %key.i47, align 8, !tbaa !15
%cmp1.i48 = icmp eq i32 %12, %11
br i1 %cmp1.i48, label %for.inc, label %if.end.i49
if.end.i49: ; preds = %lor.lhs.false.i45
%cmp3.i50 = icmp sgt i32 %12, %11
%left.i51 = getelementptr inbounds %struct.node, ptr %x.tr15.i46, i64 0, i32 1
%spec.select.i52 = select i1 %cmp3.i50, ptr %left.i51, ptr %x.tr15.i46
%x.tr.be.i53 = load ptr, ptr %spec.select.i52, align 8, !tbaa !16
%cmp.i54 = icmp eq ptr %x.tr.be.i53, null
br i1 %cmp.i54, label %for.inc, label %lor.lhs.false.i45
for.inc: ; preds = %if.end.i49, %lor.lhs.false.i45, %if.then31, %for.body, %if.then8, %if.else, %if.then23, %insert.exit
%inc = add nuw nsw i32 %i.060, 1
%13 = load i32, ptr %n, align 4, !tbaa !19
%cmp = icmp slt i32 %inc, %13
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 = { 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 #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 = !{!7, !7, i64 0}
!17 = !{!6, !7, i64 16}
!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;
void insert(Node);
void inorder(Node);
void preorder(Node);
int main()
{
int n,i,x;
char m[10];
Node A;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%s%d",m,&x);
if(m[0]=='i'){
A = (Node)malloc(sizeof(struct node));
A->right = NIL;
A->left = NIL;
A->parent = NIL;
A->key = x;
insert(A);
}
else if(m[0]=='p'){
inorder(root);
printf("\n");
preorder(root);
printf("\n");
}
}
return 0;
}
void insert(Node A)
{
Node y,x;
y = NIL;
x = root;
while(x!=NIL){
y = x;
if(A->key < x->key) x = x->left;
else x = x->right;
}
A->parent = y;
if(y==NIL) root = A;
else if(A->key < y->key) y->left = A;
else y->right = A;
}
void inorder(Node A)
{
if(A==NIL) return;
inorder(A->left);
printf(" %d",A->key);
inorder(A->right);
}
void preorder(Node A)
{
if(A==NIL) return;
printf(" %d",A->key);
preorder(A->left);
preorder(A->right);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212626/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212626/source.c"
target datalayout = "e-m:e-p270: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 [5 x i8] c"%s%d\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
%m = alloca [10 x i8], align 1
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 10, ptr nonnull %m) #7
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp19 = icmp sgt i32 %0, 0
br i1 %cmp19, label %for.body, label %for.end
for.body: ; preds = %entry, %for.inc
%i.020 = phi i32 [ %inc, %for.inc ], [ 0, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %m, ptr noundef nonnull %x)
%1 = load i8, ptr %m, align 1, !tbaa !9
switch i8 %1, label %for.inc [
i8 105, label %if.then
i8 112, label %if.then9
]
if.then: ; preds = %for.body
%call4 = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #8
%parent = getelementptr inbounds %struct.node, ptr %call4, i64 0, i32 2
call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %call4, i8 0, i64 24, i1 false)
%2 = load i32, ptr %x, align 4, !tbaa !5
%key = getelementptr inbounds %struct.node, ptr %call4, i64 0, i32 3
store i32 %2, ptr %key, align 8, !tbaa !10
%x.028.i = load ptr, ptr @root, align 8, !tbaa !13
%cmp.not29.i = icmp eq ptr %x.028.i, null
br i1 %cmp.not29.i, label %insert.exit, label %while.body.i
while.body.i: ; preds = %if.then, %while.body.i
%x.030.i = phi ptr [ %x.0.i, %while.body.i ], [ %x.028.i, %if.then ]
%key1.i = getelementptr inbounds %struct.node, ptr %x.030.i, i64 0, i32 3
%3 = load i32, ptr %key1.i, align 8, !tbaa !10
%cmp2.i = icmp slt i32 %2, %3
%left.i = getelementptr inbounds %struct.node, ptr %x.030.i, i64 0, i32 1
%x.1.in.i = select i1 %cmp2.i, ptr %left.i, ptr %x.030.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
%storemerge = phi ptr [ null, %if.then ], [ %x.030.i, %while.body.i ]
%left10.sink.i = phi ptr [ @root, %if.then ], [ %x.1.in.i, %while.body.i ]
store ptr %storemerge, ptr %parent, align 8, !tbaa !16
store ptr %call4, ptr %left10.sink.i, align 8, !tbaa !13
br label %for.inc
if.then9: ; 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)
%putchar18 = call i32 @putchar(i32 10)
br label %for.inc
for.inc: ; preds = %for.body, %insert.exit, %if.then9
%inc = add nuw nsw i32 %i.020, 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 10, ptr nonnull %m) #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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(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 allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3
; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable
define dso_local void @insert(ptr noundef %A) local_unnamed_addr #4 {
entry:
%x.028 = load ptr, ptr @root, align 8, !tbaa !13
%cmp.not29 = icmp eq ptr %x.028, null
br i1 %cmp.not29, label %if.then4, label %while.body.lr.ph
while.body.lr.ph: ; preds = %entry
%key = getelementptr inbounds %struct.node, ptr %A, i64 0, i32 3
%0 = load i32, ptr %key, align 8, !tbaa !10
br label %while.body
while.body: ; preds = %while.body.lr.ph, %while.body
%x.030 = phi ptr [ %x.028, %while.body.lr.ph ], [ %x.0, %while.body ]
%key1 = getelementptr inbounds %struct.node, ptr %x.030, i64 0, i32 3
%1 = load i32, ptr %key1, align 8, !tbaa !10
%cmp2 = icmp slt i32 %0, %1
%left = getelementptr inbounds %struct.node, ptr %x.030, i64 0, i32 1
%x.1.in = select i1 %cmp2, ptr %left, ptr %x.030
%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.else5, label %while.body, !llvm.loop !14
if.then4: ; preds = %entry
%parent32 = getelementptr inbounds %struct.node, ptr %A, i64 0, i32 2
store ptr null, ptr %parent32, align 8, !tbaa !16
br label %if.end14
if.else5: ; preds = %while.body
%parent = getelementptr inbounds %struct.node, ptr %A, i64 0, i32 2
store ptr %x.030, ptr %parent, align 8, !tbaa !16
%key6 = getelementptr inbounds %struct.node, ptr %A, i64 0, i32 3
%2 = load i32, ptr %key6, align 8, !tbaa !10
%key7 = getelementptr inbounds %struct.node, ptr %x.030, i64 0, i32 3
%3 = load i32, ptr %key7, align 8, !tbaa !10
%cmp8 = icmp slt i32 %2, %3
%left10 = getelementptr inbounds %struct.node, ptr %x.030, i64 0, i32 1
%spec.select = select i1 %cmp8, ptr %left10, ptr %x.030
br label %if.end14
if.end14: ; preds = %if.else5, %if.then4
%left10.sink = phi ptr [ @root, %if.then4 ], [ %spec.select, %if.else5 ]
store ptr %A, ptr %left10.sink, align 8, !tbaa !13
ret void
}
; Function Attrs: nofree nounwind uwtable
define dso_local void @inorder(ptr noundef readonly %A) local_unnamed_addr #0 {
entry:
%cmp4 = icmp eq ptr %A, null
br i1 %cmp4, label %return, label %if.end
if.end: ; preds = %entry, %if.end
%A.tr5 = phi ptr [ %2, %if.end ], [ %A, %entry ]
%left = getelementptr inbounds %struct.node, ptr %A.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 %A.tr5, i64 0, i32 3
%1 = load i32, ptr %key, align 8, !tbaa !10
%call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %1)
%2 = load ptr, ptr %A.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 %A) local_unnamed_addr #0 {
entry:
%cmp4 = icmp eq ptr %A, null
br i1 %cmp4, label %return, label %if.end
if.end: ; preds = %entry, %if.end
%A.tr5 = phi ptr [ %2, %if.end ], [ %A, %entry ]
%key = getelementptr inbounds %struct.node, ptr %A.tr5, i64 0, i32 3
%0 = load i32, ptr %key, 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 %A.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 %A.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 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 = { 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 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 = { nofree nounwind }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { 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 24}
!11 = !{!"node", !12, i64 0, !12, i64 8, !12, i64 16, !6, 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 16}
!17 = distinct !{!17, !15}
!18 = !{!11, !12, i64 8}
!19 = !{!11, !12, i64 0}
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct Node {
int key;
struct Node *right, *left, *parent;
};
typedef struct Node Node;
Node *root, *NIL;
void insert(int k) {
Node *y = NIL;
Node *x = root;
Node *z;
z = (Node *)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) 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(void) {
int n, i, x;
char com[16];
scanf("%d",&n);
for(i=0;i<n;i++) {
scanf("%s",com);
if(!strcmp(com,"insert")) {
scanf("%d",&x);
insert(x);
} else if(!strcmp(com,"print")) {
inorder(root);
printf("\n");
preorder(root);
printf("\n");
}
}
return 0;
}
/*
8
insert 30
insert 88
insert 12
insert 1
insert 20
insert 17
insert 25
print
*/
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212677/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212677/source.c"
target datalayout = "e-m:e-p270: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 [16 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 16, 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
%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 ]
%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)
%tobool.not = icmp eq i32 %bcmp, 0
br i1 %tobool.not, 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)
%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.select15 = 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.select15, %while.end.i ]
store ptr %call.i, ptr %left13.sink.i, align 8, !tbaa !5
br label %for.inc
if.else: ; preds = %for.body
%bcmp13 = call i32 @bcmp(ptr noundef nonnull dereferenceable(6) %com, ptr noundef nonnull dereferenceable(6) @.str.4, i64 6)
%tobool7.not = icmp eq i32 %bcmp13, 0
br i1 %tobool7.not, label %if.then8, label %for.inc
if.then8: ; 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)
%putchar14 = call i32 @putchar(i32 10)
br label %for.inc
for.inc: ; preds = %insert.exit, %if.then8, %if.else
%inc = add nuw nsw i32 %i.017, 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 16, 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){
for(;;){
if(x->left==NIL){
break;
}
else{
x=x->left;
return x;
}
}
}
Node treeMaximum(Node x){
for(;;){
if(x->right==NIL){
break;
}
else{
x=x->right;
return 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(1){
if(x==NIL){
break;
}
else{
y=x;
if(x->key < z->key){
x=x->right;
}
else{
x=x->left;
}
}
}
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_212727/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212727/source.c"
target datalayout = "e-m:e-p270: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(argmem: read) uwtable
define dso_local ptr @treeMinimum(ptr nocapture noundef readonly %x) local_unnamed_addr #0 {
entry:
%left = getelementptr inbounds %struct.node, ptr %x, i64 0, i32 1
%0 = load ptr, ptr %left, align 8, !tbaa !5
ret ptr %0
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local ptr @treeMaximum(ptr nocapture noundef readonly %x) local_unnamed_addr #0 {
entry:
%0 = load ptr, ptr %x, align 8, !tbaa !11
ret ptr %0
}
; 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 #1 {
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 #1 {
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 #1 {
entry:
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 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 @insert(i32 noundef %k) local_unnamed_addr #3 {
entry:
%0 = load ptr, ptr @root, align 8, !tbaa !12
%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
%cmp37 = 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 %cmp37, label %if.then10, label %if.else
if.else: ; preds = %entry, %if.else
%x.038 = phi ptr [ %x.1, %if.else ], [ %0, %entry ]
%key1 = getelementptr inbounds %struct.node, ptr %x.038, i64 0, i32 3
%1 = load i32, ptr %key1, align 8, !tbaa !13
%cmp3 = icmp slt i32 %1, %k
%left7 = getelementptr inbounds %struct.node, ptr %x.038, i64 0, i32 1
%x.1.in = select i1 %cmp3, ptr %x.038, ptr %left7
%x.1 = load ptr, ptr %x.1.in, align 8, !tbaa !12
%cmp = icmp eq ptr %x.1, null
br i1 %cmp, label %if.else11, label %if.else
if.then10: ; preds = %entry
%parent40 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2
store ptr null, ptr %parent40, align 8, !tbaa !14
br label %if.end20
if.else11: ; preds = %if.else
%parent = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2
store ptr %x.038, ptr %parent, align 8, !tbaa !14
%key13 = getelementptr inbounds %struct.node, ptr %x.038, i64 0, i32 3
%2 = load i32, ptr %key13, align 8, !tbaa !13
%cmp14 = icmp sgt i32 %2, %k
%left16 = getelementptr inbounds %struct.node, ptr %x.038, i64 0, i32 1
%spec.select = select i1 %cmp14, ptr %left16, ptr %x.038
br label %if.end20
if.end20: ; preds = %if.else11, %if.then10
%left16.sink = phi ptr [ @root, %if.then10 ], [ %spec.select, %if.else11 ]
store ptr %call, ptr %left16.sink, align 8, !tbaa !12
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:
%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 !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 !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 #5
; Function Attrs: nofree nounwind uwtable
define dso_local void @preorder(ptr noundef readonly %u) local_unnamed_addr #3 {
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 !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 !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 #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 !15
%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 !16
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 !15
%3 = load ptr, ptr @root, align 8, !tbaa !12
%call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #8
%key.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 3
store i32 %2, ptr %key.i, align 8, !tbaa !13
%cmp37.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 %cmp37.i, label %if.then10.i, label %if.else.i
if.else.i: ; preds = %if.then16, %if.else.i
%x.038.i = phi ptr [ %x.1.i, %if.else.i ], [ %3, %if.then16 ]
%key1.i = getelementptr inbounds %struct.node, ptr %x.038.i, i64 0, i32 3
%4 = load i32, ptr %key1.i, align 8, !tbaa !13
%cmp3.i = icmp slt i32 %4, %2
%left7.i = getelementptr inbounds %struct.node, ptr %x.038.i, i64 0, i32 1
%x.1.in.i = select i1 %cmp3.i, ptr %x.038.i, ptr %left7.i
%x.1.i = load ptr, ptr %x.1.in.i, align 8, !tbaa !12
%cmp.i = icmp eq ptr %x.1.i, null
br i1 %cmp.i, label %if.else11.i, label %if.else.i
if.then10.i: ; preds = %if.then16
%parent40.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2
store ptr null, ptr %parent40.i, align 8, !tbaa !14
br label %insert.exit
if.else11.i: ; preds = %if.else.i
%parent.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2
store ptr %x.038.i, ptr %parent.i, align 8, !tbaa !14
%cmp14.i = icmp sgt i32 %4, %2
%spec.select.i = select i1 %cmp14.i, ptr %left7.i, ptr %x.038.i
br label %insert.exit
insert.exit: ; preds = %if.then10.i, %if.else11.i
%left16.sink.i = phi ptr [ @root, %if.then10.i ], [ %spec.select.i, %if.else11.i ]
store ptr %call.i, ptr %left16.sink.i, align 8, !tbaa !12
br label %for.inc
if.then23: ; preds = %for.body
%5 = load ptr, ptr @root, align 8, !tbaa !12
call void @inorder(ptr noundef %5)
%putchar = call i32 @putchar(i32 10)
%6 = load ptr, ptr @root, align 8, !tbaa !12
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 !15
%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) #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: 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 norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!6, !7, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!6, !10, i64 24}
!14 = !{!6, !7, i64 16}
!15 = !{!10, !10, i64 0}
!16 = !{!8, !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
|
#include <stdio.h>
#include <stdlib.h>
#include <string.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 num,j,x;
char c[6];
scanf("%d", &num);
for(j = 0;j<num;j++){
scanf("%s",c);
if(strcmp(c,"insert")==0){
scanf("%d",&x);
insert(x);
}
else if( strcmp(c,"print") == 0){
inorder(root);
printf("\n");
preorder(root);
printf("\n");
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212770/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212770/source.c"
target datalayout = "e-m:e-p270: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) #7
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:
%num = alloca i32, align 4
%x = alloca i32, align 4
%c = alloca [6 x i8], align 1
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #8
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #8
call void @llvm.lifetime.start.p0(i64 6, ptr nonnull %c) #8
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %num)
%0 = load i32, ptr %num, align 4, !tbaa !17
%cmp16 = icmp sgt i32 %0, 0
br i1 %cmp16, label %for.body, label %for.end
for.body: ; preds = %entry, %for.inc
%j.017 = phi i32 [ %inc, %for.inc ], [ 0, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %c)
%call3 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %c, ptr noundef nonnull dereferenceable(7) @.str.3) #9
%cmp4 = icmp eq i32 %call3, 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) #7
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.select15 = 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.select15, %while.end.i ]
store ptr %call.i, ptr %left13.sink.i, align 8, !tbaa !5
br label %for.inc
if.else: ; preds = %for.body
%bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(6) %c, ptr noundef nonnull dereferenceable(6) @.str.4, i64 6)
%cmp8 = icmp eq i32 %bcmp, 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)
%putchar14 = call i32 @putchar(i32 10)
br label %for.inc
for.inc: ; preds = %insert.exit, %if.then9, %if.else
%inc = add nuw nsw i32 %j.017, 1
%7 = load i32, ptr %num, 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 6, ptr nonnull %c) #8
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #8
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #8
ret i32 0
}
; 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 willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #5
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #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 = { 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 willreturn memory(argmem: read) }
attributes #6 = { nofree nounwind }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { nounwind }
attributes #9 = { 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 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>
#define NIL NULL
struct node{
struct node *right;
struct node *left;
struct node *p;
int key;
};
typedef struct node *Node;
Node root;
Node treeSearch(Node u, int k){
}
Node treeSuccessor(Node x){
}
void treeDelete(Node z){
Node y;
Node x;
if(z->left == NIL || z->right == NIL){
y = z;
}
if(y->left != NIL){
x = y->left;
}
else{
x = y->right;
}
if(x != NIL){
x->p = y->p;
}
if(y->p == NIL){
root = x;
}else if(y == y->p->left){
y->p->left = x;
}else{
y->p->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->p = 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_212820/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212820/source.c"
target datalayout = "e-m:e-p270: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 @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(readwrite, inaccessiblemem: none) uwtable
define dso_local void @treeDelete(ptr noundef readonly %z) local_unnamed_addr #1 {
entry:
%left = getelementptr inbounds %struct.node, ptr %z, i64 0, i32 1
%0 = load ptr, ptr %left, align 8, !tbaa !5
%cmp3.not = icmp eq ptr %0, null
br i1 %cmp3.not, label %if.end7, label %if.then9
if.end7: ; preds = %entry
%1 = load ptr, ptr %z, align 8, !tbaa !11
%cmp8.not = icmp eq ptr %1, null
br i1 %cmp8.not, label %if.end11, label %if.then9
if.then9: ; preds = %entry, %if.end7
%x.052 = phi ptr [ %1, %if.end7 ], [ %0, %entry ]
%p = getelementptr inbounds %struct.node, ptr %z, i64 0, i32 2
%2 = load ptr, ptr %p, align 8, !tbaa !12
%p10 = getelementptr inbounds %struct.node, ptr %x.052, i64 0, i32 2
store ptr %2, ptr %p10, align 8, !tbaa !12
br label %if.end11
if.end11: ; preds = %if.then9, %if.end7
%x.053 = phi ptr [ %x.052, %if.then9 ], [ null, %if.end7 ]
%p12 = getelementptr inbounds %struct.node, ptr %z, i64 0, i32 2
%3 = load ptr, ptr %p12, align 8, !tbaa !12
%cmp13 = icmp eq ptr %3, null
br i1 %cmp13, label %if.end30, label %if.else15
if.else15: ; preds = %if.end11
%left17 = getelementptr inbounds %struct.node, ptr %3, i64 0, i32 1
%4 = load ptr, ptr %left17, align 8, !tbaa !5
%cmp18 = icmp eq ptr %4, %z
%left17. = select i1 %cmp18, ptr %left17, ptr %3
br label %if.end30
if.end30: ; preds = %if.else15, %if.end11
%root.sink = phi ptr [ @root, %if.end11 ], [ %left17., %if.else15 ]
store ptr %x.053, ptr %root.sink, align 8, !tbaa !13
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 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 @insert(i32 noundef %k) local_unnamed_addr #3 {
entry:
%0 = load ptr, ptr @root, align 8, !tbaa !13
%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 !14
%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 !14
%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
%p37 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2
store ptr null, ptr %p37, align 8, !tbaa !12
br label %if.end17
if.else8: ; preds = %while.body
%p = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2
store ptr %x.035, ptr %p, align 8, !tbaa !12
%key10 = getelementptr inbounds %struct.node, ptr %x.035, i64 0, i32 3
%2 = load i32, ptr %key10, align 8, !tbaa !14
%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 #4
; Function Attrs: nofree nounwind uwtable
define dso_local void @inorder(ptr noundef readonly %u) local_unnamed_addr #3 {
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 !14
%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 #5
; Function Attrs: nofree nounwind uwtable
define dso_local void @preorder(ptr noundef readonly %u) local_unnamed_addr #3 {
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 !14
%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 #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 !17
%cmp42 = icmp sgt i32 %0, 0
br i1 %cmp42, label %for.body, label %for.end
for.body: ; preds = %entry, %for.inc
%i.043 = 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 !13
%call.i = call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #8
%key.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 3
store i32 %2, ptr %key.i, align 8, !tbaa !14
%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 !14
%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 !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 ]
%p37.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2
store ptr %.sink, ptr %p37.i, align 8, !tbaa !12
store ptr %call.i, ptr %left13.sink.i, align 8, !tbaa !13
br label %for.inc
if.then23: ; preds = %for.body
%5 = load ptr, ptr @root, align 8, !tbaa !13
call void @inorder(ptr noundef %5)
%putchar = call i32 @putchar(i32 10)
%6 = load ptr, ptr @root, align 8, !tbaa !13
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)
unreachable
for.inc: ; preds = %for.body, %if.then, %if.then23, %insert.exit
%inc = add nuw nsw i32 %i.043, 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) #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: 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(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn memory(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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!6, !7, i64 0}
!12 = !{!6, !7, i64 16}
!13 = !{!7, !7, i64 0}
!14 = !{!6, !10, i64 24}
!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>
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->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_212864/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212864/source.c"
target datalayout = "e-m:e-p270: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
@y = dso_local local_unnamed_addr global ptr null, align 8
@x = dso_local local_unnamed_addr global ptr null, align 8
; 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
%cmp23 = icmp sgt i32 %0, 0
br i1 %cmp23, label %for.body, label %for.end
for.body: ; preds = %entry, %for.inc
%i.024 = 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
i8 100, label %if.then17
]
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)
%putchar22 = call i32 @putchar(i32 10)
br label %for.inc
if.then17: ; preds = %for.body
%call18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x)
br label %for.inc
for.inc: ; preds = %for.body, %insert.exit, %if.then17, %if.then9
%inc = add nuw nsw i32 %i.024, 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>
int main()
{
int n, y, i, j, b, r, t, num;
double ans, max;
while(1){
max = 0.0;
scanf("%d", &n);
if(n == 0) break;
scanf("%d", &y);
for(i=0; i<n; i++){
scanf("%d%d%d", &b, &r, &t);
if(t == 1){
ans = (1 + y * (double)r / 100);
}
else{
ans = 1.0;
for(j=0; j<y; j++){
ans *= (1 + (double)r / 100);
}
}
if(max < ans){
num = b;
max = ans;
}
}
printf("%d\n",num);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212921/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212921/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
%call36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp37 = icmp eq i32 %0, 0
br i1 %cmp37, label %while.end, label %if.end
if.end: ; preds = %entry, %for.end22
%num.038 = phi i32 [ %num.1.lcssa, %for.end22 ], [ 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
%cmp231 = icmp sgt i32 %1, 0
br i1 %cmp231, label %for.body, label %for.end22
for.body: ; preds = %if.end, %if.end15
%max.034 = phi double [ %max.1, %if.end15 ], [ 0.000000e+00, %if.end ]
%num.133 = phi i32 [ %num.2, %if.end15 ], [ %num.038, %if.end ]
%i.032 = phi i32 [ %inc21, %if.end15 ], [ 0, %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
%cmp4 = icmp eq i32 %2, 1
%3 = load i32, ptr %y, align 4, !tbaa !5
br i1 %cmp4, label %if.then5, label %for.cond7.preheader
for.cond7.preheader: ; preds = %for.body
%cmp828 = icmp sgt i32 %3, 0
br i1 %cmp828, label %for.body10.lr.ph, label %if.end15
for.body10.lr.ph: ; preds = %for.cond7.preheader
%4 = load i32, ptr %r, align 4, !tbaa !5
%conv11 = sitofp i32 %4 to double
%div12 = fdiv double %conv11, 1.000000e+02
%add13 = fadd double %div12, 1.000000e+00
%xtraiter = and i32 %3, 7
%5 = icmp ult i32 %3, 8
br i1 %5, label %if.end15.loopexit.unr-lcssa, label %for.body10.lr.ph.new
for.body10.lr.ph.new: ; preds = %for.body10.lr.ph
%unroll_iter = and i32 %3, -8
br label %for.body10
if.then5: ; preds = %for.body
%conv = sitofp i32 %3 to double
%6 = load i32, ptr %r, align 4, !tbaa !5
%conv6 = sitofp i32 %6 to double
%mul = fmul double %conv, %conv6
%div = fdiv double %mul, 1.000000e+02
%add = fadd double %div, 1.000000e+00
br label %if.end15
for.body10: ; preds = %for.body10, %for.body10.lr.ph.new
%ans.030 = phi double [ 1.000000e+00, %for.body10.lr.ph.new ], [ %mul14.7, %for.body10 ]
%niter = phi i32 [ 0, %for.body10.lr.ph.new ], [ %niter.next.7, %for.body10 ]
%mul14 = fmul double %ans.030, %add13
%mul14.1 = fmul double %mul14, %add13
%mul14.2 = fmul double %mul14.1, %add13
%mul14.3 = fmul double %mul14.2, %add13
%mul14.4 = fmul double %mul14.3, %add13
%mul14.5 = fmul double %mul14.4, %add13
%mul14.6 = fmul double %mul14.5, %add13
%mul14.7 = fmul double %mul14.6, %add13
%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.end15.loopexit.unr-lcssa, label %for.body10, !llvm.loop !9
if.end15.loopexit.unr-lcssa: ; preds = %for.body10, %for.body10.lr.ph
%mul14.lcssa.ph = phi double [ undef, %for.body10.lr.ph ], [ %mul14.7, %for.body10 ]
%ans.030.unr = phi double [ 1.000000e+00, %for.body10.lr.ph ], [ %mul14.7, %for.body10 ]
%lcmp.mod.not = icmp eq i32 %xtraiter, 0
br i1 %lcmp.mod.not, label %if.end15, label %for.body10.epil
for.body10.epil: ; preds = %if.end15.loopexit.unr-lcssa, %for.body10.epil
%ans.030.epil = phi double [ %mul14.epil, %for.body10.epil ], [ %ans.030.unr, %if.end15.loopexit.unr-lcssa ]
%epil.iter = phi i32 [ %epil.iter.next, %for.body10.epil ], [ 0, %if.end15.loopexit.unr-lcssa ]
%mul14.epil = fmul double %ans.030.epil, %add13
%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.end15, label %for.body10.epil, !llvm.loop !11
if.end15: ; preds = %if.end15.loopexit.unr-lcssa, %for.body10.epil, %for.cond7.preheader, %if.then5
%ans.1 = phi double [ %add, %if.then5 ], [ 1.000000e+00, %for.cond7.preheader ], [ %mul14.lcssa.ph, %if.end15.loopexit.unr-lcssa ], [ %mul14.epil, %for.body10.epil ]
%cmp16 = fcmp olt double %max.034, %ans.1
%7 = load i32, ptr %b, align 4
%num.2 = select i1 %cmp16, i32 %7, i32 %num.133
%max.1 = select i1 %cmp16, double %ans.1, double %max.034
%inc21 = add nuw nsw i32 %i.032, 1
%8 = load i32, ptr %n, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc21, %8
br i1 %cmp2, label %for.body, label %for.end22, !llvm.loop !13
for.end22: ; preds = %if.end15, %if.end
%num.1.lcssa = phi i32 [ %num.038, %if.end ], [ %num.2, %if.end15 ]
%call23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %num.1.lcssa)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%9 = load i32, ptr %n, align 4, !tbaa !5
%cmp = icmp eq i32 %9, 0
br i1 %cmp, label %while.end, label %if.end
while.end: ; preds = %for.end22, %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>
int main(void){
int n;
scanf("%d",&n);
long a[n+1],b[n];
for(long i=0;i<n+1;i++){
scanf("%ld",&a[i]);
}
for(long i=0;i<n;i++){
scanf("%ld",&b[i]);
}
long ans=0;
for(long i=0;i<n;i++){
long w1=a[i],w2=a[i+1];
if(b[i]-a[i]>=0){ //次の街に攻撃猶予がある時
a[i+1]=a[i+1]-(b[i]-a[i]);
if(a[i+1]>=0)ans+=b[i]-a[i]; //次の街に攻撃できた分
else { //次の街を全滅できた時
ans+=w2;
a[i+1]=0;
}
}
a[i]-=b[i];
if(a[i]<0){a[i]=0; //今の街を全滅した時
ans+=w1;
}
else ans+=b[i];
}
printf("%ld",ans);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212965/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212965/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%ld\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
%add = add nsw i32 %0, 1
%1 = zext i32 %add to i64
%2 = call ptr @llvm.stacksave.p0()
%vla = alloca i64, i64 %1, align 16
%3 = load i32, ptr %n, align 4, !tbaa !5
%4 = zext i32 %3 to i64
%vla1 = alloca i64, i64 %4, align 16
%cmp97 = icmp sgt i32 %3, -1
br i1 %cmp97, label %for.body, label %for.cond.cleanup22
for.cond6.preheader: ; preds = %for.body
%conv799 = sext i32 %5 to i64
%cmp8100 = icmp sgt i32 %5, 0
br i1 %cmp8100, label %for.body11, label %for.cond18.preheader
for.body: ; preds = %entry, %for.body
%i.098 = phi i64 [ %inc, %for.body ], [ 0, %entry ]
%arrayidx = getelementptr inbounds i64, ptr %vla, i64 %i.098
%call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx)
%inc = add nuw nsw i64 %i.098, 1
%5 = load i32, ptr %n, align 4, !tbaa !5
%add2 = add nsw i32 %5, 1
%conv = sext i32 %add2 to i64
%cmp = icmp slt i64 %inc, %conv
br i1 %cmp, label %for.body, label %for.cond6.preheader, !llvm.loop !9
for.cond18.preheader: ; preds = %for.body11, %for.cond6.preheader
%conv7.lcssa = phi i64 [ %conv799, %for.cond6.preheader ], [ %conv7, %for.body11 ]
%cmp20102 = icmp sgt i64 %conv7.lcssa, 0
br i1 %cmp20102, label %for.body23.preheader, label %for.cond.cleanup22
for.body23.preheader: ; preds = %for.cond18.preheader
%.pre = load i64, ptr %vla, align 16, !tbaa !11
br label %for.body23
for.body11: ; preds = %for.cond6.preheader, %for.body11
%i5.0101 = phi i64 [ %inc15, %for.body11 ], [ 0, %for.cond6.preheader ]
%arrayidx12 = getelementptr inbounds i64, ptr %vla1, i64 %i5.0101
%call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx12)
%inc15 = add nuw nsw i64 %i5.0101, 1
%6 = load i32, ptr %n, align 4, !tbaa !5
%conv7 = sext i32 %6 to i64
%cmp8 = icmp slt i64 %inc15, %conv7
br i1 %cmp8, label %for.body11, label %for.cond18.preheader, !llvm.loop !13
for.cond.cleanup22: ; preds = %if.end51, %entry, %for.cond18.preheader
%ans.0.lcssa = phi i64 [ 0, %for.cond18.preheader ], [ 0, %entry ], [ %ans.2, %if.end51 ]
%call68 = 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) #5
ret i32 0
for.body23: ; preds = %for.body23.preheader, %if.end51
%7 = phi i64 [ %10, %if.end51 ], [ %.pre, %for.body23.preheader ]
%i17.0104 = phi i64 [ %add25, %if.end51 ], [ 0, %for.body23.preheader ]
%ans.0103 = phi i64 [ %ans.2, %if.end51 ], [ 0, %for.body23.preheader ]
%arrayidx24 = getelementptr inbounds i64, ptr %vla, i64 %i17.0104
%add25 = add nuw nsw i64 %i17.0104, 1
%arrayidx26 = getelementptr inbounds i64, ptr %vla, i64 %add25
%8 = load i64, ptr %arrayidx26, align 8, !tbaa !11
%arrayidx27 = getelementptr inbounds i64, ptr %vla1, i64 %i17.0104
%9 = load i64, ptr %arrayidx27, align 8, !tbaa !11
%sub = sub nsw i64 %9, %7
%cmp29 = icmp sgt i64 %sub, -1
br i1 %cmp29, label %if.then, label %if.end51
if.then: ; preds = %for.body23
%sub36 = sub nsw i64 %8, %sub
store i64 %sub36, ptr %arrayidx26, align 8, !tbaa !11
%cmp41 = icmp sgt i64 %sub36, -1
br i1 %cmp41, label %if.then43, label %if.else
if.then43: ; preds = %if.then
%add47 = add nsw i64 %sub, %ans.0103
br label %if.end51
if.else: ; preds = %if.then
%add48 = add nsw i64 %8, %ans.0103
store i64 0, ptr %arrayidx26, align 8, !tbaa !11
br label %if.end51
if.end51: ; preds = %if.then43, %if.else, %for.body23
%10 = phi i64 [ %sub36, %if.then43 ], [ 0, %if.else ], [ %8, %for.body23 ]
%ans.1 = phi i64 [ %add47, %if.then43 ], [ %add48, %if.else ], [ %ans.0103, %for.body23 ]
%11 = load i64, ptr %arrayidx24, align 8, !tbaa !11
%sub54 = sub nsw i64 %11, %9
%cmp56 = icmp slt i64 %sub54, 0
%spec.store.select = call i64 @llvm.smax.i64(i64 %sub54, i64 0)
store i64 %spec.store.select, ptr %arrayidx24, align 8
%spec.select = select i1 %cmp56, i64 %7, i64 %9
%ans.2 = add nsw i64 %spec.select, %ans.1
%exitcond.not = icmp eq i64 %add25, %conv7.lcssa
br i1 %exitcond.not, label %for.cond.cleanup22, label %for.body23, !llvm.loop !14
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
|
#include <stdio.h>
#define MAXN 100000
int main(void)
{
int N;
int i;
int M[MAXN+1];
int H[MAXN];
long int cnt;
scanf("%d",&N);
for(i=0;i<N+1;i++){
scanf("%d",&M[i]);
}
for(i=0;i<N;i++){
scanf("%d",&H[i]);
}
cnt=0;
for(i=0;i<N;i++){
if(M[i]>=H[i]){
cnt+=H[i];
}else{
cnt+=M[i];
H[i]-=M[i];
if(M[i+1]>=H[i]){
cnt+=H[i];
M[i+1]-=H[i];
}else{
cnt+=M[i+1];
M[i+1]=0;
}
}
}
printf("%ld\n",cnt);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213007/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213007/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [5 x i8] c"%ld\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%N = alloca i32, align 4
%M = alloca [100001 x i32], align 16
%H = alloca [100000 x i32], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3
call void @llvm.lifetime.start.p0(i64 400004, ptr nonnull %M) #3
call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %H) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N)
%0 = load i32, ptr %N, align 4, !tbaa !5
%cmp.not89 = icmp slt i32 %0, 0
br i1 %cmp.not89, label %for.end60, label %for.body
for.cond2.preheader: ; preds = %for.body
%cmp391 = icmp sgt i32 %1, 0
br i1 %cmp391, label %for.body4, label %for.end60
for.body: ; preds = %entry, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
%arrayidx = getelementptr inbounds [100001 x i32], ptr %M, i64 0, i64 %indvars.iv
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%1 = load i32, ptr %N, align 4, !tbaa !5
%2 = sext i32 %1 to i64
%cmp.not.not = icmp slt i64 %indvars.iv, %2
br i1 %cmp.not.not, label %for.body, label %for.cond2.preheader, !llvm.loop !9
for.cond11.preheader: ; preds = %for.body4
%cmp1293 = icmp sgt i32 %3, 0
br i1 %cmp1293, label %for.body13.preheader, label %for.end60
for.body13.preheader: ; preds = %for.cond11.preheader
%wide.trip.count = zext i32 %3 to i64
br label %for.body13
for.body4: ; preds = %for.cond2.preheader, %for.body4
%indvars.iv99 = phi i64 [ %indvars.iv.next100, %for.body4 ], [ 0, %for.cond2.preheader ]
%arrayidx6 = getelementptr inbounds [100000 x i32], ptr %H, i64 0, i64 %indvars.iv99
%call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6)
%indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1
%3 = load i32, ptr %N, align 4, !tbaa !5
%4 = sext i32 %3 to i64
%cmp3 = icmp slt i64 %indvars.iv.next100, %4
br i1 %cmp3, label %for.body4, label %for.cond11.preheader, !llvm.loop !11
for.body13: ; preds = %for.body13.preheader, %for.inc58
%indvars.iv102 = phi i64 [ 0, %for.body13.preheader ], [ %indvars.iv.next103.pre-phi, %for.inc58 ]
%cnt.095 = phi i64 [ 0, %for.body13.preheader ], [ %cnt.1, %for.inc58 ]
%arrayidx15 = getelementptr inbounds [100001 x i32], ptr %M, i64 0, i64 %indvars.iv102
%5 = load i32, ptr %arrayidx15, align 4, !tbaa !5
%arrayidx17 = getelementptr inbounds [100000 x i32], ptr %H, i64 0, i64 %indvars.iv102
%6 = load i32, ptr %arrayidx17, align 4, !tbaa !5
%cmp18.not = icmp slt i32 %5, %6
br i1 %cmp18.not, label %if.else, label %if.then
if.then: ; preds = %for.body13
%conv = sext i32 %6 to i64
%add21 = add nsw i64 %cnt.095, %conv
%.pre = add nuw nsw i64 %indvars.iv102, 1
br label %for.inc58
if.else: ; preds = %for.body13
%conv24 = sext i32 %5 to i64
%add25 = add nsw i64 %cnt.095, %conv24
%sub = sub nsw i32 %6, %5
store i32 %sub, ptr %arrayidx17, align 4, !tbaa !5
%7 = add nuw nsw i64 %indvars.iv102, 1
%arrayidx32 = getelementptr inbounds [100001 x i32], ptr %M, i64 0, i64 %7
%8 = load i32, ptr %arrayidx32, align 4, !tbaa !5
%cmp35.not = icmp slt i32 %8, %sub
br i1 %cmp35.not, label %if.else48, label %if.then37
if.then37: ; preds = %if.else
%conv40 = sext i32 %sub to i64
%add41 = add nsw i64 %add25, %conv40
%sub47 = sub nsw i32 %8, %sub
store i32 %sub47, ptr %arrayidx32, align 4, !tbaa !5
br label %for.inc58
if.else48: ; preds = %if.else
%conv52 = sext i32 %8 to i64
%add53 = add nsw i64 %add25, %conv52
store i32 0, ptr %arrayidx32, align 4, !tbaa !5
br label %for.inc58
for.inc58: ; preds = %if.then, %if.else48, %if.then37
%indvars.iv.next103.pre-phi = phi i64 [ %.pre, %if.then ], [ %7, %if.else48 ], [ %7, %if.then37 ]
%cnt.1 = phi i64 [ %add21, %if.then ], [ %add53, %if.else48 ], [ %add41, %if.then37 ]
%exitcond.not = icmp eq i64 %indvars.iv.next103.pre-phi, %wide.trip.count
br i1 %exitcond.not, label %for.end60, label %for.body13, !llvm.loop !12
for.end60: ; preds = %for.inc58, %entry, %for.cond2.preheader, %for.cond11.preheader
%cnt.0.lcssa = phi i64 [ 0, %for.cond11.preheader ], [ 0, %for.cond2.preheader ], [ 0, %entry ], [ %cnt.1, %for.inc58 ]
%call61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %cnt.0.lcssa)
call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %H) #3
call void @llvm.lifetime.end.p0(i64 400004, ptr nonnull %M) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include<stdio.h>
int main(void){
int N;
scanf("%d",&N);
int A[N+1];
int B[N];
long long int sum_monstor = 0;
for(int i=0;i<N+1;i++){
scanf("%d",&A[i]);
sum_monstor += 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]){
B[i] -= A[i];
A[i] = 0;
if(A[i+1]<=B[i]){
A[i+1] = 0;
}else{
A[i+1] -= B[i];
}
}else{
sum_monstor -= A[i]-B[i];
}
/*
for(int j=0;j<N+1;j++){
printf("%d, ",A[j]);
}
printf("\n");
*/
}
sum_monstor -= A[N];
printf("%lld",sum_monstor);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213050/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213050/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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.not97 = icmp slt i32 %3, 0
br i1 %cmp.not97, label %for.cond.cleanup23, label %for.body
for.cond8.preheader: ; preds = %for.body
%cmp9100 = icmp sgt i32 %6, 0
br i1 %cmp9100, label %for.body12, label %for.cond.cleanup23
for.body: ; preds = %entry, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
%sum_monstor.098 = phi i64 [ %add6, %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)
%5 = load i32, ptr %arrayidx, align 4, !tbaa !5
%conv = sext i32 %5 to i64
%add6 = add nsw i64 %sum_monstor.098, %conv
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%6 = load i32, ptr %N, align 4, !tbaa !5
%7 = sext i32 %6 to i64
%cmp.not.not = icmp slt i64 %indvars.iv, %7
br i1 %cmp.not.not, label %for.body, label %for.cond8.preheader, !llvm.loop !9
for.cond20.preheader: ; preds = %for.body12
%cmp21103 = icmp sgt i32 %8, 0
br i1 %cmp21103, label %for.body24.preheader, label %for.cond.cleanup23
for.body24.preheader: ; preds = %for.cond20.preheader
%wide.trip.count = zext i32 %8 to i64
br label %for.body24
for.body12: ; preds = %for.cond8.preheader, %for.body12
%indvars.iv109 = phi i64 [ %indvars.iv.next110, %for.body12 ], [ 0, %for.cond8.preheader ]
%arrayidx14 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv109
%call15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14)
%indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
%8 = load i32, ptr %N, align 4, !tbaa !5
%9 = sext i32 %8 to i64
%cmp9 = icmp slt i64 %indvars.iv.next110, %9
br i1 %cmp9, label %for.body12, label %for.cond20.preheader, !llvm.loop !11
for.cond.cleanup23: ; preds = %for.inc63, %entry, %for.cond8.preheader, %for.cond20.preheader
%.lcssa122 = phi i32 [ %8, %for.cond20.preheader ], [ %6, %for.cond8.preheader ], [ %3, %entry ], [ %8, %for.inc63 ]
%sum_monstor.1.lcssa = phi i64 [ %add6, %for.cond20.preheader ], [ %add6, %for.cond8.preheader ], [ 0, %entry ], [ %sum_monstor.2, %for.inc63 ]
%idxprom66 = sext i32 %.lcssa122 to i64
%arrayidx67 = getelementptr inbounds i32, ptr %vla, i64 %idxprom66
%10 = load i32, ptr %arrayidx67, align 4, !tbaa !5
%conv68 = sext i32 %10 to i64
%sub69 = sub nsw i64 %sum_monstor.1.lcssa, %conv68
%call70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %sub69)
call void @llvm.stackrestore.p0(ptr %2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #4
ret i32 0
for.body24: ; preds = %for.body24.preheader, %for.inc63
%indvars.iv112 = phi i64 [ 0, %for.body24.preheader ], [ %.pre, %for.inc63 ]
%sum_monstor.1104 = phi i64 [ %add6, %for.body24.preheader ], [ %sum_monstor.2, %for.inc63 ]
%arrayidx26 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv112
%11 = load i32, ptr %arrayidx26, align 4, !tbaa !5
%arrayidx28 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv112
%12 = load i32, ptr %arrayidx28, align 4, !tbaa !5
%cmp29.not = icmp sgt i32 %11, %12
%.pre = add nuw nsw i64 %indvars.iv112, 1
br i1 %cmp29.not, label %if.else54, label %if.then
if.then: ; preds = %for.body24
%sub = sub nsw i32 %12, %11
store i32 %sub, ptr %arrayidx28, align 4, !tbaa !5
store i32 0, ptr %arrayidx26, align 4, !tbaa !5
%arrayidx39 = getelementptr inbounds i32, ptr %vla, i64 %.pre
%13 = load i32, ptr %arrayidx39, align 4, !tbaa !5
%cmp42.not = icmp sgt i32 %13, %sub
br i1 %cmp42.not, label %if.else, label %if.then44
if.then44: ; preds = %if.then
store i32 0, ptr %arrayidx39, align 4, !tbaa !5
br label %for.inc63
if.else: ; preds = %if.then
%sub53 = sub nsw i32 %13, %sub
store i32 %sub53, ptr %arrayidx39, align 4, !tbaa !5
br label %for.inc63
if.else54: ; preds = %for.body24
%sub59 = sub nsw i32 %11, %12
%conv60 = sext i32 %sub59 to i64
%sub61 = sub nsw i64 %sum_monstor.1104, %conv60
br label %for.inc63
for.inc63: ; preds = %if.else54, %if.else, %if.then44
%sum_monstor.2 = phi i64 [ %sub61, %if.else54 ], [ %sum_monstor.1104, %if.else ], [ %sum_monstor.1104, %if.then44 ]
%exitcond.not = icmp eq i64 %.pre, %wide.trip.count
br i1 %exitcond.not, label %for.cond.cleanup23, label %for.body24, !llvm.loop !12
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include<stdio.h>
int main(){
int i, j;
int N;
int A[100001], B[100000];
long int bust = 0;
scanf("%d", &N);
for (i = 0; i < N+1; i++){
scanf("%d", &A[i]);
}
for (i = 0; i < N; i++){
scanf("%d", &B[i]);
}
for (i = N - 1; i >= 0; i--){
if(A[i+1]<B[i]){
bust += A[i + 1];
B[i] -= A[i + 1];
A[i + 1] = 0;
if(A[i]<B[i]){
bust += A[i];
B[i] -= A[i];
A[i] = 0;
}
else{
bust += B[i];
A[i] -= B[i];
B[i] = 0;
}
}
else{
bust += B[i];
A[i+1] -= B[i];
B[i] = 0;
}
}
printf("%ld\n", bust);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213094/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213094/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [5 x i8] c"%ld\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%N = alloca i32, align 4
%A = alloca [100001 x i32], align 16
%B = alloca [100000 x i32], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3
call void @llvm.lifetime.start.p0(i64 400004, ptr nonnull %A) #3
call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %B) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N)
%0 = load i32, ptr %N, align 4, !tbaa !5
%cmp.not117 = icmp slt i32 %0, 0
br i1 %cmp.not117, label %for.end77, label %for.body
for.cond2.preheader: ; preds = %for.body
%cmp3119 = icmp sgt i32 %1, 0
br i1 %cmp3119, label %for.body4, label %for.end77
for.body: ; preds = %entry, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
%arrayidx = getelementptr inbounds [100001 x i32], ptr %A, i64 0, i64 %indvars.iv
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%1 = load i32, ptr %N, align 4, !tbaa !5
%2 = sext i32 %1 to i64
%cmp.not.not = icmp slt i64 %indvars.iv, %2
br i1 %cmp.not.not, label %for.body, label %for.cond2.preheader, !llvm.loop !9
for.cond11.preheader: ; preds = %for.body4
%cmp12122 = icmp sgt i32 %4, 0
br i1 %cmp12122, label %for.body13.preheader, label %for.end77
for.body13.preheader: ; preds = %for.cond11.preheader
%3 = zext i32 %4 to i64
br label %for.body13
for.body4: ; preds = %for.cond2.preheader, %for.body4
%indvars.iv129 = phi i64 [ %indvars.iv.next130, %for.body4 ], [ 0, %for.cond2.preheader ]
%arrayidx6 = getelementptr inbounds [100000 x i32], ptr %B, i64 0, i64 %indvars.iv129
%call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6)
%indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1
%4 = load i32, ptr %N, align 4, !tbaa !5
%5 = sext i32 %4 to i64
%cmp3 = icmp slt i64 %indvars.iv.next130, %5
br i1 %cmp3, label %for.body4, label %for.cond11.preheader, !llvm.loop !11
for.body13: ; preds = %for.body13.preheader, %for.inc76
%indvars.iv132 = phi i64 [ %3, %for.body13.preheader ], [ %indvars.iv.next133, %for.inc76 ]
%bust.0124 = phi i64 [ 0, %for.body13.preheader ], [ %bust.1, %for.inc76 ]
%indvars.iv.next133 = add nsw i64 %indvars.iv132, -1
%arrayidx16 = getelementptr inbounds [100001 x i32], ptr %A, i64 0, i64 %indvars.iv132
%6 = load i32, ptr %arrayidx16, align 4, !tbaa !5
%idxprom17 = and i64 %indvars.iv.next133, 4294967295
%arrayidx18 = getelementptr inbounds [100000 x i32], ptr %B, i64 0, i64 %idxprom17
%7 = load i32, ptr %arrayidx18, align 4, !tbaa !5
%cmp19 = icmp slt i32 %6, %7
br i1 %cmp19, label %if.then, label %if.else62
if.then: ; preds = %for.body13
%conv = sext i32 %6 to i64
%add23 = add nsw i64 %bust.0124, %conv
%sub29 = sub nsw i32 %7, %6
store i32 0, ptr %arrayidx16, align 4, !tbaa !5
%arrayidx34 = getelementptr inbounds [100001 x i32], ptr %A, i64 0, i64 %idxprom17
%8 = load i32, ptr %arrayidx34, align 4, !tbaa !5
%cmp37 = icmp slt i32 %8, %sub29
br i1 %cmp37, label %if.then39, label %if.else
if.then39: ; preds = %if.then
%conv42 = sext i32 %8 to i64
%add43 = add nsw i64 %add23, %conv42
%sub48 = sub nsw i32 %sub29, %8
store i32 %sub48, ptr %arrayidx18, align 4, !tbaa !5
br label %for.inc76
if.else: ; preds = %if.then
%conv53 = sext i32 %sub29 to i64
%add54 = add nsw i64 %add23, %conv53
%sub59 = sub nsw i32 %8, %sub29
store i32 %sub59, ptr %arrayidx34, align 4, !tbaa !5
br label %for.inc76
if.else62: ; preds = %for.body13
%conv65 = sext i32 %7 to i64
%add66 = add nsw i64 %bust.0124, %conv65
%sub72 = sub nsw i32 %6, %7
store i32 %sub72, ptr %arrayidx16, align 4, !tbaa !5
br label %for.inc76
for.inc76: ; preds = %if.else62, %if.else, %if.then39
%arrayidx18.sink = phi ptr [ %arrayidx18, %if.else62 ], [ %arrayidx18, %if.else ], [ %arrayidx34, %if.then39 ]
%bust.1 = phi i64 [ %add66, %if.else62 ], [ %add54, %if.else ], [ %add43, %if.then39 ]
store i32 0, ptr %arrayidx18.sink, align 4, !tbaa !5
%cmp12 = icmp ugt i64 %indvars.iv132, 1
br i1 %cmp12, label %for.body13, label %for.end77, !llvm.loop !12
for.end77: ; preds = %for.inc76, %entry, %for.cond2.preheader, %for.cond11.preheader
%bust.0.lcssa = phi i64 [ 0, %for.cond11.preheader ], [ 0, %for.cond2.preheader ], [ 0, %entry ], [ %bust.1, %for.inc76 ]
%call78 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %bust.0.lcssa)
call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %B) #3
call void @llvm.lifetime.end.p0(i64 400004, ptr nonnull %A) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include <stdio.h>
#include <string.h>
int map[12][6];
char input_map[12][8];
int group_num;
int group[12*6][2];
void tansaku(int x,int y,char color) {
if(x<0 || x>=6 || y<0 || y>=12)return;
if(map[y][x]!=0 || input_map[y][x]!=color)return;
group[group_num][0]=y;
group[group_num][1]=x;
group_num++;
map[y][x]=1;
tansaku(x-1,y,color);
tansaku(x+1,y,color);
tansaku(x,y-1,color);
tansaku(x,y+1,color);
}
int main(void) {
int data_num,cur_data;
int i,j,k;
int rensa,deleted;
scanf("%d",&data_num);
for(cur_data=0;cur_data<data_num;cur_data++) {
for(i=0;i<12;i++)scanf("%s",input_map[i]);
for(rensa=0;;rensa++) {
memset(map,0,sizeof(map));
for(i=0;i<12;i++) {
for(j=0;j<6;j++) {
if(input_map[i][j]=='.' || input_map[i][j]=='O') {
map[i][j]=1;
} else {
group_num=0;
tansaku(j,i,input_map[i][j]);
for(k=0;k<group_num;k++) {
map[group[k][0]][group[k][1]]=group_num;
}
}
}
}
deleted=0;
for(i=0;i<12;i++) {
for(j=0;j<6;j++) {
if(map[i][j]>=4) {
input_map[i][j]='.';
if(i>0 && input_map[i-1][j]=='O')input_map[i-1][j]='.';
if(i<11 && input_map[i+1][j]=='O')input_map[i+1][j]='.';
if(j>0 && input_map[i][j-1]=='O')input_map[i][j-1]='.';
if(j<5 && input_map[i][j+1]=='O')input_map[i][j+1]='.';
deleted=1;
}
}
}
if(!deleted)break;
for(i=11;i>0;i--) {
for(j=0;j<6;j++) {
if(input_map[i][j]=='.') {
for(k=i;k>=0;k--) {
if(input_map[k][j]!='.') {
input_map[i][j]=input_map[k][j];
input_map[k][j]='.';
break;
}
}
}
}
}
}
printf("%d\n",rensa);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213144/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213144/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@map = dso_local local_unnamed_addr global [12 x [6 x i32]] zeroinitializer, align 16
@input_map = dso_local global [12 x [8 x i8]] zeroinitializer, align 16
@group = dso_local local_unnamed_addr global [72 x [2 x i32]] zeroinitializer, align 16
@group_num = dso_local local_unnamed_addr global i32 0, align 4
@.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 [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable
define dso_local void @tansaku(i32 noundef %x, i32 noundef %y, i8 noundef signext %color) local_unnamed_addr #0 {
entry:
%or.cond = icmp ugt i32 %x, 5
%0 = icmp ugt i32 %y, 11
%or.cond3255 = or i1 %or.cond, %0
br i1 %or.cond3255, label %return, label %if.end.lr.ph
if.end.lr.ph: ; preds = %entry
%idxprom6 = zext i32 %x to i64
%sub = add nsw i32 %x, -1
%add = add nuw nsw i32 %x, 1
%1 = zext i32 %y to i64
br label %if.end
if.end: ; preds = %if.end.lr.ph, %if.end18
%indvars.iv = phi i64 [ %1, %if.end.lr.ph ], [ %indvars.iv.next, %if.end18 ]
%arrayidx7 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %indvars.iv, i64 %idxprom6
%2 = load i32, ptr %arrayidx7, align 4, !tbaa !5
%cmp8.not = icmp eq i32 %2, 0
br i1 %cmp8.not, label %lor.lhs.false9, label %return
lor.lhs.false9: ; preds = %if.end
%arrayidx13 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv, i64 %idxprom6
%3 = load i8, ptr %arrayidx13, align 1, !tbaa !9
%cmp15.not = icmp eq i8 %3, %color
br i1 %cmp15.not, label %if.end18, label %return
if.end18: ; preds = %lor.lhs.false9
%4 = load i32, ptr @group_num, align 4, !tbaa !5
%idxprom19 = sext i32 %4 to i64
%arrayidx20 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %idxprom19
%5 = trunc i64 %indvars.iv to i32
store i32 %5, ptr %arrayidx20, align 8, !tbaa !5
%arrayidx24 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %idxprom19, i64 1
store i32 %x, ptr %arrayidx24, align 4, !tbaa !5
%inc = add nsw i32 %4, 1
store i32 %inc, ptr @group_num, align 4, !tbaa !5
store i32 1, ptr %arrayidx7, align 4, !tbaa !5
tail call void @tansaku(i32 noundef %sub, i32 noundef %5, i8 noundef signext %color)
tail call void @tansaku(i32 noundef %add, i32 noundef %5, i8 noundef signext %color)
%sub29 = add nsw i32 %5, -1
tail call void @tansaku(i32 noundef %x, i32 noundef %sub29, i8 noundef signext %color)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%6 = and i64 %indvars.iv.next, 4294967295
%exitcond = icmp eq i64 %6, 12
br i1 %exitcond, label %return, label %if.end
return: ; preds = %if.end18, %lor.lhs.false9, %if.end, %entry
ret void
}
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #1 {
entry:
%data_num = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %data_num) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %data_num)
%0 = load i32, ptr %data_num, align 4, !tbaa !5
%cmp290 = icmp sgt i32 %0, 0
br i1 %cmp290, label %for.cond1.preheader, label %for.end209
for.cond1.preheader: ; preds = %entry, %for.end205
%cur_data.0291 = phi i32 [ %inc208, %for.end205 ], [ 0, %entry ]
%call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @input_map)
%call4.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 1))
%call4.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 2))
%call4.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 3))
%call4.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 4))
%call4.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 5))
%call4.6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 6))
%call4.7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 7))
%call4.8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 8))
%call4.9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 9))
%call4.10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 10))
%call4.11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 11))
br label %for.cond5
for.cond5: ; preds = %for.cond1.preheader, %for.inc203
%rensa.0 = phi i32 [ %inc204, %for.inc203 ], [ 0, %for.cond1.preheader ]
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(288) @map, i8 0, i64 288, i1 false)
br label %for.cond9.preheader
for.cond9.preheader: ; preds = %for.cond5, %for.inc50.5
%indvars.iv301 = phi i64 [ 0, %for.cond5 ], [ %indvars.iv.next302, %for.inc50.5 ]
%arrayidx15 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv301, i64 0
%1 = load i8, ptr %arrayidx15, align 8, !tbaa !9
switch i8 %1, label %if.else [
i8 46, label %if.then
i8 79, label %if.then
]
if.then: ; preds = %for.cond9.preheader, %for.cond9.preheader
%arrayidx28 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %indvars.iv301, i64 0
store i32 1, ptr %arrayidx28, align 8, !tbaa !5
br label %for.inc50
if.else: ; preds = %for.cond9.preheader
store i32 0, ptr @group_num, align 4, !tbaa !5
%2 = trunc i64 %indvars.iv301 to i32
call void @tansaku(i32 noundef 0, i32 noundef %2, i8 noundef signext %1)
%3 = load i32, ptr @group_num, align 4, !tbaa !5
%cmp34278 = icmp sgt i32 %3, 0
br i1 %cmp34278, label %for.body36.preheader, label %for.inc50
for.body36.preheader: ; preds = %if.else
%wide.trip.count = zext i32 %3 to i64
%xtraiter = and i64 %wide.trip.count, 1
%4 = icmp eq i32 %3, 1
br i1 %4, label %for.inc50.loopexit.unr-lcssa, label %for.body36.preheader.new
for.body36.preheader.new: ; preds = %for.body36.preheader
%unroll_iter = and i64 %wide.trip.count, 4294967294
br label %for.body36
for.body36: ; preds = %for.body36, %for.body36.preheader.new
%indvars.iv = phi i64 [ 0, %for.body36.preheader.new ], [ %indvars.iv.next.1386, %for.body36 ]
%niter = phi i64 [ 0, %for.body36.preheader.new ], [ %niter.next.1, %for.body36 ]
%arrayidx38 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv
%5 = load i32, ptr %arrayidx38, align 16, !tbaa !5
%idxprom40 = sext i32 %5 to i64
%arrayidx44 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv, i64 1
%6 = load i32, ptr %arrayidx44, align 4, !tbaa !5
%idxprom45 = sext i32 %6 to i64
%arrayidx46 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40, i64 %idxprom45
store i32 %3, ptr %arrayidx46, align 4, !tbaa !5
%indvars.iv.next = or i64 %indvars.iv, 1
%arrayidx38.1381 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.next
%7 = load i32, ptr %arrayidx38.1381, align 8, !tbaa !5
%idxprom40.1382 = sext i32 %7 to i64
%arrayidx44.1383 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.next, i64 1
%8 = load i32, ptr %arrayidx44.1383, align 4, !tbaa !5
%idxprom45.1384 = sext i32 %8 to i64
%arrayidx46.1385 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40.1382, i64 %idxprom45.1384
store i32 %3, ptr %arrayidx46.1385, align 4, !tbaa !5
%indvars.iv.next.1386 = add nuw nsw i64 %indvars.iv, 2
%niter.next.1 = add i64 %niter, 2
%niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
br i1 %niter.ncmp.1, label %for.inc50.loopexit.unr-lcssa, label %for.body36, !llvm.loop !10
for.inc50.loopexit.unr-lcssa: ; preds = %for.body36, %for.body36.preheader
%indvars.iv.unr = phi i64 [ 0, %for.body36.preheader ], [ %indvars.iv.next.1386, %for.body36 ]
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.inc50, label %for.body36.epil
for.body36.epil: ; preds = %for.inc50.loopexit.unr-lcssa
%arrayidx38.epil = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.unr
%9 = load i32, ptr %arrayidx38.epil, align 8, !tbaa !5
%idxprom40.epil = sext i32 %9 to i64
%arrayidx44.epil = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.unr, i64 1
%10 = load i32, ptr %arrayidx44.epil, align 4, !tbaa !5
%idxprom45.epil = sext i32 %10 to i64
%arrayidx46.epil = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40.epil, i64 %idxprom45.epil
store i32 %3, ptr %arrayidx46.epil, align 4, !tbaa !5
br label %for.inc50
for.inc50: ; preds = %for.body36.epil, %for.inc50.loopexit.unr-lcssa, %if.else, %if.then
%arrayidx15.1 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv301, i64 1
%11 = load i8, ptr %arrayidx15.1, align 1, !tbaa !9
switch i8 %11, label %if.else.1 [
i8 46, label %if.then.1
i8 79, label %if.then.1
]
if.then.1: ; preds = %for.inc50, %for.inc50
%arrayidx28.1 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %indvars.iv301, i64 1
store i32 1, ptr %arrayidx28.1, align 4, !tbaa !5
br label %for.inc50.1
if.else.1: ; preds = %for.inc50
store i32 0, ptr @group_num, align 4, !tbaa !5
%12 = trunc i64 %indvars.iv301 to i32
call void @tansaku(i32 noundef 1, i32 noundef %12, i8 noundef signext %11)
%13 = load i32, ptr @group_num, align 4, !tbaa !5
%cmp34278.1 = icmp sgt i32 %13, 0
br i1 %cmp34278.1, label %for.body36.preheader.1, label %for.inc50.1
for.body36.preheader.1: ; preds = %if.else.1
%wide.trip.count.1 = zext i32 %13 to i64
%xtraiter388 = and i64 %wide.trip.count.1, 1
%14 = icmp eq i32 %13, 1
br i1 %14, label %for.inc50.1.loopexit.unr-lcssa, label %for.body36.preheader.1.new
for.body36.preheader.1.new: ; preds = %for.body36.preheader.1
%unroll_iter390 = and i64 %wide.trip.count.1, 4294967294
br label %for.body36.1
for.body36.1: ; preds = %for.body36.1, %for.body36.preheader.1.new
%indvars.iv.1 = phi i64 [ 0, %for.body36.preheader.1.new ], [ %indvars.iv.next.1.1, %for.body36.1 ]
%niter391 = phi i64 [ 0, %for.body36.preheader.1.new ], [ %niter391.next.1, %for.body36.1 ]
%arrayidx38.1 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.1
%15 = load i32, ptr %arrayidx38.1, align 16, !tbaa !5
%idxprom40.1 = sext i32 %15 to i64
%arrayidx44.1 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.1, i64 1
%16 = load i32, ptr %arrayidx44.1, align 4, !tbaa !5
%idxprom45.1 = sext i32 %16 to i64
%arrayidx46.1 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40.1, i64 %idxprom45.1
store i32 %13, ptr %arrayidx46.1, align 4, !tbaa !5
%indvars.iv.next.1 = or i64 %indvars.iv.1, 1
%arrayidx38.1.1 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.next.1
%17 = load i32, ptr %arrayidx38.1.1, align 8, !tbaa !5
%idxprom40.1.1 = sext i32 %17 to i64
%arrayidx44.1.1 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.next.1, i64 1
%18 = load i32, ptr %arrayidx44.1.1, align 4, !tbaa !5
%idxprom45.1.1 = sext i32 %18 to i64
%arrayidx46.1.1 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40.1.1, i64 %idxprom45.1.1
store i32 %13, ptr %arrayidx46.1.1, align 4, !tbaa !5
%indvars.iv.next.1.1 = add nuw nsw i64 %indvars.iv.1, 2
%niter391.next.1 = add i64 %niter391, 2
%niter391.ncmp.1 = icmp eq i64 %niter391.next.1, %unroll_iter390
br i1 %niter391.ncmp.1, label %for.inc50.1.loopexit.unr-lcssa, label %for.body36.1, !llvm.loop !10
for.inc50.1.loopexit.unr-lcssa: ; preds = %for.body36.1, %for.body36.preheader.1
%indvars.iv.1.unr = phi i64 [ 0, %for.body36.preheader.1 ], [ %indvars.iv.next.1.1, %for.body36.1 ]
%lcmp.mod389.not = icmp eq i64 %xtraiter388, 0
br i1 %lcmp.mod389.not, label %for.inc50.1, label %for.body36.1.epil
for.body36.1.epil: ; preds = %for.inc50.1.loopexit.unr-lcssa
%arrayidx38.1.epil = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.1.unr
%19 = load i32, ptr %arrayidx38.1.epil, align 8, !tbaa !5
%idxprom40.1.epil = sext i32 %19 to i64
%arrayidx44.1.epil = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.1.unr, i64 1
%20 = load i32, ptr %arrayidx44.1.epil, align 4, !tbaa !5
%idxprom45.1.epil = sext i32 %20 to i64
%arrayidx46.1.epil = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40.1.epil, i64 %idxprom45.1.epil
store i32 %13, ptr %arrayidx46.1.epil, align 4, !tbaa !5
br label %for.inc50.1
for.inc50.1: ; preds = %for.body36.1.epil, %for.inc50.1.loopexit.unr-lcssa, %if.else.1, %if.then.1
%arrayidx15.2 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv301, i64 2
%21 = load i8, ptr %arrayidx15.2, align 2, !tbaa !9
switch i8 %21, label %if.else.2 [
i8 46, label %if.then.2
i8 79, label %if.then.2
]
if.then.2: ; preds = %for.inc50.1, %for.inc50.1
%arrayidx28.2 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %indvars.iv301, i64 2
store i32 1, ptr %arrayidx28.2, align 8, !tbaa !5
br label %for.inc50.2
if.else.2: ; preds = %for.inc50.1
store i32 0, ptr @group_num, align 4, !tbaa !5
%22 = trunc i64 %indvars.iv301 to i32
call void @tansaku(i32 noundef 2, i32 noundef %22, i8 noundef signext %21)
%23 = load i32, ptr @group_num, align 4, !tbaa !5
%cmp34278.2 = icmp sgt i32 %23, 0
br i1 %cmp34278.2, label %for.body36.preheader.2, label %for.inc50.2
for.body36.preheader.2: ; preds = %if.else.2
%wide.trip.count.2 = zext i32 %23 to i64
%xtraiter392 = and i64 %wide.trip.count.2, 1
%24 = icmp eq i32 %23, 1
br i1 %24, label %for.inc50.2.loopexit.unr-lcssa, label %for.body36.preheader.2.new
for.body36.preheader.2.new: ; preds = %for.body36.preheader.2
%unroll_iter394 = and i64 %wide.trip.count.2, 4294967294
br label %for.body36.2
for.body36.2: ; preds = %for.body36.2, %for.body36.preheader.2.new
%indvars.iv.2 = phi i64 [ 0, %for.body36.preheader.2.new ], [ %indvars.iv.next.2.1, %for.body36.2 ]
%niter395 = phi i64 [ 0, %for.body36.preheader.2.new ], [ %niter395.next.1, %for.body36.2 ]
%arrayidx38.2 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.2
%25 = load i32, ptr %arrayidx38.2, align 16, !tbaa !5
%idxprom40.2 = sext i32 %25 to i64
%arrayidx44.2 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.2, i64 1
%26 = load i32, ptr %arrayidx44.2, align 4, !tbaa !5
%idxprom45.2 = sext i32 %26 to i64
%arrayidx46.2 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40.2, i64 %idxprom45.2
store i32 %23, ptr %arrayidx46.2, align 4, !tbaa !5
%indvars.iv.next.2 = or i64 %indvars.iv.2, 1
%arrayidx38.2.1 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.next.2
%27 = load i32, ptr %arrayidx38.2.1, align 8, !tbaa !5
%idxprom40.2.1 = sext i32 %27 to i64
%arrayidx44.2.1 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.next.2, i64 1
%28 = load i32, ptr %arrayidx44.2.1, align 4, !tbaa !5
%idxprom45.2.1 = sext i32 %28 to i64
%arrayidx46.2.1 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40.2.1, i64 %idxprom45.2.1
store i32 %23, ptr %arrayidx46.2.1, align 4, !tbaa !5
%indvars.iv.next.2.1 = add nuw nsw i64 %indvars.iv.2, 2
%niter395.next.1 = add i64 %niter395, 2
%niter395.ncmp.1 = icmp eq i64 %niter395.next.1, %unroll_iter394
br i1 %niter395.ncmp.1, label %for.inc50.2.loopexit.unr-lcssa, label %for.body36.2, !llvm.loop !10
for.inc50.2.loopexit.unr-lcssa: ; preds = %for.body36.2, %for.body36.preheader.2
%indvars.iv.2.unr = phi i64 [ 0, %for.body36.preheader.2 ], [ %indvars.iv.next.2.1, %for.body36.2 ]
%lcmp.mod393.not = icmp eq i64 %xtraiter392, 0
br i1 %lcmp.mod393.not, label %for.inc50.2, label %for.body36.2.epil
for.body36.2.epil: ; preds = %for.inc50.2.loopexit.unr-lcssa
%arrayidx38.2.epil = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.2.unr
%29 = load i32, ptr %arrayidx38.2.epil, align 8, !tbaa !5
%idxprom40.2.epil = sext i32 %29 to i64
%arrayidx44.2.epil = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.2.unr, i64 1
%30 = load i32, ptr %arrayidx44.2.epil, align 4, !tbaa !5
%idxprom45.2.epil = sext i32 %30 to i64
%arrayidx46.2.epil = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40.2.epil, i64 %idxprom45.2.epil
store i32 %23, ptr %arrayidx46.2.epil, align 4, !tbaa !5
br label %for.inc50.2
for.inc50.2: ; preds = %for.body36.2.epil, %for.inc50.2.loopexit.unr-lcssa, %if.else.2, %if.then.2
%arrayidx15.3 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv301, i64 3
%31 = load i8, ptr %arrayidx15.3, align 1, !tbaa !9
switch i8 %31, label %if.else.3 [
i8 46, label %if.then.3
i8 79, label %if.then.3
]
if.then.3: ; preds = %for.inc50.2, %for.inc50.2
%arrayidx28.3 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %indvars.iv301, i64 3
store i32 1, ptr %arrayidx28.3, align 4, !tbaa !5
br label %for.inc50.3
if.else.3: ; preds = %for.inc50.2
store i32 0, ptr @group_num, align 4, !tbaa !5
%32 = trunc i64 %indvars.iv301 to i32
call void @tansaku(i32 noundef 3, i32 noundef %32, i8 noundef signext %31)
%33 = load i32, ptr @group_num, align 4, !tbaa !5
%cmp34278.3 = icmp sgt i32 %33, 0
br i1 %cmp34278.3, label %for.body36.preheader.3, label %for.inc50.3
for.body36.preheader.3: ; preds = %if.else.3
%wide.trip.count.3 = zext i32 %33 to i64
%xtraiter396 = and i64 %wide.trip.count.3, 1
%34 = icmp eq i32 %33, 1
br i1 %34, label %for.inc50.3.loopexit.unr-lcssa, label %for.body36.preheader.3.new
for.body36.preheader.3.new: ; preds = %for.body36.preheader.3
%unroll_iter398 = and i64 %wide.trip.count.3, 4294967294
br label %for.body36.3
for.body36.3: ; preds = %for.body36.3, %for.body36.preheader.3.new
%indvars.iv.3 = phi i64 [ 0, %for.body36.preheader.3.new ], [ %indvars.iv.next.3.1, %for.body36.3 ]
%niter399 = phi i64 [ 0, %for.body36.preheader.3.new ], [ %niter399.next.1, %for.body36.3 ]
%arrayidx38.3 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.3
%35 = load i32, ptr %arrayidx38.3, align 16, !tbaa !5
%idxprom40.3 = sext i32 %35 to i64
%arrayidx44.3 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.3, i64 1
%36 = load i32, ptr %arrayidx44.3, align 4, !tbaa !5
%idxprom45.3 = sext i32 %36 to i64
%arrayidx46.3 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40.3, i64 %idxprom45.3
store i32 %33, ptr %arrayidx46.3, align 4, !tbaa !5
%indvars.iv.next.3 = or i64 %indvars.iv.3, 1
%arrayidx38.3.1 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.next.3
%37 = load i32, ptr %arrayidx38.3.1, align 8, !tbaa !5
%idxprom40.3.1 = sext i32 %37 to i64
%arrayidx44.3.1 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.next.3, i64 1
%38 = load i32, ptr %arrayidx44.3.1, align 4, !tbaa !5
%idxprom45.3.1 = sext i32 %38 to i64
%arrayidx46.3.1 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40.3.1, i64 %idxprom45.3.1
store i32 %33, ptr %arrayidx46.3.1, align 4, !tbaa !5
%indvars.iv.next.3.1 = add nuw nsw i64 %indvars.iv.3, 2
%niter399.next.1 = add i64 %niter399, 2
%niter399.ncmp.1 = icmp eq i64 %niter399.next.1, %unroll_iter398
br i1 %niter399.ncmp.1, label %for.inc50.3.loopexit.unr-lcssa, label %for.body36.3, !llvm.loop !10
for.inc50.3.loopexit.unr-lcssa: ; preds = %for.body36.3, %for.body36.preheader.3
%indvars.iv.3.unr = phi i64 [ 0, %for.body36.preheader.3 ], [ %indvars.iv.next.3.1, %for.body36.3 ]
%lcmp.mod397.not = icmp eq i64 %xtraiter396, 0
br i1 %lcmp.mod397.not, label %for.inc50.3, label %for.body36.3.epil
for.body36.3.epil: ; preds = %for.inc50.3.loopexit.unr-lcssa
%arrayidx38.3.epil = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.3.unr
%39 = load i32, ptr %arrayidx38.3.epil, align 8, !tbaa !5
%idxprom40.3.epil = sext i32 %39 to i64
%arrayidx44.3.epil = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.3.unr, i64 1
%40 = load i32, ptr %arrayidx44.3.epil, align 4, !tbaa !5
%idxprom45.3.epil = sext i32 %40 to i64
%arrayidx46.3.epil = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40.3.epil, i64 %idxprom45.3.epil
store i32 %33, ptr %arrayidx46.3.epil, align 4, !tbaa !5
br label %for.inc50.3
for.inc50.3: ; preds = %for.body36.3.epil, %for.inc50.3.loopexit.unr-lcssa, %if.else.3, %if.then.3
%arrayidx15.4 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv301, i64 4
%41 = load i8, ptr %arrayidx15.4, align 4, !tbaa !9
switch i8 %41, label %if.else.4 [
i8 46, label %if.then.4
i8 79, label %if.then.4
]
if.then.4: ; preds = %for.inc50.3, %for.inc50.3
%arrayidx28.4 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %indvars.iv301, i64 4
store i32 1, ptr %arrayidx28.4, align 8, !tbaa !5
br label %for.inc50.4
if.else.4: ; preds = %for.inc50.3
store i32 0, ptr @group_num, align 4, !tbaa !5
%42 = trunc i64 %indvars.iv301 to i32
call void @tansaku(i32 noundef 4, i32 noundef %42, i8 noundef signext %41)
%43 = load i32, ptr @group_num, align 4, !tbaa !5
%cmp34278.4 = icmp sgt i32 %43, 0
br i1 %cmp34278.4, label %for.body36.preheader.4, label %for.inc50.4
for.body36.preheader.4: ; preds = %if.else.4
%wide.trip.count.4 = zext i32 %43 to i64
%xtraiter400 = and i64 %wide.trip.count.4, 1
%44 = icmp eq i32 %43, 1
br i1 %44, label %for.inc50.4.loopexit.unr-lcssa, label %for.body36.preheader.4.new
for.body36.preheader.4.new: ; preds = %for.body36.preheader.4
%unroll_iter402 = and i64 %wide.trip.count.4, 4294967294
br label %for.body36.4
for.body36.4: ; preds = %for.body36.4, %for.body36.preheader.4.new
%indvars.iv.4 = phi i64 [ 0, %for.body36.preheader.4.new ], [ %indvars.iv.next.4.1, %for.body36.4 ]
%niter403 = phi i64 [ 0, %for.body36.preheader.4.new ], [ %niter403.next.1, %for.body36.4 ]
%arrayidx38.4 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.4
%45 = load i32, ptr %arrayidx38.4, align 16, !tbaa !5
%idxprom40.4 = sext i32 %45 to i64
%arrayidx44.4 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.4, i64 1
%46 = load i32, ptr %arrayidx44.4, align 4, !tbaa !5
%idxprom45.4 = sext i32 %46 to i64
%arrayidx46.4 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40.4, i64 %idxprom45.4
store i32 %43, ptr %arrayidx46.4, align 4, !tbaa !5
%indvars.iv.next.4 = or i64 %indvars.iv.4, 1
%arrayidx38.4.1 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.next.4
%47 = load i32, ptr %arrayidx38.4.1, align 8, !tbaa !5
%idxprom40.4.1 = sext i32 %47 to i64
%arrayidx44.4.1 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.next.4, i64 1
%48 = load i32, ptr %arrayidx44.4.1, align 4, !tbaa !5
%idxprom45.4.1 = sext i32 %48 to i64
%arrayidx46.4.1 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40.4.1, i64 %idxprom45.4.1
store i32 %43, ptr %arrayidx46.4.1, align 4, !tbaa !5
%indvars.iv.next.4.1 = add nuw nsw i64 %indvars.iv.4, 2
%niter403.next.1 = add i64 %niter403, 2
%niter403.ncmp.1 = icmp eq i64 %niter403.next.1, %unroll_iter402
br i1 %niter403.ncmp.1, label %for.inc50.4.loopexit.unr-lcssa, label %for.body36.4, !llvm.loop !10
for.inc50.4.loopexit.unr-lcssa: ; preds = %for.body36.4, %for.body36.preheader.4
%indvars.iv.4.unr = phi i64 [ 0, %for.body36.preheader.4 ], [ %indvars.iv.next.4.1, %for.body36.4 ]
%lcmp.mod401.not = icmp eq i64 %xtraiter400, 0
br i1 %lcmp.mod401.not, label %for.inc50.4, label %for.body36.4.epil
for.body36.4.epil: ; preds = %for.inc50.4.loopexit.unr-lcssa
%arrayidx38.4.epil = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.4.unr
%49 = load i32, ptr %arrayidx38.4.epil, align 8, !tbaa !5
%idxprom40.4.epil = sext i32 %49 to i64
%arrayidx44.4.epil = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.4.unr, i64 1
%50 = load i32, ptr %arrayidx44.4.epil, align 4, !tbaa !5
%idxprom45.4.epil = sext i32 %50 to i64
%arrayidx46.4.epil = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40.4.epil, i64 %idxprom45.4.epil
store i32 %43, ptr %arrayidx46.4.epil, align 4, !tbaa !5
br label %for.inc50.4
for.inc50.4: ; preds = %for.body36.4.epil, %for.inc50.4.loopexit.unr-lcssa, %if.else.4, %if.then.4
%arrayidx15.5 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv301, i64 5
%51 = load i8, ptr %arrayidx15.5, align 1, !tbaa !9
switch i8 %51, label %if.else.5 [
i8 46, label %if.then.5
i8 79, label %if.then.5
]
if.then.5: ; preds = %for.inc50.4, %for.inc50.4
%arrayidx28.5 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %indvars.iv301, i64 5
store i32 1, ptr %arrayidx28.5, align 4, !tbaa !5
br label %for.inc50.5
if.else.5: ; preds = %for.inc50.4
store i32 0, ptr @group_num, align 4, !tbaa !5
%52 = trunc i64 %indvars.iv301 to i32
call void @tansaku(i32 noundef 5, i32 noundef %52, i8 noundef signext %51)
%53 = load i32, ptr @group_num, align 4, !tbaa !5
%cmp34278.5 = icmp sgt i32 %53, 0
br i1 %cmp34278.5, label %for.body36.preheader.5, label %for.inc50.5
for.body36.preheader.5: ; preds = %if.else.5
%wide.trip.count.5 = zext i32 %53 to i64
%xtraiter404 = and i64 %wide.trip.count.5, 1
%54 = icmp eq i32 %53, 1
br i1 %54, label %for.inc50.5.loopexit.unr-lcssa, label %for.body36.preheader.5.new
for.body36.preheader.5.new: ; preds = %for.body36.preheader.5
%unroll_iter406 = and i64 %wide.trip.count.5, 4294967294
br label %for.body36.5
for.body36.5: ; preds = %for.body36.5, %for.body36.preheader.5.new
%indvars.iv.5 = phi i64 [ 0, %for.body36.preheader.5.new ], [ %indvars.iv.next.5.1, %for.body36.5 ]
%niter407 = phi i64 [ 0, %for.body36.preheader.5.new ], [ %niter407.next.1, %for.body36.5 ]
%arrayidx38.5 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.5
%55 = load i32, ptr %arrayidx38.5, align 16, !tbaa !5
%idxprom40.5 = sext i32 %55 to i64
%arrayidx44.5 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.5, i64 1
%56 = load i32, ptr %arrayidx44.5, align 4, !tbaa !5
%idxprom45.5 = sext i32 %56 to i64
%arrayidx46.5 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40.5, i64 %idxprom45.5
store i32 %53, ptr %arrayidx46.5, align 4, !tbaa !5
%indvars.iv.next.5 = or i64 %indvars.iv.5, 1
%arrayidx38.5.1 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.next.5
%57 = load i32, ptr %arrayidx38.5.1, align 8, !tbaa !5
%idxprom40.5.1 = sext i32 %57 to i64
%arrayidx44.5.1 = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.next.5, i64 1
%58 = load i32, ptr %arrayidx44.5.1, align 4, !tbaa !5
%idxprom45.5.1 = sext i32 %58 to i64
%arrayidx46.5.1 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40.5.1, i64 %idxprom45.5.1
store i32 %53, ptr %arrayidx46.5.1, align 4, !tbaa !5
%indvars.iv.next.5.1 = add nuw nsw i64 %indvars.iv.5, 2
%niter407.next.1 = add i64 %niter407, 2
%niter407.ncmp.1 = icmp eq i64 %niter407.next.1, %unroll_iter406
br i1 %niter407.ncmp.1, label %for.inc50.5.loopexit.unr-lcssa, label %for.body36.5, !llvm.loop !10
for.inc50.5.loopexit.unr-lcssa: ; preds = %for.body36.5, %for.body36.preheader.5
%indvars.iv.5.unr = phi i64 [ 0, %for.body36.preheader.5 ], [ %indvars.iv.next.5.1, %for.body36.5 ]
%lcmp.mod405.not = icmp eq i64 %xtraiter404, 0
br i1 %lcmp.mod405.not, label %for.inc50.5, label %for.body36.5.epil
for.body36.5.epil: ; preds = %for.inc50.5.loopexit.unr-lcssa
%arrayidx38.5.epil = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.5.unr
%59 = load i32, ptr %arrayidx38.5.epil, align 8, !tbaa !5
%idxprom40.5.epil = sext i32 %59 to i64
%arrayidx44.5.epil = getelementptr inbounds [72 x [2 x i32]], ptr @group, i64 0, i64 %indvars.iv.5.unr, i64 1
%60 = load i32, ptr %arrayidx44.5.epil, align 4, !tbaa !5
%idxprom45.5.epil = sext i32 %60 to i64
%arrayidx46.5.epil = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %idxprom40.5.epil, i64 %idxprom45.5.epil
store i32 %53, ptr %arrayidx46.5.epil, align 4, !tbaa !5
br label %for.inc50.5
for.inc50.5: ; preds = %for.body36.5.epil, %for.inc50.5.loopexit.unr-lcssa, %if.else.5, %if.then.5
%indvars.iv.next302 = add nuw nsw i64 %indvars.iv301, 1
%exitcond304.not = icmp eq i64 %indvars.iv.next302, 12
br i1 %exitcond304.not, label %for.cond60.preheader.preheader, label %for.cond9.preheader, !llvm.loop !12
for.cond60.preheader.preheader: ; preds = %for.inc50.5
%61 = load i32, ptr @map, align 16
%cmp68.us = icmp sgt i32 %61, 3
%62 = load i32, ptr getelementptr inbounds ([12 x [6 x i32]], ptr @map, i64 0, i64 0, i64 1), align 4
%cmp68.us.1 = icmp sgt i32 %62, 3
%63 = load <4 x i32>, ptr getelementptr inbounds ([12 x [6 x i32]], ptr @map, i64 0, i64 0, i64 2), align 8
%64 = icmp sgt <4 x i32> %63, <i32 3, i32 3, i32 3, i32 3>
%65 = extractelement <4 x i1> %64, i64 0
%66 = extractelement <4 x i1> %64, i64 1
%67 = extractelement <4 x i1> %64, i64 2
%68 = extractelement <4 x i1> %64, i64 3
br label %for.cond60.preheader
for.cond60.preheader: ; preds = %for.cond60.preheader.preheader, %for.inc148
%indvars.iv317 = phi i64 [ 0, %for.cond60.preheader.preheader ], [ %indvars.iv.next318, %for.inc148 ]
%deleted.0285 = phi i32 [ 0, %for.cond60.preheader.preheader ], [ %.us-phi, %for.inc148 ]
%cmp75.not = icmp eq i64 %indvars.iv317, 0
%69 = add nuw i64 %indvars.iv317, 4294967295
%idxprom77 = and i64 %69, 4294967295
%cmp91 = icmp ult i64 %indvars.iv317, 11
%indvars.iv.next318 = add nuw nsw i64 %indvars.iv317, 1
br i1 %cmp75.not, label %for.body63.us.preheader, label %for.body63.preheader
for.body63.preheader: ; preds = %for.cond60.preheader
%arrayidx67 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %indvars.iv317, i64 0
%70 = load i32, ptr %arrayidx67, align 8, !tbaa !5
%cmp68 = icmp sgt i32 %70, 3
br i1 %cmp68, label %if.then70, label %for.inc145
for.body63.us.preheader: ; preds = %for.cond60.preheader
br i1 %cmp68.us, label %if.then70.us, label %for.inc145.us
if.then70.us: ; preds = %for.body63.us.preheader
store i8 46, ptr @input_map, align 16, !tbaa !9
%arrayidx97.us = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv.next318, i64 0
%71 = load i8, ptr %arrayidx97.us, align 8, !tbaa !9
%cmp99.us = icmp eq i8 %71, 79
br i1 %cmp99.us, label %if.then101.us, label %land.lhs.true128.us
if.then101.us: ; preds = %if.then70.us
store i8 46, ptr %arrayidx97.us, align 8, !tbaa !9
br label %land.lhs.true128.us
land.lhs.true128.us: ; preds = %if.then70.us, %if.then101.us
%72 = load i8, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 1), align 1, !tbaa !9
%cmp135.us = icmp eq i8 %72, 79
br i1 %cmp135.us, label %if.then137.us, label %for.inc145.us
if.then137.us: ; preds = %land.lhs.true128.us
store i8 46, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 1), align 1, !tbaa !9
br label %for.inc145.us
for.inc145.us: ; preds = %if.then137.us, %land.lhs.true128.us, %for.body63.us.preheader
%deleted.2.us = phi i32 [ %deleted.0285, %for.body63.us.preheader ], [ 1, %if.then137.us ], [ 1, %land.lhs.true128.us ]
br i1 %cmp68.us.1, label %if.then70.us.1, label %for.inc145.us.1
if.then70.us.1: ; preds = %for.inc145.us
store i8 46, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 1), align 1, !tbaa !9
%arrayidx97.us.1 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv.next318, i64 1
%73 = load i8, ptr %arrayidx97.us.1, align 1, !tbaa !9
%cmp99.us.1 = icmp eq i8 %73, 79
br i1 %cmp99.us.1, label %if.then101.us.1, label %land.lhs.true110.us.1
if.then101.us.1: ; preds = %if.then70.us.1
store i8 46, ptr %arrayidx97.us.1, align 1, !tbaa !9
br label %land.lhs.true110.us.1
land.lhs.true110.us.1: ; preds = %if.then70.us.1, %if.then101.us.1
%74 = load i8, ptr @input_map, align 16, !tbaa !9
%cmp117.us.1 = icmp eq i8 %74, 79
br i1 %cmp117.us.1, label %if.then119.us.1, label %land.lhs.true128.us.1
if.then119.us.1: ; preds = %land.lhs.true110.us.1
store i8 46, ptr @input_map, align 16, !tbaa !9
br label %land.lhs.true128.us.1
land.lhs.true128.us.1: ; preds = %land.lhs.true110.us.1, %if.then119.us.1
%75 = load i8, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 2), align 2, !tbaa !9
%cmp135.us.1 = icmp eq i8 %75, 79
br i1 %cmp135.us.1, label %if.then137.us.1, label %for.inc145.us.1
if.then137.us.1: ; preds = %land.lhs.true128.us.1
store i8 46, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 2), align 2, !tbaa !9
br label %for.inc145.us.1
for.inc145.us.1: ; preds = %if.then137.us.1, %land.lhs.true128.us.1, %for.inc145.us
%deleted.2.us.1 = phi i32 [ %deleted.2.us, %for.inc145.us ], [ 1, %if.then137.us.1 ], [ 1, %land.lhs.true128.us.1 ]
br i1 %65, label %if.then70.us.2, label %for.inc145.us.2
if.then70.us.2: ; preds = %for.inc145.us.1
store i8 46, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 2), align 2, !tbaa !9
%arrayidx97.us.2 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv.next318, i64 2
%76 = load i8, ptr %arrayidx97.us.2, align 2, !tbaa !9
%cmp99.us.2 = icmp eq i8 %76, 79
br i1 %cmp99.us.2, label %if.then101.us.2, label %land.lhs.true110.us.2
if.then101.us.2: ; preds = %if.then70.us.2
store i8 46, ptr %arrayidx97.us.2, align 2, !tbaa !9
br label %land.lhs.true110.us.2
land.lhs.true110.us.2: ; preds = %if.then70.us.2, %if.then101.us.2
%77 = load i8, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 1), align 1, !tbaa !9
%cmp117.us.2 = icmp eq i8 %77, 79
br i1 %cmp117.us.2, label %if.then119.us.2, label %land.lhs.true128.us.2
if.then119.us.2: ; preds = %land.lhs.true110.us.2
store i8 46, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 1), align 1, !tbaa !9
br label %land.lhs.true128.us.2
land.lhs.true128.us.2: ; preds = %land.lhs.true110.us.2, %if.then119.us.2
%78 = load i8, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 3), align 1, !tbaa !9
%cmp135.us.2 = icmp eq i8 %78, 79
br i1 %cmp135.us.2, label %if.then137.us.2, label %for.inc145.us.2
if.then137.us.2: ; preds = %land.lhs.true128.us.2
store i8 46, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 3), align 1, !tbaa !9
br label %for.inc145.us.2
for.inc145.us.2: ; preds = %if.then137.us.2, %land.lhs.true128.us.2, %for.inc145.us.1
%deleted.2.us.2 = phi i32 [ %deleted.2.us.1, %for.inc145.us.1 ], [ 1, %if.then137.us.2 ], [ 1, %land.lhs.true128.us.2 ]
br i1 %66, label %if.then70.us.3, label %for.inc145.us.3
if.then70.us.3: ; preds = %for.inc145.us.2
store i8 46, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 3), align 1, !tbaa !9
%arrayidx97.us.3 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv.next318, i64 3
%79 = load i8, ptr %arrayidx97.us.3, align 1, !tbaa !9
%cmp99.us.3 = icmp eq i8 %79, 79
br i1 %cmp99.us.3, label %if.then101.us.3, label %land.lhs.true110.us.3
if.then101.us.3: ; preds = %if.then70.us.3
store i8 46, ptr %arrayidx97.us.3, align 1, !tbaa !9
br label %land.lhs.true110.us.3
land.lhs.true110.us.3: ; preds = %if.then70.us.3, %if.then101.us.3
%80 = load i8, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 2), align 2, !tbaa !9
%cmp117.us.3 = icmp eq i8 %80, 79
br i1 %cmp117.us.3, label %if.then119.us.3, label %land.lhs.true128.us.3
if.then119.us.3: ; preds = %land.lhs.true110.us.3
store i8 46, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 2), align 2, !tbaa !9
br label %land.lhs.true128.us.3
land.lhs.true128.us.3: ; preds = %land.lhs.true110.us.3, %if.then119.us.3
%81 = load i8, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 4), align 4, !tbaa !9
%cmp135.us.3 = icmp eq i8 %81, 79
br i1 %cmp135.us.3, label %if.then137.us.3, label %for.inc145.us.3
if.then137.us.3: ; preds = %land.lhs.true128.us.3
store i8 46, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 4), align 4, !tbaa !9
br label %for.inc145.us.3
for.inc145.us.3: ; preds = %if.then137.us.3, %land.lhs.true128.us.3, %for.inc145.us.2
%deleted.2.us.3 = phi i32 [ %deleted.2.us.2, %for.inc145.us.2 ], [ 1, %if.then137.us.3 ], [ 1, %land.lhs.true128.us.3 ]
br i1 %67, label %if.then70.us.4, label %for.inc145.us.4
if.then70.us.4: ; preds = %for.inc145.us.3
store i8 46, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 4), align 4, !tbaa !9
%arrayidx97.us.4 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv.next318, i64 4
%82 = load i8, ptr %arrayidx97.us.4, align 4, !tbaa !9
%cmp99.us.4 = icmp eq i8 %82, 79
br i1 %cmp99.us.4, label %if.then101.us.4, label %land.lhs.true110.us.4
if.then101.us.4: ; preds = %if.then70.us.4
store i8 46, ptr %arrayidx97.us.4, align 4, !tbaa !9
br label %land.lhs.true110.us.4
land.lhs.true110.us.4: ; preds = %if.then70.us.4, %if.then101.us.4
%83 = load i8, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 3), align 1, !tbaa !9
%cmp117.us.4 = icmp eq i8 %83, 79
br i1 %cmp117.us.4, label %if.then119.us.4, label %land.lhs.true128.us.4
if.then119.us.4: ; preds = %land.lhs.true110.us.4
store i8 46, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 3), align 1, !tbaa !9
br label %land.lhs.true128.us.4
land.lhs.true128.us.4: ; preds = %land.lhs.true110.us.4, %if.then119.us.4
%84 = load i8, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 5), align 1, !tbaa !9
%cmp135.us.4 = icmp eq i8 %84, 79
br i1 %cmp135.us.4, label %if.then137.us.4, label %for.inc145.us.4
if.then137.us.4: ; preds = %land.lhs.true128.us.4
store i8 46, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 5), align 1, !tbaa !9
br label %for.inc145.us.4
for.inc145.us.4: ; preds = %if.then137.us.4, %land.lhs.true128.us.4, %for.inc145.us.3
%deleted.2.us.4 = phi i32 [ %deleted.2.us.3, %for.inc145.us.3 ], [ 1, %if.then137.us.4 ], [ 1, %land.lhs.true128.us.4 ]
br i1 %68, label %if.then70.us.5, label %for.inc148
if.then70.us.5: ; preds = %for.inc145.us.4
store i8 46, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 5), align 1, !tbaa !9
%arrayidx97.us.5 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv.next318, i64 5
%85 = load i8, ptr %arrayidx97.us.5, align 1, !tbaa !9
%cmp99.us.5 = icmp eq i8 %85, 79
br i1 %cmp99.us.5, label %if.then101.us.5, label %land.lhs.true110.us.5
if.then101.us.5: ; preds = %if.then70.us.5
store i8 46, ptr %arrayidx97.us.5, align 1, !tbaa !9
br label %land.lhs.true110.us.5
land.lhs.true110.us.5: ; preds = %if.then70.us.5, %if.then101.us.5
%86 = load i8, ptr getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 4), align 4, !tbaa !9
%cmp117.us.5 = icmp eq i8 %86, 79
br i1 %cmp117.us.5, label %for.inc148.sink.split, label %for.inc148
if.then70: ; preds = %for.body63.preheader
%arrayidx74 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv317, i64 0
store i8 46, ptr %arrayidx74, align 8, !tbaa !9
%arrayidx80 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %idxprom77, i64 0
%87 = load i8, ptr %arrayidx80, align 8, !tbaa !9
%cmp82 = icmp eq i8 %87, 79
br i1 %cmp82, label %if.then84, label %if.end90
if.then84: ; preds = %if.then70
store i8 46, ptr %arrayidx80, align 8, !tbaa !9
br label %if.end90
if.end90: ; preds = %if.then84, %if.then70
br i1 %cmp91, label %land.lhs.true93, label %land.lhs.true128
land.lhs.true93: ; preds = %if.end90
%arrayidx97 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv.next318, i64 0
%88 = load i8, ptr %arrayidx97, align 8, !tbaa !9
%cmp99 = icmp eq i8 %88, 79
br i1 %cmp99, label %if.then101, label %land.lhs.true128
if.then101: ; preds = %land.lhs.true93
store i8 46, ptr %arrayidx97, align 8, !tbaa !9
br label %land.lhs.true128
land.lhs.true128: ; preds = %if.end90, %land.lhs.true93, %if.then101
%arrayidx133 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv317, i64 1
%89 = load i8, ptr %arrayidx133, align 1, !tbaa !9
%cmp135 = icmp eq i8 %89, 79
br i1 %cmp135, label %if.then137, label %for.inc145
if.then137: ; preds = %land.lhs.true128
store i8 46, ptr %arrayidx133, align 1, !tbaa !9
br label %for.inc145
for.inc145: ; preds = %land.lhs.true128, %if.then137, %for.body63.preheader
%deleted.2 = phi i32 [ %deleted.0285, %for.body63.preheader ], [ 1, %if.then137 ], [ 1, %land.lhs.true128 ]
%arrayidx67.1 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %indvars.iv317, i64 1
%90 = load i32, ptr %arrayidx67.1, align 4, !tbaa !5
%cmp68.1 = icmp sgt i32 %90, 3
br i1 %cmp68.1, label %if.then70.1, label %for.inc145.1
if.then70.1: ; preds = %for.inc145
%arrayidx74.1 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv317, i64 1
store i8 46, ptr %arrayidx74.1, align 1, !tbaa !9
%arrayidx80.1 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %idxprom77, i64 1
%91 = load i8, ptr %arrayidx80.1, align 1, !tbaa !9
%cmp82.1 = icmp eq i8 %91, 79
br i1 %cmp82.1, label %if.then84.1, label %if.end90.1
if.then84.1: ; preds = %if.then70.1
store i8 46, ptr %arrayidx80.1, align 1, !tbaa !9
br label %if.end90.1
if.end90.1: ; preds = %if.then84.1, %if.then70.1
br i1 %cmp91, label %land.lhs.true93.1, label %land.lhs.true110.1
land.lhs.true93.1: ; preds = %if.end90.1
%arrayidx97.1 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv.next318, i64 1
%92 = load i8, ptr %arrayidx97.1, align 1, !tbaa !9
%cmp99.1 = icmp eq i8 %92, 79
br i1 %cmp99.1, label %if.then101.1, label %land.lhs.true110.1
if.then101.1: ; preds = %land.lhs.true93.1
store i8 46, ptr %arrayidx97.1, align 1, !tbaa !9
br label %land.lhs.true110.1
land.lhs.true110.1: ; preds = %if.end90.1, %land.lhs.true93.1, %if.then101.1
%arrayidx115.1 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv317, i64 0
%93 = load i8, ptr %arrayidx115.1, align 8, !tbaa !9
%cmp117.1 = icmp eq i8 %93, 79
br i1 %cmp117.1, label %if.then119.1, label %land.lhs.true128.1
if.then119.1: ; preds = %land.lhs.true110.1
store i8 46, ptr %arrayidx115.1, align 8, !tbaa !9
br label %land.lhs.true128.1
land.lhs.true128.1: ; preds = %land.lhs.true110.1, %if.then119.1
%arrayidx133.1 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv317, i64 2
%94 = load i8, ptr %arrayidx133.1, align 2, !tbaa !9
%cmp135.1 = icmp eq i8 %94, 79
br i1 %cmp135.1, label %if.then137.1, label %for.inc145.1
if.then137.1: ; preds = %land.lhs.true128.1
store i8 46, ptr %arrayidx133.1, align 2, !tbaa !9
br label %for.inc145.1
for.inc145.1: ; preds = %if.then137.1, %land.lhs.true128.1, %for.inc145
%deleted.2.1 = phi i32 [ %deleted.2, %for.inc145 ], [ 1, %if.then137.1 ], [ 1, %land.lhs.true128.1 ]
%arrayidx67.2 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %indvars.iv317, i64 2
%95 = load i32, ptr %arrayidx67.2, align 8, !tbaa !5
%cmp68.2 = icmp sgt i32 %95, 3
br i1 %cmp68.2, label %if.then70.2, label %for.inc145.2
if.then70.2: ; preds = %for.inc145.1
%arrayidx74.2 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv317, i64 2
store i8 46, ptr %arrayidx74.2, align 2, !tbaa !9
%arrayidx80.2 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %idxprom77, i64 2
%96 = load i8, ptr %arrayidx80.2, align 2, !tbaa !9
%cmp82.2 = icmp eq i8 %96, 79
br i1 %cmp82.2, label %if.then84.2, label %if.end90.2
if.then84.2: ; preds = %if.then70.2
store i8 46, ptr %arrayidx80.2, align 2, !tbaa !9
br label %if.end90.2
if.end90.2: ; preds = %if.then84.2, %if.then70.2
br i1 %cmp91, label %land.lhs.true93.2, label %land.lhs.true110.2
land.lhs.true93.2: ; preds = %if.end90.2
%arrayidx97.2 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv.next318, i64 2
%97 = load i8, ptr %arrayidx97.2, align 2, !tbaa !9
%cmp99.2 = icmp eq i8 %97, 79
br i1 %cmp99.2, label %if.then101.2, label %land.lhs.true110.2
if.then101.2: ; preds = %land.lhs.true93.2
store i8 46, ptr %arrayidx97.2, align 2, !tbaa !9
br label %land.lhs.true110.2
land.lhs.true110.2: ; preds = %if.end90.2, %land.lhs.true93.2, %if.then101.2
%arrayidx115.2 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv317, i64 1
%98 = load i8, ptr %arrayidx115.2, align 1, !tbaa !9
%cmp117.2 = icmp eq i8 %98, 79
br i1 %cmp117.2, label %if.then119.2, label %land.lhs.true128.2
if.then119.2: ; preds = %land.lhs.true110.2
store i8 46, ptr %arrayidx115.2, align 1, !tbaa !9
br label %land.lhs.true128.2
land.lhs.true128.2: ; preds = %land.lhs.true110.2, %if.then119.2
%arrayidx133.2 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv317, i64 3
%99 = load i8, ptr %arrayidx133.2, align 1, !tbaa !9
%cmp135.2 = icmp eq i8 %99, 79
br i1 %cmp135.2, label %if.then137.2, label %for.inc145.2
if.then137.2: ; preds = %land.lhs.true128.2
store i8 46, ptr %arrayidx133.2, align 1, !tbaa !9
br label %for.inc145.2
for.inc145.2: ; preds = %if.then137.2, %land.lhs.true128.2, %for.inc145.1
%deleted.2.2 = phi i32 [ %deleted.2.1, %for.inc145.1 ], [ 1, %if.then137.2 ], [ 1, %land.lhs.true128.2 ]
%arrayidx67.3 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %indvars.iv317, i64 3
%100 = load i32, ptr %arrayidx67.3, align 4, !tbaa !5
%cmp68.3 = icmp sgt i32 %100, 3
br i1 %cmp68.3, label %if.then70.3, label %for.inc145.3
if.then70.3: ; preds = %for.inc145.2
%arrayidx74.3 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv317, i64 3
store i8 46, ptr %arrayidx74.3, align 1, !tbaa !9
%arrayidx80.3 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %idxprom77, i64 3
%101 = load i8, ptr %arrayidx80.3, align 1, !tbaa !9
%cmp82.3 = icmp eq i8 %101, 79
br i1 %cmp82.3, label %if.then84.3, label %if.end90.3
if.then84.3: ; preds = %if.then70.3
store i8 46, ptr %arrayidx80.3, align 1, !tbaa !9
br label %if.end90.3
if.end90.3: ; preds = %if.then84.3, %if.then70.3
br i1 %cmp91, label %land.lhs.true93.3, label %land.lhs.true110.3
land.lhs.true93.3: ; preds = %if.end90.3
%arrayidx97.3 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv.next318, i64 3
%102 = load i8, ptr %arrayidx97.3, align 1, !tbaa !9
%cmp99.3 = icmp eq i8 %102, 79
br i1 %cmp99.3, label %if.then101.3, label %land.lhs.true110.3
if.then101.3: ; preds = %land.lhs.true93.3
store i8 46, ptr %arrayidx97.3, align 1, !tbaa !9
br label %land.lhs.true110.3
land.lhs.true110.3: ; preds = %if.end90.3, %land.lhs.true93.3, %if.then101.3
%arrayidx115.3 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv317, i64 2
%103 = load i8, ptr %arrayidx115.3, align 2, !tbaa !9
%cmp117.3 = icmp eq i8 %103, 79
br i1 %cmp117.3, label %if.then119.3, label %land.lhs.true128.3
if.then119.3: ; preds = %land.lhs.true110.3
store i8 46, ptr %arrayidx115.3, align 2, !tbaa !9
br label %land.lhs.true128.3
land.lhs.true128.3: ; preds = %land.lhs.true110.3, %if.then119.3
%arrayidx133.3 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv317, i64 4
%104 = load i8, ptr %arrayidx133.3, align 4, !tbaa !9
%cmp135.3 = icmp eq i8 %104, 79
br i1 %cmp135.3, label %if.then137.3, label %for.inc145.3
if.then137.3: ; preds = %land.lhs.true128.3
store i8 46, ptr %arrayidx133.3, align 4, !tbaa !9
br label %for.inc145.3
for.inc145.3: ; preds = %if.then137.3, %land.lhs.true128.3, %for.inc145.2
%deleted.2.3 = phi i32 [ %deleted.2.2, %for.inc145.2 ], [ 1, %if.then137.3 ], [ 1, %land.lhs.true128.3 ]
%arrayidx67.4 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %indvars.iv317, i64 4
%105 = load i32, ptr %arrayidx67.4, align 8, !tbaa !5
%cmp68.4 = icmp sgt i32 %105, 3
br i1 %cmp68.4, label %if.then70.4, label %for.inc145.4
if.then70.4: ; preds = %for.inc145.3
%arrayidx74.4 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv317, i64 4
store i8 46, ptr %arrayidx74.4, align 4, !tbaa !9
%arrayidx80.4 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %idxprom77, i64 4
%106 = load i8, ptr %arrayidx80.4, align 4, !tbaa !9
%cmp82.4 = icmp eq i8 %106, 79
br i1 %cmp82.4, label %if.then84.4, label %if.end90.4
if.then84.4: ; preds = %if.then70.4
store i8 46, ptr %arrayidx80.4, align 4, !tbaa !9
br label %if.end90.4
if.end90.4: ; preds = %if.then84.4, %if.then70.4
br i1 %cmp91, label %land.lhs.true93.4, label %land.lhs.true110.4
land.lhs.true93.4: ; preds = %if.end90.4
%arrayidx97.4 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv.next318, i64 4
%107 = load i8, ptr %arrayidx97.4, align 4, !tbaa !9
%cmp99.4 = icmp eq i8 %107, 79
br i1 %cmp99.4, label %if.then101.4, label %land.lhs.true110.4
if.then101.4: ; preds = %land.lhs.true93.4
store i8 46, ptr %arrayidx97.4, align 4, !tbaa !9
br label %land.lhs.true110.4
land.lhs.true110.4: ; preds = %if.end90.4, %land.lhs.true93.4, %if.then101.4
%arrayidx115.4 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv317, i64 3
%108 = load i8, ptr %arrayidx115.4, align 1, !tbaa !9
%cmp117.4 = icmp eq i8 %108, 79
br i1 %cmp117.4, label %if.then119.4, label %land.lhs.true128.4
if.then119.4: ; preds = %land.lhs.true110.4
store i8 46, ptr %arrayidx115.4, align 1, !tbaa !9
br label %land.lhs.true128.4
land.lhs.true128.4: ; preds = %land.lhs.true110.4, %if.then119.4
%arrayidx133.4 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv317, i64 5
%109 = load i8, ptr %arrayidx133.4, align 1, !tbaa !9
%cmp135.4 = icmp eq i8 %109, 79
br i1 %cmp135.4, label %if.then137.4, label %for.inc145.4
if.then137.4: ; preds = %land.lhs.true128.4
store i8 46, ptr %arrayidx133.4, align 1, !tbaa !9
br label %for.inc145.4
for.inc145.4: ; preds = %if.then137.4, %land.lhs.true128.4, %for.inc145.3
%deleted.2.4 = phi i32 [ %deleted.2.3, %for.inc145.3 ], [ 1, %if.then137.4 ], [ 1, %land.lhs.true128.4 ]
%arrayidx67.5 = getelementptr inbounds [12 x [6 x i32]], ptr @map, i64 0, i64 %indvars.iv317, i64 5
%110 = load i32, ptr %arrayidx67.5, align 4, !tbaa !5
%cmp68.5 = icmp sgt i32 %110, 3
br i1 %cmp68.5, label %if.then70.5, label %for.inc148
if.then70.5: ; preds = %for.inc145.4
%arrayidx74.5 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv317, i64 5
store i8 46, ptr %arrayidx74.5, align 1, !tbaa !9
%arrayidx80.5 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %idxprom77, i64 5
%111 = load i8, ptr %arrayidx80.5, align 1, !tbaa !9
%cmp82.5 = icmp eq i8 %111, 79
br i1 %cmp82.5, label %if.then84.5, label %if.end90.5
if.then84.5: ; preds = %if.then70.5
store i8 46, ptr %arrayidx80.5, align 1, !tbaa !9
br label %if.end90.5
if.end90.5: ; preds = %if.then84.5, %if.then70.5
br i1 %cmp91, label %land.lhs.true93.5, label %land.lhs.true110.5
land.lhs.true93.5: ; preds = %if.end90.5
%arrayidx97.5 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv.next318, i64 5
%112 = load i8, ptr %arrayidx97.5, align 1, !tbaa !9
%cmp99.5 = icmp eq i8 %112, 79
br i1 %cmp99.5, label %if.then101.5, label %land.lhs.true110.5
if.then101.5: ; preds = %land.lhs.true93.5
store i8 46, ptr %arrayidx97.5, align 1, !tbaa !9
br label %land.lhs.true110.5
land.lhs.true110.5: ; preds = %if.end90.5, %land.lhs.true93.5, %if.then101.5
%arrayidx115.5 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv317, i64 4
%113 = load i8, ptr %arrayidx115.5, align 4, !tbaa !9
%cmp117.5 = icmp eq i8 %113, 79
br i1 %cmp117.5, label %for.inc148.sink.split, label %for.inc148
for.inc148.sink.split: ; preds = %land.lhs.true110.5, %land.lhs.true110.us.5
%arrayidx115.5.sink = phi ptr [ getelementptr inbounds ([12 x [8 x i8]], ptr @input_map, i64 0, i64 0, i64 4), %land.lhs.true110.us.5 ], [ %arrayidx115.5, %land.lhs.true110.5 ]
store i8 46, ptr %arrayidx115.5.sink, align 1, !tbaa !9
br label %for.inc148
for.inc148: ; preds = %for.inc148.sink.split, %for.inc145.4, %land.lhs.true110.5, %for.inc145.us.4, %land.lhs.true110.us.5
%.us-phi = phi i32 [ %deleted.2.us.4, %for.inc145.us.4 ], [ 1, %land.lhs.true110.us.5 ], [ %deleted.2.4, %for.inc145.4 ], [ 1, %land.lhs.true110.5 ], [ 1, %for.inc148.sink.split ]
%exitcond321.not = icmp eq i64 %indvars.iv.next318, 12
br i1 %exitcond321.not, label %for.end150, label %for.cond60.preheader, !llvm.loop !13
for.end150: ; preds = %for.inc148
%tobool.not = icmp eq i32 %.us-phi, 0
br i1 %tobool.not, label %for.end205, label %for.cond157.preheader
for.cond157.preheader: ; preds = %for.end150, %for.inc197.us.5
%indvars.iv326 = phi i64 [ %indvars.iv.next327, %for.inc197.us.5 ], [ 11, %for.end150 ]
%arrayidx164.us = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv326, i64 0
%114 = load i8, ptr %arrayidx164.us, align 8, !tbaa !9
%cmp166.us = icmp eq i8 %114, 46
br i1 %cmp166.us, label %for.body172.us.preheader, label %for.inc197.us
for.body172.us.preheader: ; preds = %for.cond157.preheader
%115 = trunc i64 %indvars.iv326 to i32
br label %for.body172.us
for.cond169.us: ; preds = %for.body172.us
%dec.us = add nsw i32 %k.1287.us, -1
%cmp170.us = icmp sgt i32 %k.1287.us, 0
br i1 %cmp170.us, label %for.body172.us, label %for.inc197.us, !llvm.loop !14
for.body172.us: ; preds = %for.body172.us.preheader, %for.cond169.us
%k.1287.us = phi i32 [ %dec.us, %for.cond169.us ], [ %115, %for.body172.us.preheader ]
%idxprom173.us = zext i32 %k.1287.us to i64
%arrayidx176.us = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %idxprom173.us, i64 0
%116 = load i8, ptr %arrayidx176.us, align 8, !tbaa !9
%cmp178.not.us = icmp eq i8 %116, 46
br i1 %cmp178.not.us, label %for.cond169.us, label %if.then180.us
if.then180.us: ; preds = %for.body172.us
store i8 %116, ptr %arrayidx164.us, align 8, !tbaa !9
store i8 46, ptr %arrayidx176.us, align 1, !tbaa !9
br label %for.inc197.us
for.inc197.us: ; preds = %for.cond169.us, %if.then180.us, %for.cond157.preheader
%arrayidx164.us.1 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv326, i64 1
%117 = load i8, ptr %arrayidx164.us.1, align 1, !tbaa !9
%cmp166.us.1 = icmp eq i8 %117, 46
br i1 %cmp166.us.1, label %for.body172.us.preheader.1, label %for.inc197.us.1
for.body172.us.preheader.1: ; preds = %for.inc197.us
%118 = trunc i64 %indvars.iv326 to i32
br label %for.body172.us.1
for.body172.us.1: ; preds = %for.cond169.us.1, %for.body172.us.preheader.1
%k.1287.us.1 = phi i32 [ %dec.us.1, %for.cond169.us.1 ], [ %118, %for.body172.us.preheader.1 ]
%idxprom173.us.1 = zext i32 %k.1287.us.1 to i64
%arrayidx176.us.1 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %idxprom173.us.1, i64 1
%119 = load i8, ptr %arrayidx176.us.1, align 1, !tbaa !9
%cmp178.not.us.1 = icmp eq i8 %119, 46
br i1 %cmp178.not.us.1, label %for.cond169.us.1, label %if.then180.us.1
if.then180.us.1: ; preds = %for.body172.us.1
store i8 %119, ptr %arrayidx164.us.1, align 1, !tbaa !9
store i8 46, ptr %arrayidx176.us.1, align 1, !tbaa !9
br label %for.inc197.us.1
for.cond169.us.1: ; preds = %for.body172.us.1
%dec.us.1 = add nsw i32 %k.1287.us.1, -1
%cmp170.us.1 = icmp sgt i32 %k.1287.us.1, 0
br i1 %cmp170.us.1, label %for.body172.us.1, label %for.inc197.us.1, !llvm.loop !14
for.inc197.us.1: ; preds = %for.cond169.us.1, %if.then180.us.1, %for.inc197.us
%arrayidx164.us.2 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv326, i64 2
%120 = load i8, ptr %arrayidx164.us.2, align 2, !tbaa !9
%cmp166.us.2 = icmp eq i8 %120, 46
br i1 %cmp166.us.2, label %for.body172.us.preheader.2, label %for.inc197.us.2
for.body172.us.preheader.2: ; preds = %for.inc197.us.1
%121 = trunc i64 %indvars.iv326 to i32
br label %for.body172.us.2
for.body172.us.2: ; preds = %for.cond169.us.2, %for.body172.us.preheader.2
%k.1287.us.2 = phi i32 [ %dec.us.2, %for.cond169.us.2 ], [ %121, %for.body172.us.preheader.2 ]
%idxprom173.us.2 = zext i32 %k.1287.us.2 to i64
%arrayidx176.us.2 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %idxprom173.us.2, i64 2
%122 = load i8, ptr %arrayidx176.us.2, align 2, !tbaa !9
%cmp178.not.us.2 = icmp eq i8 %122, 46
br i1 %cmp178.not.us.2, label %for.cond169.us.2, label %if.then180.us.2
if.then180.us.2: ; preds = %for.body172.us.2
store i8 %122, ptr %arrayidx164.us.2, align 2, !tbaa !9
store i8 46, ptr %arrayidx176.us.2, align 1, !tbaa !9
br label %for.inc197.us.2
for.cond169.us.2: ; preds = %for.body172.us.2
%dec.us.2 = add nsw i32 %k.1287.us.2, -1
%cmp170.us.2 = icmp sgt i32 %k.1287.us.2, 0
br i1 %cmp170.us.2, label %for.body172.us.2, label %for.inc197.us.2, !llvm.loop !14
for.inc197.us.2: ; preds = %for.cond169.us.2, %if.then180.us.2, %for.inc197.us.1
%arrayidx164.us.3 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv326, i64 3
%123 = load i8, ptr %arrayidx164.us.3, align 1, !tbaa !9
%cmp166.us.3 = icmp eq i8 %123, 46
br i1 %cmp166.us.3, label %for.body172.us.preheader.3, label %for.inc197.us.3
for.body172.us.preheader.3: ; preds = %for.inc197.us.2
%124 = trunc i64 %indvars.iv326 to i32
br label %for.body172.us.3
for.body172.us.3: ; preds = %for.cond169.us.3, %for.body172.us.preheader.3
%k.1287.us.3 = phi i32 [ %dec.us.3, %for.cond169.us.3 ], [ %124, %for.body172.us.preheader.3 ]
%idxprom173.us.3 = zext i32 %k.1287.us.3 to i64
%arrayidx176.us.3 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %idxprom173.us.3, i64 3
%125 = load i8, ptr %arrayidx176.us.3, align 1, !tbaa !9
%cmp178.not.us.3 = icmp eq i8 %125, 46
br i1 %cmp178.not.us.3, label %for.cond169.us.3, label %if.then180.us.3
if.then180.us.3: ; preds = %for.body172.us.3
store i8 %125, ptr %arrayidx164.us.3, align 1, !tbaa !9
store i8 46, ptr %arrayidx176.us.3, align 1, !tbaa !9
br label %for.inc197.us.3
for.cond169.us.3: ; preds = %for.body172.us.3
%dec.us.3 = add nsw i32 %k.1287.us.3, -1
%cmp170.us.3 = icmp sgt i32 %k.1287.us.3, 0
br i1 %cmp170.us.3, label %for.body172.us.3, label %for.inc197.us.3, !llvm.loop !14
for.inc197.us.3: ; preds = %for.cond169.us.3, %if.then180.us.3, %for.inc197.us.2
%arrayidx164.us.4 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv326, i64 4
%126 = load i8, ptr %arrayidx164.us.4, align 4, !tbaa !9
%cmp166.us.4 = icmp eq i8 %126, 46
br i1 %cmp166.us.4, label %for.body172.us.preheader.4, label %for.inc197.us.4
for.body172.us.preheader.4: ; preds = %for.inc197.us.3
%127 = trunc i64 %indvars.iv326 to i32
br label %for.body172.us.4
for.body172.us.4: ; preds = %for.cond169.us.4, %for.body172.us.preheader.4
%k.1287.us.4 = phi i32 [ %dec.us.4, %for.cond169.us.4 ], [ %127, %for.body172.us.preheader.4 ]
%idxprom173.us.4 = zext i32 %k.1287.us.4 to i64
%arrayidx176.us.4 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %idxprom173.us.4, i64 4
%128 = load i8, ptr %arrayidx176.us.4, align 4, !tbaa !9
%cmp178.not.us.4 = icmp eq i8 %128, 46
br i1 %cmp178.not.us.4, label %for.cond169.us.4, label %if.then180.us.4
if.then180.us.4: ; preds = %for.body172.us.4
store i8 %128, ptr %arrayidx164.us.4, align 4, !tbaa !9
store i8 46, ptr %arrayidx176.us.4, align 1, !tbaa !9
br label %for.inc197.us.4
for.cond169.us.4: ; preds = %for.body172.us.4
%dec.us.4 = add nsw i32 %k.1287.us.4, -1
%cmp170.us.4 = icmp sgt i32 %k.1287.us.4, 0
br i1 %cmp170.us.4, label %for.body172.us.4, label %for.inc197.us.4, !llvm.loop !14
for.inc197.us.4: ; preds = %for.cond169.us.4, %if.then180.us.4, %for.inc197.us.3
%arrayidx164.us.5 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %indvars.iv326, i64 5
%129 = load i8, ptr %arrayidx164.us.5, align 1, !tbaa !9
%cmp166.us.5 = icmp eq i8 %129, 46
br i1 %cmp166.us.5, label %for.body172.us.preheader.5, label %for.inc197.us.5
for.body172.us.preheader.5: ; preds = %for.inc197.us.4
%130 = trunc i64 %indvars.iv326 to i32
br label %for.body172.us.5
for.body172.us.5: ; preds = %for.cond169.us.5, %for.body172.us.preheader.5
%k.1287.us.5 = phi i32 [ %dec.us.5, %for.cond169.us.5 ], [ %130, %for.body172.us.preheader.5 ]
%idxprom173.us.5 = zext i32 %k.1287.us.5 to i64
%arrayidx176.us.5 = getelementptr inbounds [12 x [8 x i8]], ptr @input_map, i64 0, i64 %idxprom173.us.5, i64 5
%131 = load i8, ptr %arrayidx176.us.5, align 1, !tbaa !9
%cmp178.not.us.5 = icmp eq i8 %131, 46
br i1 %cmp178.not.us.5, label %for.cond169.us.5, label %if.then180.us.5
if.then180.us.5: ; preds = %for.body172.us.5
store i8 %131, ptr %arrayidx164.us.5, align 1, !tbaa !9
store i8 46, ptr %arrayidx176.us.5, align 1, !tbaa !9
br label %for.inc197.us.5
for.cond169.us.5: ; preds = %for.body172.us.5
%dec.us.5 = add nsw i32 %k.1287.us.5, -1
%cmp170.us.5 = icmp sgt i32 %k.1287.us.5, 0
br i1 %cmp170.us.5, label %for.body172.us.5, label %for.inc197.us.5, !llvm.loop !14
for.inc197.us.5: ; preds = %for.cond169.us.5, %if.then180.us.5, %for.inc197.us.4
%indvars.iv.next327 = add nsw i64 %indvars.iv326, -1
%cmp154 = icmp ugt i64 %indvars.iv326, 1
br i1 %cmp154, label %for.cond157.preheader, label %for.inc203, !llvm.loop !15
for.inc203: ; preds = %for.inc197.us.5
%inc204 = add nuw nsw i32 %rensa.0, 1
br label %for.cond5
for.end205: ; preds = %for.end150
%call206 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %rensa.0)
%inc208 = add nuw nsw i32 %cur_data.0291, 1
%132 = load i32, ptr %data_num, align 4, !tbaa !5
%cmp = icmp slt i32 %inc208, %132
br i1 %cmp, label %for.cond1.preheader, label %for.end209, !llvm.loop !16
for.end209: ; preds = %for.end205, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %data_num) #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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2
attributes #0 = { nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree 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}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
|
#include<stdio.h>
int main(void)
{
int m[100], d[100];
scanf("%d%d%d%d", &m[0], &d[0], &m[1], &d[1]);
if (m[0] != m[1]) {
printf("1\n");
}
else {
printf("0\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213188/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213188/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 = 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:
%m = alloca [100 x i32], align 16
%d = alloca [100 x i32], align 16
call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %m) #4
call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %d) #4
%arrayidx2 = getelementptr inbounds [100 x i32], ptr %m, i64 0, i64 1
%arrayidx3 = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 1
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %m, ptr noundef nonnull %d, ptr noundef nonnull %arrayidx2, ptr noundef nonnull %arrayidx3)
%0 = load i32, ptr %m, align 16, !tbaa !5
%1 = load i32, ptr %arrayidx2, align 4, !tbaa !5
%cmp.not = icmp eq i32 %0, %1
%str.str.3 = select i1 %cmp.not, ptr @str, ptr @str.3
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.str.3)
call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %d) #4
call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %m) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @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>
#define MAX 2
int main()
{
int man[MAX];
int day[MAX];
scanf("%d %d", &man[0], &day[0]);
scanf("%d %d", &man[1], &day[1]);
if (man[0] != man[1]) {
printf("1\n");
} else {
printf("0\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213245/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213245/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@str = private unnamed_addr constant [2 x i8] c"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:
%man = alloca [2 x i32], align 4
%day = alloca [2 x i32], align 4
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %man) #4
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %day) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %man, ptr noundef nonnull %day)
%arrayidx2 = getelementptr inbounds [2 x i32], ptr %man, i64 0, i64 1
%arrayidx3 = getelementptr inbounds [2 x i32], ptr %day, i64 0, i64 1
%call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx2, ptr noundef nonnull %arrayidx3)
%0 = load i32, ptr %man, align 4, !tbaa !5
%1 = load i32, ptr %arrayidx2, align 4, !tbaa !5
%cmp.not = icmp eq i32 %0, %1
%str.str.3 = select i1 %cmp.not, ptr @str, ptr @str.3
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.str.3)
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %day) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %man) #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"}
|
/*
* main.c
*
* Created on: 2019/07/21
* Author: family
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
int main()
{
int M1 = 0, D1 = 0, M2 = 0, D2 = 0;
scanf("%d %d", &M1, &D1);
scanf("%d %d", &M2, &D2);
if (M1 == M2) {
printf("0\n");
} else {
printf("1\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213289/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213289/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@str = private unnamed_addr constant [2 x i8] c"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
store i32 0, ptr %M1, align 4, !tbaa !5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %D1) #4
store i32 0, ptr %D1, align 4, !tbaa !5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %M2) #4
store i32 0, ptr %M2, align 4, !tbaa !5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %D2) #4
store i32 0, ptr %D2, align 4, !tbaa !5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %M1, ptr noundef nonnull %D1)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %M2, ptr noundef nonnull %D2)
%0 = load i32, ptr %M1, align 4, !tbaa !5
%1 = load i32, ptr %M2, 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 %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 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
#include<stdlib.h>
int n, A, B, C;
int l[8];
int max = 4680;
int MIN(int a, int b){return a<b?a:b;};
int dfs(int cur, int a, int b, int c, int ta, int tb, int tc){
if(cur == n){
if(a * b * c == 0){return max;}
return abs(A-a) + abs(B-b) + abs(C-c) + 10*((ta-1) + (tb-1) + (tc-1));
}
int ret0 = dfs(cur+1, a, b, c, ta, tb, tc);
int ret1 = dfs(cur+1, a+l[cur], b, c, ta+1, tb, tc);
int ret2 = dfs(cur+1, a, b+l[cur], c, ta, tb+1, tc);
int ret3 = dfs(cur+1, a, b, c+l[cur], ta, tb, tc+1);
return MIN(ret3,MIN(ret2,MIN(ret0, ret1)));
}
int main(void){
scanf("%d%d%d%d", &n, &A, &B, &C);
for(int i = 0; i < n; i++){scanf("%d", &l[i]);}
printf("%d\n", dfs(0, 0, 0, 0, 0, 0, 0));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213346/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213346/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@max = dso_local local_unnamed_addr global i32 4680, align 4
@n = dso_local global i32 0, align 4
@A = dso_local global i32 0, align 4
@B = dso_local global i32 0, align 4
@C = dso_local global i32 0, align 4
@l = dso_local global [8 x i32] zeroinitializer, align 16
@.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
@.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
define dso_local i32 @MIN(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 {
entry:
%cond = tail call i32 @llvm.smin.i32(i32 %a, i32 %b)
ret i32 %cond
}
; Function Attrs: nofree nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable
define dso_local i32 @dfs(i32 noundef %cur, i32 noundef %a, i32 noundef %b, i32 noundef %c, i32 noundef %ta, i32 noundef %tb, i32 noundef %tc) local_unnamed_addr #1 {
entry:
%0 = load i32, ptr @n, align 4, !tbaa !5
%cmp = icmp eq i32 %0, %cur
br i1 %cmp, label %if.then, label %if.end14
if.then: ; preds = %entry
%mul = mul nsw i32 %b, %a
%mul1 = mul nsw i32 %mul, %c
%cmp2 = icmp eq i32 %mul1, 0
br i1 %cmp2, label %if.then3, label %if.end
if.then3: ; preds = %if.then
%1 = load i32, ptr @max, align 4, !tbaa !5
br label %common.ret71
if.end: ; preds = %if.then
%2 = load i32, ptr @A, align 4, !tbaa !5
%sub = sub nsw i32 %2, %a
%3 = tail call i32 @llvm.abs.i32(i32 %sub, i1 true)
%4 = load i32, ptr @B, align 4, !tbaa !5
%sub4 = sub nsw i32 %4, %b
%5 = tail call i32 @llvm.abs.i32(i32 %sub4, i1 true)
%6 = load i32, ptr @C, align 4, !tbaa !5
%sub5 = sub nsw i32 %6, %c
%7 = tail call i32 @llvm.abs.i32(i32 %sub5, i1 true)
%sub8 = add i32 %tb, %ta
%sub10 = add i32 %sub8, %tc
%8 = mul i32 %sub10, 10
%add = add i32 %8, -30
%add6 = add i32 %add, %3
%mul12 = add i32 %add6, %5
%add13 = add i32 %mul12, %7
br label %common.ret71
common.ret71: ; preds = %if.end, %if.then3, %if.end14
%common.ret71.op = phi i32 [ %cond.i70, %if.end14 ], [ %1, %if.then3 ], [ %add13, %if.end ]
ret i32 %common.ret71.op
if.end14: ; preds = %entry
%add15 = add nsw i32 %cur, 1
%call = tail call i32 @dfs(i32 noundef %add15, i32 noundef %a, i32 noundef %b, i32 noundef %c, i32 noundef %ta, i32 noundef %tb, i32 noundef %tc)
%idxprom = sext i32 %cur to i64
%arrayidx = getelementptr inbounds [8 x i32], ptr @l, i64 0, i64 %idxprom
%9 = load i32, ptr %arrayidx, align 4, !tbaa !5
%add17 = add nsw i32 %9, %a
%add18 = add nsw i32 %ta, 1
%call19 = tail call i32 @dfs(i32 noundef %add15, i32 noundef %add17, i32 noundef %b, i32 noundef %c, i32 noundef %add18, i32 noundef %tb, i32 noundef %tc)
%add23 = add nsw i32 %9, %b
%add24 = add nsw i32 %tb, 1
%call25 = tail call i32 @dfs(i32 noundef %add15, i32 noundef %a, i32 noundef %add23, i32 noundef %c, i32 noundef %ta, i32 noundef %add24, i32 noundef %tc)
%add29 = add nsw i32 %9, %c
%add30 = add nsw i32 %tc, 1
%call31 = tail call i32 @dfs(i32 noundef %add15, i32 noundef %a, i32 noundef %b, i32 noundef %add29, i32 noundef %ta, i32 noundef %tb, i32 noundef %add30)
%cond.i = tail call i32 @llvm.smin.i32(i32 %call, i32 %call19)
%cond.i69 = tail call i32 @llvm.smin.i32(i32 %call25, i32 %cond.i)
%cond.i70 = tail call i32 @llvm.smin.i32(i32 %call31, i32 %cond.i69)
br label %common.ret71
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #2
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #3 {
entry:
%call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @A, ptr noundef nonnull @B, ptr noundef nonnull @C)
%0 = load i32, ptr @n, align 4, !tbaa !5
%cmp6 = icmp sgt i32 %0, 0
br i1 %cmp6, label %for.body, label %for.cond.cleanup
for.cond.cleanup: ; preds = %for.body, %entry
%call2 = tail call i32 @dfs(i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0)
%call3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %call2)
ret i32 0
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 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%1 = load i32, ptr @n, align 4, !tbaa !5
%2 = sext i32 %1 to i64
%cmp = icmp slt i64 %indvars.iv.next, %2
br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !9
}
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #5
attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
|
#include <stdio.h>
#include<math.h>
int main()
{
int tt;
scanf("%d",&tt);
while(tt--)
{
long long x,n,l1,l2,a,b,ans=0,m1,m2;
scanf(" %lld %lld",&x,&n);
// if(n%4==0)
// {
// l1=n-3;
// l2=n;
// m1=n-2;
// m2=n-1;
// }
// else if(n%4==1)
// {
// l1=n;
// l2=n-1;
// m1=n-3;
// m2=n-2;
// }
// else if(n%4==2)
// {
// l1=n-1;
// l2=n-2;
// m1=n;
// m2=n-3;
// }
// else if(n%4==3)
// {
// l1=n-2;
// l2=n-3;
// m1=n-1;
// m2=n;
// }
// //printf("The value of l1 l2 m1 m2: %lld %lld %lld %lld\n",l1,l2,m1,m2);
// a=(l1+1)/2*((l1+3)/4)+l2/4*(4+l2)/2;
// b=((2+m1)/2*(m1+2)/4)+((3+m2)/2*(m2+1)/4);
// //printf("The value of a and b is :%lld %lld\n",a,b);
if(n%4==0)
ans=0;
else if(n%4==1)
{
if(x%2==0)
ans=-n;
else ans=n;
}
else if(n%4==2)
{
if(x%2==0)
ans=1;
else ans=-1;
}
else if(n%4==3)
{
if(x%2==0)
ans=n+1;
else ans=-n-1;
}
//printf("The value of x and ans is:%lld %lld\n",x,ans);
ans=x+ans;
printf("%lld\n",ans);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21339/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21339/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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" %lld %lld\00", align 1
@.str.2 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%tt = alloca i32, align 4
%x = alloca i64, align 8
%n = alloca i64, align 8
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %tt) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %tt)
%0 = load i32, ptr %tt, align 4, !tbaa !5
%dec36 = add nsw i32 %0, -1
store i32 %dec36, ptr %tt, align 4, !tbaa !5
%tobool.not37 = icmp eq i32 %0, 0
br i1 %tobool.not37, label %while.end, label %while.body
while.body: ; preds = %entry, %if.end32
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x) #3
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #3
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x, ptr noundef nonnull %n)
%1 = load i64, ptr %n, align 8, !tbaa !9
%rem = srem i64 %1, 4
%.pre = load i64, ptr %x, align 8, !tbaa !9
switch i64 %rem, label %if.end32 [
i64 3, label %if.then21
i64 1, label %if.then4
i64 2, label %if.then12
]
if.then4: ; preds = %while.body
%2 = and i64 %.pre, 1
%cmp6 = icmp eq i64 %2, 0
%sub = sub nsw i64 0, %1
%spec.select = select i1 %cmp6, i64 %sub, i64 %1
br label %if.end32
if.then12: ; preds = %while.body
%3 = and i64 %.pre, 1
%cmp14 = icmp eq i64 %3, 0
%. = select i1 %cmp14, i64 1, i64 -1
br label %if.end32
if.then21: ; preds = %while.body
%4 = and i64 %.pre, 1
%cmp23 = icmp eq i64 %4, 0
br i1 %cmp23, label %if.then24, label %if.else25
if.then24: ; preds = %if.then21
%add = add nsw i64 %1, 1
br label %if.end32
if.else25: ; preds = %if.then21
%sub27 = xor i64 %1, -1
br label %if.end32
if.end32: ; preds = %while.body, %if.then4, %if.then12, %if.else25, %if.then24
%ans.0 = phi i64 [ %add, %if.then24 ], [ %sub27, %if.else25 ], [ %., %if.then12 ], [ %spec.select, %if.then4 ], [ 0, %while.body ]
%add33 = add nsw i64 %.pre, %ans.0
%call34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %add33)
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #3
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %x) #3
%5 = load i32, ptr %tt, align 4, !tbaa !5
%dec = add nsw i32 %5, -1
store i32 %dec, ptr %tt, align 4, !tbaa !5
%tobool.not = icmp eq i32 %5, 0
br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !11
while.end: ; preds = %if.end32, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %tt) #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 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
|
#include <stdio.h>
int main(void) {
int x,y;
scanf("%d%d",&x,&y);
if(y%2==0&&2*x<=y&&y<=4*x){
printf("Yes");
}else{
printf("No");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213432/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213432/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:
%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
%1 = and i32 %0, 1
%cmp = icmp eq i32 %1, 0
br i1 %cmp, label %land.lhs.true, label %if.else
land.lhs.true: ; preds = %entry
%2 = load i32, ptr %x, align 4, !tbaa !5
%mul = shl nsw i32 %2, 1
%cmp1.not = icmp sgt i32 %mul, %0
%mul3 = shl nsw i32 %2, 2
%cmp4.not = icmp sgt i32 %0, %mul3
%or.cond = select i1 %cmp1.not, i1 true, i1 %cmp4.not
br i1 %or.cond, label %if.else, label %if.end
if.else: ; preds = %land.lhs.true, %entry
br label %if.end
if.end: ; preds = %land.lhs.true, %if.else
%.str.2.sink = phi ptr [ @.str.2, %if.else ], [ @.str.1, %land.lhs.true ]
%call6 = 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<stdio.h>
int main(){
int c,t,x,y;
scanf("%d%d",&x,&y);
if((y-2*x)%2!=0||(4*x-y)%2!=0||y<2*x||4*x<y)
printf("No");
else
printf("Yes");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213476/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213476/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
%1 = and i32 %0, 1
%cmp.not = icmp eq i32 %1, 0
br i1 %cmp.not, label %lor.lhs.false, label %if.end
lor.lhs.false: ; preds = %entry
%2 = load i32, ptr %x, align 4, !tbaa !5
%mul = shl nsw i32 %2, 1
%mul1 = shl nsw i32 %2, 2
%cmp7 = icmp slt i32 %0, %mul
%cmp10 = icmp slt i32 %mul1, %0
%or.cond13 = select i1 %cmp7, i1 true, i1 %cmp10
%spec.select = select i1 %or.cond13, ptr @.str.1, ptr @.str.2
br label %if.end
if.end: ; preds = %lor.lhs.false, %entry
%.str.2.sink = phi ptr [ @.str.1, %entry ], [ %spec.select, %lor.lhs.false ]
%call12 = 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 <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define SIZE 100005
#define PI acosl(-1) //3.14159265358979323846264338327950L
#define rep(i, N) for (i = 0; i < N; i++) //制御変数iを用いてN回転
#define array(N, t) (t*)calloc(N, sizeof(t)) //t型N要素の1次元配列を動的確保後0クリア(freeを忘れずに)
#define zero(a); {int iter; rep(iter, sizeof(a)/sizeof((a)[0])) (a)[iter]=0;} //1次元配列aのゼロ初期化?
typedef long long ll; typedef long double ld;
typedef struct node { int data; struct node *next; } Node;
Node *list[SIZE];
int queue[SIZE]; int q_head = 0, q_tail = 0;
void print_log(); //とりあえず文字を出力してどこまで実行できているか確認(for debug)
void printa_int(int *a, int size); //int型の1次元配列aを出力(for debug)
void printl_int(int size); //リンクリストを出力(for debug)
Node* add_node(int i, int data); void free_list(Node* head);
int queue_empty(); int queue_full();
void enqueue(int data); int dequeue();
ll* factorize(ll N); //Nを素因数分解、得られる配列は素因数,指数,素因数,…となっている(添字はintで指定する必要あり?)
void check_factorization(ll *fact); //素因数分解を表示(for debug)
int main() {
int i, X, Y;
scanf("%d %d", &X, &Y);
if (Y % 2 == 0 && Y >= 2 * X && Y <= 4 * X) printf("Yes\n");
else printf("No\n");
return 0;
}
void print_log() {
printf("=== print log ===\n");
}
void printa_int(int *a, int size) {
int i;
printf("[");
for (i = 0; i < size; i++)
printf("%d, ", a[i]);
printf("]\n");
}
void printl_int(int size) {
int i;
Node *t;
rep(i, size) {
printf("[%d] ", i);
for (t = list[i]; t; t = t->next) printf("%d, ", t->data);
printf("\n");
}
}
Node* add_node(int i, int data) {
if (!list[i]) {
list[i] = (Node*)malloc(sizeof(Node*));
list[i]->data = data;
} else {
Node *t;
t = list[i];
list[i] = (Node*)malloc(sizeof(Node*));
list[i]->data = data;
list[i]->next = t;
}
return list[i];
}
void free_list(Node* head) {
Node *prev = NULL, *t = head;
while (t) {
prev = t;
t = t->next;
free(prev);
}
}
int queue_empty() {
return q_head == q_tail;
}
int queue_full() {
return (q_head - 1) % SIZE == q_tail % SIZE;
}
void enqueue(int data) {
if (queue_full()) {
printf("full!\n");
return;
}
queue[q_tail++] = data;
q_tail %= SIZE;
}
int dequeue() {
if (queue_empty()) {
printf("empty!\n");
return -444444;
}
int data = queue[q_head++];
q_head %= SIZE;
return data;
}
ll* factorize(ll N) {
ll *res = array(((sqrt(N) + 1) * 2), ll);
ll i, x = N;
int count = 0;
for (i = 2; i * i <= N; i++) {
ll e = 0;
while (x % i == 0) {
x /= i;
e++;
}
if (e > 0) {
res[count * 2] = i;
res[count * 2 + 1] = e;
count++;
}
}
if (x > 1) {
res[count * 2] = x;
res[count * 2 + 1] = 1;
}
return res;
}
void check_factorization(ll *fact) {
int i = 1;
printf("%lld^%lld", fact[0], fact[1]);
while (fact[i * 2] > 0) {
printf(" * %lld^%lld", fact[i * 2], fact[i * 2 + 1]);
i++;
}
printf("\n");
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213519/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213519/source.c"
target datalayout = "e-m:e-p270: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 }
@q_head = dso_local local_unnamed_addr global i32 0, align 4
@q_tail = dso_local local_unnamed_addr global i32 0, align 4
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.5 = private unnamed_addr constant [5 x i8] c"%d, \00", align 1
@.str.7 = private unnamed_addr constant [6 x i8] c"[%d] \00", align 1
@list = dso_local local_unnamed_addr global [100005 x ptr] zeroinitializer, align 16
@queue = dso_local local_unnamed_addr global [100005 x i32] zeroinitializer, align 16
@.str.11 = private unnamed_addr constant [10 x i8] c"%lld^%lld\00", align 1
@.str.12 = private unnamed_addr constant [13 x i8] c" * %lld^%lld\00", align 1
@str = private unnamed_addr constant [3 x i8] c"No\00", align 1
@str.13 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
@str.14 = private unnamed_addr constant [18 x i8] c"=== print log ===\00", align 1
@str.15 = private unnamed_addr constant [2 x i8] c"]\00", align 1
@str.16 = private unnamed_addr constant [6 x i8] c"full!\00", align 1
@str.17 = private unnamed_addr constant [7 x i8] c"empty!\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) #12
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %Y) #12
%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 = and i32 %0, 1
%cmp = icmp eq i32 %1, 0
br i1 %cmp, label %land.lhs.true, label %if.else
land.lhs.true: ; preds = %entry
%2 = load i32, ptr %X, align 4, !tbaa !5
%mul = shl nsw i32 %2, 1
%cmp1.not = icmp slt i32 %0, %mul
%mul3 = shl nsw i32 %2, 2
%cmp4.not = icmp sgt i32 %0, %mul3
%or.cond = select i1 %cmp1.not, i1 true, i1 %cmp4.not
br i1 %or.cond, label %if.else, label %if.end
if.else: ; preds = %land.lhs.true, %entry
br label %if.end
if.end: ; preds = %land.lhs.true, %if.else
%str.sink = phi ptr [ @str, %if.else ], [ @str.13, %land.lhs.true ]
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %Y) #12
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %X) #12
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(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 void @print_log() local_unnamed_addr #0 {
entry:
%puts = tail call i32 @puts(ptr nonnull dereferenceable(1) @str.14)
ret void
}
; Function Attrs: nofree nounwind uwtable
define dso_local void @printa_int(ptr nocapture noundef readonly %a, i32 noundef %size) local_unnamed_addr #0 {
entry:
%putchar = tail call i32 @putchar(i32 91)
%cmp5 = icmp sgt i32 %size, 0
br i1 %cmp5, label %for.body.preheader, label %for.end
for.body.preheader: ; preds = %entry
%wide.trip.count = zext i32 %size to i64
br label %for.body
for.body: ; preds = %for.body.preheader, %for.body
%indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.body ]
%arrayidx = getelementptr inbounds i32, ptr %a, i64 %indvars.iv
%0 = load i32, ptr %arrayidx, align 4, !tbaa !5
%call1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %0)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !9
for.end: ; preds = %for.body, %entry
%puts = tail call i32 @puts(ptr nonnull dereferenceable(1) @str.15)
ret void
}
; Function Attrs: nofree nounwind uwtable
define dso_local void @printl_int(i32 noundef %size) local_unnamed_addr #0 {
entry:
%cmp15 = icmp sgt i32 %size, 0
br i1 %cmp15, label %for.body.preheader, label %for.end6
for.body.preheader: ; preds = %entry
%wide.trip.count = zext i32 %size to i64
br label %for.body
for.body: ; preds = %for.body.preheader, %for.end
%indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.end ]
%0 = trunc i64 %indvars.iv to i32
%call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %0)
%arrayidx = getelementptr inbounds [100005 x ptr], ptr @list, i64 0, i64 %indvars.iv
%t.012 = load ptr, ptr %arrayidx, align 8, !tbaa !11
%tobool.not13 = icmp eq ptr %t.012, null
br i1 %tobool.not13, label %for.end, label %for.body2
for.body2: ; preds = %for.body, %for.body2
%t.014 = phi ptr [ %t.0, %for.body2 ], [ %t.012, %for.body ]
%1 = load i32, ptr %t.014, align 8, !tbaa !13
%call3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %1)
%next = getelementptr inbounds %struct.node, ptr %t.014, i64 0, i32 1
%t.0 = load ptr, ptr %next, align 8, !tbaa !11
%tobool.not = icmp eq ptr %t.0, null
br i1 %tobool.not, label %for.end, label %for.body2, !llvm.loop !15
for.end: ; preds = %for.body2, %for.body
%putchar = tail call i32 @putchar(i32 10)
%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.end6, label %for.body, !llvm.loop !16
for.end6: ; preds = %for.end, %entry
ret void
}
; Function Attrs: mustprogress nofree nounwind willreturn memory(readwrite, argmem: none) uwtable
define dso_local ptr @add_node(i32 noundef %i, i32 noundef %data) local_unnamed_addr #3 {
entry:
%idxprom = sext i32 %i to i64
%arrayidx = getelementptr inbounds [100005 x ptr], ptr @list, i64 0, i64 %idxprom
%0 = load ptr, ptr %arrayidx, align 8, !tbaa !11
%tobool.not = icmp eq ptr %0, null
%call = tail call noalias dereferenceable_or_null(8) ptr @malloc(i64 noundef 8) #13
br i1 %tobool.not, label %if.then, label %if.else
if.then: ; preds = %entry
store i32 %data, ptr %call, align 8, !tbaa !13
br label %if.end
if.else: ; preds = %entry
%next = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 1
store ptr %0, ptr %next, align 8, !tbaa !17
br label %if.end
if.end: ; preds = %if.else, %if.then
store ptr %call, ptr %arrayidx, align 8
ret ptr %call
}
; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #4
; Function Attrs: nounwind uwtable
define dso_local void @free_list(ptr noundef %head) local_unnamed_addr #5 {
entry:
%tobool.not3 = icmp eq ptr %head, null
br i1 %tobool.not3, label %while.end, label %while.body
while.body: ; preds = %entry, %while.body
%t.04 = phi ptr [ %0, %while.body ], [ %head, %entry ]
%next = getelementptr inbounds %struct.node, ptr %t.04, i64 0, i32 1
%0 = load ptr, ptr %next, align 8, !tbaa !17
tail call void @free(ptr noundef nonnull %t.04) #12
%tobool.not = icmp eq ptr %0, null
br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !18
while.end: ; preds = %while.body, %entry
ret void
}
; 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: mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable
define dso_local i32 @queue_empty() local_unnamed_addr #7 {
entry:
%0 = load i32, ptr @q_head, align 4, !tbaa !5
%1 = load i32, ptr @q_tail, align 4, !tbaa !5
%cmp = icmp eq i32 %0, %1
%conv = zext i1 %cmp to i32
ret i32 %conv
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable
define dso_local i32 @queue_full() local_unnamed_addr #7 {
entry:
%0 = load i32, ptr @q_head, align 4, !tbaa !5
%sub = add nsw i32 %0, -1
%rem = srem i32 %sub, 100005
%1 = load i32, ptr @q_tail, align 4, !tbaa !5
%rem1 = srem i32 %1, 100005
%cmp = icmp eq i32 %rem, %rem1
%conv = zext i1 %cmp to i32
ret i32 %conv
}
; Function Attrs: nofree nounwind uwtable
define dso_local void @enqueue(i32 noundef %data) local_unnamed_addr #0 {
entry:
%0 = load i32, ptr @q_head, align 4, !tbaa !5
%sub.i = add nsw i32 %0, -1
%rem.i = srem i32 %sub.i, 100005
%1 = load i32, ptr @q_tail, align 4, !tbaa !5
%rem1.i = srem i32 %1, 100005
%cmp.i.not = icmp eq i32 %rem.i, %rem1.i
br i1 %cmp.i.not, label %if.then, label %if.end
if.then: ; preds = %entry
%puts = tail call i32 @puts(ptr nonnull dereferenceable(1) @str.16)
br label %return
if.end: ; preds = %entry
%inc = add nsw i32 %1, 1
%idxprom = sext i32 %1 to i64
%arrayidx = getelementptr inbounds [100005 x i32], ptr @queue, i64 0, i64 %idxprom
store i32 %data, ptr %arrayidx, align 4, !tbaa !5
%rem = srem i32 %inc, 100005
store i32 %rem, ptr @q_tail, align 4, !tbaa !5
br label %return
return: ; preds = %if.end, %if.then
ret void
}
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @dequeue() local_unnamed_addr #0 {
entry:
%0 = load i32, ptr @q_head, align 4, !tbaa !5
%1 = load i32, ptr @q_tail, align 4, !tbaa !5
%cmp.i.not = icmp eq i32 %0, %1
br i1 %cmp.i.not, label %if.then, label %if.end
if.then: ; preds = %entry
%puts = tail call i32 @puts(ptr nonnull dereferenceable(1) @str.17)
br label %return
if.end: ; preds = %entry
%inc = add nsw i32 %0, 1
%idxprom = sext i32 %0 to i64
%arrayidx = getelementptr inbounds [100005 x i32], ptr @queue, i64 0, i64 %idxprom
%2 = load i32, ptr %arrayidx, align 4, !tbaa !5
%rem = srem i32 %inc, 100005
store i32 %rem, ptr @q_head, align 4, !tbaa !5
br label %return
return: ; preds = %if.end, %if.then
%retval.0 = phi i32 [ -444444, %if.then ], [ %2, %if.end ]
ret i32 %retval.0
}
; Function Attrs: nofree nounwind memory(write, inaccessiblemem: readwrite) uwtable
define dso_local noalias ptr @factorize(i64 noundef %N) local_unnamed_addr #8 {
entry:
%conv = sitofp i64 %N to double
%call = tail call double @sqrt(double noundef %conv) #12
%add = fadd double %call, 1.000000e+00
%mul = fmul double %add, 2.000000e+00
%conv1 = fptoui double %mul to i64
%call2 = tail call noalias ptr @calloc(i64 noundef %conv1, i64 noundef 8) #14
%cmp.not52 = icmp slt i64 %N, 4
br i1 %cmp.not52, label %for.end, label %while.cond.preheader
while.cond.preheader: ; preds = %entry, %if.end
%count.055 = phi i32 [ %count.1, %if.end ], [ 0, %entry ]
%x.054 = phi i64 [ %x.1.lcssa61, %if.end ], [ %N, %entry ]
%i.053 = phi i64 [ %inc15, %if.end ], [ 2, %entry ]
%rem47 = srem i64 %x.054, %i.053
%cmp548 = icmp eq i64 %rem47, 0
br i1 %cmp548, label %while.body, label %if.end
while.body: ; preds = %while.cond.preheader, %while.body
%e.050 = phi i64 [ %inc, %while.body ], [ 0, %while.cond.preheader ]
%x.149 = phi i64 [ %div, %while.body ], [ %x.054, %while.cond.preheader ]
%div = sdiv i64 %x.149, %i.053
%inc = add nuw nsw i64 %e.050, 1
%rem = srem i64 %div, %i.053
%cmp5 = icmp eq i64 %rem, 0
br i1 %cmp5, label %while.body, label %if.then, !llvm.loop !19
if.then: ; preds = %while.body
%mul9 = shl nsw i32 %count.055, 1
%idxprom = sext i32 %mul9 to i64
%arrayidx = getelementptr inbounds i64, ptr %call2, i64 %idxprom
store i64 %i.053, ptr %arrayidx, align 8, !tbaa !20
%add11 = or i32 %mul9, 1
%idxprom12 = sext i32 %add11 to i64
%arrayidx13 = getelementptr inbounds i64, ptr %call2, i64 %idxprom12
store i64 %inc, ptr %arrayidx13, align 8, !tbaa !20
%inc14 = add nsw i32 %count.055, 1
br label %if.end
if.end: ; preds = %while.cond.preheader, %if.then
%x.1.lcssa61 = phi i64 [ %div, %if.then ], [ %x.054, %while.cond.preheader ]
%count.1 = phi i32 [ %inc14, %if.then ], [ %count.055, %while.cond.preheader ]
%inc15 = add nuw nsw i64 %i.053, 1
%mul3 = mul nsw i64 %inc15, %inc15
%cmp.not = icmp sgt i64 %mul3, %N
br i1 %cmp.not, label %for.end.loopexit, label %while.cond.preheader, !llvm.loop !22
for.end.loopexit: ; preds = %if.end
%0 = shl nsw i32 %count.1, 1
br label %for.end
for.end: ; preds = %for.end.loopexit, %entry
%x.0.lcssa = phi i64 [ %N, %entry ], [ %x.1.lcssa61, %for.end.loopexit ]
%count.0.lcssa = phi i32 [ 0, %entry ], [ %0, %for.end.loopexit ]
%cmp16 = icmp sgt i64 %x.0.lcssa, 1
br i1 %cmp16, label %if.then18, label %if.end26
if.then18: ; preds = %for.end
%idxprom20 = sext i32 %count.0.lcssa to i64
%arrayidx21 = getelementptr inbounds i64, ptr %call2, i64 %idxprom20
store i64 %x.0.lcssa, ptr %arrayidx21, align 8, !tbaa !20
%add23 = or i32 %count.0.lcssa, 1
%idxprom24 = sext i32 %add23 to i64
%arrayidx25 = getelementptr inbounds i64, ptr %call2, i64 %idxprom24
store i64 1, ptr %arrayidx25, align 8, !tbaa !20
br label %if.end26
if.end26: ; preds = %if.then18, %for.end
ret ptr %call2
}
; 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 #9
; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #10
; Function Attrs: nofree nounwind uwtable
define dso_local void @check_factorization(ptr nocapture noundef readonly %fact) local_unnamed_addr #0 {
entry:
%0 = load i64, ptr %fact, align 8, !tbaa !20
%arrayidx1 = getelementptr inbounds i64, ptr %fact, i64 1
%1 = load i64, ptr %arrayidx1, align 8, !tbaa !20
%call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i64 noundef %0, i64 noundef %1)
%arrayidx218 = getelementptr inbounds i64, ptr %fact, i64 2
%2 = load i64, ptr %arrayidx218, align 8, !tbaa !20
%cmp19 = icmp sgt i64 %2, 0
br i1 %cmp19, label %while.body, label %while.end
while.body: ; preds = %entry, %while.body
%indvars.iv = phi i64 [ %indvars.iv.next, %while.body ], [ 1, %entry ]
%3 = phi i64 [ %6, %while.body ], [ %2, %entry ]
%mul21 = phi i32 [ %mul, %while.body ], [ 2, %entry ]
%add = or i32 %mul21, 1
%idxprom7 = zext i32 %add to i64
%arrayidx8 = getelementptr inbounds i64, ptr %fact, i64 %idxprom7
%4 = load i64, ptr %arrayidx8, align 8, !tbaa !20
%call9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, i64 noundef %3, i64 noundef %4)
%indvars.iv.next = add nuw i64 %indvars.iv, 1
%5 = trunc i64 %indvars.iv.next to i32
%mul = shl nuw nsw i32 %5, 1
%idxprom = zext i32 %mul to i64
%arrayidx2 = getelementptr inbounds i64, ptr %fact, i64 %idxprom
%6 = load i64, ptr %arrayidx2, align 8, !tbaa !20
%cmp = icmp sgt i64 %6, 0
br i1 %cmp, label %while.body, label %while.end, !llvm.loop !23
while.end: ; preds = %while.body, %entry
%putchar = tail call i32 @putchar(i32 10)
ret void
}
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #11
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #11
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(readwrite, argmem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-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 = { mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nofree nounwind memory(write, 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 #9 = { 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 #10 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #11 = { nofree nounwind }
attributes #12 = { nounwind }
attributes #13 = { nounwind allocsize(0) }
attributes #14 = { nounwind allocsize(0,1) }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"node", !6, i64 0, !12, i64 8}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = !{!14, !12, i64 8}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = !{!21, !21, i64 0}
!21 = !{!"long long", !7, i64 0}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
|
#include<stdio.h>
signed main(){
int X,Y;
scanf("%d %d",&X,&Y);
if(X*2<=Y && Y<=X*4 && Y%2==0){
printf("Yes\n");
}else{
printf("No\n");
}
return(0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213562/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213562/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %Y) #4
%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
%mul = shl nsw i32 %0, 1
%1 = load i32, ptr %Y, align 4, !tbaa !5
%cmp.not = icmp sle i32 %mul, %1
%mul1 = shl nsw i32 %0, 2
%cmp2.not = icmp sle i32 %1, %mul1
%or.cond.not9 = select i1 %cmp.not, i1 %cmp2.not, i1 false
%2 = and i32 %1, 1
%cmp4 = icmp eq i32 %2, 0
%or.cond8 = and i1 %or.cond.not9, %cmp4
%str.3.str = select i1 %or.cond8, 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 %Y) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %X) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
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 x, y;
scanf("%d %d",&x,&y);
if(y%2==1){
printf("No");
}else if((y<2*x)||(4*x<y)){
printf("No");
}else{
printf("Yes");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213605/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213605/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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"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
%1 = and i32 %0, -2147483647
%cmp = icmp eq i32 %1, 1
br i1 %cmp, label %if.end9, label %if.else
if.else: ; preds = %entry
%2 = load i32, ptr %x, align 4, !tbaa !5
%mul = shl nsw i32 %2, 1
%cmp2 = icmp slt i32 %0, %mul
%mul3 = shl nsw i32 %2, 2
%cmp4 = icmp slt i32 %mul3, %0
%or.cond = select i1 %cmp2, i1 true, i1 %cmp4
%.str.1..str.2 = select i1 %or.cond, ptr @.str.1, ptr @.str.2
br label %if.end9
if.end9: ; preds = %if.else, %entry
%.str.1.sink = phi ptr [ @.str.1, %entry ], [ %.str.1..str.2, %if.else ]
%call6 = 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"}
|
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
int max(int a,int b){return a>b?a:b;}
int min(int a,int b){return a<b?a:b;}
int main(void)
{
int x, y,f=0;
scanf("%d %d",&x,&y);
for(int i=0;i<=x;i++)
{
if(y==2*(x-i)+4*i)
{
printf("Yes");
f=1;
break;
}
}
if(f==0)
printf("No");
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213649/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213649/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 i32 @max(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 {
entry:
%cond = tail call i32 @llvm.smax.i32(i32 %a, i32 %b)
ret i32 %cond
}
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
define dso_local i32 @min(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 {
entry:
%cond = tail call i32 @llvm.smin.i32(i32 %a, i32 %b)
ret i32 %cond
}
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #1 {
entry:
%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.not11 = icmp slt i32 %0, 0
br i1 %cmp.not11, label %if.end7, 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.012, 1
%exitcond.not = icmp eq i32 %i.012, %0
br i1 %exitcond.not, label %if.end7, label %for.body, !llvm.loop !9
for.body: ; preds = %for.body.lr.ph, %for.cond
%i.012 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.cond ]
%sub = sub nsw i32 %0, %i.012
%mul = shl nsw i32 %sub, 1
%mul1 = shl nsw i32 %i.012, 2
%add = add nsw i32 %mul, %mul1
%cmp2 = icmp eq i32 %1, %add
br i1 %cmp2, label %if.end7, label %for.cond
if.end7: ; 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) #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 i32 @llvm.smax.i32(i32, i32) #4
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #4
attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
|
#include"stdio.h"
int main(void)
{
unsigned int X,Y,ans;
//input
scanf("%d %d",&X,&Y);
//check&output
if(Y%2 != 0||Y-2*X>2*X)
{
printf("No");
}else{
printf("Yes");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213692/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213692/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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"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
%rem = and i32 %0, 1
%cmp.not = icmp eq i32 %rem, 0
br i1 %cmp.not, label %lor.lhs.false, label %if.end
lor.lhs.false: ; preds = %entry
%1 = load i32, ptr %X, align 4, !tbaa !5
%mul = shl i32 %1, 1
%sub = sub i32 %0, %mul
%cmp2 = icmp ugt i32 %sub, %mul
%spec.select = select i1 %cmp2, ptr @.str.1, ptr @.str.2
br label %if.end
if.end: ; preds = %lor.lhs.false, %entry
%.str.2.sink = phi ptr [ @.str.1, %entry ], [ %spec.select, %lor.lhs.false ]
%call4 = 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 <stdio.h>
int main() {
int x, y, i;
scanf("%d %d", &x, &y);
for (i = 0; i <= x; i++) {
if ((i * 2 + (x - i) * 4) == y) {
printf("Yes");
return (0);
}
}
printf("No");
return (0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213742/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213742/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %cleanup, 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 %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 ], [ %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 %cleanup, label %for.cond
cleanup: ; preds = %for.cond, %for.body, %entry
%.str.2.sink = phi ptr [ @.str.2, %entry ], [ @.str.1, %for.body ], [ @.str.2, %for.cond ]
%call4 = 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"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
|
#include<stdio.h>
int main(void)
{
int a, b,x,y;
int i;
char s[4], t[20];
scanf("%d %d", &x, &y);
for(int i=0;i<=x;i++)
if (i * 4 + (x - i) * 2 == y) {
printf("Yes");
return 0;
}
printf("No");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213786/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213786/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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.not16 = icmp slt i32 %0, 0
br i1 %cmp.not16, label %cleanup6, 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 %i1.017, 1
%exitcond.not = icmp eq i32 %i1.017, %0
br i1 %exitcond.not, label %cleanup6, label %for.body, !llvm.loop !9
for.body: ; preds = %for.body.lr.ph, %for.cond
%i1.017 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.cond ]
%mul = shl nsw i32 %i1.017, 2
%sub = sub nsw i32 %0, %i1.017
%mul2 = shl nsw i32 %sub, 1
%add = add nsw i32 %mul2, %mul
%cmp3 = icmp eq i32 %add, %1
br i1 %cmp3, label %cleanup6, label %for.cond
cleanup6: ; preds = %for.cond, %for.body, %entry
%.str.1.sink = phi ptr [ @.str.2, %entry ], [ @.str.1, %for.body ], [ @.str.2, %for.cond ]
%call4 = 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(void){
char s;
scanf("%c", &s);
//printf("%c\n", s);
if(s == 'S'){
printf("Cloudy\n");
}else if(s == 'C'){
printf("Rainy\n");
}else if(s == 'R'){
printf("Sunny\n");
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213836/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213836/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 = 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 i8, align 1
call void @llvm.lifetime.start.p0(i64 1, 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.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.4.sink = phi ptr [ @str.4, %if.then6 ], [ @str, %if.then12 ], [ @str.5, %entry ]
%puts16 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
br label %if.end15
if.end15: ; preds = %if.end15.sink.split, %entry
call void @llvm.lifetime.end.p0(i64 1, 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>
char pwd[20000];
int pwdlen=1;
char option[400];
void parse()
{
int cur;
for (cur=0;option[cur]!=0;cur++)
{
if (option[cur]=='.')
{
cur+=2;
if (option[cur]==0) { cur--; }
pwdlen--;
while (pwd[pwdlen-1]!='/') { pwdlen--; }
continue;
}
pwd[pwdlen++]=option[cur];
}
if (pwd[pwdlen-1]!='/') { pwd[pwdlen++]='/'; }
pwd[pwdlen]=0;
}
int main()
{
int n;
int i;
char cmd[20];
pwd[0]='/';
pwd[1]=0;
scanf("%d",&n);
for (i=0;i<n;i++)
{
scanf("%s",cmd);
if (!strcmp(cmd,"pwd"))
{
printf("%s\n",pwd);
continue;
}
scanf("%s",option);
if (option[0]=='/') { pwdlen=0; }
parse();
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21388/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21388/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@pwdlen = dso_local local_unnamed_addr global i32 1, align 4
@option = dso_local global [400 x i8] zeroinitializer, align 16
@pwd = dso_local global [20000 x i8] 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
; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable
define dso_local void @parse() local_unnamed_addr #0 {
entry:
%pwdlen.promoted = load i32, ptr @pwdlen, align 4, !tbaa !5
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%0 = phi i32 [ %pwdlen.promoted, %entry ], [ %storemerge.lcssa46, %for.inc ]
%cur.0 = phi i32 [ 0, %entry ], [ %inc25, %for.inc ]
%idxprom = sext i32 %cur.0 to i64
%arrayidx = getelementptr inbounds [400 x i8], ptr @option, i64 0, i64 %idxprom
%1 = load i8, ptr %arrayidx, align 1, !tbaa !9
switch i8 %1, label %if.end20 [
i8 0, label %for.end
i8 46, label %if.then
]
if.then: ; preds = %for.cond
%add = add nsw i32 %cur.0, 2
%idxprom7 = sext i32 %add to i64
%arrayidx8 = getelementptr inbounds [400 x i8], ptr @option, i64 0, i64 %idxprom7
%2 = load i8, ptr %arrayidx8, align 1, !tbaa !9
%dec = add nsw i32 %cur.0, 1
%3 = sext i32 %0 to i64
br label %while.cond
while.cond: ; preds = %while.cond, %if.then
%indvars.iv = phi i64 [ %indvars.iv.next, %while.cond ], [ %3, %if.then ]
%indvars.iv.next = add i64 %indvars.iv, -1
%4 = add nsw i64 %indvars.iv, -2
%arrayidx15 = getelementptr inbounds [20000 x i8], ptr @pwd, i64 0, i64 %4
%5 = load i8, ptr %arrayidx15, align 1, !tbaa !9
%cmp17.not = icmp eq i8 %5, 47
br i1 %cmp17.not, label %for.inc.loopexit, label %while.cond, !llvm.loop !10
if.end20: ; preds = %for.cond
%inc = add nsw i32 %0, 1
store i32 %inc, ptr @pwdlen, align 4, !tbaa !5
%idxprom23 = sext i32 %0 to i64
%arrayidx24 = getelementptr inbounds [20000 x i8], ptr @pwd, i64 0, i64 %idxprom23
store i8 %1, ptr %arrayidx24, align 1, !tbaa !9
br label %for.inc
for.inc.loopexit: ; preds = %while.cond
%cmp10 = icmp eq i8 %2, 0
%spec.select = select i1 %cmp10, i32 %dec, i32 %add
%6 = trunc i64 %indvars.iv.next to i32
store i32 %6, ptr @pwdlen, align 4, !tbaa !5
br label %for.inc
for.inc: ; preds = %for.inc.loopexit, %if.end20
%storemerge.lcssa46 = phi i32 [ %inc, %if.end20 ], [ %6, %for.inc.loopexit ]
%cur.2 = phi i32 [ %cur.0, %if.end20 ], [ %spec.select, %for.inc.loopexit ]
%inc25 = add nsw i32 %cur.2, 1
br label %for.cond, !llvm.loop !12
for.end: ; preds = %for.cond
%sub26 = add nsw i32 %0, -1
%idxprom27 = sext i32 %sub26 to i64
%arrayidx28 = getelementptr inbounds [20000 x i8], ptr @pwd, i64 0, i64 %idxprom27
%7 = load i8, ptr %arrayidx28, align 1, !tbaa !9
%cmp30.not = icmp eq i8 %7, 47
br i1 %cmp30.not, label %if.end36, label %if.then32
if.then32: ; preds = %for.end
%inc33 = add nsw i32 %0, 1
store i32 %inc33, ptr @pwdlen, align 4, !tbaa !5
%idxprom34 = sext i32 %0 to i64
%arrayidx35 = getelementptr inbounds [20000 x i8], ptr @pwd, i64 0, i64 %idxprom34
store i8 47, ptr %arrayidx35, align 1, !tbaa !9
br label %if.end36
if.end36: ; preds = %if.then32, %for.end
%8 = phi i32 [ %inc33, %if.then32 ], [ %0, %for.end ]
%idxprom37 = sext i32 %8 to i64
%arrayidx38 = getelementptr inbounds [20000 x i8], ptr @pwd, i64 0, i64 %idxprom37
store i8 0, ptr %arrayidx38, align 1, !tbaa !9
ret void
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #2 {
entry:
%n = alloca i32, align 4
%cmd = alloca [20 x i8], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5
call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %cmd) #5
store i8 47, ptr @pwd, align 16, !tbaa !9
store i8 0, ptr getelementptr inbounds ([20000 x i8], ptr @pwd, i64 0, i64 1), align 1, !tbaa !9
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp12 = icmp sgt i32 %0, 0
br i1 %cmp12, label %for.body, label %for.end
for.body: ; preds = %entry, %for.inc
%i.013 = phi i32 [ %inc, %for.inc ], [ 0, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %cmd)
%lhsv = load i32, ptr %cmd, align 16
%.not = icmp eq i32 %lhsv, 6584176
br i1 %.not, label %if.then, label %if.end
if.then: ; preds = %for.body
%puts = call i32 @puts(ptr nonnull dereferenceable(1) @pwd)
br label %for.inc
if.end: ; preds = %for.body
%call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @option)
%1 = load i8, ptr @option, align 16, !tbaa !9
%cmp6 = icmp eq i8 %1, 47
br i1 %cmp6, label %if.then8, label %if.end.if.end9_crit_edge
if.end.if.end9_crit_edge: ; preds = %if.end
%pwdlen.promoted.i.pre = load i32, ptr @pwdlen, align 4, !tbaa !5
br label %for.cond.i.preheader
if.then8: ; preds = %if.end
store i32 0, ptr @pwdlen, align 4, !tbaa !5
br label %for.cond.i.preheader
for.cond.i.preheader: ; preds = %if.end.if.end9_crit_edge, %if.then8
%.ph = phi i32 [ 0, %if.then8 ], [ %pwdlen.promoted.i.pre, %if.end.if.end9_crit_edge ]
br label %for.cond.i
for.cond.i: ; preds = %for.cond.i.preheader, %for.inc.i
%2 = phi i8 [ %.pre, %for.inc.i ], [ %1, %for.cond.i.preheader ]
%3 = phi i32 [ %storemerge.lcssa46.i, %for.inc.i ], [ %.ph, %for.cond.i.preheader ]
%cur.0.i = phi i32 [ %inc25.i, %for.inc.i ], [ 0, %for.cond.i.preheader ]
switch i8 %2, label %if.end20.i [
i8 0, label %for.end.i
i8 46, label %if.then.i
]
if.then.i: ; preds = %for.cond.i
%add.i = add nsw i32 %cur.0.i, 2
%idxprom7.i = sext i32 %add.i to i64
%arrayidx8.i = getelementptr inbounds [400 x i8], ptr @option, i64 0, i64 %idxprom7.i
%4 = load i8, ptr %arrayidx8.i, align 1, !tbaa !9
%5 = sext i32 %3 to i64
br label %while.cond.i
while.cond.i: ; preds = %while.cond.i, %if.then.i
%indvars.iv.i = phi i64 [ %indvars.iv.next.i, %while.cond.i ], [ %5, %if.then.i ]
%indvars.iv.next.i = add i64 %indvars.iv.i, -1
%6 = add nsw i64 %indvars.iv.i, -2
%arrayidx15.i = getelementptr inbounds [20000 x i8], ptr @pwd, i64 0, i64 %6
%7 = load i8, ptr %arrayidx15.i, align 1, !tbaa !9
%cmp17.not.i = icmp eq i8 %7, 47
br i1 %cmp17.not.i, label %for.inc.loopexit.i, label %while.cond.i, !llvm.loop !10
if.end20.i: ; preds = %for.cond.i
%inc.i = add nsw i32 %3, 1
store i32 %inc.i, ptr @pwdlen, align 4, !tbaa !5
%idxprom23.i = sext i32 %3 to i64
%arrayidx24.i = getelementptr inbounds [20000 x i8], ptr @pwd, i64 0, i64 %idxprom23.i
store i8 %2, ptr %arrayidx24.i, align 1, !tbaa !9
br label %for.inc.i
for.inc.loopexit.i: ; preds = %while.cond.i
%dec.i = add nsw i32 %cur.0.i, 1
%cmp10.i = icmp eq i8 %4, 0
%spec.select.i = select i1 %cmp10.i, i32 %dec.i, i32 %add.i
%8 = trunc i64 %indvars.iv.next.i to i32
store i32 %8, ptr @pwdlen, align 4, !tbaa !5
br label %for.inc.i
for.inc.i: ; preds = %for.inc.loopexit.i, %if.end20.i
%storemerge.lcssa46.i = phi i32 [ %inc.i, %if.end20.i ], [ %8, %for.inc.loopexit.i ]
%cur.2.i = phi i32 [ %cur.0.i, %if.end20.i ], [ %spec.select.i, %for.inc.loopexit.i ]
%inc25.i = add nsw i32 %cur.2.i, 1
%idxprom.i.phi.trans.insert = sext i32 %inc25.i to i64
%arrayidx.i.phi.trans.insert = getelementptr inbounds [400 x i8], ptr @option, i64 0, i64 %idxprom.i.phi.trans.insert
%.pre = load i8, ptr %arrayidx.i.phi.trans.insert, align 1, !tbaa !9
br label %for.cond.i, !llvm.loop !12
for.end.i: ; preds = %for.cond.i
%sub26.i = add nsw i32 %3, -1
%idxprom27.i = sext i32 %sub26.i to i64
%arrayidx28.i = getelementptr inbounds [20000 x i8], ptr @pwd, i64 0, i64 %idxprom27.i
%9 = load i8, ptr %arrayidx28.i, align 1, !tbaa !9
%cmp30.not.i = icmp eq i8 %9, 47
br i1 %cmp30.not.i, label %parse.exit, label %if.then32.i
if.then32.i: ; preds = %for.end.i
%inc33.i = add nsw i32 %3, 1
store i32 %inc33.i, ptr @pwdlen, align 4, !tbaa !5
%idxprom34.i = sext i32 %3 to i64
%arrayidx35.i = getelementptr inbounds [20000 x i8], ptr @pwd, i64 0, i64 %idxprom34.i
store i8 47, ptr %arrayidx35.i, align 1, !tbaa !9
br label %parse.exit
parse.exit: ; preds = %for.end.i, %if.then32.i
%10 = phi i32 [ %inc33.i, %if.then32.i ], [ %3, %for.end.i ]
%idxprom37.i = sext i32 %10 to i64
%arrayidx38.i = getelementptr inbounds [20000 x i8], ptr @pwd, i64 0, i64 %idxprom37.i
store i8 0, ptr %arrayidx38.i, align 1, !tbaa !9
br label %for.inc
for.inc: ; preds = %parse.exit, %if.then
%inc = add nuw nsw i32 %i.013, 1
%11 = load i32, ptr %n, align 4, !tbaa !5
%cmp = icmp slt i32 %inc, %11
br i1 %cmp, label %for.body, label %for.end, !llvm.loop !13
for.end: ; preds = %for.inc, %entry
call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %cmd) #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 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4
attributes #0 = { nofree norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
|
#include<stdio.h>
int main(void){
char s[6];
scanf("%s",&s);
if(s[0]=='S')printf("Cloudy\n");
if(s[0]=='C')printf("Rainy\n");
if(s[0]=='R')printf("Sunny\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213995/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213995/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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.4 = private unnamed_addr constant [6 x i8] c"Rainy\00", align 1
@str.5 = 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 [6 x i8], align 1
call void @llvm.lifetime.start.p0(i64 6, 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
%cmp = icmp eq i8 %0, 83
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%puts = call i32 @puts(ptr nonnull dereferenceable(1) @str)
%.pr = load i8, ptr %s, align 1, !tbaa !5
br label %if.end
if.end: ; preds = %if.then, %entry
%1 = phi i8 [ %.pr, %if.then ], [ %0, %entry ]
%cmp5 = icmp eq i8 %1, 67
br i1 %cmp5, label %if.then7, label %if.end9
if.then7: ; preds = %if.end
%puts17 = call i32 @puts(ptr nonnull dereferenceable(1) @str.4)
%.pre = load i8, ptr %s, align 1, !tbaa !5
br label %if.end9
if.end9: ; preds = %if.then7, %if.end
%2 = phi i8 [ %.pre, %if.then7 ], [ %1, %if.end ]
%cmp12 = icmp eq i8 %2, 82
br i1 %cmp12, label %if.then14, label %if.end16
if.then14: ; preds = %if.end9
%puts18 = call i32 @puts(ptr nonnull dereferenceable(1) @str.5)
br label %if.end16
if.end16: ; preds = %if.then14, %if.end9
call void @llvm.lifetime.end.p0(i64 6, 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>
int main(void) {
char s[9];
scanf("%s",s);
if(s[0]=='S'){
printf("Cloudy");
}
if(s[0]=='C'){
printf("Rainy");
}
if(s[0]=='R'){
printf("Sunny");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214037/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214037/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [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 [9 x i8], align 1
call void @llvm.lifetime.start.p0(i64 9, 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
%cmp = icmp eq i8 %0, 83
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
%.pr = load i8, ptr %s, align 1, !tbaa !5
br label %if.end
if.end: ; preds = %if.then, %entry
%1 = phi i8 [ %.pr, %if.then ], [ %0, %entry ]
%cmp5 = icmp eq i8 %1, 67
br i1 %cmp5, label %if.then7, label %if.end9
if.then7: ; preds = %if.end
%call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
%.pre = load i8, ptr %s, align 1, !tbaa !5
br label %if.end9
if.end9: ; preds = %if.then7, %if.end
%2 = phi i8 [ %.pre, %if.then7 ], [ %1, %if.end ]
%cmp12 = icmp eq i8 %2, 82
br i1 %cmp12, label %if.then14, label %if.end16
if.then14: ; preds = %if.end9
%call15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
br label %if.end16
if.end16: ; preds = %if.then14, %if.end9
call void @llvm.lifetime.end.p0(i64 9, 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>
int main(void)
{
char S[10];
scanf("%s", &S);
if(S[0] == 'S'){printf("Cloudy\n");}
if(S[0] == 'C'){printf("Rainy\n");}
if(S[0] == 'R'){printf("Sunny\n");}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214088/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214088/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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.4 = private unnamed_addr constant [6 x i8] c"Rainy\00", align 1
@str.5 = 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 [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
%cmp = icmp eq i8 %0, 83
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%puts = call i32 @puts(ptr nonnull dereferenceable(1) @str)
%.pr = load i8, ptr %S, align 1, !tbaa !5
br label %if.end
if.end: ; preds = %if.then, %entry
%1 = phi i8 [ %.pr, %if.then ], [ %0, %entry ]
%cmp5 = icmp eq i8 %1, 67
br i1 %cmp5, label %if.then7, label %if.end9
if.then7: ; preds = %if.end
%puts17 = call i32 @puts(ptr nonnull dereferenceable(1) @str.4)
%.pre = load i8, ptr %S, align 1, !tbaa !5
br label %if.end9
if.end9: ; preds = %if.then7, %if.end
%2 = phi i8 [ %.pre, %if.then7 ], [ %1, %if.end ]
%cmp12 = icmp eq i8 %2, 82
br i1 %cmp12, label %if.then14, label %if.end16
if.then14: ; preds = %if.end9
%puts18 = call i32 @puts(ptr nonnull dereferenceable(1) @str.5)
br label %if.end16
if.end16: ; preds = %if.then14, %if.end9
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 weather[10];
scanf("%s", weather);
if ( !strcmp(weather, "Sunny") ) {
printf("Cloudy\n");
} else if ( !strcmp(weather, "Cloudy") ) {
printf("Rainy\n");
} else {
printf("Sunny\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214138/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214138/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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.6 = private unnamed_addr constant [6 x i8] c"Rainy\00", align 1
@str.7 = 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:
%weather = alloca [10 x i8], align 1
call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %weather) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %weather)
%bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(6) %weather, ptr noundef nonnull dereferenceable(6) @str.7, i64 6)
%tobool.not = icmp eq i32 %bcmp, 0
br i1 %tobool.not, label %if.end11, label %if.else
if.else: ; preds = %entry
%bcmp12 = call i32 @bcmp(ptr noundef nonnull dereferenceable(7) %weather, ptr noundef nonnull dereferenceable(7) @str, i64 7)
%tobool6.not = icmp eq i32 %bcmp12, 0
%str.6.str.7 = select i1 %tobool6.not, ptr @str.6, ptr @str.7
br label %if.end11
if.end11: ; preds = %if.else, %entry
%str.6.sink = phi ptr [ @str, %entry ], [ %str.6.str.7, %if.else ]
%puts13 = call i32 @puts(ptr nonnull dereferenceable(1) %str.6.sink)
call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %weather) #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>
#include<string.h>
#include<stdlib.h>
#include<math.h>
long long cmpfunc (const void * a, const void * b) {
return ( *(long long*)a - *(long long*)b );
}
int main(void){
long long int test,i,j,n,count,flag=0,o1=0,o2=0,b1,x,m,l,max,sum2,min,f,c,r,o,sum1,sum=0,y,b,count1=0,a2,b2;
char a[100];
scanf("%s",a);
if((strcmp(a,"Sunny"))==0){
printf("Cloudy");
}else{
if((strcmp(a,"Cloudy"))==0){
printf("Rainy");
}else{
printf("Sunny");
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214181/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214181/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i64 @cmpfunc(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 {
entry:
%0 = load i64, ptr %a, align 8, !tbaa !5
%1 = load i64, ptr %b, align 8, !tbaa !5
%sub = sub nsw i64 %0, %1
ret i64 %sub
}
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #1 {
entry:
%a = alloca [100 x i8], align 16
call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %a) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(6) %a, ptr noundef nonnull dereferenceable(6) @.str.1, i64 6)
%cmp = icmp eq i32 %bcmp, 0
br i1 %cmp, label %if.end11, label %if.else
if.else: ; preds = %entry
%bcmp12 = call i32 @bcmp(ptr noundef nonnull dereferenceable(7) %a, ptr noundef nonnull dereferenceable(7) @.str.2, i64 7)
%cmp6 = icmp eq i32 %bcmp12, 0
%.str.3..str.1 = select i1 %cmp6, ptr @.str.3, ptr @.str.1
br label %if.end11
if.end11: ; preds = %if.else, %entry
%.str.3.sink = phi ptr [ @.str.2, %entry ], [ %.str.3..str.1, %if.else ]
%call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink)
call void @llvm.lifetime.end.p0(i64 100, 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) #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: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #4
attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main()
{
char s[6];
scanf("%s",s);
// 出力
if(s[0] == 'S'){
printf("Cloudy");
}else if(s[0] == 'C'){
printf("Rainy");
}else if(s[0] == 'R'){
printf("Sunny");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214231/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214231/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [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 [6 x i8], align 1
call void @llvm.lifetime.start.p0(i64 6, 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 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.2.sink = phi ptr [ @.str.2, %if.then7 ], [ @.str.3, %if.then14 ], [ @.str.1, %entry ]
%call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink)
br label %if.end17
if.end17: ; preds = %if.end17.sink.split, %entry
call void @llvm.lifetime.end.p0(i64 6, 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>
#define SZ 100001
int s[SZ],grp[5];
int main(void)
{
long int n,i,count=0,x;
scanf("%ld",&n);
for(i=1; i<=n; i++)
{
scanf("%d",&s[i]);
grp[s[i]]++;
}
count += grp[4];
if(grp[3]<=grp[1])
{
count += grp[3];
grp[1] -= grp[3];
grp[3] = 0;
}
else
{
count += grp[1];
count += (grp[3]-grp[1]);
grp[3] -= grp[1];
grp[1] = 0;
}
x = grp[2]/2;
count += x;
grp[2] = grp[2] - x*2;
if(grp[2]>0)
{
count++;
grp[1] -= 2;
if(grp[1]>0)
{
count += grp[1]/4;
if(grp[1]%4 != 0)
count++;
}
}
else
{
if(grp[1]>0)
{
count += grp[1]/4;
if(grp[1]%4 != 0)
count++;
}
}
printf("%ld\n",count);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21429/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21429/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [4 x i8] c"%ld\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@s = dso_local global [100001 x i32] zeroinitializer, align 16
@grp = dso_local local_unnamed_addr global [5 x i32] zeroinitializer, align 16
@.str.2 = private unnamed_addr constant [5 x i8] c"%ld\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i64, align 8
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i64, ptr %n, align 8, !tbaa !5
%cmp.not73 = icmp slt i64 %0, 1
br i1 %cmp.not73, label %for.end, label %for.body
for.body: ; preds = %entry, %for.body
%i.074 = phi i64 [ %inc4, %for.body ], [ 1, %entry ]
%arrayidx = getelementptr inbounds [100001 x i32], ptr @s, i64 0, i64 %i.074
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx)
%1 = load i32, ptr %arrayidx, align 4, !tbaa !9
%idxprom = sext i32 %1 to i64
%arrayidx3 = getelementptr inbounds [5 x i32], ptr @grp, i64 0, i64 %idxprom
%2 = load i32, ptr %arrayidx3, align 4, !tbaa !9
%inc = add nsw i32 %2, 1
store i32 %inc, ptr %arrayidx3, align 4, !tbaa !9
%inc4 = add nuw nsw i64 %i.074, 1
%3 = load i64, ptr %n, align 8, !tbaa !5
%cmp.not.not = icmp slt i64 %i.074, %3
br i1 %cmp.not.not, label %for.body, label %for.end, !llvm.loop !11
for.end: ; preds = %for.body, %entry
%4 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @grp, i64 0, i64 4), align 16, !tbaa !9
%conv = sext i32 %4 to i64
%5 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @grp, i64 0, i64 3), align 4, !tbaa !9
%6 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @grp, i64 0, i64 1), align 4, !tbaa !9
%cmp5.not = icmp sgt i32 %5, %6
br i1 %cmp5.not, label %if.else, label %if.then
if.then: ; preds = %for.end
%conv7 = sext i32 %5 to i64
%add8 = add nsw i64 %conv7, %conv
%sub = sub nsw i32 %6, %5
br label %if.end
if.else: ; preds = %for.end
%conv9 = sext i32 %6 to i64
%add10 = add nsw i64 %conv9, %conv
%sub11 = sub nsw i32 %5, %6
%conv12 = sext i32 %sub11 to i64
%add13 = add nsw i64 %add10, %conv12
br label %if.end
if.end: ; preds = %if.else, %if.then
%.sink = phi i32 [ %sub11, %if.else ], [ 0, %if.then ]
%7 = phi i32 [ 0, %if.else ], [ %sub, %if.then ]
%count.0 = phi i64 [ %add13, %if.else ], [ %add8, %if.then ]
store i32 %.sink, ptr getelementptr inbounds ([5 x i32], ptr @grp, i64 0, i64 3), align 4
store i32 %7, ptr getelementptr inbounds ([5 x i32], ptr @grp, i64 0, i64 1), align 4
%8 = load i32, ptr getelementptr inbounds ([5 x i32], ptr @grp, i64 0, i64 2), align 8, !tbaa !9
%div = sdiv i32 %8, 2
%conv15 = sext i32 %div to i64
%add16 = add nsw i64 %count.0, %conv15
%mul = shl nsw i32 %div, 1
%sub18 = sub i32 %8, %mul
store i32 %sub18, ptr getelementptr inbounds ([5 x i32], ptr @grp, i64 0, i64 2), align 8, !tbaa !9
%cmp20 = icmp sgt i32 %sub18, 0
br i1 %cmp20, label %if.then22, label %if.else37
if.then22: ; preds = %if.end
%inc23 = add nsw i64 %add16, 1
%sub24 = add nsw i32 %7, -2
store i32 %sub24, ptr getelementptr inbounds ([5 x i32], ptr @grp, i64 0, i64 1), align 4, !tbaa !9
%cmp25 = icmp sgt i32 %7, 2
br i1 %cmp25, label %if.then27, label %if.end51
if.then27: ; preds = %if.then22
%div2871 = lshr i32 %sub24, 2
%conv29 = zext i32 %div2871 to i64
%add30 = add nsw i64 %inc23, %conv29
%rem = and i32 %sub24, 3
%cmp31.not = icmp ne i32 %rem, 0
%inc34 = zext i1 %cmp31.not to i64
%spec.select = add nsw i64 %add30, %inc34
br label %if.end51
if.else37: ; preds = %if.end
%cmp38 = icmp sgt i32 %7, 0
br i1 %cmp38, label %if.then40, label %if.end51
if.then40: ; preds = %if.else37
%div4170 = lshr i32 %7, 2
%conv42 = zext i32 %div4170 to i64
%add43 = add nsw i64 %add16, %conv42
%rem44 = and i32 %7, 3
%cmp45.not = icmp ne i32 %rem44, 0
%inc48 = zext i1 %cmp45.not to i64
%spec.select72 = add nsw i64 %add43, %inc48
br label %if.end51
if.end51: ; preds = %if.then40, %if.then27, %if.else37, %if.then22
%count.1 = phi i64 [ %inc23, %if.then22 ], [ %add16, %if.else37 ], [ %spec.select, %if.then27 ], [ %spec.select72, %if.then40 ]
%call52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %count.1)
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
|
#include<stdio.h>
int main(){
int card[4][13]={};
int n, num, i, j;
char m;
scanf("%d", &n);
for(i=0;i<n;i++){
scanf(" %c %d", &m, &num);
if(m=='S') card[0][num-1]=1;
else if(m=='H') card[1][num-1]=1;
else if(m=='C') card[2][num-1]=1;
else if(m=='D') card[3][num-1]=1;
}
for(i=0;i<4;i++){
for(j=0;j<13;j++){
if(i==0&&card[i][j]==0) printf("S %d\n", j+1);
else if(i==1&&card[i][j]==0) printf("H %d\n", j+1);
else if(i==2&&card[i][j]==0) printf("C %d\n", j+1);
else if(i==3&&card[i][j]==0) printf("D %d\n", j+1);
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214332/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214332/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:
%card = alloca [4 x [13 x i32]], align 16
%n = alloca i32, align 4
%num = alloca i32, align 4
%m = alloca i8, align 1
call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %card) #4
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %card, i8 0, i64 208, i1 false)
call void @llvm.lifetime.start.p0(i64 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 %m) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp121 = icmp sgt i32 %0, 0
br i1 %cmp121, label %for.body, label %for.cond34.preheader
for.cond34.preheader: ; preds = %for.inc, %entry
%arrayidx72.us = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 0
%arrayidx72.us.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 1
%arrayidx72.us.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 2
%arrayidx72.us.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 3
%arrayidx72.us.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 4
%arrayidx72.us.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 5
%arrayidx72.us.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 6
%arrayidx72.us.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 7
%arrayidx72.us.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 8
%arrayidx72.us.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 9
%arrayidx72.us.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 10
%arrayidx72.us.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 11
%arrayidx72.us.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 12
%arrayidx59.us = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 0
%arrayidx59.us.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 1
%arrayidx59.us.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 2
%arrayidx59.us.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 3
%arrayidx59.us.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 4
%arrayidx59.us.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 5
%arrayidx59.us.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 6
%arrayidx59.us.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 7
%arrayidx59.us.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 8
%arrayidx59.us.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 9
%arrayidx59.us.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 10
%arrayidx59.us.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 11
%arrayidx59.us.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 12
%arrayidx47.us.1 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 1
%arrayidx47.us.2 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 2
%arrayidx47.us.3 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 3
%arrayidx47.us.4 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 4
%arrayidx47.us.5 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 5
%arrayidx47.us.6 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 6
%arrayidx47.us.7 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 7
%arrayidx47.us.8 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 8
%arrayidx47.us.9 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 9
%arrayidx47.us.10 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 10
%arrayidx47.us.11 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 11
%arrayidx47.us.12 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 12
br label %for.cond38.preheader
for.body: ; preds = %entry, %for.inc
%i.0122 = phi i32 [ %inc, %for.inc ], [ 0, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %m, ptr noundef nonnull %num)
%1 = load i8, ptr %m, 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 %card, 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 %card, 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 %card, 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 %card, 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.0122, 1
%6 = load i32, ptr %n, align 4, !tbaa !5
%cmp = icmp slt i32 %inc, %6
br i1 %cmp, label %for.body, label %for.cond34.preheader, !llvm.loop !10
for.cond38.preheader: ; preds = %for.inc98, %for.cond34.preheader
%i.1142 = phi i32 [ 0, %for.cond34.preheader ], [ %inc99, %for.inc98 ]
switch i32 %i.1142, label %for.inc98 [
i32 0, label %for.body41.us.preheader
i32 1, label %for.body41.us125.preheader
i32 2, label %for.body41.us131.preheader
i32 3, label %for.body41.us137.preheader
]
for.body41.us137.preheader: ; preds = %for.cond38.preheader
%arrayidx85.us = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 0
%7 = load i32, ptr %arrayidx85.us, align 4, !tbaa !5
%cmp86.us = icmp eq i32 %7, 0
br i1 %cmp86.us, label %if.then88.us, label %for.inc95.us139
for.body41.us131.preheader: ; preds = %for.cond38.preheader
%8 = load i32, ptr %arrayidx72.us, align 8, !tbaa !5
%cmp73.us = icmp eq i32 %8, 0
br i1 %cmp73.us, label %if.then75.us, label %for.inc95.us133
for.body41.us125.preheader: ; preds = %for.cond38.preheader
%9 = load i32, ptr %arrayidx59.us, align 4, !tbaa !5
%cmp60.us = icmp eq i32 %9, 0
br i1 %cmp60.us, label %if.then62.us, label %for.inc95.us127
for.body41.us.preheader: ; preds = %for.cond38.preheader
%10 = load i32, ptr %card, align 16, !tbaa !5
%cmp48.us = icmp eq i32 %10, 0
br i1 %cmp48.us, label %if.then50.us, label %for.inc95.us
if.then50.us: ; preds = %for.body41.us.preheader
%call51.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.then50.us, %for.body41.us.preheader
%11 = load i32, ptr %arrayidx47.us.1, align 4, !tbaa !5
%cmp48.us.1 = icmp eq i32 %11, 0
br i1 %cmp48.us.1, label %if.then50.us.1, label %for.inc95.us.1
if.then50.us.1: ; preds = %for.inc95.us
%call51.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.then50.us.1, %for.inc95.us
%12 = load i32, ptr %arrayidx47.us.2, align 8, !tbaa !5
%cmp48.us.2 = icmp eq i32 %12, 0
br i1 %cmp48.us.2, label %if.then50.us.2, label %for.inc95.us.2
if.then50.us.2: ; preds = %for.inc95.us.1
%call51.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.then50.us.2, %for.inc95.us.1
%13 = load i32, ptr %arrayidx47.us.3, align 4, !tbaa !5
%cmp48.us.3 = icmp eq i32 %13, 0
br i1 %cmp48.us.3, label %if.then50.us.3, label %for.inc95.us.3
if.then50.us.3: ; preds = %for.inc95.us.2
%call51.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.then50.us.3, %for.inc95.us.2
%14 = load i32, ptr %arrayidx47.us.4, align 16, !tbaa !5
%cmp48.us.4 = icmp eq i32 %14, 0
br i1 %cmp48.us.4, label %if.then50.us.4, label %for.inc95.us.4
if.then50.us.4: ; preds = %for.inc95.us.3
%call51.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.then50.us.4, %for.inc95.us.3
%15 = load i32, ptr %arrayidx47.us.5, align 4, !tbaa !5
%cmp48.us.5 = icmp eq i32 %15, 0
br i1 %cmp48.us.5, label %if.then50.us.5, label %for.inc95.us.5
if.then50.us.5: ; preds = %for.inc95.us.4
%call51.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.then50.us.5, %for.inc95.us.4
%16 = load i32, ptr %arrayidx47.us.6, align 8, !tbaa !5
%cmp48.us.6 = icmp eq i32 %16, 0
br i1 %cmp48.us.6, label %if.then50.us.6, label %for.inc95.us.6
if.then50.us.6: ; preds = %for.inc95.us.5
%call51.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.then50.us.6, %for.inc95.us.5
%17 = load i32, ptr %arrayidx47.us.7, align 4, !tbaa !5
%cmp48.us.7 = icmp eq i32 %17, 0
br i1 %cmp48.us.7, label %if.then50.us.7, label %for.inc95.us.7
if.then50.us.7: ; preds = %for.inc95.us.6
%call51.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.then50.us.7, %for.inc95.us.6
%18 = load i32, ptr %arrayidx47.us.8, align 16, !tbaa !5
%cmp48.us.8 = icmp eq i32 %18, 0
br i1 %cmp48.us.8, label %if.then50.us.8, label %for.inc95.us.8
if.then50.us.8: ; preds = %for.inc95.us.7
%call51.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.then50.us.8, %for.inc95.us.7
%19 = load i32, ptr %arrayidx47.us.9, align 4, !tbaa !5
%cmp48.us.9 = icmp eq i32 %19, 0
br i1 %cmp48.us.9, label %if.then50.us.9, label %for.inc95.us.9
if.then50.us.9: ; preds = %for.inc95.us.8
%call51.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.then50.us.9, %for.inc95.us.8
%20 = load i32, ptr %arrayidx47.us.10, align 8, !tbaa !5
%cmp48.us.10 = icmp eq i32 %20, 0
br i1 %cmp48.us.10, label %if.then50.us.10, label %for.inc95.us.10
if.then50.us.10: ; preds = %for.inc95.us.9
%call51.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.then50.us.10, %for.inc95.us.9
%21 = load i32, ptr %arrayidx47.us.11, align 4, !tbaa !5
%cmp48.us.11 = icmp eq i32 %21, 0
br i1 %cmp48.us.11, label %if.then50.us.11, label %for.inc95.us.11
if.then50.us.11: ; preds = %for.inc95.us.10
%call51.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.then50.us.11, %for.inc95.us.10
%22 = load i32, ptr %arrayidx47.us.12, align 16, !tbaa !5
%cmp48.us.12 = icmp eq i32 %22, 0
br i1 %cmp48.us.12, label %for.inc98.sink.split, label %for.inc98
if.then62.us: ; preds = %for.body41.us125.preheader
%call64.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1)
br label %for.inc95.us127
for.inc95.us127: ; preds = %if.then62.us, %for.body41.us125.preheader
%23 = load i32, ptr %arrayidx59.us.1, align 8, !tbaa !5
%cmp60.us.1 = icmp eq i32 %23, 0
br i1 %cmp60.us.1, label %if.then62.us.1, label %for.inc95.us127.1
if.then62.us.1: ; preds = %for.inc95.us127
%call64.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2)
br label %for.inc95.us127.1
for.inc95.us127.1: ; preds = %if.then62.us.1, %for.inc95.us127
%24 = load i32, ptr %arrayidx59.us.2, align 4, !tbaa !5
%cmp60.us.2 = icmp eq i32 %24, 0
br i1 %cmp60.us.2, label %if.then62.us.2, label %for.inc95.us127.2
if.then62.us.2: ; preds = %for.inc95.us127.1
%call64.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3)
br label %for.inc95.us127.2
for.inc95.us127.2: ; preds = %if.then62.us.2, %for.inc95.us127.1
%25 = load i32, ptr %arrayidx59.us.3, align 16, !tbaa !5
%cmp60.us.3 = icmp eq i32 %25, 0
br i1 %cmp60.us.3, label %if.then62.us.3, label %for.inc95.us127.3
if.then62.us.3: ; preds = %for.inc95.us127.2
%call64.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4)
br label %for.inc95.us127.3
for.inc95.us127.3: ; preds = %if.then62.us.3, %for.inc95.us127.2
%26 = load i32, ptr %arrayidx59.us.4, align 4, !tbaa !5
%cmp60.us.4 = icmp eq i32 %26, 0
br i1 %cmp60.us.4, label %if.then62.us.4, label %for.inc95.us127.4
if.then62.us.4: ; preds = %for.inc95.us127.3
%call64.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5)
br label %for.inc95.us127.4
for.inc95.us127.4: ; preds = %if.then62.us.4, %for.inc95.us127.3
%27 = load i32, ptr %arrayidx59.us.5, align 8, !tbaa !5
%cmp60.us.5 = icmp eq i32 %27, 0
br i1 %cmp60.us.5, label %if.then62.us.5, label %for.inc95.us127.5
if.then62.us.5: ; preds = %for.inc95.us127.4
%call64.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6)
br label %for.inc95.us127.5
for.inc95.us127.5: ; preds = %if.then62.us.5, %for.inc95.us127.4
%28 = load i32, ptr %arrayidx59.us.6, align 4, !tbaa !5
%cmp60.us.6 = icmp eq i32 %28, 0
br i1 %cmp60.us.6, label %if.then62.us.6, label %for.inc95.us127.6
if.then62.us.6: ; preds = %for.inc95.us127.5
%call64.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7)
br label %for.inc95.us127.6
for.inc95.us127.6: ; preds = %if.then62.us.6, %for.inc95.us127.5
%29 = load i32, ptr %arrayidx59.us.7, align 16, !tbaa !5
%cmp60.us.7 = icmp eq i32 %29, 0
br i1 %cmp60.us.7, label %if.then62.us.7, label %for.inc95.us127.7
if.then62.us.7: ; preds = %for.inc95.us127.6
%call64.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8)
br label %for.inc95.us127.7
for.inc95.us127.7: ; preds = %if.then62.us.7, %for.inc95.us127.6
%30 = load i32, ptr %arrayidx59.us.8, align 4, !tbaa !5
%cmp60.us.8 = icmp eq i32 %30, 0
br i1 %cmp60.us.8, label %if.then62.us.8, label %for.inc95.us127.8
if.then62.us.8: ; preds = %for.inc95.us127.7
%call64.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9)
br label %for.inc95.us127.8
for.inc95.us127.8: ; preds = %if.then62.us.8, %for.inc95.us127.7
%31 = load i32, ptr %arrayidx59.us.9, align 8, !tbaa !5
%cmp60.us.9 = icmp eq i32 %31, 0
br i1 %cmp60.us.9, label %if.then62.us.9, label %for.inc95.us127.9
if.then62.us.9: ; preds = %for.inc95.us127.8
%call64.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10)
br label %for.inc95.us127.9
for.inc95.us127.9: ; preds = %if.then62.us.9, %for.inc95.us127.8
%32 = load i32, ptr %arrayidx59.us.10, align 4, !tbaa !5
%cmp60.us.10 = icmp eq i32 %32, 0
br i1 %cmp60.us.10, label %if.then62.us.10, label %for.inc95.us127.10
if.then62.us.10: ; preds = %for.inc95.us127.9
%call64.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11)
br label %for.inc95.us127.10
for.inc95.us127.10: ; preds = %if.then62.us.10, %for.inc95.us127.9
%33 = load i32, ptr %arrayidx59.us.11, align 16, !tbaa !5
%cmp60.us.11 = icmp eq i32 %33, 0
br i1 %cmp60.us.11, label %if.then62.us.11, label %for.inc95.us127.11
if.then62.us.11: ; preds = %for.inc95.us127.10
%call64.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12)
br label %for.inc95.us127.11
for.inc95.us127.11: ; preds = %if.then62.us.11, %for.inc95.us127.10
%34 = load i32, ptr %arrayidx59.us.12, align 4, !tbaa !5
%cmp60.us.12 = icmp eq i32 %34, 0
br i1 %cmp60.us.12, label %for.inc98.sink.split, label %for.inc98
if.then75.us: ; preds = %for.body41.us131.preheader
%call77.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1)
br label %for.inc95.us133
for.inc95.us133: ; preds = %if.then75.us, %for.body41.us131.preheader
%35 = load i32, ptr %arrayidx72.us.1, align 4, !tbaa !5
%cmp73.us.1 = icmp eq i32 %35, 0
br i1 %cmp73.us.1, label %if.then75.us.1, label %for.inc95.us133.1
if.then75.us.1: ; preds = %for.inc95.us133
%call77.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2)
br label %for.inc95.us133.1
for.inc95.us133.1: ; preds = %if.then75.us.1, %for.inc95.us133
%36 = load i32, ptr %arrayidx72.us.2, align 16, !tbaa !5
%cmp73.us.2 = icmp eq i32 %36, 0
br i1 %cmp73.us.2, label %if.then75.us.2, label %for.inc95.us133.2
if.then75.us.2: ; preds = %for.inc95.us133.1
%call77.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3)
br label %for.inc95.us133.2
for.inc95.us133.2: ; preds = %if.then75.us.2, %for.inc95.us133.1
%37 = load i32, ptr %arrayidx72.us.3, align 4, !tbaa !5
%cmp73.us.3 = icmp eq i32 %37, 0
br i1 %cmp73.us.3, label %if.then75.us.3, label %for.inc95.us133.3
if.then75.us.3: ; preds = %for.inc95.us133.2
%call77.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4)
br label %for.inc95.us133.3
for.inc95.us133.3: ; preds = %if.then75.us.3, %for.inc95.us133.2
%38 = load i32, ptr %arrayidx72.us.4, align 8, !tbaa !5
%cmp73.us.4 = icmp eq i32 %38, 0
br i1 %cmp73.us.4, label %if.then75.us.4, label %for.inc95.us133.4
if.then75.us.4: ; preds = %for.inc95.us133.3
%call77.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5)
br label %for.inc95.us133.4
for.inc95.us133.4: ; preds = %if.then75.us.4, %for.inc95.us133.3
%39 = load i32, ptr %arrayidx72.us.5, align 4, !tbaa !5
%cmp73.us.5 = icmp eq i32 %39, 0
br i1 %cmp73.us.5, label %if.then75.us.5, label %for.inc95.us133.5
if.then75.us.5: ; preds = %for.inc95.us133.4
%call77.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6)
br label %for.inc95.us133.5
for.inc95.us133.5: ; preds = %if.then75.us.5, %for.inc95.us133.4
%40 = load i32, ptr %arrayidx72.us.6, align 16, !tbaa !5
%cmp73.us.6 = icmp eq i32 %40, 0
br i1 %cmp73.us.6, label %if.then75.us.6, label %for.inc95.us133.6
if.then75.us.6: ; preds = %for.inc95.us133.5
%call77.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7)
br label %for.inc95.us133.6
for.inc95.us133.6: ; preds = %if.then75.us.6, %for.inc95.us133.5
%41 = load i32, ptr %arrayidx72.us.7, align 4, !tbaa !5
%cmp73.us.7 = icmp eq i32 %41, 0
br i1 %cmp73.us.7, label %if.then75.us.7, label %for.inc95.us133.7
if.then75.us.7: ; preds = %for.inc95.us133.6
%call77.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8)
br label %for.inc95.us133.7
for.inc95.us133.7: ; preds = %if.then75.us.7, %for.inc95.us133.6
%42 = load i32, ptr %arrayidx72.us.8, align 8, !tbaa !5
%cmp73.us.8 = icmp eq i32 %42, 0
br i1 %cmp73.us.8, label %if.then75.us.8, label %for.inc95.us133.8
if.then75.us.8: ; preds = %for.inc95.us133.7
%call77.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9)
br label %for.inc95.us133.8
for.inc95.us133.8: ; preds = %if.then75.us.8, %for.inc95.us133.7
%43 = load i32, ptr %arrayidx72.us.9, align 4, !tbaa !5
%cmp73.us.9 = icmp eq i32 %43, 0
br i1 %cmp73.us.9, label %if.then75.us.9, label %for.inc95.us133.9
if.then75.us.9: ; preds = %for.inc95.us133.8
%call77.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10)
br label %for.inc95.us133.9
for.inc95.us133.9: ; preds = %if.then75.us.9, %for.inc95.us133.8
%44 = load i32, ptr %arrayidx72.us.10, align 16, !tbaa !5
%cmp73.us.10 = icmp eq i32 %44, 0
br i1 %cmp73.us.10, label %if.then75.us.10, label %for.inc95.us133.10
if.then75.us.10: ; preds = %for.inc95.us133.9
%call77.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11)
br label %for.inc95.us133.10
for.inc95.us133.10: ; preds = %if.then75.us.10, %for.inc95.us133.9
%45 = load i32, ptr %arrayidx72.us.11, align 4, !tbaa !5
%cmp73.us.11 = icmp eq i32 %45, 0
br i1 %cmp73.us.11, label %if.then75.us.11, label %for.inc95.us133.11
if.then75.us.11: ; preds = %for.inc95.us133.10
%call77.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12)
br label %for.inc95.us133.11
for.inc95.us133.11: ; preds = %if.then75.us.11, %for.inc95.us133.10
%46 = load i32, ptr %arrayidx72.us.12, align 8, !tbaa !5
%cmp73.us.12 = icmp eq i32 %46, 0
br i1 %cmp73.us.12, label %for.inc98.sink.split, label %for.inc98
if.then88.us: ; preds = %for.body41.us137.preheader
%call90.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1)
br label %for.inc95.us139
for.inc95.us139: ; preds = %if.then88.us, %for.body41.us137.preheader
%arrayidx85.us.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 1
%47 = load i32, ptr %arrayidx85.us.1, align 16, !tbaa !5
%cmp86.us.1 = icmp eq i32 %47, 0
br i1 %cmp86.us.1, label %if.then88.us.1, label %for.inc95.us139.1
if.then88.us.1: ; preds = %for.inc95.us139
%call90.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2)
br label %for.inc95.us139.1
for.inc95.us139.1: ; preds = %if.then88.us.1, %for.inc95.us139
%arrayidx85.us.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 2
%48 = load i32, ptr %arrayidx85.us.2, align 4, !tbaa !5
%cmp86.us.2 = icmp eq i32 %48, 0
br i1 %cmp86.us.2, label %if.then88.us.2, label %for.inc95.us139.2
if.then88.us.2: ; preds = %for.inc95.us139.1
%call90.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3)
br label %for.inc95.us139.2
for.inc95.us139.2: ; preds = %if.then88.us.2, %for.inc95.us139.1
%arrayidx85.us.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 3
%49 = load i32, ptr %arrayidx85.us.3, align 8, !tbaa !5
%cmp86.us.3 = icmp eq i32 %49, 0
br i1 %cmp86.us.3, label %if.then88.us.3, label %for.inc95.us139.3
if.then88.us.3: ; preds = %for.inc95.us139.2
%call90.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4)
br label %for.inc95.us139.3
for.inc95.us139.3: ; preds = %if.then88.us.3, %for.inc95.us139.2
%arrayidx85.us.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 4
%50 = load i32, ptr %arrayidx85.us.4, align 4, !tbaa !5
%cmp86.us.4 = icmp eq i32 %50, 0
br i1 %cmp86.us.4, label %if.then88.us.4, label %for.inc95.us139.4
if.then88.us.4: ; preds = %for.inc95.us139.3
%call90.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5)
br label %for.inc95.us139.4
for.inc95.us139.4: ; preds = %if.then88.us.4, %for.inc95.us139.3
%arrayidx85.us.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 5
%51 = load i32, ptr %arrayidx85.us.5, align 16, !tbaa !5
%cmp86.us.5 = icmp eq i32 %51, 0
br i1 %cmp86.us.5, label %if.then88.us.5, label %for.inc95.us139.5
if.then88.us.5: ; preds = %for.inc95.us139.4
%call90.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6)
br label %for.inc95.us139.5
for.inc95.us139.5: ; preds = %if.then88.us.5, %for.inc95.us139.4
%arrayidx85.us.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 6
%52 = load i32, ptr %arrayidx85.us.6, align 4, !tbaa !5
%cmp86.us.6 = icmp eq i32 %52, 0
br i1 %cmp86.us.6, label %if.then88.us.6, label %for.inc95.us139.6
if.then88.us.6: ; preds = %for.inc95.us139.5
%call90.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7)
br label %for.inc95.us139.6
for.inc95.us139.6: ; preds = %if.then88.us.6, %for.inc95.us139.5
%arrayidx85.us.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 7
%53 = load i32, ptr %arrayidx85.us.7, align 8, !tbaa !5
%cmp86.us.7 = icmp eq i32 %53, 0
br i1 %cmp86.us.7, label %if.then88.us.7, label %for.inc95.us139.7
if.then88.us.7: ; preds = %for.inc95.us139.6
%call90.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8)
br label %for.inc95.us139.7
for.inc95.us139.7: ; preds = %if.then88.us.7, %for.inc95.us139.6
%arrayidx85.us.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 8
%54 = load i32, ptr %arrayidx85.us.8, align 4, !tbaa !5
%cmp86.us.8 = icmp eq i32 %54, 0
br i1 %cmp86.us.8, label %if.then88.us.8, label %for.inc95.us139.8
if.then88.us.8: ; preds = %for.inc95.us139.7
%call90.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9)
br label %for.inc95.us139.8
for.inc95.us139.8: ; preds = %if.then88.us.8, %for.inc95.us139.7
%arrayidx85.us.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 9
%55 = load i32, ptr %arrayidx85.us.9, align 16, !tbaa !5
%cmp86.us.9 = icmp eq i32 %55, 0
br i1 %cmp86.us.9, label %if.then88.us.9, label %for.inc95.us139.9
if.then88.us.9: ; preds = %for.inc95.us139.8
%call90.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10)
br label %for.inc95.us139.9
for.inc95.us139.9: ; preds = %if.then88.us.9, %for.inc95.us139.8
%arrayidx85.us.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 10
%56 = load i32, ptr %arrayidx85.us.10, align 4, !tbaa !5
%cmp86.us.10 = icmp eq i32 %56, 0
br i1 %cmp86.us.10, label %if.then88.us.10, label %for.inc95.us139.10
if.then88.us.10: ; preds = %for.inc95.us139.9
%call90.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11)
br label %for.inc95.us139.10
for.inc95.us139.10: ; preds = %if.then88.us.10, %for.inc95.us139.9
%arrayidx85.us.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 11
%57 = load i32, ptr %arrayidx85.us.11, align 8, !tbaa !5
%cmp86.us.11 = icmp eq i32 %57, 0
br i1 %cmp86.us.11, label %if.then88.us.11, label %for.inc95.us139.11
if.then88.us.11: ; preds = %for.inc95.us139.10
%call90.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12)
br label %for.inc95.us139.11
for.inc95.us139.11: ; preds = %if.then88.us.11, %for.inc95.us139.10
%arrayidx85.us.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 12
%58 = load i32, ptr %arrayidx85.us.12, align 4, !tbaa !5
%cmp86.us.12 = icmp eq i32 %58, 0
br i1 %cmp86.us.12, label %if.then88.us.12, label %for.end100
if.then88.us.12: ; preds = %for.inc95.us139.11
%call90.us.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 13)
br label %for.end100
for.inc98.sink.split: ; preds = %for.inc95.us133.11, %for.inc95.us127.11, %for.inc95.us.11
%.str.4.sink = phi ptr [ @.str.2, %for.inc95.us.11 ], [ @.str.3, %for.inc95.us127.11 ], [ @.str.4, %for.inc95.us133.11 ]
%call77.us.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.4.sink, i32 noundef 13)
br label %for.inc98
for.inc98: ; preds = %for.inc98.sink.split, %for.inc95.us133.11, %for.inc95.us127.11, %for.inc95.us.11, %for.cond38.preheader
%inc99 = add nuw nsw i32 %i.1142, 1
br label %for.cond38.preheader
for.end100: ; preds = %for.inc95.us139.11, %if.then88.us.12
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %m) #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 %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: 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"}
|
#include <stdio.h>
int main(void){
int i,j,n,m,cn;
char c,s[5]={'S','H','C','D','\0'};
static int card[4][13];
scanf("%d\n",&n);
for(i=0;i<n;i++){
scanf("%c %d\n",&c,&m);
for(j=0;j<4;j++)
if(s[j]==c)
card[j][m-1]=1;
}
for(i=0;i<4;i++)
for(j=0;j<13;j++)
if(card[i][j]==0)
printf("%c %d\n",s[i],j+1);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214376/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214376/source.c"
target datalayout = "e-m:e-p270: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 [5 x i8] c"SHCD\00", align 1
@main.card = internal unnamed_addr global [4 x [13 x i32]] zeroinitializer, align 16
@.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
@.str.1 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
%m = alloca i32, align 4
%c = 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 %m) #3
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 %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp54 = icmp sgt i32 %0, 0
br i1 %cmp54, label %for.body, label %for.cond19.preheader.preheader
for.body: ; preds = %entry, %for.inc.3
%i.055 = phi i32 [ %inc13, %for.inc.3 ], [ 0, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %c, ptr noundef nonnull %m)
%1 = load i8, ptr %c, align 1, !tbaa !9
%2 = load i32, ptr %m, align 4
%sub = add nsw i32 %2, -1
%idxprom10 = sext i32 %sub to i64
switch i8 %1, label %for.inc.3 [
i8 83, label %for.inc.3.sink.split
i8 72, label %if.then.1
i8 67, label %if.then.2
i8 68, label %if.then.3
]
if.then.1: ; preds = %for.body
br label %for.inc.3.sink.split
if.then.2: ; preds = %for.body
br label %for.inc.3.sink.split
if.then.3: ; preds = %for.body
br label %for.inc.3.sink.split
for.inc.3.sink.split: ; preds = %for.body, %if.then.3, %if.then.2, %if.then.1
%.sink = phi i64 [ 1, %if.then.1 ], [ 2, %if.then.2 ], [ 3, %if.then.3 ], [ 0, %for.body ]
%arrayidx11.1 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %.sink, i64 %idxprom10
store i32 1, ptr %arrayidx11.1, align 4, !tbaa !5
br label %for.inc.3
for.inc.3: ; preds = %for.inc.3.sink.split, %for.body
%inc13 = add nuw nsw i32 %i.055, 1
%3 = load i32, ptr %n, align 4, !tbaa !5
%cmp = icmp slt i32 %inc13, %3
br i1 %cmp, label %for.body, label %for.cond19.preheader.preheader, !llvm.loop !10
for.cond19.preheader.preheader: ; preds = %for.inc.3, %entry
br label %for.cond19.preheader
for.cond19.preheader: ; preds = %for.cond19.preheader.preheader, %for.inc35.12
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc35.12 ], [ 0, %for.cond19.preheader.preheader ]
%arrayidx31 = getelementptr inbounds [5 x i8], ptr @__const.main.s, i64 0, i64 %indvars.iv
%arrayidx26 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 0
%4 = load i32, ptr %arrayidx26, align 4, !tbaa !5
%cmp27 = icmp eq i32 %4, 0
br i1 %cmp27, label %if.then29, label %for.inc35
if.then29: ; preds = %for.cond19.preheader
%5 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32 = sext i8 %5 to i32
%call33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32, i32 noundef 1)
br label %for.inc35
for.inc35: ; preds = %for.cond19.preheader, %if.then29
%arrayidx26.1 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 1
%6 = load i32, ptr %arrayidx26.1, align 4, !tbaa !5
%cmp27.1 = icmp eq i32 %6, 0
br i1 %cmp27.1, label %if.then29.1, label %for.inc35.1
if.then29.1: ; preds = %for.inc35
%7 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.1 = sext i8 %7 to i32
%call33.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.1, i32 noundef 2)
br label %for.inc35.1
for.inc35.1: ; preds = %if.then29.1, %for.inc35
%arrayidx26.2 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 2
%8 = load i32, ptr %arrayidx26.2, align 4, !tbaa !5
%cmp27.2 = icmp eq i32 %8, 0
br i1 %cmp27.2, label %if.then29.2, label %for.inc35.2
if.then29.2: ; preds = %for.inc35.1
%9 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.2 = sext i8 %9 to i32
%call33.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.2, i32 noundef 3)
br label %for.inc35.2
for.inc35.2: ; preds = %if.then29.2, %for.inc35.1
%arrayidx26.3 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 3
%10 = load i32, ptr %arrayidx26.3, align 4, !tbaa !5
%cmp27.3 = icmp eq i32 %10, 0
br i1 %cmp27.3, label %if.then29.3, label %for.inc35.3
if.then29.3: ; preds = %for.inc35.2
%11 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.3 = sext i8 %11 to i32
%call33.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.3, i32 noundef 4)
br label %for.inc35.3
for.inc35.3: ; preds = %if.then29.3, %for.inc35.2
%arrayidx26.4 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 4
%12 = load i32, ptr %arrayidx26.4, align 4, !tbaa !5
%cmp27.4 = icmp eq i32 %12, 0
br i1 %cmp27.4, label %if.then29.4, label %for.inc35.4
if.then29.4: ; preds = %for.inc35.3
%13 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.4 = sext i8 %13 to i32
%call33.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.4, i32 noundef 5)
br label %for.inc35.4
for.inc35.4: ; preds = %if.then29.4, %for.inc35.3
%arrayidx26.5 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 5
%14 = load i32, ptr %arrayidx26.5, align 4, !tbaa !5
%cmp27.5 = icmp eq i32 %14, 0
br i1 %cmp27.5, label %if.then29.5, label %for.inc35.5
if.then29.5: ; preds = %for.inc35.4
%15 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.5 = sext i8 %15 to i32
%call33.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.5, i32 noundef 6)
br label %for.inc35.5
for.inc35.5: ; preds = %if.then29.5, %for.inc35.4
%arrayidx26.6 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 6
%16 = load i32, ptr %arrayidx26.6, align 4, !tbaa !5
%cmp27.6 = icmp eq i32 %16, 0
br i1 %cmp27.6, label %if.then29.6, label %for.inc35.6
if.then29.6: ; preds = %for.inc35.5
%17 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.6 = sext i8 %17 to i32
%call33.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.6, i32 noundef 7)
br label %for.inc35.6
for.inc35.6: ; preds = %if.then29.6, %for.inc35.5
%arrayidx26.7 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 7
%18 = load i32, ptr %arrayidx26.7, align 4, !tbaa !5
%cmp27.7 = icmp eq i32 %18, 0
br i1 %cmp27.7, label %if.then29.7, label %for.inc35.7
if.then29.7: ; preds = %for.inc35.6
%19 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.7 = sext i8 %19 to i32
%call33.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.7, i32 noundef 8)
br label %for.inc35.7
for.inc35.7: ; preds = %if.then29.7, %for.inc35.6
%arrayidx26.8 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 8
%20 = load i32, ptr %arrayidx26.8, align 4, !tbaa !5
%cmp27.8 = icmp eq i32 %20, 0
br i1 %cmp27.8, label %if.then29.8, label %for.inc35.8
if.then29.8: ; preds = %for.inc35.7
%21 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.8 = sext i8 %21 to i32
%call33.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.8, i32 noundef 9)
br label %for.inc35.8
for.inc35.8: ; preds = %if.then29.8, %for.inc35.7
%arrayidx26.9 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 9
%22 = load i32, ptr %arrayidx26.9, align 4, !tbaa !5
%cmp27.9 = icmp eq i32 %22, 0
br i1 %cmp27.9, label %if.then29.9, label %for.inc35.9
if.then29.9: ; preds = %for.inc35.8
%23 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.9 = sext i8 %23 to i32
%call33.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.9, i32 noundef 10)
br label %for.inc35.9
for.inc35.9: ; preds = %if.then29.9, %for.inc35.8
%arrayidx26.10 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 10
%24 = load i32, ptr %arrayidx26.10, align 4, !tbaa !5
%cmp27.10 = icmp eq i32 %24, 0
br i1 %cmp27.10, label %if.then29.10, label %for.inc35.10
if.then29.10: ; preds = %for.inc35.9
%25 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.10 = sext i8 %25 to i32
%call33.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.10, i32 noundef 11)
br label %for.inc35.10
for.inc35.10: ; preds = %if.then29.10, %for.inc35.9
%arrayidx26.11 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 11
%26 = load i32, ptr %arrayidx26.11, align 4, !tbaa !5
%cmp27.11 = icmp eq i32 %26, 0
br i1 %cmp27.11, label %if.then29.11, label %for.inc35.11
if.then29.11: ; preds = %for.inc35.10
%27 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.11 = sext i8 %27 to i32
%call33.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.11, i32 noundef 12)
br label %for.inc35.11
for.inc35.11: ; preds = %if.then29.11, %for.inc35.10
%arrayidx26.12 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 12
%28 = load i32, ptr %arrayidx26.12, align 4, !tbaa !5
%cmp27.12 = icmp eq i32 %28, 0
br i1 %cmp27.12, label %if.then29.12, label %for.inc35.12
if.then29.12: ; preds = %for.inc35.11
%29 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.12 = sext i8 %29 to i32
%call33.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.12, i32 noundef 13)
br label %for.inc35.12
for.inc35.12: ; preds = %if.then29.12, %for.inc35.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.cond19.preheader, !llvm.loop !12
for.end40: ; preds = %for.inc35.12
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
|
#include <stdio.h>
int main(){
int s[14],h[14],c[14],d[14],i,su,num;
char jo;
for(i=0;i<14;i++) s[i]=1;
for(i=0;i<14;i++) h[i]=1;
for(i=0;i<14;i++) c[i]=1;
for(i=0;i<14;i++) d[i]=1;
scanf("%d",&su);
for(i=0;i<su;i++){
scanf("%c",&jo);
scanf("%c %d",&jo,&num);
if(jo=='S') s[num] = 0;
else if(jo=='H') h[num] = 0;
else if(jo=='C') c[num] = 0;
else if(jo=='D') d[num] = 0;
}
for(i=1;i<14;i++) if(s[i]==1) printf("S %d\n",i);
for(i=1;i<14;i++) if(h[i]==1) printf("H %d\n",i);
for(i=1;i<14;i++) if(c[i]==1) printf("C %d\n",i);
for(i=1;i<14;i++) if(d[i]==1) printf("D %d\n",i);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214419/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214419/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:
%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
%su = alloca i32, align 4
%num = alloca i32, align 4
%jo = alloca i8, align 1
call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %s) #3
call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %h) #3
call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %c) #3
call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %d) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %su) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #3
call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %jo) #3
%arrayidx.1 = getelementptr inbounds [14 x i32], ptr %s, i64 0, i64 1
%arrayidx.2 = getelementptr inbounds [14 x i32], ptr %s, i64 0, i64 2
%arrayidx.3 = getelementptr inbounds [14 x i32], ptr %s, i64 0, i64 3
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %s, align 16, !tbaa !5
%arrayidx.4 = getelementptr inbounds [14 x i32], ptr %s, i64 0, i64 4
%arrayidx.5 = getelementptr inbounds [14 x i32], ptr %s, i64 0, i64 5
%arrayidx.6 = getelementptr inbounds [14 x i32], ptr %s, i64 0, i64 6
%arrayidx.7 = getelementptr inbounds [14 x i32], ptr %s, i64 0, i64 7
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx.4, align 16, !tbaa !5
%arrayidx.8 = getelementptr inbounds [14 x i32], ptr %s, i64 0, i64 8
%arrayidx.9 = getelementptr inbounds [14 x i32], ptr %s, i64 0, i64 9
%arrayidx.10 = getelementptr inbounds [14 x i32], ptr %s, i64 0, i64 10
%arrayidx.11 = getelementptr inbounds [14 x i32], ptr %s, i64 0, i64 11
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx.8, align 16, !tbaa !5
%arrayidx.12 = getelementptr inbounds [14 x i32], ptr %s, i64 0, i64 12
store i32 1, ptr %arrayidx.12, align 16, !tbaa !5
%arrayidx.13 = getelementptr inbounds [14 x i32], ptr %s, i64 0, i64 13
store i32 1, ptr %arrayidx.13, align 4, !tbaa !5
%arrayidx5.1 = getelementptr inbounds [14 x i32], ptr %h, i64 0, i64 1
%arrayidx5.2 = getelementptr inbounds [14 x i32], ptr %h, i64 0, i64 2
%arrayidx5.3 = getelementptr inbounds [14 x i32], ptr %h, i64 0, i64 3
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %h, align 16, !tbaa !5
%arrayidx5.4 = getelementptr inbounds [14 x i32], ptr %h, i64 0, i64 4
%arrayidx5.5 = getelementptr inbounds [14 x i32], ptr %h, i64 0, i64 5
%arrayidx5.6 = getelementptr inbounds [14 x i32], ptr %h, i64 0, i64 6
%arrayidx5.7 = getelementptr inbounds [14 x i32], ptr %h, i64 0, i64 7
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx5.4, align 16, !tbaa !5
%arrayidx5.8 = getelementptr inbounds [14 x i32], ptr %h, i64 0, i64 8
%arrayidx5.9 = getelementptr inbounds [14 x i32], ptr %h, i64 0, i64 9
%arrayidx5.10 = getelementptr inbounds [14 x i32], ptr %h, i64 0, i64 10
%arrayidx5.11 = getelementptr inbounds [14 x i32], ptr %h, i64 0, i64 11
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx5.8, align 16, !tbaa !5
%arrayidx5.12 = getelementptr inbounds [14 x i32], ptr %h, i64 0, i64 12
store i32 1, ptr %arrayidx5.12, align 16, !tbaa !5
%arrayidx5.13 = getelementptr inbounds [14 x i32], ptr %h, i64 0, i64 13
store i32 1, ptr %arrayidx5.13, align 4, !tbaa !5
%arrayidx13.1 = getelementptr inbounds [14 x i32], ptr %c, i64 0, i64 1
%arrayidx13.2 = getelementptr inbounds [14 x i32], ptr %c, i64 0, i64 2
%arrayidx13.3 = getelementptr inbounds [14 x i32], ptr %c, i64 0, i64 3
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %c, align 16, !tbaa !5
%arrayidx13.4 = getelementptr inbounds [14 x i32], ptr %c, i64 0, i64 4
%arrayidx13.5 = getelementptr inbounds [14 x i32], ptr %c, i64 0, i64 5
%arrayidx13.6 = getelementptr inbounds [14 x i32], ptr %c, i64 0, i64 6
%arrayidx13.7 = getelementptr inbounds [14 x i32], ptr %c, i64 0, i64 7
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx13.4, align 16, !tbaa !5
%arrayidx13.8 = getelementptr inbounds [14 x i32], ptr %c, i64 0, i64 8
%arrayidx13.9 = getelementptr inbounds [14 x i32], ptr %c, i64 0, i64 9
%arrayidx13.10 = getelementptr inbounds [14 x i32], ptr %c, i64 0, i64 10
%arrayidx13.11 = getelementptr inbounds [14 x i32], ptr %c, i64 0, i64 11
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx13.8, align 16, !tbaa !5
%arrayidx13.12 = getelementptr inbounds [14 x i32], ptr %c, i64 0, i64 12
store i32 1, ptr %arrayidx13.12, align 16, !tbaa !5
%arrayidx13.13 = getelementptr inbounds [14 x i32], ptr %c, i64 0, i64 13
store i32 1, ptr %arrayidx13.13, align 4, !tbaa !5
%arrayidx21.1 = getelementptr inbounds [14 x i32], ptr %d, i64 0, i64 1
%arrayidx21.2 = getelementptr inbounds [14 x i32], ptr %d, i64 0, i64 2
%arrayidx21.3 = getelementptr inbounds [14 x i32], ptr %d, i64 0, i64 3
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %d, align 16, !tbaa !5
%arrayidx21.4 = getelementptr inbounds [14 x i32], ptr %d, i64 0, i64 4
%arrayidx21.5 = getelementptr inbounds [14 x i32], ptr %d, i64 0, i64 5
%arrayidx21.6 = getelementptr inbounds [14 x i32], ptr %d, i64 0, i64 6
%arrayidx21.7 = getelementptr inbounds [14 x i32], ptr %d, i64 0, i64 7
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx21.4, align 16, !tbaa !5
%arrayidx21.8 = getelementptr inbounds [14 x i32], ptr %d, i64 0, i64 8
%arrayidx21.9 = getelementptr inbounds [14 x i32], ptr %d, i64 0, i64 9
%arrayidx21.10 = getelementptr inbounds [14 x i32], ptr %d, i64 0, i64 10
%arrayidx21.11 = getelementptr inbounds [14 x i32], ptr %d, i64 0, i64 11
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %arrayidx21.8, align 16, !tbaa !5
%arrayidx21.12 = getelementptr inbounds [14 x i32], ptr %d, i64 0, i64 12
store i32 1, ptr %arrayidx21.12, align 16, !tbaa !5
%arrayidx21.13 = getelementptr inbounds [14 x i32], ptr %d, i64 0, i64 13
store i32 1, ptr %arrayidx21.13, align 4, !tbaa !5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %su)
%0 = load i32, ptr %su, align 4, !tbaa !5
%cmp26149 = icmp sgt i32 %0, 0
br i1 %cmp26149, label %for.body27, label %for.cond60.preheader
for.cond60.preheader: ; preds = %for.inc57, %entry
%1 = load i32, ptr %arrayidx.1, align 4, !tbaa !5
%cmp66 = icmp eq i32 %1, 1
br i1 %cmp66, label %if.then68, label %for.inc71
for.body27: ; preds = %entry, %for.inc57
%i.4150 = phi i32 [ %inc58, %for.inc57 ], [ 0, %entry ]
%call28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %jo)
%call29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %jo, ptr noundef nonnull %num)
%2 = load i8, ptr %jo, align 1, !tbaa !9
switch i8 %2, label %for.inc57 [
i8 83, label %for.inc57.sink.split
i8 72, label %if.then37
i8 67, label %if.then44
i8 68, label %if.then51
]
if.then37: ; preds = %for.body27
br label %for.inc57.sink.split
if.then44: ; preds = %for.body27
br label %for.inc57.sink.split
if.then51: ; preds = %for.body27
br label %for.inc57.sink.split
for.inc57.sink.split: ; preds = %for.body27, %if.then37, %if.then51, %if.then44
%s.sink = phi ptr [ %c, %if.then44 ], [ %d, %if.then51 ], [ %h, %if.then37 ], [ %s, %for.body27 ]
%.sink = load i32, ptr %num, align 4, !tbaa !5
%idxprom32 = sext i32 %.sink to i64
%arrayidx33 = getelementptr inbounds [14 x i32], ptr %s.sink, i64 0, i64 %idxprom32
store i32 0, ptr %arrayidx33, align 4, !tbaa !5
br label %for.inc57
for.inc57: ; preds = %for.inc57.sink.split, %for.body27
%inc58 = add nuw nsw i32 %i.4150, 1
%3 = load i32, ptr %su, align 4, !tbaa !5
%cmp26 = icmp slt i32 %inc58, %3
br i1 %cmp26, label %for.body27, label %for.cond60.preheader, !llvm.loop !10
if.then68: ; preds = %for.cond60.preheader
%call69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1)
br label %for.inc71
for.inc71: ; preds = %for.cond60.preheader, %if.then68
%4 = load i32, ptr %arrayidx.2, align 8, !tbaa !5
%cmp66.1 = icmp eq i32 %4, 1
br i1 %cmp66.1, label %if.then68.1, label %for.inc71.1
if.then68.1: ; preds = %for.inc71
%call69.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2)
br label %for.inc71.1
for.inc71.1: ; preds = %if.then68.1, %for.inc71
%5 = load i32, ptr %arrayidx.3, align 4, !tbaa !5
%cmp66.2 = icmp eq i32 %5, 1
br i1 %cmp66.2, label %if.then68.2, label %for.inc71.2
if.then68.2: ; preds = %for.inc71.1
%call69.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3)
br label %for.inc71.2
for.inc71.2: ; preds = %if.then68.2, %for.inc71.1
%6 = load i32, ptr %arrayidx.4, align 16, !tbaa !5
%cmp66.3 = icmp eq i32 %6, 1
br i1 %cmp66.3, label %if.then68.3, label %for.inc71.3
if.then68.3: ; preds = %for.inc71.2
%call69.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4)
br label %for.inc71.3
for.inc71.3: ; preds = %if.then68.3, %for.inc71.2
%7 = load i32, ptr %arrayidx.5, align 4, !tbaa !5
%cmp66.4 = icmp eq i32 %7, 1
br i1 %cmp66.4, label %if.then68.4, label %for.inc71.4
if.then68.4: ; preds = %for.inc71.3
%call69.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5)
br label %for.inc71.4
for.inc71.4: ; preds = %if.then68.4, %for.inc71.3
%8 = load i32, ptr %arrayidx.6, align 8, !tbaa !5
%cmp66.5 = icmp eq i32 %8, 1
br i1 %cmp66.5, label %if.then68.5, label %for.inc71.5
if.then68.5: ; preds = %for.inc71.4
%call69.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6)
br label %for.inc71.5
for.inc71.5: ; preds = %if.then68.5, %for.inc71.4
%9 = load i32, ptr %arrayidx.7, align 4, !tbaa !5
%cmp66.6 = icmp eq i32 %9, 1
br i1 %cmp66.6, label %if.then68.6, label %for.inc71.6
if.then68.6: ; preds = %for.inc71.5
%call69.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7)
br label %for.inc71.6
for.inc71.6: ; preds = %if.then68.6, %for.inc71.5
%10 = load i32, ptr %arrayidx.8, align 16, !tbaa !5
%cmp66.7 = icmp eq i32 %10, 1
br i1 %cmp66.7, label %if.then68.7, label %for.inc71.7
if.then68.7: ; preds = %for.inc71.6
%call69.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8)
br label %for.inc71.7
for.inc71.7: ; preds = %if.then68.7, %for.inc71.6
%11 = load i32, ptr %arrayidx.9, align 4, !tbaa !5
%cmp66.8 = icmp eq i32 %11, 1
br i1 %cmp66.8, label %if.then68.8, label %for.inc71.8
if.then68.8: ; preds = %for.inc71.7
%call69.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9)
br label %for.inc71.8
for.inc71.8: ; preds = %if.then68.8, %for.inc71.7
%12 = load i32, ptr %arrayidx.10, align 8, !tbaa !5
%cmp66.9 = icmp eq i32 %12, 1
br i1 %cmp66.9, label %if.then68.9, label %for.inc71.9
if.then68.9: ; preds = %for.inc71.8
%call69.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10)
br label %for.inc71.9
for.inc71.9: ; preds = %if.then68.9, %for.inc71.8
%13 = load i32, ptr %arrayidx.11, align 4, !tbaa !5
%cmp66.10 = icmp eq i32 %13, 1
br i1 %cmp66.10, label %if.then68.10, label %for.inc71.10
if.then68.10: ; preds = %for.inc71.9
%call69.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11)
br label %for.inc71.10
for.inc71.10: ; preds = %if.then68.10, %for.inc71.9
%14 = load i32, ptr %arrayidx.12, align 16, !tbaa !5
%cmp66.11 = icmp eq i32 %14, 1
br i1 %cmp66.11, label %if.then68.11, label %for.inc71.11
if.then68.11: ; preds = %for.inc71.10
%call69.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12)
br label %for.inc71.11
for.inc71.11: ; preds = %if.then68.11, %for.inc71.10
%15 = load i32, ptr %arrayidx.13, align 4, !tbaa !5
%cmp66.12 = icmp eq i32 %15, 1
br i1 %cmp66.12, label %if.then68.12, label %for.inc71.12
if.then68.12: ; preds = %for.inc71.11
%call69.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 13)
br label %for.inc71.12
for.inc71.12: ; preds = %if.then68.12, %for.inc71.11
%16 = load i32, ptr %arrayidx5.1, align 4, !tbaa !5
%cmp80 = icmp eq i32 %16, 1
br i1 %cmp80, label %if.then82, label %for.inc85
if.then82: ; preds = %for.inc71.12
%call83 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1)
br label %for.inc85
for.inc85: ; preds = %for.inc71.12, %if.then82
%17 = load i32, ptr %arrayidx5.2, align 8, !tbaa !5
%cmp80.1 = icmp eq i32 %17, 1
br i1 %cmp80.1, label %if.then82.1, label %for.inc85.1
if.then82.1: ; preds = %for.inc85
%call83.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2)
br label %for.inc85.1
for.inc85.1: ; preds = %if.then82.1, %for.inc85
%18 = load i32, ptr %arrayidx5.3, align 4, !tbaa !5
%cmp80.2 = icmp eq i32 %18, 1
br i1 %cmp80.2, label %if.then82.2, label %for.inc85.2
if.then82.2: ; preds = %for.inc85.1
%call83.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3)
br label %for.inc85.2
for.inc85.2: ; preds = %if.then82.2, %for.inc85.1
%19 = load i32, ptr %arrayidx5.4, align 16, !tbaa !5
%cmp80.3 = icmp eq i32 %19, 1
br i1 %cmp80.3, label %if.then82.3, label %for.inc85.3
if.then82.3: ; preds = %for.inc85.2
%call83.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4)
br label %for.inc85.3
for.inc85.3: ; preds = %if.then82.3, %for.inc85.2
%20 = load i32, ptr %arrayidx5.5, align 4, !tbaa !5
%cmp80.4 = icmp eq i32 %20, 1
br i1 %cmp80.4, label %if.then82.4, label %for.inc85.4
if.then82.4: ; preds = %for.inc85.3
%call83.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5)
br label %for.inc85.4
for.inc85.4: ; preds = %if.then82.4, %for.inc85.3
%21 = load i32, ptr %arrayidx5.6, align 8, !tbaa !5
%cmp80.5 = icmp eq i32 %21, 1
br i1 %cmp80.5, label %if.then82.5, label %for.inc85.5
if.then82.5: ; preds = %for.inc85.4
%call83.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6)
br label %for.inc85.5
for.inc85.5: ; preds = %if.then82.5, %for.inc85.4
%22 = load i32, ptr %arrayidx5.7, align 4, !tbaa !5
%cmp80.6 = icmp eq i32 %22, 1
br i1 %cmp80.6, label %if.then82.6, label %for.inc85.6
if.then82.6: ; preds = %for.inc85.5
%call83.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7)
br label %for.inc85.6
for.inc85.6: ; preds = %if.then82.6, %for.inc85.5
%23 = load i32, ptr %arrayidx5.8, align 16, !tbaa !5
%cmp80.7 = icmp eq i32 %23, 1
br i1 %cmp80.7, label %if.then82.7, label %for.inc85.7
if.then82.7: ; preds = %for.inc85.6
%call83.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8)
br label %for.inc85.7
for.inc85.7: ; preds = %if.then82.7, %for.inc85.6
%24 = load i32, ptr %arrayidx5.9, align 4, !tbaa !5
%cmp80.8 = icmp eq i32 %24, 1
br i1 %cmp80.8, label %if.then82.8, label %for.inc85.8
if.then82.8: ; preds = %for.inc85.7
%call83.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9)
br label %for.inc85.8
for.inc85.8: ; preds = %if.then82.8, %for.inc85.7
%25 = load i32, ptr %arrayidx5.10, align 8, !tbaa !5
%cmp80.9 = icmp eq i32 %25, 1
br i1 %cmp80.9, label %if.then82.9, label %for.inc85.9
if.then82.9: ; preds = %for.inc85.8
%call83.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10)
br label %for.inc85.9
for.inc85.9: ; preds = %if.then82.9, %for.inc85.8
%26 = load i32, ptr %arrayidx5.11, align 4, !tbaa !5
%cmp80.10 = icmp eq i32 %26, 1
br i1 %cmp80.10, label %if.then82.10, label %for.inc85.10
if.then82.10: ; preds = %for.inc85.9
%call83.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11)
br label %for.inc85.10
for.inc85.10: ; preds = %if.then82.10, %for.inc85.9
%27 = load i32, ptr %arrayidx5.12, align 16, !tbaa !5
%cmp80.11 = icmp eq i32 %27, 1
br i1 %cmp80.11, label %if.then82.11, label %for.inc85.11
if.then82.11: ; preds = %for.inc85.10
%call83.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12)
br label %for.inc85.11
for.inc85.11: ; preds = %if.then82.11, %for.inc85.10
%28 = load i32, ptr %arrayidx5.13, align 4, !tbaa !5
%cmp80.12 = icmp eq i32 %28, 1
br i1 %cmp80.12, label %if.then82.12, label %for.inc85.12
if.then82.12: ; preds = %for.inc85.11
%call83.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 13)
br label %for.inc85.12
for.inc85.12: ; preds = %if.then82.12, %for.inc85.11
%29 = load i32, ptr %arrayidx13.1, align 4, !tbaa !5
%cmp94 = icmp eq i32 %29, 1
br i1 %cmp94, label %if.then96, label %for.inc99
if.then96: ; preds = %for.inc85.12
%call97 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1)
br label %for.inc99
for.inc99: ; preds = %for.inc85.12, %if.then96
%30 = load i32, ptr %arrayidx13.2, align 8, !tbaa !5
%cmp94.1 = icmp eq i32 %30, 1
br i1 %cmp94.1, label %if.then96.1, label %for.inc99.1
if.then96.1: ; preds = %for.inc99
%call97.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2)
br label %for.inc99.1
for.inc99.1: ; preds = %if.then96.1, %for.inc99
%31 = load i32, ptr %arrayidx13.3, align 4, !tbaa !5
%cmp94.2 = icmp eq i32 %31, 1
br i1 %cmp94.2, label %if.then96.2, label %for.inc99.2
if.then96.2: ; preds = %for.inc99.1
%call97.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3)
br label %for.inc99.2
for.inc99.2: ; preds = %if.then96.2, %for.inc99.1
%32 = load i32, ptr %arrayidx13.4, align 16, !tbaa !5
%cmp94.3 = icmp eq i32 %32, 1
br i1 %cmp94.3, label %if.then96.3, label %for.inc99.3
if.then96.3: ; preds = %for.inc99.2
%call97.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4)
br label %for.inc99.3
for.inc99.3: ; preds = %if.then96.3, %for.inc99.2
%33 = load i32, ptr %arrayidx13.5, align 4, !tbaa !5
%cmp94.4 = icmp eq i32 %33, 1
br i1 %cmp94.4, label %if.then96.4, label %for.inc99.4
if.then96.4: ; preds = %for.inc99.3
%call97.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5)
br label %for.inc99.4
for.inc99.4: ; preds = %if.then96.4, %for.inc99.3
%34 = load i32, ptr %arrayidx13.6, align 8, !tbaa !5
%cmp94.5 = icmp eq i32 %34, 1
br i1 %cmp94.5, label %if.then96.5, label %for.inc99.5
if.then96.5: ; preds = %for.inc99.4
%call97.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6)
br label %for.inc99.5
for.inc99.5: ; preds = %if.then96.5, %for.inc99.4
%35 = load i32, ptr %arrayidx13.7, align 4, !tbaa !5
%cmp94.6 = icmp eq i32 %35, 1
br i1 %cmp94.6, label %if.then96.6, label %for.inc99.6
if.then96.6: ; preds = %for.inc99.5
%call97.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7)
br label %for.inc99.6
for.inc99.6: ; preds = %if.then96.6, %for.inc99.5
%36 = load i32, ptr %arrayidx13.8, align 16, !tbaa !5
%cmp94.7 = icmp eq i32 %36, 1
br i1 %cmp94.7, label %if.then96.7, label %for.inc99.7
if.then96.7: ; preds = %for.inc99.6
%call97.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8)
br label %for.inc99.7
for.inc99.7: ; preds = %if.then96.7, %for.inc99.6
%37 = load i32, ptr %arrayidx13.9, align 4, !tbaa !5
%cmp94.8 = icmp eq i32 %37, 1
br i1 %cmp94.8, label %if.then96.8, label %for.inc99.8
if.then96.8: ; preds = %for.inc99.7
%call97.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9)
br label %for.inc99.8
for.inc99.8: ; preds = %if.then96.8, %for.inc99.7
%38 = load i32, ptr %arrayidx13.10, align 8, !tbaa !5
%cmp94.9 = icmp eq i32 %38, 1
br i1 %cmp94.9, label %if.then96.9, label %for.inc99.9
if.then96.9: ; preds = %for.inc99.8
%call97.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10)
br label %for.inc99.9
for.inc99.9: ; preds = %if.then96.9, %for.inc99.8
%39 = load i32, ptr %arrayidx13.11, align 4, !tbaa !5
%cmp94.10 = icmp eq i32 %39, 1
br i1 %cmp94.10, label %if.then96.10, label %for.inc99.10
if.then96.10: ; preds = %for.inc99.9
%call97.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11)
br label %for.inc99.10
for.inc99.10: ; preds = %if.then96.10, %for.inc99.9
%40 = load i32, ptr %arrayidx13.12, align 16, !tbaa !5
%cmp94.11 = icmp eq i32 %40, 1
br i1 %cmp94.11, label %if.then96.11, label %for.inc99.11
if.then96.11: ; preds = %for.inc99.10
%call97.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12)
br label %for.inc99.11
for.inc99.11: ; preds = %if.then96.11, %for.inc99.10
%41 = load i32, ptr %arrayidx13.13, align 4, !tbaa !5
%cmp94.12 = icmp eq i32 %41, 1
br i1 %cmp94.12, label %if.then96.12, label %for.inc99.12
if.then96.12: ; preds = %for.inc99.11
%call97.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 13)
br label %for.inc99.12
for.inc99.12: ; preds = %if.then96.12, %for.inc99.11
%42 = load i32, ptr %arrayidx21.1, align 4, !tbaa !5
%cmp108 = icmp eq i32 %42, 1
br i1 %cmp108, label %if.then110, label %for.inc113
if.then110: ; preds = %for.inc99.12
%call111 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 1)
br label %for.inc113
for.inc113: ; preds = %for.inc99.12, %if.then110
%43 = load i32, ptr %arrayidx21.2, align 8, !tbaa !5
%cmp108.1 = icmp eq i32 %43, 1
br i1 %cmp108.1, label %if.then110.1, label %for.inc113.1
if.then110.1: ; preds = %for.inc113
%call111.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 2)
br label %for.inc113.1
for.inc113.1: ; preds = %if.then110.1, %for.inc113
%44 = load i32, ptr %arrayidx21.3, align 4, !tbaa !5
%cmp108.2 = icmp eq i32 %44, 1
br i1 %cmp108.2, label %if.then110.2, label %for.inc113.2
if.then110.2: ; preds = %for.inc113.1
%call111.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 3)
br label %for.inc113.2
for.inc113.2: ; preds = %if.then110.2, %for.inc113.1
%45 = load i32, ptr %arrayidx21.4, align 16, !tbaa !5
%cmp108.3 = icmp eq i32 %45, 1
br i1 %cmp108.3, label %if.then110.3, label %for.inc113.3
if.then110.3: ; preds = %for.inc113.2
%call111.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 4)
br label %for.inc113.3
for.inc113.3: ; preds = %if.then110.3, %for.inc113.2
%46 = load i32, ptr %arrayidx21.5, align 4, !tbaa !5
%cmp108.4 = icmp eq i32 %46, 1
br i1 %cmp108.4, label %if.then110.4, label %for.inc113.4
if.then110.4: ; preds = %for.inc113.3
%call111.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 5)
br label %for.inc113.4
for.inc113.4: ; preds = %if.then110.4, %for.inc113.3
%47 = load i32, ptr %arrayidx21.6, align 8, !tbaa !5
%cmp108.5 = icmp eq i32 %47, 1
br i1 %cmp108.5, label %if.then110.5, label %for.inc113.5
if.then110.5: ; preds = %for.inc113.4
%call111.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 6)
br label %for.inc113.5
for.inc113.5: ; preds = %if.then110.5, %for.inc113.4
%48 = load i32, ptr %arrayidx21.7, align 4, !tbaa !5
%cmp108.6 = icmp eq i32 %48, 1
br i1 %cmp108.6, label %if.then110.6, label %for.inc113.6
if.then110.6: ; preds = %for.inc113.5
%call111.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 7)
br label %for.inc113.6
for.inc113.6: ; preds = %if.then110.6, %for.inc113.5
%49 = load i32, ptr %arrayidx21.8, align 16, !tbaa !5
%cmp108.7 = icmp eq i32 %49, 1
br i1 %cmp108.7, label %if.then110.7, label %for.inc113.7
if.then110.7: ; preds = %for.inc113.6
%call111.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 8)
br label %for.inc113.7
for.inc113.7: ; preds = %if.then110.7, %for.inc113.6
%50 = load i32, ptr %arrayidx21.9, align 4, !tbaa !5
%cmp108.8 = icmp eq i32 %50, 1
br i1 %cmp108.8, label %if.then110.8, label %for.inc113.8
if.then110.8: ; preds = %for.inc113.7
%call111.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 9)
br label %for.inc113.8
for.inc113.8: ; preds = %if.then110.8, %for.inc113.7
%51 = load i32, ptr %arrayidx21.10, align 8, !tbaa !5
%cmp108.9 = icmp eq i32 %51, 1
br i1 %cmp108.9, label %if.then110.9, label %for.inc113.9
if.then110.9: ; preds = %for.inc113.8
%call111.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 10)
br label %for.inc113.9
for.inc113.9: ; preds = %if.then110.9, %for.inc113.8
%52 = load i32, ptr %arrayidx21.11, align 4, !tbaa !5
%cmp108.10 = icmp eq i32 %52, 1
br i1 %cmp108.10, label %if.then110.10, label %for.inc113.10
if.then110.10: ; preds = %for.inc113.9
%call111.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 11)
br label %for.inc113.10
for.inc113.10: ; preds = %if.then110.10, %for.inc113.9
%53 = load i32, ptr %arrayidx21.12, align 16, !tbaa !5
%cmp108.11 = icmp eq i32 %53, 1
br i1 %cmp108.11, label %if.then110.11, label %for.inc113.11
if.then110.11: ; preds = %for.inc113.10
%call111.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 12)
br label %for.inc113.11
for.inc113.11: ; preds = %if.then110.11, %for.inc113.10
%54 = load i32, ptr %arrayidx21.13, align 4, !tbaa !5
%cmp108.12 = icmp eq i32 %54, 1
br i1 %cmp108.12, label %if.then110.12, label %for.inc113.12
if.then110.12: ; preds = %for.inc113.11
%call111.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 13)
br label %for.inc113.12
for.inc113.12: ; preds = %if.then110.12, %for.inc113.11
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %jo) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %su) #3
call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %d) #3
call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %c) #3
call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %h) #3
call void @llvm.lifetime.end.p0(i64 56, 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 i,j,n[5][14],maisuu,num;
char mark,dummy;
scanf("%d",&maisuu);
for(i=0; i < 5; i++){
for(j=0; j < 14; j++){
n[i][j]=0;
}
}
for(i=0; i < maisuu; i++){
scanf("%c",&dummy);
scanf("%c %d",&mark,&num);
if(mark == 'S'){
n[0][num] = 1;
}
if(mark == 'H'){
n[1][num] = 1;
}
if(mark == 'C'){
n[2][num] = 1;
}
if(mark == 'D'){
n[3][num] = 1;
}
}
for(i = 0; i < 4; i++){
for(j=1; j < 14; j++){
if(n[i][j]==0 && i == 0) printf("S %d\n",j);
if(n[i][j]==0 && i == 1) printf("H %d\n",j);
if(n[i][j]==0 && i==2) printf("C %d\n",j);
if(n[i][j]==0 && i==3) printf("D %d\n",j);
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214462/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214462/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [5 x [14 x i32]], align 16
%maisuu = alloca i32, align 4
%num = alloca i32, align 4
%mark = alloca i8, align 1
%dummy = alloca i8, align 1
call void @llvm.lifetime.start.p0(i64 280, ptr nonnull %n) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %maisuu) #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 void @llvm.lifetime.start.p0(i64 1, ptr nonnull %dummy) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %maisuu)
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(280) %n, i8 0, i64 280, i1 false), !tbaa !5
%0 = load i32, ptr %maisuu, align 4, !tbaa !5
%cmp10145 = icmp sgt i32 %0, 0
br i1 %cmp10145, label %for.body11, label %for.cond46.preheader
for.cond46.preheader: ; preds = %for.inc43, %entry
%arrayidx57.us151 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 1, i64 1
%1 = load i32, ptr %arrayidx57.us151, align 4
%cmp69.us156 = icmp eq i32 %1, 0
%arrayidx57.us151.1 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 1, i64 2
%2 = load i32, ptr %arrayidx57.us151.1, align 16
%cmp69.us156.1 = icmp eq i32 %2, 0
%arrayidx57.us151.2 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 1, i64 3
%3 = load i32, ptr %arrayidx57.us151.2, align 4
%cmp69.us156.2 = icmp eq i32 %3, 0
%arrayidx57.us151.3 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 1, i64 4
%4 = load i32, ptr %arrayidx57.us151.3, align 8
%cmp69.us156.3 = icmp eq i32 %4, 0
%arrayidx57.us151.4 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 1, i64 5
%5 = load i32, ptr %arrayidx57.us151.4, align 4
%cmp69.us156.4 = icmp eq i32 %5, 0
%arrayidx57.us151.5 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 1, i64 6
%6 = load <8 x i32>, ptr %arrayidx57.us151.5, align 16
%7 = icmp eq <8 x i32> %6, zeroinitializer
%8 = extractelement <8 x i1> %7, i64 0
%9 = extractelement <8 x i1> %7, i64 1
%10 = extractelement <8 x i1> %7, i64 2
%11 = extractelement <8 x i1> %7, i64 3
%12 = extractelement <8 x i1> %7, i64 4
%13 = extractelement <8 x i1> %7, i64 5
%14 = extractelement <8 x i1> %7, i64 6
%15 = extractelement <8 x i1> %7, i64 7
br label %for.cond50.preheader
for.body11: ; preds = %entry, %for.inc43
%i.1146 = phi i32 [ %inc44, %for.inc43 ], [ 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 %mark, ptr noundef nonnull %num)
%16 = load i8, ptr %mark, align 1, !tbaa !9
switch i8 %16, label %for.inc43 [
i8 83, label %if.end.thread
i8 72, label %if.then22
i8 67, label %if.then30
i8 68, label %if.then38
]
if.end.thread: ; preds = %for.body11
%17 = load i32, ptr %num, align 4, !tbaa !5
%idxprom17 = sext i32 %17 to i64
%arrayidx18 = getelementptr inbounds [14 x i32], ptr %n, i64 0, i64 %idxprom17
br label %for.inc43.sink.split
if.then22: ; preds = %for.body11
%18 = load i32, ptr %num, align 4, !tbaa !5
%idxprom24 = sext i32 %18 to i64
%arrayidx25 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 1, i64 %idxprom24
br label %for.inc43.sink.split
if.then30: ; preds = %for.body11
%19 = load i32, ptr %num, align 4, !tbaa !5
%idxprom32 = sext i32 %19 to i64
%arrayidx33 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 2, i64 %idxprom32
br label %for.inc43.sink.split
if.then38: ; preds = %for.body11
%20 = load i32, ptr %num, align 4, !tbaa !5
%idxprom40 = sext i32 %20 to i64
%arrayidx41 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 3, i64 %idxprom40
br label %for.inc43.sink.split
for.inc43.sink.split: ; preds = %if.then38, %if.then30, %if.end.thread, %if.then22
%arrayidx25.sink = phi ptr [ %arrayidx25, %if.then22 ], [ %arrayidx18, %if.end.thread ], [ %arrayidx33, %if.then30 ], [ %arrayidx41, %if.then38 ]
store i32 1, ptr %arrayidx25.sink, align 4, !tbaa !5
br label %for.inc43
for.inc43: ; preds = %for.inc43.sink.split, %for.body11
%inc44 = add nuw nsw i32 %i.1146, 1
%21 = load i32, ptr %maisuu, align 4, !tbaa !5
%cmp10 = icmp slt i32 %inc44, %21
br i1 %cmp10, label %for.body11, label %for.cond46.preheader, !llvm.loop !10
for.cond50.preheader: ; preds = %for.cond46.preheader, %for.inc104
%indvars.iv = phi i64 [ 0, %for.cond46.preheader ], [ %indvars.iv.next, %for.inc104 ]
%cmp72 = icmp eq i64 %indvars.iv, 1
%cmp84 = icmp eq i64 %indvars.iv, 2
%cmp96 = icmp eq i64 %indvars.iv, 3
br i1 %cmp72, label %if.end64.us155, label %for.body53.us.preheader
for.body53.us.preheader: ; preds = %for.cond50.preheader
%arrayidx57.us = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 %indvars.iv, i64 1
%22 = load i32, ptr %arrayidx57.us, align 4, !tbaa !5
%23 = trunc i64 %indvars.iv to i32
%24 = or i32 %22, %23
%or.cond.us = icmp eq i32 %24, 0
br i1 %or.cond.us, label %if.then62.us, label %if.end64.us
if.then62.us: ; preds = %for.body53.us.preheader
%call63.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1)
br label %if.end64.us
if.end64.us: ; preds = %if.then62.us, %for.body53.us.preheader
%cmp69.us = icmp eq i32 %22, 0
%or.cond108.us = and i1 %cmp84, %cmp69.us
br i1 %or.cond108.us, label %for.inc101.us.sink.split, label %if.end88.us
if.end88.us: ; preds = %if.end64.us
%or.cond109.us = and i1 %cmp96, %cmp69.us
br i1 %or.cond109.us, label %for.inc101.us.sink.split, label %for.inc101.us
for.inc101.us.sink.split: ; preds = %if.end64.us, %if.end88.us
%.str.5.sink = phi ptr [ @.str.6, %if.end88.us ], [ @.str.5, %if.end64.us ]
%call87.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink, i32 noundef 1)
br label %for.inc101.us
for.inc101.us: ; preds = %for.inc101.us.sink.split, %if.end88.us
%arrayidx57.us.1 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 %indvars.iv, i64 2
%25 = load i32, ptr %arrayidx57.us.1, align 8, !tbaa !5
%26 = or i32 %25, %23
%or.cond.us.1 = icmp eq i32 %26, 0
br i1 %or.cond.us.1, label %if.then62.us.1, label %if.end64.us.1
if.then62.us.1: ; preds = %for.inc101.us
%call63.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2)
br label %if.end64.us.1
if.end64.us.1: ; preds = %if.then62.us.1, %for.inc101.us
%cmp69.us.1 = icmp eq i32 %25, 0
%or.cond108.us.1 = and i1 %cmp84, %cmp69.us.1
br i1 %or.cond108.us.1, label %for.inc101.us.1.sink.split, label %if.end88.us.1
if.end88.us.1: ; preds = %if.end64.us.1
%or.cond109.us.1 = and i1 %cmp96, %cmp69.us.1
br i1 %or.cond109.us.1, label %for.inc101.us.1.sink.split, label %for.inc101.us.1
for.inc101.us.1.sink.split: ; preds = %if.end64.us.1, %if.end88.us.1
%.str.5.sink178 = phi ptr [ @.str.6, %if.end88.us.1 ], [ @.str.5, %if.end64.us.1 ]
%call87.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink178, i32 noundef 2)
br label %for.inc101.us.1
for.inc101.us.1: ; preds = %for.inc101.us.1.sink.split, %if.end88.us.1
%arrayidx57.us.2 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 %indvars.iv, i64 3
%27 = load i32, ptr %arrayidx57.us.2, align 4, !tbaa !5
%28 = or i32 %27, %23
%or.cond.us.2 = icmp eq i32 %28, 0
br i1 %or.cond.us.2, label %if.then62.us.2, label %if.end64.us.2
if.then62.us.2: ; preds = %for.inc101.us.1
%call63.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3)
br label %if.end64.us.2
if.end64.us.2: ; preds = %if.then62.us.2, %for.inc101.us.1
%cmp69.us.2 = icmp eq i32 %27, 0
%or.cond108.us.2 = and i1 %cmp84, %cmp69.us.2
br i1 %or.cond108.us.2, label %for.inc101.us.2.sink.split, label %if.end88.us.2
if.end88.us.2: ; preds = %if.end64.us.2
%or.cond109.us.2 = and i1 %cmp96, %cmp69.us.2
br i1 %or.cond109.us.2, label %for.inc101.us.2.sink.split, label %for.inc101.us.2
for.inc101.us.2.sink.split: ; preds = %if.end64.us.2, %if.end88.us.2
%.str.5.sink179 = phi ptr [ @.str.6, %if.end88.us.2 ], [ @.str.5, %if.end64.us.2 ]
%call87.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink179, i32 noundef 3)
br label %for.inc101.us.2
for.inc101.us.2: ; preds = %for.inc101.us.2.sink.split, %if.end88.us.2
%arrayidx57.us.3 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 %indvars.iv, i64 4
%29 = load i32, ptr %arrayidx57.us.3, align 8, !tbaa !5
%30 = or i32 %29, %23
%or.cond.us.3 = icmp eq i32 %30, 0
br i1 %or.cond.us.3, label %if.then62.us.3, label %if.end64.us.3
if.then62.us.3: ; preds = %for.inc101.us.2
%call63.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4)
br label %if.end64.us.3
if.end64.us.3: ; preds = %if.then62.us.3, %for.inc101.us.2
%cmp69.us.3 = icmp eq i32 %29, 0
%or.cond108.us.3 = and i1 %cmp84, %cmp69.us.3
br i1 %or.cond108.us.3, label %for.inc101.us.3.sink.split, label %if.end88.us.3
if.end88.us.3: ; preds = %if.end64.us.3
%or.cond109.us.3 = and i1 %cmp96, %cmp69.us.3
br i1 %or.cond109.us.3, label %for.inc101.us.3.sink.split, label %for.inc101.us.3
for.inc101.us.3.sink.split: ; preds = %if.end64.us.3, %if.end88.us.3
%.str.5.sink180 = phi ptr [ @.str.6, %if.end88.us.3 ], [ @.str.5, %if.end64.us.3 ]
%call87.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink180, i32 noundef 4)
br label %for.inc101.us.3
for.inc101.us.3: ; preds = %for.inc101.us.3.sink.split, %if.end88.us.3
%arrayidx57.us.4 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 %indvars.iv, i64 5
%31 = load i32, ptr %arrayidx57.us.4, align 4, !tbaa !5
%32 = or i32 %31, %23
%or.cond.us.4 = icmp eq i32 %32, 0
br i1 %or.cond.us.4, label %if.then62.us.4, label %if.end64.us.4
if.then62.us.4: ; preds = %for.inc101.us.3
%call63.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5)
br label %if.end64.us.4
if.end64.us.4: ; preds = %if.then62.us.4, %for.inc101.us.3
%cmp69.us.4 = icmp eq i32 %31, 0
%or.cond108.us.4 = and i1 %cmp84, %cmp69.us.4
br i1 %or.cond108.us.4, label %for.inc101.us.4.sink.split, label %if.end88.us.4
if.end88.us.4: ; preds = %if.end64.us.4
%or.cond109.us.4 = and i1 %cmp96, %cmp69.us.4
br i1 %or.cond109.us.4, label %for.inc101.us.4.sink.split, label %for.inc101.us.4
for.inc101.us.4.sink.split: ; preds = %if.end64.us.4, %if.end88.us.4
%.str.5.sink181 = phi ptr [ @.str.6, %if.end88.us.4 ], [ @.str.5, %if.end64.us.4 ]
%call87.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink181, i32 noundef 5)
br label %for.inc101.us.4
for.inc101.us.4: ; preds = %for.inc101.us.4.sink.split, %if.end88.us.4
%arrayidx57.us.5 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 %indvars.iv, i64 6
%33 = load i32, ptr %arrayidx57.us.5, align 8, !tbaa !5
%34 = or i32 %33, %23
%or.cond.us.5 = icmp eq i32 %34, 0
br i1 %or.cond.us.5, label %if.then62.us.5, label %if.end64.us.5
if.then62.us.5: ; preds = %for.inc101.us.4
%call63.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6)
br label %if.end64.us.5
if.end64.us.5: ; preds = %if.then62.us.5, %for.inc101.us.4
%cmp69.us.5 = icmp eq i32 %33, 0
%or.cond108.us.5 = and i1 %cmp84, %cmp69.us.5
br i1 %or.cond108.us.5, label %for.inc101.us.5.sink.split, label %if.end88.us.5
if.end88.us.5: ; preds = %if.end64.us.5
%or.cond109.us.5 = and i1 %cmp96, %cmp69.us.5
br i1 %or.cond109.us.5, label %for.inc101.us.5.sink.split, label %for.inc101.us.5
for.inc101.us.5.sink.split: ; preds = %if.end64.us.5, %if.end88.us.5
%.str.5.sink182 = phi ptr [ @.str.6, %if.end88.us.5 ], [ @.str.5, %if.end64.us.5 ]
%call87.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink182, i32 noundef 6)
br label %for.inc101.us.5
for.inc101.us.5: ; preds = %for.inc101.us.5.sink.split, %if.end88.us.5
%arrayidx57.us.6 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 %indvars.iv, i64 7
%35 = load i32, ptr %arrayidx57.us.6, align 4, !tbaa !5
%36 = or i32 %35, %23
%or.cond.us.6 = icmp eq i32 %36, 0
br i1 %or.cond.us.6, label %if.then62.us.6, label %if.end64.us.6
if.then62.us.6: ; preds = %for.inc101.us.5
%call63.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7)
br label %if.end64.us.6
if.end64.us.6: ; preds = %if.then62.us.6, %for.inc101.us.5
%cmp69.us.6 = icmp eq i32 %35, 0
%or.cond108.us.6 = and i1 %cmp84, %cmp69.us.6
br i1 %or.cond108.us.6, label %for.inc101.us.6.sink.split, label %if.end88.us.6
if.end88.us.6: ; preds = %if.end64.us.6
%or.cond109.us.6 = and i1 %cmp96, %cmp69.us.6
br i1 %or.cond109.us.6, label %for.inc101.us.6.sink.split, label %for.inc101.us.6
for.inc101.us.6.sink.split: ; preds = %if.end64.us.6, %if.end88.us.6
%.str.5.sink183 = phi ptr [ @.str.6, %if.end88.us.6 ], [ @.str.5, %if.end64.us.6 ]
%call87.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink183, i32 noundef 7)
br label %for.inc101.us.6
for.inc101.us.6: ; preds = %for.inc101.us.6.sink.split, %if.end88.us.6
%arrayidx57.us.7 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 %indvars.iv, i64 8
%37 = load i32, ptr %arrayidx57.us.7, align 8, !tbaa !5
%38 = or i32 %37, %23
%or.cond.us.7 = icmp eq i32 %38, 0
br i1 %or.cond.us.7, label %if.then62.us.7, label %if.end64.us.7
if.then62.us.7: ; preds = %for.inc101.us.6
%call63.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8)
br label %if.end64.us.7
if.end64.us.7: ; preds = %if.then62.us.7, %for.inc101.us.6
%cmp69.us.7 = icmp eq i32 %37, 0
%or.cond108.us.7 = and i1 %cmp84, %cmp69.us.7
br i1 %or.cond108.us.7, label %for.inc101.us.7.sink.split, label %if.end88.us.7
if.end88.us.7: ; preds = %if.end64.us.7
%or.cond109.us.7 = and i1 %cmp96, %cmp69.us.7
br i1 %or.cond109.us.7, label %for.inc101.us.7.sink.split, label %for.inc101.us.7
for.inc101.us.7.sink.split: ; preds = %if.end64.us.7, %if.end88.us.7
%.str.5.sink184 = phi ptr [ @.str.6, %if.end88.us.7 ], [ @.str.5, %if.end64.us.7 ]
%call87.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink184, i32 noundef 8)
br label %for.inc101.us.7
for.inc101.us.7: ; preds = %for.inc101.us.7.sink.split, %if.end88.us.7
%arrayidx57.us.8 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 %indvars.iv, i64 9
%39 = load i32, ptr %arrayidx57.us.8, align 4, !tbaa !5
%40 = or i32 %39, %23
%or.cond.us.8 = icmp eq i32 %40, 0
br i1 %or.cond.us.8, label %if.then62.us.8, label %if.end64.us.8
if.then62.us.8: ; preds = %for.inc101.us.7
%call63.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9)
br label %if.end64.us.8
if.end64.us.8: ; preds = %if.then62.us.8, %for.inc101.us.7
%cmp69.us.8 = icmp eq i32 %39, 0
%or.cond108.us.8 = and i1 %cmp84, %cmp69.us.8
br i1 %or.cond108.us.8, label %for.inc101.us.8.sink.split, label %if.end88.us.8
if.end88.us.8: ; preds = %if.end64.us.8
%or.cond109.us.8 = and i1 %cmp96, %cmp69.us.8
br i1 %or.cond109.us.8, label %for.inc101.us.8.sink.split, label %for.inc101.us.8
for.inc101.us.8.sink.split: ; preds = %if.end64.us.8, %if.end88.us.8
%.str.5.sink185 = phi ptr [ @.str.6, %if.end88.us.8 ], [ @.str.5, %if.end64.us.8 ]
%call87.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink185, i32 noundef 9)
br label %for.inc101.us.8
for.inc101.us.8: ; preds = %for.inc101.us.8.sink.split, %if.end88.us.8
%arrayidx57.us.9 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 %indvars.iv, i64 10
%41 = load i32, ptr %arrayidx57.us.9, align 8, !tbaa !5
%42 = or i32 %41, %23
%or.cond.us.9 = icmp eq i32 %42, 0
br i1 %or.cond.us.9, label %if.then62.us.9, label %if.end64.us.9
if.then62.us.9: ; preds = %for.inc101.us.8
%call63.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10)
br label %if.end64.us.9
if.end64.us.9: ; preds = %if.then62.us.9, %for.inc101.us.8
%cmp69.us.9 = icmp eq i32 %41, 0
%or.cond108.us.9 = and i1 %cmp84, %cmp69.us.9
br i1 %or.cond108.us.9, label %for.inc101.us.9.sink.split, label %if.end88.us.9
if.end88.us.9: ; preds = %if.end64.us.9
%or.cond109.us.9 = and i1 %cmp96, %cmp69.us.9
br i1 %or.cond109.us.9, label %for.inc101.us.9.sink.split, label %for.inc101.us.9
for.inc101.us.9.sink.split: ; preds = %if.end64.us.9, %if.end88.us.9
%.str.5.sink186 = phi ptr [ @.str.6, %if.end88.us.9 ], [ @.str.5, %if.end64.us.9 ]
%call87.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink186, i32 noundef 10)
br label %for.inc101.us.9
for.inc101.us.9: ; preds = %for.inc101.us.9.sink.split, %if.end88.us.9
%arrayidx57.us.10 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 %indvars.iv, i64 11
%43 = load i32, ptr %arrayidx57.us.10, align 4, !tbaa !5
%44 = or i32 %43, %23
%or.cond.us.10 = icmp eq i32 %44, 0
br i1 %or.cond.us.10, label %if.then62.us.10, label %if.end64.us.10
if.then62.us.10: ; preds = %for.inc101.us.9
%call63.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11)
br label %if.end64.us.10
if.end64.us.10: ; preds = %if.then62.us.10, %for.inc101.us.9
%cmp69.us.10 = icmp eq i32 %43, 0
%or.cond108.us.10 = and i1 %cmp84, %cmp69.us.10
br i1 %or.cond108.us.10, label %for.inc101.us.10.sink.split, label %if.end88.us.10
if.end88.us.10: ; preds = %if.end64.us.10
%or.cond109.us.10 = and i1 %cmp96, %cmp69.us.10
br i1 %or.cond109.us.10, label %for.inc101.us.10.sink.split, label %for.inc101.us.10
for.inc101.us.10.sink.split: ; preds = %if.end64.us.10, %if.end88.us.10
%.str.5.sink187 = phi ptr [ @.str.6, %if.end88.us.10 ], [ @.str.5, %if.end64.us.10 ]
%call87.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink187, i32 noundef 11)
br label %for.inc101.us.10
for.inc101.us.10: ; preds = %for.inc101.us.10.sink.split, %if.end88.us.10
%arrayidx57.us.11 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 %indvars.iv, i64 12
%45 = load i32, ptr %arrayidx57.us.11, align 8, !tbaa !5
%46 = or i32 %45, %23
%or.cond.us.11 = icmp eq i32 %46, 0
br i1 %or.cond.us.11, label %if.then62.us.11, label %if.end64.us.11
if.then62.us.11: ; preds = %for.inc101.us.10
%call63.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12)
br label %if.end64.us.11
if.end64.us.11: ; preds = %if.then62.us.11, %for.inc101.us.10
%cmp69.us.11 = icmp eq i32 %45, 0
%or.cond108.us.11 = and i1 %cmp84, %cmp69.us.11
br i1 %or.cond108.us.11, label %for.inc101.us.11.sink.split, label %if.end88.us.11
if.end88.us.11: ; preds = %if.end64.us.11
%or.cond109.us.11 = and i1 %cmp96, %cmp69.us.11
br i1 %or.cond109.us.11, label %for.inc101.us.11.sink.split, label %for.inc101.us.11
for.inc101.us.11.sink.split: ; preds = %if.end64.us.11, %if.end88.us.11
%.str.5.sink188 = phi ptr [ @.str.6, %if.end88.us.11 ], [ @.str.5, %if.end64.us.11 ]
%call87.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink188, i32 noundef 12)
br label %for.inc101.us.11
for.inc101.us.11: ; preds = %for.inc101.us.11.sink.split, %if.end88.us.11
%arrayidx57.us.12 = getelementptr inbounds [5 x [14 x i32]], ptr %n, i64 0, i64 %indvars.iv, i64 13
%47 = load i32, ptr %arrayidx57.us.12, align 4, !tbaa !5
%48 = or i32 %47, %23
%or.cond.us.12 = icmp eq i32 %48, 0
br i1 %or.cond.us.12, label %if.then62.us.12, label %if.end64.us.12
if.then62.us.12: ; preds = %for.inc101.us.11
%call63.us.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 13)
br label %if.end64.us.12
if.end64.us.12: ; preds = %if.then62.us.12, %for.inc101.us.11
%cmp69.us.12 = icmp eq i32 %47, 0
%or.cond108.us.12 = and i1 %cmp84, %cmp69.us.12
br i1 %or.cond108.us.12, label %for.inc104.sink.split, label %if.end88.us.12
if.end88.us.12: ; preds = %if.end64.us.12
%or.cond109.us.12 = and i1 %cmp96, %cmp69.us.12
br i1 %or.cond109.us.12, label %for.inc104.thread, label %for.inc104
for.inc104.thread: ; preds = %if.end88.us.12
%call99.us.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 13)
br label %for.end106
if.end64.us155: ; preds = %for.cond50.preheader
br i1 %cmp69.us156, label %if.end76.thread.us, label %if.end64.us155.1
if.end76.thread.us: ; preds = %if.end64.us155
%call75.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1)
br label %if.end64.us155.1
if.end64.us155.1: ; preds = %if.end76.thread.us, %if.end64.us155
br i1 %cmp69.us156.1, label %if.end76.thread.us.1, label %if.end64.us155.2
if.end76.thread.us.1: ; preds = %if.end64.us155.1
%call75.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2)
br label %if.end64.us155.2
if.end64.us155.2: ; preds = %if.end64.us155.1, %if.end76.thread.us.1
br i1 %cmp69.us156.2, label %if.end76.thread.us.2, label %if.end64.us155.3
if.end76.thread.us.2: ; preds = %if.end64.us155.2
%call75.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3)
br label %if.end64.us155.3
if.end64.us155.3: ; preds = %if.end64.us155.2, %if.end76.thread.us.2
br i1 %cmp69.us156.3, label %if.end76.thread.us.3, label %if.end64.us155.4
if.end76.thread.us.3: ; preds = %if.end64.us155.3
%call75.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4)
br label %if.end64.us155.4
if.end64.us155.4: ; preds = %if.end64.us155.3, %if.end76.thread.us.3
br i1 %cmp69.us156.4, label %if.end76.thread.us.4, label %if.end64.us155.5
if.end76.thread.us.4: ; preds = %if.end64.us155.4
%call75.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5)
br label %if.end64.us155.5
if.end64.us155.5: ; preds = %if.end64.us155.4, %if.end76.thread.us.4
br i1 %8, label %if.end76.thread.us.5, label %if.end64.us155.6
if.end76.thread.us.5: ; preds = %if.end64.us155.5
%call75.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6)
br label %if.end64.us155.6
if.end64.us155.6: ; preds = %if.end64.us155.5, %if.end76.thread.us.5
br i1 %9, label %if.end76.thread.us.6, label %if.end64.us155.7
if.end76.thread.us.6: ; preds = %if.end64.us155.6
%call75.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7)
br label %if.end64.us155.7
if.end64.us155.7: ; preds = %if.end64.us155.6, %if.end76.thread.us.6
br i1 %10, label %if.end76.thread.us.7, label %if.end64.us155.8
if.end76.thread.us.7: ; preds = %if.end64.us155.7
%call75.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8)
br label %if.end64.us155.8
if.end64.us155.8: ; preds = %if.end64.us155.7, %if.end76.thread.us.7
br i1 %11, label %if.end76.thread.us.8, label %if.end64.us155.9
if.end76.thread.us.8: ; preds = %if.end64.us155.8
%call75.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9)
br label %if.end64.us155.9
if.end64.us155.9: ; preds = %if.end64.us155.8, %if.end76.thread.us.8
br i1 %12, label %if.end76.thread.us.9, label %if.end64.us155.10
if.end76.thread.us.9: ; preds = %if.end64.us155.9
%call75.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10)
br label %if.end64.us155.10
if.end64.us155.10: ; preds = %if.end64.us155.9, %if.end76.thread.us.9
br i1 %13, label %if.end76.thread.us.10, label %if.end64.us155.11
if.end76.thread.us.10: ; preds = %if.end64.us155.10
%call75.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11)
br label %if.end64.us155.11
if.end64.us155.11: ; preds = %if.end64.us155.10, %if.end76.thread.us.10
br i1 %14, label %if.end76.thread.us.11, label %if.end64.us155.12
if.end76.thread.us.11: ; preds = %if.end64.us155.11
%call75.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12)
br label %if.end64.us155.12
if.end64.us155.12: ; preds = %if.end64.us155.11, %if.end76.thread.us.11
br i1 %15, label %for.inc104.sink.split, label %for.inc104
for.inc104.sink.split: ; preds = %if.end64.us155.12, %if.end64.us.12
%.str.4.sink = phi ptr [ @.str.5, %if.end64.us.12 ], [ @.str.4, %if.end64.us155.12 ]
%call75.us.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.4.sink, i32 noundef 13)
br label %for.inc104
for.inc104: ; preds = %for.inc104.sink.split, %if.end64.us155.12, %if.end88.us.12
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond.not = icmp eq i64 %indvars.iv.next, 4
br i1 %exitcond.not, label %for.end106, label %for.cond50.preheader, !llvm.loop !12
for.end106: ; preds = %for.inc104, %for.inc104.thread
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %dummy) #4
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 %maisuu) #4
call void @llvm.lifetime.end.p0(i64 280, 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,card[4][13] = {0};
int i, j, d;
char m;
scanf("%d", &n);
for(i=0;i<n;i++){
scanf(" %c %d", &m, &d);
switch(m){
case 'S' : card[0][d-1] = 1;
break;
case 'H' : card[1][d-1] = 1;
break;
case 'C' : card[2][d-1] = 1;
break;
case 'D' : card[3][d-1] = 1;
break;
}
}
for(i=0;i<4;i++){
for(j=0;j<13;j++){
if(card[i][j] == 0){
switch(i){
case 0: printf("S %d", j+1);
break;
case 1: printf("H %d", j+1);
break;
case 2: printf("C %d", j+1);
break;
case 3: printf("D %d", j+1);
break;
}
printf("\n");
}
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214505/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214505/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [5 x i8] c"S %d\00", align 1
@.str.3 = private unnamed_addr constant [5 x i8] c"H %d\00", align 1
@.str.4 = private unnamed_addr constant [5 x i8] c"C %d\00", align 1
@.str.5 = private unnamed_addr constant [5 x i8] c"D %d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
%card = alloca [4 x [13 x i32]], align 16
%d = alloca i32, align 4
%m = alloca 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 %card) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %card, i8 0, i64 208, i1 false)
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #5
call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %m) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp62 = icmp sgt i32 %0, 0
br i1 %cmp62, label %for.body, label %for.cond22.preheader.preheader
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.1, ptr noundef nonnull %m, ptr noundef nonnull %d)
%1 = load i8, ptr %m, 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 %d, align 4, !tbaa !5
%sub = add nsw i32 %2, -1
%idxprom = sext i32 %sub to i64
%arrayidx2 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 %idxprom
br label %for.inc.sink.split
sw.bb3: ; preds = %for.body
%3 = load i32, ptr %d, 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 %card, i64 0, i64 1, i64 %idxprom6
br label %for.inc.sink.split
sw.bb8: ; preds = %for.body
%4 = load i32, ptr %d, 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 %card, i64 0, i64 2, i64 %idxprom11
br label %for.inc.sink.split
sw.bb13: ; preds = %for.body
%5 = load i32, ptr %d, 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 %card, 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.063, 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.inc48
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc48 ], [ 0, %for.cond22.preheader.preheader ]
%7 = trunc i64 %indvars.iv to i32
%arrayidx29 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 0
%8 = load i32, ptr %arrayidx29, align 4, !tbaa !5
%cmp30 = icmp eq i32 %8, 0
switch i32 %7, label %for.body25.preheader [
i32 0, label %for.body25.us.preheader
i32 1, label %for.body25.us67.preheader
i32 2, label %for.body25.us80.preheader
i32 3, label %for.body25.us93.preheader
]
for.body25.us93.preheader: ; preds = %for.cond22.preheader
br i1 %cmp30, label %if.then.us98, label %for.inc45.us101
for.body25.us80.preheader: ; preds = %for.cond22.preheader
br i1 %cmp30, label %if.then.us85, label %for.inc45.us88
for.body25.us67.preheader: ; preds = %for.cond22.preheader
br i1 %cmp30, label %if.then.us72, label %for.inc45.us75
for.body25.us.preheader: ; preds = %for.cond22.preheader
br i1 %cmp30, label %if.then.us, label %for.inc45.us
for.body25.preheader: ; preds = %for.cond22.preheader
br i1 %cmp30, label %if.then, label %for.inc45
if.then.us: ; preds = %for.body25.us.preheader
%call33.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 1)
%putchar.us = call i32 @putchar(i32 10)
br label %for.inc45.us
for.inc45.us: ; preds = %if.then.us, %for.body25.us.preheader
%arrayidx29.us.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1
%9 = load i32, ptr %arrayidx29.us.1, align 4, !tbaa !5
%cmp30.us.1 = icmp eq i32 %9, 0
br i1 %cmp30.us.1, label %if.then.us.1, label %for.inc45.us.1
if.then.us.1: ; preds = %for.inc45.us
%call33.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 2)
%putchar.us.1 = call i32 @putchar(i32 10)
br label %for.inc45.us.1
for.inc45.us.1: ; preds = %if.then.us.1, %for.inc45.us
%arrayidx29.us.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2
%10 = load i32, ptr %arrayidx29.us.2, align 4, !tbaa !5
%cmp30.us.2 = icmp eq i32 %10, 0
br i1 %cmp30.us.2, label %if.then.us.2, label %for.inc45.us.2
if.then.us.2: ; preds = %for.inc45.us.1
%call33.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 3)
%putchar.us.2 = call i32 @putchar(i32 10)
br label %for.inc45.us.2
for.inc45.us.2: ; preds = %if.then.us.2, %for.inc45.us.1
%arrayidx29.us.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3
%11 = load i32, ptr %arrayidx29.us.3, align 4, !tbaa !5
%cmp30.us.3 = icmp eq i32 %11, 0
br i1 %cmp30.us.3, label %if.then.us.3, label %for.inc45.us.3
if.then.us.3: ; preds = %for.inc45.us.2
%call33.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 4)
%putchar.us.3 = call i32 @putchar(i32 10)
br label %for.inc45.us.3
for.inc45.us.3: ; preds = %if.then.us.3, %for.inc45.us.2
%arrayidx29.us.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4
%12 = load i32, ptr %arrayidx29.us.4, align 4, !tbaa !5
%cmp30.us.4 = icmp eq i32 %12, 0
br i1 %cmp30.us.4, label %if.then.us.4, label %for.inc45.us.4
if.then.us.4: ; preds = %for.inc45.us.3
%call33.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 5)
%putchar.us.4 = call i32 @putchar(i32 10)
br label %for.inc45.us.4
for.inc45.us.4: ; preds = %if.then.us.4, %for.inc45.us.3
%arrayidx29.us.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5
%13 = load i32, ptr %arrayidx29.us.5, align 4, !tbaa !5
%cmp30.us.5 = icmp eq i32 %13, 0
br i1 %cmp30.us.5, label %if.then.us.5, label %for.inc45.us.5
if.then.us.5: ; preds = %for.inc45.us.4
%call33.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 6)
%putchar.us.5 = call i32 @putchar(i32 10)
br label %for.inc45.us.5
for.inc45.us.5: ; preds = %if.then.us.5, %for.inc45.us.4
%arrayidx29.us.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6
%14 = load i32, ptr %arrayidx29.us.6, align 4, !tbaa !5
%cmp30.us.6 = icmp eq i32 %14, 0
br i1 %cmp30.us.6, label %if.then.us.6, label %for.inc45.us.6
if.then.us.6: ; preds = %for.inc45.us.5
%call33.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 7)
%putchar.us.6 = call i32 @putchar(i32 10)
br label %for.inc45.us.6
for.inc45.us.6: ; preds = %if.then.us.6, %for.inc45.us.5
%arrayidx29.us.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7
%15 = load i32, ptr %arrayidx29.us.7, align 4, !tbaa !5
%cmp30.us.7 = icmp eq i32 %15, 0
br i1 %cmp30.us.7, label %if.then.us.7, label %for.inc45.us.7
if.then.us.7: ; preds = %for.inc45.us.6
%call33.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 8)
%putchar.us.7 = call i32 @putchar(i32 10)
br label %for.inc45.us.7
for.inc45.us.7: ; preds = %if.then.us.7, %for.inc45.us.6
%arrayidx29.us.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8
%16 = load i32, ptr %arrayidx29.us.8, align 4, !tbaa !5
%cmp30.us.8 = icmp eq i32 %16, 0
br i1 %cmp30.us.8, label %if.then.us.8, label %for.inc45.us.8
if.then.us.8: ; preds = %for.inc45.us.7
%call33.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 9)
%putchar.us.8 = call i32 @putchar(i32 10)
br label %for.inc45.us.8
for.inc45.us.8: ; preds = %if.then.us.8, %for.inc45.us.7
%arrayidx29.us.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9
%17 = load i32, ptr %arrayidx29.us.9, align 4, !tbaa !5
%cmp30.us.9 = icmp eq i32 %17, 0
br i1 %cmp30.us.9, label %if.then.us.9, label %for.inc45.us.9
if.then.us.9: ; preds = %for.inc45.us.8
%call33.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 10)
%putchar.us.9 = call i32 @putchar(i32 10)
br label %for.inc45.us.9
for.inc45.us.9: ; preds = %if.then.us.9, %for.inc45.us.8
%arrayidx29.us.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10
%18 = load i32, ptr %arrayidx29.us.10, align 4, !tbaa !5
%cmp30.us.10 = icmp eq i32 %18, 0
br i1 %cmp30.us.10, label %if.then.us.10, label %for.inc45.us.10
if.then.us.10: ; preds = %for.inc45.us.9
%call33.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 11)
%putchar.us.10 = call i32 @putchar(i32 10)
br label %for.inc45.us.10
for.inc45.us.10: ; preds = %if.then.us.10, %for.inc45.us.9
%arrayidx29.us.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11
%19 = load i32, ptr %arrayidx29.us.11, align 4, !tbaa !5
%cmp30.us.11 = icmp eq i32 %19, 0
br i1 %cmp30.us.11, label %if.then.us.11, label %for.inc45.us.11
if.then.us.11: ; preds = %for.inc45.us.10
%call33.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 12)
%putchar.us.11 = call i32 @putchar(i32 10)
br label %for.inc45.us.11
for.inc45.us.11: ; preds = %if.then.us.11, %for.inc45.us.10
%arrayidx29.us.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12
%20 = load i32, ptr %arrayidx29.us.12, align 4, !tbaa !5
%cmp30.us.12 = icmp eq i32 %20, 0
br i1 %cmp30.us.12, label %for.inc48.sink.split.sink.split, label %for.inc48
if.then.us72: ; preds = %for.body25.us67.preheader
%call36.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1)
%putchar.us74 = call i32 @putchar(i32 10)
br label %for.inc45.us75
for.inc45.us75: ; preds = %if.then.us72, %for.body25.us67.preheader
%arrayidx29.us70.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1
%21 = load i32, ptr %arrayidx29.us70.1, align 4, !tbaa !5
%cmp30.us71.1 = icmp eq i32 %21, 0
br i1 %cmp30.us71.1, label %if.then.us72.1, label %for.inc45.us75.1
if.then.us72.1: ; preds = %for.inc45.us75
%call36.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2)
%putchar.us74.1 = call i32 @putchar(i32 10)
br label %for.inc45.us75.1
for.inc45.us75.1: ; preds = %if.then.us72.1, %for.inc45.us75
%arrayidx29.us70.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2
%22 = load i32, ptr %arrayidx29.us70.2, align 4, !tbaa !5
%cmp30.us71.2 = icmp eq i32 %22, 0
br i1 %cmp30.us71.2, label %if.then.us72.2, label %for.inc45.us75.2
if.then.us72.2: ; preds = %for.inc45.us75.1
%call36.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3)
%putchar.us74.2 = call i32 @putchar(i32 10)
br label %for.inc45.us75.2
for.inc45.us75.2: ; preds = %if.then.us72.2, %for.inc45.us75.1
%arrayidx29.us70.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3
%23 = load i32, ptr %arrayidx29.us70.3, align 4, !tbaa !5
%cmp30.us71.3 = icmp eq i32 %23, 0
br i1 %cmp30.us71.3, label %if.then.us72.3, label %for.inc45.us75.3
if.then.us72.3: ; preds = %for.inc45.us75.2
%call36.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4)
%putchar.us74.3 = call i32 @putchar(i32 10)
br label %for.inc45.us75.3
for.inc45.us75.3: ; preds = %if.then.us72.3, %for.inc45.us75.2
%arrayidx29.us70.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4
%24 = load i32, ptr %arrayidx29.us70.4, align 4, !tbaa !5
%cmp30.us71.4 = icmp eq i32 %24, 0
br i1 %cmp30.us71.4, label %if.then.us72.4, label %for.inc45.us75.4
if.then.us72.4: ; preds = %for.inc45.us75.3
%call36.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5)
%putchar.us74.4 = call i32 @putchar(i32 10)
br label %for.inc45.us75.4
for.inc45.us75.4: ; preds = %if.then.us72.4, %for.inc45.us75.3
%arrayidx29.us70.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5
%25 = load i32, ptr %arrayidx29.us70.5, align 4, !tbaa !5
%cmp30.us71.5 = icmp eq i32 %25, 0
br i1 %cmp30.us71.5, label %if.then.us72.5, label %for.inc45.us75.5
if.then.us72.5: ; preds = %for.inc45.us75.4
%call36.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6)
%putchar.us74.5 = call i32 @putchar(i32 10)
br label %for.inc45.us75.5
for.inc45.us75.5: ; preds = %if.then.us72.5, %for.inc45.us75.4
%arrayidx29.us70.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6
%26 = load i32, ptr %arrayidx29.us70.6, align 4, !tbaa !5
%cmp30.us71.6 = icmp eq i32 %26, 0
br i1 %cmp30.us71.6, label %if.then.us72.6, label %for.inc45.us75.6
if.then.us72.6: ; preds = %for.inc45.us75.5
%call36.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7)
%putchar.us74.6 = call i32 @putchar(i32 10)
br label %for.inc45.us75.6
for.inc45.us75.6: ; preds = %if.then.us72.6, %for.inc45.us75.5
%arrayidx29.us70.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7
%27 = load i32, ptr %arrayidx29.us70.7, align 4, !tbaa !5
%cmp30.us71.7 = icmp eq i32 %27, 0
br i1 %cmp30.us71.7, label %if.then.us72.7, label %for.inc45.us75.7
if.then.us72.7: ; preds = %for.inc45.us75.6
%call36.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8)
%putchar.us74.7 = call i32 @putchar(i32 10)
br label %for.inc45.us75.7
for.inc45.us75.7: ; preds = %if.then.us72.7, %for.inc45.us75.6
%arrayidx29.us70.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8
%28 = load i32, ptr %arrayidx29.us70.8, align 4, !tbaa !5
%cmp30.us71.8 = icmp eq i32 %28, 0
br i1 %cmp30.us71.8, label %if.then.us72.8, label %for.inc45.us75.8
if.then.us72.8: ; preds = %for.inc45.us75.7
%call36.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9)
%putchar.us74.8 = call i32 @putchar(i32 10)
br label %for.inc45.us75.8
for.inc45.us75.8: ; preds = %if.then.us72.8, %for.inc45.us75.7
%arrayidx29.us70.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9
%29 = load i32, ptr %arrayidx29.us70.9, align 4, !tbaa !5
%cmp30.us71.9 = icmp eq i32 %29, 0
br i1 %cmp30.us71.9, label %if.then.us72.9, label %for.inc45.us75.9
if.then.us72.9: ; preds = %for.inc45.us75.8
%call36.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10)
%putchar.us74.9 = call i32 @putchar(i32 10)
br label %for.inc45.us75.9
for.inc45.us75.9: ; preds = %if.then.us72.9, %for.inc45.us75.8
%arrayidx29.us70.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10
%30 = load i32, ptr %arrayidx29.us70.10, align 4, !tbaa !5
%cmp30.us71.10 = icmp eq i32 %30, 0
br i1 %cmp30.us71.10, label %if.then.us72.10, label %for.inc45.us75.10
if.then.us72.10: ; preds = %for.inc45.us75.9
%call36.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11)
%putchar.us74.10 = call i32 @putchar(i32 10)
br label %for.inc45.us75.10
for.inc45.us75.10: ; preds = %if.then.us72.10, %for.inc45.us75.9
%arrayidx29.us70.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11
%31 = load i32, ptr %arrayidx29.us70.11, align 4, !tbaa !5
%cmp30.us71.11 = icmp eq i32 %31, 0
br i1 %cmp30.us71.11, label %if.then.us72.11, label %for.inc45.us75.11
if.then.us72.11: ; preds = %for.inc45.us75.10
%call36.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12)
%putchar.us74.11 = call i32 @putchar(i32 10)
br label %for.inc45.us75.11
for.inc45.us75.11: ; preds = %if.then.us72.11, %for.inc45.us75.10
%arrayidx29.us70.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12
%32 = load i32, ptr %arrayidx29.us70.12, align 4, !tbaa !5
%cmp30.us71.12 = icmp eq i32 %32, 0
br i1 %cmp30.us71.12, label %for.inc48.sink.split.sink.split, label %for.inc48
if.then.us85: ; preds = %for.body25.us80.preheader
%call39.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1)
%putchar.us87 = call i32 @putchar(i32 10)
br label %for.inc45.us88
for.inc45.us88: ; preds = %if.then.us85, %for.body25.us80.preheader
%arrayidx29.us83.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1
%33 = load i32, ptr %arrayidx29.us83.1, align 4, !tbaa !5
%cmp30.us84.1 = icmp eq i32 %33, 0
br i1 %cmp30.us84.1, label %if.then.us85.1, label %for.inc45.us88.1
if.then.us85.1: ; preds = %for.inc45.us88
%call39.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2)
%putchar.us87.1 = call i32 @putchar(i32 10)
br label %for.inc45.us88.1
for.inc45.us88.1: ; preds = %if.then.us85.1, %for.inc45.us88
%arrayidx29.us83.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2
%34 = load i32, ptr %arrayidx29.us83.2, align 4, !tbaa !5
%cmp30.us84.2 = icmp eq i32 %34, 0
br i1 %cmp30.us84.2, label %if.then.us85.2, label %for.inc45.us88.2
if.then.us85.2: ; preds = %for.inc45.us88.1
%call39.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3)
%putchar.us87.2 = call i32 @putchar(i32 10)
br label %for.inc45.us88.2
for.inc45.us88.2: ; preds = %if.then.us85.2, %for.inc45.us88.1
%arrayidx29.us83.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3
%35 = load i32, ptr %arrayidx29.us83.3, align 4, !tbaa !5
%cmp30.us84.3 = icmp eq i32 %35, 0
br i1 %cmp30.us84.3, label %if.then.us85.3, label %for.inc45.us88.3
if.then.us85.3: ; preds = %for.inc45.us88.2
%call39.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4)
%putchar.us87.3 = call i32 @putchar(i32 10)
br label %for.inc45.us88.3
for.inc45.us88.3: ; preds = %if.then.us85.3, %for.inc45.us88.2
%arrayidx29.us83.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4
%36 = load i32, ptr %arrayidx29.us83.4, align 4, !tbaa !5
%cmp30.us84.4 = icmp eq i32 %36, 0
br i1 %cmp30.us84.4, label %if.then.us85.4, label %for.inc45.us88.4
if.then.us85.4: ; preds = %for.inc45.us88.3
%call39.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5)
%putchar.us87.4 = call i32 @putchar(i32 10)
br label %for.inc45.us88.4
for.inc45.us88.4: ; preds = %if.then.us85.4, %for.inc45.us88.3
%arrayidx29.us83.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5
%37 = load i32, ptr %arrayidx29.us83.5, align 4, !tbaa !5
%cmp30.us84.5 = icmp eq i32 %37, 0
br i1 %cmp30.us84.5, label %if.then.us85.5, label %for.inc45.us88.5
if.then.us85.5: ; preds = %for.inc45.us88.4
%call39.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6)
%putchar.us87.5 = call i32 @putchar(i32 10)
br label %for.inc45.us88.5
for.inc45.us88.5: ; preds = %if.then.us85.5, %for.inc45.us88.4
%arrayidx29.us83.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6
%38 = load i32, ptr %arrayidx29.us83.6, align 4, !tbaa !5
%cmp30.us84.6 = icmp eq i32 %38, 0
br i1 %cmp30.us84.6, label %if.then.us85.6, label %for.inc45.us88.6
if.then.us85.6: ; preds = %for.inc45.us88.5
%call39.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7)
%putchar.us87.6 = call i32 @putchar(i32 10)
br label %for.inc45.us88.6
for.inc45.us88.6: ; preds = %if.then.us85.6, %for.inc45.us88.5
%arrayidx29.us83.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7
%39 = load i32, ptr %arrayidx29.us83.7, align 4, !tbaa !5
%cmp30.us84.7 = icmp eq i32 %39, 0
br i1 %cmp30.us84.7, label %if.then.us85.7, label %for.inc45.us88.7
if.then.us85.7: ; preds = %for.inc45.us88.6
%call39.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8)
%putchar.us87.7 = call i32 @putchar(i32 10)
br label %for.inc45.us88.7
for.inc45.us88.7: ; preds = %if.then.us85.7, %for.inc45.us88.6
%arrayidx29.us83.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8
%40 = load i32, ptr %arrayidx29.us83.8, align 4, !tbaa !5
%cmp30.us84.8 = icmp eq i32 %40, 0
br i1 %cmp30.us84.8, label %if.then.us85.8, label %for.inc45.us88.8
if.then.us85.8: ; preds = %for.inc45.us88.7
%call39.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9)
%putchar.us87.8 = call i32 @putchar(i32 10)
br label %for.inc45.us88.8
for.inc45.us88.8: ; preds = %if.then.us85.8, %for.inc45.us88.7
%arrayidx29.us83.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9
%41 = load i32, ptr %arrayidx29.us83.9, align 4, !tbaa !5
%cmp30.us84.9 = icmp eq i32 %41, 0
br i1 %cmp30.us84.9, label %if.then.us85.9, label %for.inc45.us88.9
if.then.us85.9: ; preds = %for.inc45.us88.8
%call39.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10)
%putchar.us87.9 = call i32 @putchar(i32 10)
br label %for.inc45.us88.9
for.inc45.us88.9: ; preds = %if.then.us85.9, %for.inc45.us88.8
%arrayidx29.us83.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10
%42 = load i32, ptr %arrayidx29.us83.10, align 4, !tbaa !5
%cmp30.us84.10 = icmp eq i32 %42, 0
br i1 %cmp30.us84.10, label %if.then.us85.10, label %for.inc45.us88.10
if.then.us85.10: ; preds = %for.inc45.us88.9
%call39.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11)
%putchar.us87.10 = call i32 @putchar(i32 10)
br label %for.inc45.us88.10
for.inc45.us88.10: ; preds = %if.then.us85.10, %for.inc45.us88.9
%arrayidx29.us83.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11
%43 = load i32, ptr %arrayidx29.us83.11, align 4, !tbaa !5
%cmp30.us84.11 = icmp eq i32 %43, 0
br i1 %cmp30.us84.11, label %if.then.us85.11, label %for.inc45.us88.11
if.then.us85.11: ; preds = %for.inc45.us88.10
%call39.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12)
%putchar.us87.11 = call i32 @putchar(i32 10)
br label %for.inc45.us88.11
for.inc45.us88.11: ; preds = %if.then.us85.11, %for.inc45.us88.10
%arrayidx29.us83.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12
%44 = load i32, ptr %arrayidx29.us83.12, align 4, !tbaa !5
%cmp30.us84.12 = icmp eq i32 %44, 0
br i1 %cmp30.us84.12, label %for.inc48.sink.split.sink.split, label %for.inc48
if.then.us98: ; preds = %for.body25.us93.preheader
%call42.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1)
%putchar.us100 = call i32 @putchar(i32 10)
br label %for.inc45.us101
for.inc45.us101: ; preds = %if.then.us98, %for.body25.us93.preheader
%arrayidx29.us96.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1
%45 = load i32, ptr %arrayidx29.us96.1, align 4, !tbaa !5
%cmp30.us97.1 = icmp eq i32 %45, 0
br i1 %cmp30.us97.1, label %if.then.us98.1, label %for.inc45.us101.1
if.then.us98.1: ; preds = %for.inc45.us101
%call42.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2)
%putchar.us100.1 = call i32 @putchar(i32 10)
br label %for.inc45.us101.1
for.inc45.us101.1: ; preds = %if.then.us98.1, %for.inc45.us101
%arrayidx29.us96.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2
%46 = load i32, ptr %arrayidx29.us96.2, align 4, !tbaa !5
%cmp30.us97.2 = icmp eq i32 %46, 0
br i1 %cmp30.us97.2, label %if.then.us98.2, label %for.inc45.us101.2
if.then.us98.2: ; preds = %for.inc45.us101.1
%call42.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3)
%putchar.us100.2 = call i32 @putchar(i32 10)
br label %for.inc45.us101.2
for.inc45.us101.2: ; preds = %if.then.us98.2, %for.inc45.us101.1
%arrayidx29.us96.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3
%47 = load i32, ptr %arrayidx29.us96.3, align 4, !tbaa !5
%cmp30.us97.3 = icmp eq i32 %47, 0
br i1 %cmp30.us97.3, label %if.then.us98.3, label %for.inc45.us101.3
if.then.us98.3: ; preds = %for.inc45.us101.2
%call42.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4)
%putchar.us100.3 = call i32 @putchar(i32 10)
br label %for.inc45.us101.3
for.inc45.us101.3: ; preds = %if.then.us98.3, %for.inc45.us101.2
%arrayidx29.us96.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4
%48 = load i32, ptr %arrayidx29.us96.4, align 4, !tbaa !5
%cmp30.us97.4 = icmp eq i32 %48, 0
br i1 %cmp30.us97.4, label %if.then.us98.4, label %for.inc45.us101.4
if.then.us98.4: ; preds = %for.inc45.us101.3
%call42.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5)
%putchar.us100.4 = call i32 @putchar(i32 10)
br label %for.inc45.us101.4
for.inc45.us101.4: ; preds = %if.then.us98.4, %for.inc45.us101.3
%arrayidx29.us96.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5
%49 = load i32, ptr %arrayidx29.us96.5, align 4, !tbaa !5
%cmp30.us97.5 = icmp eq i32 %49, 0
br i1 %cmp30.us97.5, label %if.then.us98.5, label %for.inc45.us101.5
if.then.us98.5: ; preds = %for.inc45.us101.4
%call42.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6)
%putchar.us100.5 = call i32 @putchar(i32 10)
br label %for.inc45.us101.5
for.inc45.us101.5: ; preds = %if.then.us98.5, %for.inc45.us101.4
%arrayidx29.us96.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6
%50 = load i32, ptr %arrayidx29.us96.6, align 4, !tbaa !5
%cmp30.us97.6 = icmp eq i32 %50, 0
br i1 %cmp30.us97.6, label %if.then.us98.6, label %for.inc45.us101.6
if.then.us98.6: ; preds = %for.inc45.us101.5
%call42.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7)
%putchar.us100.6 = call i32 @putchar(i32 10)
br label %for.inc45.us101.6
for.inc45.us101.6: ; preds = %if.then.us98.6, %for.inc45.us101.5
%arrayidx29.us96.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7
%51 = load i32, ptr %arrayidx29.us96.7, align 4, !tbaa !5
%cmp30.us97.7 = icmp eq i32 %51, 0
br i1 %cmp30.us97.7, label %if.then.us98.7, label %for.inc45.us101.7
if.then.us98.7: ; preds = %for.inc45.us101.6
%call42.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8)
%putchar.us100.7 = call i32 @putchar(i32 10)
br label %for.inc45.us101.7
for.inc45.us101.7: ; preds = %if.then.us98.7, %for.inc45.us101.6
%arrayidx29.us96.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8
%52 = load i32, ptr %arrayidx29.us96.8, align 4, !tbaa !5
%cmp30.us97.8 = icmp eq i32 %52, 0
br i1 %cmp30.us97.8, label %if.then.us98.8, label %for.inc45.us101.8
if.then.us98.8: ; preds = %for.inc45.us101.7
%call42.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9)
%putchar.us100.8 = call i32 @putchar(i32 10)
br label %for.inc45.us101.8
for.inc45.us101.8: ; preds = %if.then.us98.8, %for.inc45.us101.7
%arrayidx29.us96.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9
%53 = load i32, ptr %arrayidx29.us96.9, align 4, !tbaa !5
%cmp30.us97.9 = icmp eq i32 %53, 0
br i1 %cmp30.us97.9, label %if.then.us98.9, label %for.inc45.us101.9
if.then.us98.9: ; preds = %for.inc45.us101.8
%call42.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10)
%putchar.us100.9 = call i32 @putchar(i32 10)
br label %for.inc45.us101.9
for.inc45.us101.9: ; preds = %if.then.us98.9, %for.inc45.us101.8
%arrayidx29.us96.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10
%54 = load i32, ptr %arrayidx29.us96.10, align 4, !tbaa !5
%cmp30.us97.10 = icmp eq i32 %54, 0
br i1 %cmp30.us97.10, label %if.then.us98.10, label %for.inc45.us101.10
if.then.us98.10: ; preds = %for.inc45.us101.9
%call42.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11)
%putchar.us100.10 = call i32 @putchar(i32 10)
br label %for.inc45.us101.10
for.inc45.us101.10: ; preds = %if.then.us98.10, %for.inc45.us101.9
%arrayidx29.us96.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11
%55 = load i32, ptr %arrayidx29.us96.11, align 4, !tbaa !5
%cmp30.us97.11 = icmp eq i32 %55, 0
br i1 %cmp30.us97.11, label %if.then.us98.11, label %for.inc45.us101.11
if.then.us98.11: ; preds = %for.inc45.us101.10
%call42.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12)
%putchar.us100.11 = call i32 @putchar(i32 10)
br label %for.inc45.us101.11
for.inc45.us101.11: ; preds = %if.then.us98.11, %for.inc45.us101.10
%arrayidx29.us96.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12
%56 = load i32, ptr %arrayidx29.us96.12, align 4, !tbaa !5
%cmp30.us97.12 = icmp eq i32 %56, 0
br i1 %cmp30.us97.12, label %for.inc48.sink.split.sink.split, label %for.inc48
if.then: ; preds = %for.body25.preheader
%putchar = call i32 @putchar(i32 10)
br label %for.inc45
for.inc45: ; preds = %for.body25.preheader, %if.then
%arrayidx29.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1
%57 = load i32, ptr %arrayidx29.1, align 4, !tbaa !5
%cmp30.1 = icmp eq i32 %57, 0
br i1 %cmp30.1, label %if.then.1, label %for.inc45.1
if.then.1: ; preds = %for.inc45
%putchar.1 = call i32 @putchar(i32 10)
br label %for.inc45.1
for.inc45.1: ; preds = %if.then.1, %for.inc45
%arrayidx29.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2
%58 = load i32, ptr %arrayidx29.2, align 4, !tbaa !5
%cmp30.2 = icmp eq i32 %58, 0
br i1 %cmp30.2, label %if.then.2, label %for.inc45.2
if.then.2: ; preds = %for.inc45.1
%putchar.2 = call i32 @putchar(i32 10)
br label %for.inc45.2
for.inc45.2: ; preds = %if.then.2, %for.inc45.1
%arrayidx29.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3
%59 = load i32, ptr %arrayidx29.3, align 4, !tbaa !5
%cmp30.3 = icmp eq i32 %59, 0
br i1 %cmp30.3, label %if.then.3, label %for.inc45.3
if.then.3: ; preds = %for.inc45.2
%putchar.3 = call i32 @putchar(i32 10)
br label %for.inc45.3
for.inc45.3: ; preds = %if.then.3, %for.inc45.2
%arrayidx29.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4
%60 = load i32, ptr %arrayidx29.4, align 4, !tbaa !5
%cmp30.4 = icmp eq i32 %60, 0
br i1 %cmp30.4, label %if.then.4, label %for.inc45.4
if.then.4: ; preds = %for.inc45.3
%putchar.4 = call i32 @putchar(i32 10)
br label %for.inc45.4
for.inc45.4: ; preds = %if.then.4, %for.inc45.3
%arrayidx29.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5
%61 = load i32, ptr %arrayidx29.5, align 4, !tbaa !5
%cmp30.5 = icmp eq i32 %61, 0
br i1 %cmp30.5, label %if.then.5, label %for.inc45.5
if.then.5: ; preds = %for.inc45.4
%putchar.5 = call i32 @putchar(i32 10)
br label %for.inc45.5
for.inc45.5: ; preds = %if.then.5, %for.inc45.4
%arrayidx29.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6
%62 = load i32, ptr %arrayidx29.6, align 4, !tbaa !5
%cmp30.6 = icmp eq i32 %62, 0
br i1 %cmp30.6, label %if.then.6, label %for.inc45.6
if.then.6: ; preds = %for.inc45.5
%putchar.6 = call i32 @putchar(i32 10)
br label %for.inc45.6
for.inc45.6: ; preds = %if.then.6, %for.inc45.5
%arrayidx29.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7
%63 = load i32, ptr %arrayidx29.7, align 4, !tbaa !5
%cmp30.7 = icmp eq i32 %63, 0
br i1 %cmp30.7, label %if.then.7, label %for.inc45.7
if.then.7: ; preds = %for.inc45.6
%putchar.7 = call i32 @putchar(i32 10)
br label %for.inc45.7
for.inc45.7: ; preds = %if.then.7, %for.inc45.6
%arrayidx29.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8
%64 = load i32, ptr %arrayidx29.8, align 4, !tbaa !5
%cmp30.8 = icmp eq i32 %64, 0
br i1 %cmp30.8, label %if.then.8, label %for.inc45.8
if.then.8: ; preds = %for.inc45.7
%putchar.8 = call i32 @putchar(i32 10)
br label %for.inc45.8
for.inc45.8: ; preds = %if.then.8, %for.inc45.7
%arrayidx29.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9
%65 = load i32, ptr %arrayidx29.9, align 4, !tbaa !5
%cmp30.9 = icmp eq i32 %65, 0
br i1 %cmp30.9, label %if.then.9, label %for.inc45.9
if.then.9: ; preds = %for.inc45.8
%putchar.9 = call i32 @putchar(i32 10)
br label %for.inc45.9
for.inc45.9: ; preds = %if.then.9, %for.inc45.8
%arrayidx29.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10
%66 = load i32, ptr %arrayidx29.10, align 4, !tbaa !5
%cmp30.10 = icmp eq i32 %66, 0
br i1 %cmp30.10, label %if.then.10, label %for.inc45.10
if.then.10: ; preds = %for.inc45.9
%putchar.10 = call i32 @putchar(i32 10)
br label %for.inc45.10
for.inc45.10: ; preds = %if.then.10, %for.inc45.9
%arrayidx29.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11
%67 = load i32, ptr %arrayidx29.11, align 4, !tbaa !5
%cmp30.11 = icmp eq i32 %67, 0
br i1 %cmp30.11, label %if.then.11, label %for.inc45.11
if.then.11: ; preds = %for.inc45.10
%putchar.11 = call i32 @putchar(i32 10)
br label %for.inc45.11
for.inc45.11: ; preds = %if.then.11, %for.inc45.10
%arrayidx29.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12
%68 = load i32, ptr %arrayidx29.12, align 4, !tbaa !5
%cmp30.12 = icmp eq i32 %68, 0
br i1 %cmp30.12, label %for.inc48.sink.split, label %for.inc48
for.inc48.sink.split.sink.split: ; preds = %for.inc45.us101.11, %for.inc45.us88.11, %for.inc45.us75.11, %for.inc45.us.11
%.str.2.sink = phi ptr [ @.str.2, %for.inc45.us.11 ], [ @.str.3, %for.inc45.us75.11 ], [ @.str.4, %for.inc45.us88.11 ], [ @.str.5, %for.inc45.us101.11 ]
%call33.us.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink, i32 noundef 13)
br label %for.inc48.sink.split
for.inc48.sink.split: ; preds = %for.inc48.sink.split.sink.split, %for.inc45.11
%putchar.12 = call i32 @putchar(i32 10)
br label %for.inc48
for.inc48: ; preds = %for.inc48.sink.split, %for.inc45.11, %for.inc45.us101.11, %for.inc45.us88.11, %for.inc45.us75.11, %for.inc45.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.end50, label %for.cond22.preheader, !llvm.loop !12
for.end50: ; preds = %for.inc48
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %m) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #5
call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %card) #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: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
|
#include <stdio.h>
#define MAX_PIC 4
#define MAX_RANK 13
// ????????????2?¬??????????[??????][?????????]
int card[MAX_PIC][MAX_RANK];
// ??????????????????????????????????????????0????????????????????????
void CardInitialize(void){
int i, j;
for(i = 0; i < MAX_PIC; i++){
for(j = 0; j < MAX_RANK; j++){
card[i][j] = 0;
}
}
}
// ??\??????????????????????????§??????????????????
void CheckCards(int card_num){
int i, picture_num, rank;
char picture;
for(i = 0; i < card_num; i++){
// C?¨?????????????????§?
scanf(" %c", &picture);
scanf("%d", &rank);
// ???????????????????????°?????????????????????
switch(picture){
case 'S': picture_num = 0; break;
case 'H': picture_num = 1; break;
case 'C': picture_num = 2; break;
case 'D': picture_num = 3; break;
}
card[picture_num][rank-1] = 1;
}
}
// ?¶????????????????????????¨?????????
void ShowCards(void){
int i, j;
char picture;
for(i = 0; i < MAX_PIC; i++){
for(j = 0; j < MAX_RANK; j++){
if(card[i][j] == 0){
// ??°??????????????????????????????????????????
switch(i){
case 0: picture = 'S'; break;
case 1: picture = 'H'; break;
case 2: picture = 'C'; break;
case 3: picture = 'D'; break;
}
printf("%c %d\n", picture, j + 1);
}
}
}
}
int main(void){
// 2?¬?????????????for?????¨
int i, j;
// ??????(S,H,C,D)
char picture;
// ??\???????????????????????°????????????????????°???????????????
int card_num, picture_num, rank;
// ?????????
CardInitialize();
// ??????????????°?????\???
scanf("%d", &card_num);
// ??\?????????????????????????????????????????????1????????£??\??????
CheckCards(card_num);
// ???????????¨??¨??????????´¢??????0?????¨???????????¨?????????
ShowCards();
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214549/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214549/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@card = dso_local local_unnamed_addr global [4 x [13 x i32]] zeroinitializer, align 16
@.str = private unnamed_addr constant [4 x i8] c" %c\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(write, argmem: none, inaccessiblemem: none) uwtable
define dso_local void @CardInitialize() local_unnamed_addr #0 {
entry:
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) @card, i8 0, i64 208, i1 false), !tbaa !5
ret void
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind uwtable
define dso_local void @CheckCards(i32 noundef %card_num) local_unnamed_addr #2 {
entry:
%rank = alloca i32, align 4
%picture = alloca i8, align 1
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %rank) #5
call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %picture) #5
%cmp8 = icmp sgt i32 %card_num, 0
br i1 %cmp8, label %for.body, label %for.end
for.body: ; preds = %entry, %sw.epilog
%picture_num.010 = phi i32 [ %picture_num.1, %sw.epilog ], [ undef, %entry ]
%i.09 = phi i32 [ %inc, %sw.epilog ], [ 0, %entry ]
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %picture)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %rank)
%0 = load i8, ptr %picture, align 1, !tbaa !9
%conv = sext i8 %0 to i32
switch i32 %conv, label %sw.epilog [
i32 83, label %sw.bb
i32 72, label %sw.bb2
i32 67, label %sw.bb3
i32 68, label %sw.bb4
]
sw.bb: ; preds = %for.body
br label %sw.epilog
sw.bb2: ; preds = %for.body
br label %sw.epilog
sw.bb3: ; preds = %for.body
br label %sw.epilog
sw.bb4: ; preds = %for.body
br label %sw.epilog
sw.epilog: ; preds = %for.body, %sw.bb4, %sw.bb3, %sw.bb2, %sw.bb
%picture_num.1 = phi i32 [ %picture_num.010, %for.body ], [ 3, %sw.bb4 ], [ 2, %sw.bb3 ], [ 1, %sw.bb2 ], [ 0, %sw.bb ]
%idxprom = sext i32 %picture_num.1 to i64
%1 = load i32, ptr %rank, align 4, !tbaa !5
%sub = add nsw i32 %1, -1
%idxprom5 = sext i32 %sub to i64
%arrayidx6 = getelementptr inbounds [4 x [13 x i32]], ptr @card, i64 0, i64 %idxprom, i64 %idxprom5
store i32 1, ptr %arrayidx6, align 4, !tbaa !5
%inc = add nuw nsw i32 %i.09, 1
%exitcond.not = icmp eq i32 %inc, %card_num
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !10
for.end: ; preds = %sw.epilog, %entry
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %picture) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %rank) #5
ret void
}
; 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 @ShowCards() local_unnamed_addr #2 {
entry:
br label %for.cond1.preheader
for.cond1.preheader: ; preds = %entry, %for.inc.12
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.inc.12 ]
%picture.022 = phi i8 [ undef, %entry ], [ %picture.3.12, %for.inc.12 ]
%arrayidx5 = getelementptr inbounds [4 x [13 x i32]], ptr @card, i64 0, i64 %indvars.iv, i64 0
%0 = load i32, ptr %arrayidx5, align 4, !tbaa !5
%cmp6 = icmp eq i32 %0, 0
br i1 %cmp6, label %if.then, label %for.inc
if.then: ; preds = %for.cond1.preheader
%1 = trunc i64 %indvars.iv to i32
%2 = icmp ult i32 %1, 4
%switch.shiftamt = shl nuw nsw i32 %1, 3
%switch.downshift = lshr i32 1145260115, %switch.shiftamt
%switch.masked = trunc i32 %switch.downshift to i8
%picture.2 = select i1 %2, i8 %switch.masked, i8 %picture.022
%conv = sext i8 %picture.2 to i32
%call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv, i32 noundef 1)
br label %for.inc
for.inc: ; preds = %for.cond1.preheader, %if.then
%picture.3 = phi i8 [ %picture.2, %if.then ], [ %picture.022, %for.cond1.preheader ]
%arrayidx5.1 = getelementptr inbounds [4 x [13 x i32]], ptr @card, i64 0, i64 %indvars.iv, i64 1
%3 = load i32, ptr %arrayidx5.1, align 4, !tbaa !5
%cmp6.1 = icmp eq i32 %3, 0
br i1 %cmp6.1, label %if.then.1, label %for.inc.1
if.then.1: ; preds = %for.inc
%4 = trunc i64 %indvars.iv to i32
%5 = icmp ult i32 %4, 4
%switch.shiftamt25 = shl nuw nsw i32 %4, 3
%switch.downshift26 = lshr i32 1145260115, %switch.shiftamt25
%switch.masked27 = trunc i32 %switch.downshift26 to i8
%picture.2.1 = select i1 %5, i8 %switch.masked27, i8 %picture.3
%conv.1 = sext i8 %picture.2.1 to i32
%call.1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv.1, i32 noundef 2)
br label %for.inc.1
for.inc.1: ; preds = %if.then.1, %for.inc
%picture.3.1 = phi i8 [ %picture.2.1, %if.then.1 ], [ %picture.3, %for.inc ]
%arrayidx5.2 = getelementptr inbounds [4 x [13 x i32]], ptr @card, i64 0, i64 %indvars.iv, i64 2
%6 = load i32, ptr %arrayidx5.2, align 4, !tbaa !5
%cmp6.2 = icmp eq i32 %6, 0
br i1 %cmp6.2, label %if.then.2, label %for.inc.2
if.then.2: ; preds = %for.inc.1
%7 = trunc i64 %indvars.iv to i32
%8 = icmp ult i32 %7, 4
%switch.shiftamt29 = shl nuw nsw i32 %7, 3
%switch.downshift30 = lshr i32 1145260115, %switch.shiftamt29
%switch.masked31 = trunc i32 %switch.downshift30 to i8
%picture.2.2 = select i1 %8, i8 %switch.masked31, i8 %picture.3.1
%conv.2 = sext i8 %picture.2.2 to i32
%call.2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv.2, i32 noundef 3)
br label %for.inc.2
for.inc.2: ; preds = %if.then.2, %for.inc.1
%picture.3.2 = phi i8 [ %picture.2.2, %if.then.2 ], [ %picture.3.1, %for.inc.1 ]
%arrayidx5.3 = getelementptr inbounds [4 x [13 x i32]], ptr @card, i64 0, i64 %indvars.iv, i64 3
%9 = load i32, ptr %arrayidx5.3, align 4, !tbaa !5
%cmp6.3 = icmp eq i32 %9, 0
br i1 %cmp6.3, label %if.then.3, label %for.inc.3
if.then.3: ; preds = %for.inc.2
%10 = trunc i64 %indvars.iv to i32
%11 = icmp ult i32 %10, 4
%switch.shiftamt33 = shl nuw nsw i32 %10, 3
%switch.downshift34 = lshr i32 1145260115, %switch.shiftamt33
%switch.masked35 = trunc i32 %switch.downshift34 to i8
%picture.2.3 = select i1 %11, i8 %switch.masked35, i8 %picture.3.2
%conv.3 = sext i8 %picture.2.3 to i32
%call.3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv.3, i32 noundef 4)
br label %for.inc.3
for.inc.3: ; preds = %if.then.3, %for.inc.2
%picture.3.3 = phi i8 [ %picture.2.3, %if.then.3 ], [ %picture.3.2, %for.inc.2 ]
%arrayidx5.4 = getelementptr inbounds [4 x [13 x i32]], ptr @card, i64 0, i64 %indvars.iv, i64 4
%12 = load i32, ptr %arrayidx5.4, align 4, !tbaa !5
%cmp6.4 = icmp eq i32 %12, 0
br i1 %cmp6.4, label %if.then.4, label %for.inc.4
if.then.4: ; preds = %for.inc.3
%13 = trunc i64 %indvars.iv to i32
%14 = icmp ult i32 %13, 4
%switch.shiftamt37 = shl nuw nsw i32 %13, 3
%switch.downshift38 = lshr i32 1145260115, %switch.shiftamt37
%switch.masked39 = trunc i32 %switch.downshift38 to i8
%picture.2.4 = select i1 %14, i8 %switch.masked39, i8 %picture.3.3
%conv.4 = sext i8 %picture.2.4 to i32
%call.4 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv.4, i32 noundef 5)
br label %for.inc.4
for.inc.4: ; preds = %if.then.4, %for.inc.3
%picture.3.4 = phi i8 [ %picture.2.4, %if.then.4 ], [ %picture.3.3, %for.inc.3 ]
%arrayidx5.5 = getelementptr inbounds [4 x [13 x i32]], ptr @card, i64 0, i64 %indvars.iv, i64 5
%15 = load i32, ptr %arrayidx5.5, align 4, !tbaa !5
%cmp6.5 = icmp eq i32 %15, 0
br i1 %cmp6.5, label %if.then.5, label %for.inc.5
if.then.5: ; preds = %for.inc.4
%16 = trunc i64 %indvars.iv to i32
%17 = icmp ult i32 %16, 4
%switch.shiftamt41 = shl nuw nsw i32 %16, 3
%switch.downshift42 = lshr i32 1145260115, %switch.shiftamt41
%switch.masked43 = trunc i32 %switch.downshift42 to i8
%picture.2.5 = select i1 %17, i8 %switch.masked43, i8 %picture.3.4
%conv.5 = sext i8 %picture.2.5 to i32
%call.5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv.5, i32 noundef 6)
br label %for.inc.5
for.inc.5: ; preds = %if.then.5, %for.inc.4
%picture.3.5 = phi i8 [ %picture.2.5, %if.then.5 ], [ %picture.3.4, %for.inc.4 ]
%arrayidx5.6 = getelementptr inbounds [4 x [13 x i32]], ptr @card, i64 0, i64 %indvars.iv, i64 6
%18 = load i32, ptr %arrayidx5.6, align 4, !tbaa !5
%cmp6.6 = icmp eq i32 %18, 0
br i1 %cmp6.6, label %if.then.6, label %for.inc.6
if.then.6: ; preds = %for.inc.5
%19 = trunc i64 %indvars.iv to i32
%20 = icmp ult i32 %19, 4
%switch.shiftamt45 = shl nuw nsw i32 %19, 3
%switch.downshift46 = lshr i32 1145260115, %switch.shiftamt45
%switch.masked47 = trunc i32 %switch.downshift46 to i8
%picture.2.6 = select i1 %20, i8 %switch.masked47, i8 %picture.3.5
%conv.6 = sext i8 %picture.2.6 to i32
%call.6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv.6, i32 noundef 7)
br label %for.inc.6
for.inc.6: ; preds = %if.then.6, %for.inc.5
%picture.3.6 = phi i8 [ %picture.2.6, %if.then.6 ], [ %picture.3.5, %for.inc.5 ]
%arrayidx5.7 = getelementptr inbounds [4 x [13 x i32]], ptr @card, i64 0, i64 %indvars.iv, i64 7
%21 = load i32, ptr %arrayidx5.7, align 4, !tbaa !5
%cmp6.7 = icmp eq i32 %21, 0
br i1 %cmp6.7, label %if.then.7, label %for.inc.7
if.then.7: ; preds = %for.inc.6
%22 = trunc i64 %indvars.iv to i32
%23 = icmp ult i32 %22, 4
%switch.shiftamt49 = shl nuw nsw i32 %22, 3
%switch.downshift50 = lshr i32 1145260115, %switch.shiftamt49
%switch.masked51 = trunc i32 %switch.downshift50 to i8
%picture.2.7 = select i1 %23, i8 %switch.masked51, i8 %picture.3.6
%conv.7 = sext i8 %picture.2.7 to i32
%call.7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv.7, i32 noundef 8)
br label %for.inc.7
for.inc.7: ; preds = %if.then.7, %for.inc.6
%picture.3.7 = phi i8 [ %picture.2.7, %if.then.7 ], [ %picture.3.6, %for.inc.6 ]
%arrayidx5.8 = getelementptr inbounds [4 x [13 x i32]], ptr @card, i64 0, i64 %indvars.iv, i64 8
%24 = load i32, ptr %arrayidx5.8, align 4, !tbaa !5
%cmp6.8 = icmp eq i32 %24, 0
br i1 %cmp6.8, label %if.then.8, label %for.inc.8
if.then.8: ; preds = %for.inc.7
%25 = trunc i64 %indvars.iv to i32
%26 = icmp ult i32 %25, 4
%switch.shiftamt53 = shl nuw nsw i32 %25, 3
%switch.downshift54 = lshr i32 1145260115, %switch.shiftamt53
%switch.masked55 = trunc i32 %switch.downshift54 to i8
%picture.2.8 = select i1 %26, i8 %switch.masked55, i8 %picture.3.7
%conv.8 = sext i8 %picture.2.8 to i32
%call.8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv.8, i32 noundef 9)
br label %for.inc.8
for.inc.8: ; preds = %if.then.8, %for.inc.7
%picture.3.8 = phi i8 [ %picture.2.8, %if.then.8 ], [ %picture.3.7, %for.inc.7 ]
%arrayidx5.9 = getelementptr inbounds [4 x [13 x i32]], ptr @card, i64 0, i64 %indvars.iv, i64 9
%27 = load i32, ptr %arrayidx5.9, align 4, !tbaa !5
%cmp6.9 = icmp eq i32 %27, 0
br i1 %cmp6.9, label %if.then.9, label %for.inc.9
if.then.9: ; preds = %for.inc.8
%28 = trunc i64 %indvars.iv to i32
%29 = icmp ult i32 %28, 4
%switch.shiftamt57 = shl nuw nsw i32 %28, 3
%switch.downshift58 = lshr i32 1145260115, %switch.shiftamt57
%switch.masked59 = trunc i32 %switch.downshift58 to i8
%picture.2.9 = select i1 %29, i8 %switch.masked59, i8 %picture.3.8
%conv.9 = sext i8 %picture.2.9 to i32
%call.9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv.9, i32 noundef 10)
br label %for.inc.9
for.inc.9: ; preds = %if.then.9, %for.inc.8
%picture.3.9 = phi i8 [ %picture.2.9, %if.then.9 ], [ %picture.3.8, %for.inc.8 ]
%arrayidx5.10 = getelementptr inbounds [4 x [13 x i32]], ptr @card, i64 0, i64 %indvars.iv, i64 10
%30 = load i32, ptr %arrayidx5.10, align 4, !tbaa !5
%cmp6.10 = icmp eq i32 %30, 0
br i1 %cmp6.10, label %if.then.10, label %for.inc.10
if.then.10: ; preds = %for.inc.9
%31 = trunc i64 %indvars.iv to i32
%32 = icmp ult i32 %31, 4
%switch.shiftamt61 = shl nuw nsw i32 %31, 3
%switch.downshift62 = lshr i32 1145260115, %switch.shiftamt61
%switch.masked63 = trunc i32 %switch.downshift62 to i8
%picture.2.10 = select i1 %32, i8 %switch.masked63, i8 %picture.3.9
%conv.10 = sext i8 %picture.2.10 to i32
%call.10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv.10, i32 noundef 11)
br label %for.inc.10
for.inc.10: ; preds = %if.then.10, %for.inc.9
%picture.3.10 = phi i8 [ %picture.2.10, %if.then.10 ], [ %picture.3.9, %for.inc.9 ]
%arrayidx5.11 = getelementptr inbounds [4 x [13 x i32]], ptr @card, i64 0, i64 %indvars.iv, i64 11
%33 = load i32, ptr %arrayidx5.11, align 4, !tbaa !5
%cmp6.11 = icmp eq i32 %33, 0
br i1 %cmp6.11, label %if.then.11, label %for.inc.11
if.then.11: ; preds = %for.inc.10
%34 = trunc i64 %indvars.iv to i32
%35 = icmp ult i32 %34, 4
%switch.shiftamt65 = shl nuw nsw i32 %34, 3
%switch.downshift66 = lshr i32 1145260115, %switch.shiftamt65
%switch.masked67 = trunc i32 %switch.downshift66 to i8
%picture.2.11 = select i1 %35, i8 %switch.masked67, i8 %picture.3.10
%conv.11 = sext i8 %picture.2.11 to i32
%call.11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv.11, i32 noundef 12)
br label %for.inc.11
for.inc.11: ; preds = %if.then.11, %for.inc.10
%picture.3.11 = phi i8 [ %picture.2.11, %if.then.11 ], [ %picture.3.10, %for.inc.10 ]
%arrayidx5.12 = getelementptr inbounds [4 x [13 x i32]], ptr @card, i64 0, i64 %indvars.iv, i64 12
%36 = load i32, ptr %arrayidx5.12, align 4, !tbaa !5
%cmp6.12 = icmp eq i32 %36, 0
br i1 %cmp6.12, label %if.then.12, label %for.inc.12
if.then.12: ; preds = %for.inc.11
%37 = trunc i64 %indvars.iv to i32
%38 = icmp ult i32 %37, 4
%switch.shiftamt69 = shl nuw nsw i32 %37, 3
%switch.downshift70 = lshr i32 1145260115, %switch.shiftamt69
%switch.masked71 = trunc i32 %switch.downshift70 to i8
%picture.2.12 = select i1 %38, i8 %switch.masked71, i8 %picture.3.11
%conv.12 = sext i8 %picture.2.12 to i32
%call.12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv.12, i32 noundef 13)
br label %for.inc.12
for.inc.12: ; preds = %if.then.12, %for.inc.11
%picture.3.12 = phi i8 [ %picture.2.12, %if.then.12 ], [ %picture.3.11, %for.inc.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.end12, label %for.cond1.preheader, !llvm.loop !12
for.end12: ; preds = %for.inc.12
ret void
}
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #2 {
entry:
%rank.i = alloca i32, align 4
%picture.i = alloca i8, align 1
%card_num = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %card_num) #5
tail 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.1, ptr noundef nonnull %card_num)
%0 = load i32, ptr %card_num, align 4, !tbaa !5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %rank.i) #5
call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %picture.i) #5
%cmp8.i = icmp sgt i32 %0, 0
br i1 %cmp8.i, label %for.body.i, label %CheckCards.exit
for.body.i: ; preds = %entry, %sw.epilog.i
%picture_num.010.i = phi i32 [ %picture_num.1.i, %sw.epilog.i ], [ undef, %entry ]
%i.09.i = phi i32 [ %inc.i, %sw.epilog.i ], [ 0, %entry ]
%call.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %picture.i)
%call1.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %rank.i)
%1 = load i8, ptr %picture.i, align 1, !tbaa !9
%conv.i = sext i8 %1 to i32
switch i32 %conv.i, label %sw.epilog.i [
i32 83, label %sw.bb.i
i32 72, label %sw.bb2.i
i32 67, label %sw.bb3.i
i32 68, label %sw.bb4.i
]
sw.bb.i: ; preds = %for.body.i
br label %sw.epilog.i
sw.bb2.i: ; preds = %for.body.i
br label %sw.epilog.i
sw.bb3.i: ; preds = %for.body.i
br label %sw.epilog.i
sw.bb4.i: ; preds = %for.body.i
br label %sw.epilog.i
sw.epilog.i: ; preds = %sw.bb4.i, %sw.bb3.i, %sw.bb2.i, %sw.bb.i, %for.body.i
%picture_num.1.i = phi i32 [ %picture_num.010.i, %for.body.i ], [ 3, %sw.bb4.i ], [ 2, %sw.bb3.i ], [ 1, %sw.bb2.i ], [ 0, %sw.bb.i ]
%idxprom.i = sext i32 %picture_num.1.i to i64
%2 = load i32, ptr %rank.i, align 4, !tbaa !5
%sub.i = add nsw i32 %2, -1
%idxprom5.i = sext i32 %sub.i to i64
%arrayidx6.i = getelementptr inbounds [4 x [13 x i32]], ptr @card, i64 0, i64 %idxprom.i, i64 %idxprom5.i
store i32 1, ptr %arrayidx6.i, align 4, !tbaa !5
%inc.i = add nuw nsw i32 %i.09.i, 1
%exitcond.not.i = icmp eq i32 %inc.i, %0
br i1 %exitcond.not.i, label %CheckCards.exit, label %for.body.i, !llvm.loop !10
CheckCards.exit: ; preds = %sw.epilog.i, %entry
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %picture.i) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %rank.i) #5
call void @ShowCards()
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %card_num) #5
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) #4
attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(write, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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(void)
{
int n,i,x,j; int card[4][13]={}; char M; scanf("%d",&n); for(i = 0;i < n+1;i++){ scanf("%c %d%*c",&M ,&x); if(M == 'S'){ card[0][x-1]=1; }else if(M =='H'){ card[1][x-1]=1; }else if(M == 'C'){ card[2][x-1]=1; }else if(M == 'D'){ card[3][x-1]=1; } } for(i = 0;i < 4;i++){ for(j = 0;j < 13;j++){ if(card[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_214592/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214592/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %d%*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
%x = alloca i32, align 4
%card = alloca [4 x [13 x i32]], align 16
%M = 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 %x) #4
call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %card) #4
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %card, i8 0, i64 208, i1 false)
call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %M) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp.not97 = icmp slt i32 %0, 0
br i1 %cmp.not97, label %for.cond38.preheader.preheader, label %for.body
for.body: ; preds = %entry, %for.inc
%i.098 = phi i32 [ %inc, %for.inc ], [ 0, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %M, ptr noundef nonnull %x)
%1 = load i8, ptr %M, 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 %x, align 4, !tbaa !5
%sub = add nsw i32 %2, -1
%idxprom = sext i32 %sub to i64
%arrayidx4 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 %idxprom
br label %for.inc.sink.split
if.then8: ; preds = %for.body
%3 = load i32, ptr %x, 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 %card, i64 0, i64 1, i64 %idxprom11
br label %for.inc.sink.split
if.then17: ; preds = %for.body
%4 = load i32, ptr %x, 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 %card, i64 0, i64 2, i64 %idxprom20
br label %for.inc.sink.split
if.then26: ; preds = %for.body
%5 = load i32, ptr %x, 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 %card, 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.098, 1
%6 = load i32, ptr %n, align 4, !tbaa !5
%cmp.not.not = icmp slt i32 %i.098, %6
br i1 %cmp.not.not, 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.inc80
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc80 ], [ 0, %for.cond38.preheader.preheader ]
%7 = trunc i64 %indvars.iv to i32
switch i32 %7, label %for.inc80 [
i32 0, label %for.body41.us.preheader
i32 1, label %for.body41.us101.preheader
i32 2, label %for.body41.us111.preheader
i32 3, label %for.body41.us121.preheader
]
for.body41.us121.preheader: ; preds = %for.cond38.preheader
%arrayidx45.us124 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 0
%8 = load i32, ptr %arrayidx45.us124, align 4, !tbaa !5
%cmp46.us125 = icmp eq i32 %8, 0
br i1 %cmp46.us125, label %if.then48.us126, label %for.inc77.us127
for.body41.us111.preheader: ; preds = %for.cond38.preheader
%arrayidx45.us114 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 0
%9 = load i32, ptr %arrayidx45.us114, align 4, !tbaa !5
%cmp46.us115 = icmp eq i32 %9, 0
br i1 %cmp46.us115, label %if.then48.us116, label %for.inc77.us117
for.body41.us101.preheader: ; preds = %for.cond38.preheader
%arrayidx45.us104 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 0
%10 = load i32, ptr %arrayidx45.us104, align 4, !tbaa !5
%cmp46.us105 = icmp eq i32 %10, 0
br i1 %cmp46.us105, label %if.then48.us106, label %for.inc77.us107
for.body41.us.preheader: ; preds = %for.cond38.preheader
%arrayidx45.us = getelementptr inbounds [4 x [13 x i32]], ptr %card, 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.inc77.us
if.then48.us: ; preds = %for.body41.us.preheader
%call53.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 1)
br label %for.inc77.us
for.inc77.us: ; preds = %if.then48.us, %for.body41.us.preheader
%arrayidx45.us.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, 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.inc77.us.1
if.then48.us.1: ; preds = %for.inc77.us
%call53.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 2)
br label %for.inc77.us.1
for.inc77.us.1: ; preds = %if.then48.us.1, %for.inc77.us
%arrayidx45.us.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, 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.inc77.us.2
if.then48.us.2: ; preds = %for.inc77.us.1
%call53.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 3)
br label %for.inc77.us.2
for.inc77.us.2: ; preds = %if.then48.us.2, %for.inc77.us.1
%arrayidx45.us.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, 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.inc77.us.3
if.then48.us.3: ; preds = %for.inc77.us.2
%call53.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 4)
br label %for.inc77.us.3
for.inc77.us.3: ; preds = %if.then48.us.3, %for.inc77.us.2
%arrayidx45.us.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, 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.inc77.us.4
if.then48.us.4: ; preds = %for.inc77.us.3
%call53.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 5)
br label %for.inc77.us.4
for.inc77.us.4: ; preds = %if.then48.us.4, %for.inc77.us.3
%arrayidx45.us.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, 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.inc77.us.5
if.then48.us.5: ; preds = %for.inc77.us.4
%call53.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 6)
br label %for.inc77.us.5
for.inc77.us.5: ; preds = %if.then48.us.5, %for.inc77.us.4
%arrayidx45.us.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, 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.inc77.us.6
if.then48.us.6: ; preds = %for.inc77.us.5
%call53.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 7)
br label %for.inc77.us.6
for.inc77.us.6: ; preds = %if.then48.us.6, %for.inc77.us.5
%arrayidx45.us.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, 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.inc77.us.7
if.then48.us.7: ; preds = %for.inc77.us.6
%call53.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 8)
br label %for.inc77.us.7
for.inc77.us.7: ; preds = %if.then48.us.7, %for.inc77.us.6
%arrayidx45.us.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, 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.inc77.us.8
if.then48.us.8: ; preds = %for.inc77.us.7
%call53.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 9)
br label %for.inc77.us.8
for.inc77.us.8: ; preds = %if.then48.us.8, %for.inc77.us.7
%arrayidx45.us.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, 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.inc77.us.9
if.then48.us.9: ; preds = %for.inc77.us.8
%call53.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 10)
br label %for.inc77.us.9
for.inc77.us.9: ; preds = %if.then48.us.9, %for.inc77.us.8
%arrayidx45.us.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, 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.inc77.us.10
if.then48.us.10: ; preds = %for.inc77.us.9
%call53.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 11)
br label %for.inc77.us.10
for.inc77.us.10: ; preds = %if.then48.us.10, %for.inc77.us.9
%arrayidx45.us.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, 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.inc77.us.11
if.then48.us.11: ; preds = %for.inc77.us.10
%call53.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 12)
br label %for.inc77.us.11
for.inc77.us.11: ; preds = %if.then48.us.11, %for.inc77.us.10
%arrayidx45.us.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, 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.inc80.sink.split, label %for.inc80
if.then48.us106: ; preds = %for.body41.us101.preheader
%call59.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1)
br label %for.inc77.us107
for.inc77.us107: ; preds = %if.then48.us106, %for.body41.us101.preheader
%arrayidx45.us104.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1
%24 = load i32, ptr %arrayidx45.us104.1, align 4, !tbaa !5
%cmp46.us105.1 = icmp eq i32 %24, 0
br i1 %cmp46.us105.1, label %if.then48.us106.1, label %for.inc77.us107.1
if.then48.us106.1: ; preds = %for.inc77.us107
%call59.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2)
br label %for.inc77.us107.1
for.inc77.us107.1: ; preds = %if.then48.us106.1, %for.inc77.us107
%arrayidx45.us104.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2
%25 = load i32, ptr %arrayidx45.us104.2, align 4, !tbaa !5
%cmp46.us105.2 = icmp eq i32 %25, 0
br i1 %cmp46.us105.2, label %if.then48.us106.2, label %for.inc77.us107.2
if.then48.us106.2: ; preds = %for.inc77.us107.1
%call59.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3)
br label %for.inc77.us107.2
for.inc77.us107.2: ; preds = %if.then48.us106.2, %for.inc77.us107.1
%arrayidx45.us104.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3
%26 = load i32, ptr %arrayidx45.us104.3, align 4, !tbaa !5
%cmp46.us105.3 = icmp eq i32 %26, 0
br i1 %cmp46.us105.3, label %if.then48.us106.3, label %for.inc77.us107.3
if.then48.us106.3: ; preds = %for.inc77.us107.2
%call59.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4)
br label %for.inc77.us107.3
for.inc77.us107.3: ; preds = %if.then48.us106.3, %for.inc77.us107.2
%arrayidx45.us104.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4
%27 = load i32, ptr %arrayidx45.us104.4, align 4, !tbaa !5
%cmp46.us105.4 = icmp eq i32 %27, 0
br i1 %cmp46.us105.4, label %if.then48.us106.4, label %for.inc77.us107.4
if.then48.us106.4: ; preds = %for.inc77.us107.3
%call59.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5)
br label %for.inc77.us107.4
for.inc77.us107.4: ; preds = %if.then48.us106.4, %for.inc77.us107.3
%arrayidx45.us104.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5
%28 = load i32, ptr %arrayidx45.us104.5, align 4, !tbaa !5
%cmp46.us105.5 = icmp eq i32 %28, 0
br i1 %cmp46.us105.5, label %if.then48.us106.5, label %for.inc77.us107.5
if.then48.us106.5: ; preds = %for.inc77.us107.4
%call59.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6)
br label %for.inc77.us107.5
for.inc77.us107.5: ; preds = %if.then48.us106.5, %for.inc77.us107.4
%arrayidx45.us104.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6
%29 = load i32, ptr %arrayidx45.us104.6, align 4, !tbaa !5
%cmp46.us105.6 = icmp eq i32 %29, 0
br i1 %cmp46.us105.6, label %if.then48.us106.6, label %for.inc77.us107.6
if.then48.us106.6: ; preds = %for.inc77.us107.5
%call59.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7)
br label %for.inc77.us107.6
for.inc77.us107.6: ; preds = %if.then48.us106.6, %for.inc77.us107.5
%arrayidx45.us104.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7
%30 = load i32, ptr %arrayidx45.us104.7, align 4, !tbaa !5
%cmp46.us105.7 = icmp eq i32 %30, 0
br i1 %cmp46.us105.7, label %if.then48.us106.7, label %for.inc77.us107.7
if.then48.us106.7: ; preds = %for.inc77.us107.6
%call59.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8)
br label %for.inc77.us107.7
for.inc77.us107.7: ; preds = %if.then48.us106.7, %for.inc77.us107.6
%arrayidx45.us104.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8
%31 = load i32, ptr %arrayidx45.us104.8, align 4, !tbaa !5
%cmp46.us105.8 = icmp eq i32 %31, 0
br i1 %cmp46.us105.8, label %if.then48.us106.8, label %for.inc77.us107.8
if.then48.us106.8: ; preds = %for.inc77.us107.7
%call59.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9)
br label %for.inc77.us107.8
for.inc77.us107.8: ; preds = %if.then48.us106.8, %for.inc77.us107.7
%arrayidx45.us104.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9
%32 = load i32, ptr %arrayidx45.us104.9, align 4, !tbaa !5
%cmp46.us105.9 = icmp eq i32 %32, 0
br i1 %cmp46.us105.9, label %if.then48.us106.9, label %for.inc77.us107.9
if.then48.us106.9: ; preds = %for.inc77.us107.8
%call59.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10)
br label %for.inc77.us107.9
for.inc77.us107.9: ; preds = %if.then48.us106.9, %for.inc77.us107.8
%arrayidx45.us104.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10
%33 = load i32, ptr %arrayidx45.us104.10, align 4, !tbaa !5
%cmp46.us105.10 = icmp eq i32 %33, 0
br i1 %cmp46.us105.10, label %if.then48.us106.10, label %for.inc77.us107.10
if.then48.us106.10: ; preds = %for.inc77.us107.9
%call59.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11)
br label %for.inc77.us107.10
for.inc77.us107.10: ; preds = %if.then48.us106.10, %for.inc77.us107.9
%arrayidx45.us104.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11
%34 = load i32, ptr %arrayidx45.us104.11, align 4, !tbaa !5
%cmp46.us105.11 = icmp eq i32 %34, 0
br i1 %cmp46.us105.11, label %if.then48.us106.11, label %for.inc77.us107.11
if.then48.us106.11: ; preds = %for.inc77.us107.10
%call59.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12)
br label %for.inc77.us107.11
for.inc77.us107.11: ; preds = %if.then48.us106.11, %for.inc77.us107.10
%arrayidx45.us104.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12
%35 = load i32, ptr %arrayidx45.us104.12, align 4, !tbaa !5
%cmp46.us105.12 = icmp eq i32 %35, 0
br i1 %cmp46.us105.12, label %for.inc80.sink.split, label %for.inc80
if.then48.us116: ; preds = %for.body41.us111.preheader
%call65.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1)
br label %for.inc77.us117
for.inc77.us117: ; preds = %if.then48.us116, %for.body41.us111.preheader
%arrayidx45.us114.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1
%36 = load i32, ptr %arrayidx45.us114.1, align 4, !tbaa !5
%cmp46.us115.1 = icmp eq i32 %36, 0
br i1 %cmp46.us115.1, label %if.then48.us116.1, label %for.inc77.us117.1
if.then48.us116.1: ; preds = %for.inc77.us117
%call65.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2)
br label %for.inc77.us117.1
for.inc77.us117.1: ; preds = %if.then48.us116.1, %for.inc77.us117
%arrayidx45.us114.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2
%37 = load i32, ptr %arrayidx45.us114.2, align 4, !tbaa !5
%cmp46.us115.2 = icmp eq i32 %37, 0
br i1 %cmp46.us115.2, label %if.then48.us116.2, label %for.inc77.us117.2
if.then48.us116.2: ; preds = %for.inc77.us117.1
%call65.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3)
br label %for.inc77.us117.2
for.inc77.us117.2: ; preds = %if.then48.us116.2, %for.inc77.us117.1
%arrayidx45.us114.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3
%38 = load i32, ptr %arrayidx45.us114.3, align 4, !tbaa !5
%cmp46.us115.3 = icmp eq i32 %38, 0
br i1 %cmp46.us115.3, label %if.then48.us116.3, label %for.inc77.us117.3
if.then48.us116.3: ; preds = %for.inc77.us117.2
%call65.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4)
br label %for.inc77.us117.3
for.inc77.us117.3: ; preds = %if.then48.us116.3, %for.inc77.us117.2
%arrayidx45.us114.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4
%39 = load i32, ptr %arrayidx45.us114.4, align 4, !tbaa !5
%cmp46.us115.4 = icmp eq i32 %39, 0
br i1 %cmp46.us115.4, label %if.then48.us116.4, label %for.inc77.us117.4
if.then48.us116.4: ; preds = %for.inc77.us117.3
%call65.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5)
br label %for.inc77.us117.4
for.inc77.us117.4: ; preds = %if.then48.us116.4, %for.inc77.us117.3
%arrayidx45.us114.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5
%40 = load i32, ptr %arrayidx45.us114.5, align 4, !tbaa !5
%cmp46.us115.5 = icmp eq i32 %40, 0
br i1 %cmp46.us115.5, label %if.then48.us116.5, label %for.inc77.us117.5
if.then48.us116.5: ; preds = %for.inc77.us117.4
%call65.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6)
br label %for.inc77.us117.5
for.inc77.us117.5: ; preds = %if.then48.us116.5, %for.inc77.us117.4
%arrayidx45.us114.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6
%41 = load i32, ptr %arrayidx45.us114.6, align 4, !tbaa !5
%cmp46.us115.6 = icmp eq i32 %41, 0
br i1 %cmp46.us115.6, label %if.then48.us116.6, label %for.inc77.us117.6
if.then48.us116.6: ; preds = %for.inc77.us117.5
%call65.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7)
br label %for.inc77.us117.6
for.inc77.us117.6: ; preds = %if.then48.us116.6, %for.inc77.us117.5
%arrayidx45.us114.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7
%42 = load i32, ptr %arrayidx45.us114.7, align 4, !tbaa !5
%cmp46.us115.7 = icmp eq i32 %42, 0
br i1 %cmp46.us115.7, label %if.then48.us116.7, label %for.inc77.us117.7
if.then48.us116.7: ; preds = %for.inc77.us117.6
%call65.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8)
br label %for.inc77.us117.7
for.inc77.us117.7: ; preds = %if.then48.us116.7, %for.inc77.us117.6
%arrayidx45.us114.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8
%43 = load i32, ptr %arrayidx45.us114.8, align 4, !tbaa !5
%cmp46.us115.8 = icmp eq i32 %43, 0
br i1 %cmp46.us115.8, label %if.then48.us116.8, label %for.inc77.us117.8
if.then48.us116.8: ; preds = %for.inc77.us117.7
%call65.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9)
br label %for.inc77.us117.8
for.inc77.us117.8: ; preds = %if.then48.us116.8, %for.inc77.us117.7
%arrayidx45.us114.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9
%44 = load i32, ptr %arrayidx45.us114.9, align 4, !tbaa !5
%cmp46.us115.9 = icmp eq i32 %44, 0
br i1 %cmp46.us115.9, label %if.then48.us116.9, label %for.inc77.us117.9
if.then48.us116.9: ; preds = %for.inc77.us117.8
%call65.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10)
br label %for.inc77.us117.9
for.inc77.us117.9: ; preds = %if.then48.us116.9, %for.inc77.us117.8
%arrayidx45.us114.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10
%45 = load i32, ptr %arrayidx45.us114.10, align 4, !tbaa !5
%cmp46.us115.10 = icmp eq i32 %45, 0
br i1 %cmp46.us115.10, label %if.then48.us116.10, label %for.inc77.us117.10
if.then48.us116.10: ; preds = %for.inc77.us117.9
%call65.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11)
br label %for.inc77.us117.10
for.inc77.us117.10: ; preds = %if.then48.us116.10, %for.inc77.us117.9
%arrayidx45.us114.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11
%46 = load i32, ptr %arrayidx45.us114.11, align 4, !tbaa !5
%cmp46.us115.11 = icmp eq i32 %46, 0
br i1 %cmp46.us115.11, label %if.then48.us116.11, label %for.inc77.us117.11
if.then48.us116.11: ; preds = %for.inc77.us117.10
%call65.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12)
br label %for.inc77.us117.11
for.inc77.us117.11: ; preds = %if.then48.us116.11, %for.inc77.us117.10
%arrayidx45.us114.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12
%47 = load i32, ptr %arrayidx45.us114.12, align 4, !tbaa !5
%cmp46.us115.12 = icmp eq i32 %47, 0
br i1 %cmp46.us115.12, label %for.inc80.sink.split, label %for.inc80
if.then48.us126: ; preds = %for.body41.us121.preheader
%call71.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1)
br label %for.inc77.us127
for.inc77.us127: ; preds = %if.then48.us126, %for.body41.us121.preheader
%arrayidx45.us124.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1
%48 = load i32, ptr %arrayidx45.us124.1, align 4, !tbaa !5
%cmp46.us125.1 = icmp eq i32 %48, 0
br i1 %cmp46.us125.1, label %if.then48.us126.1, label %for.inc77.us127.1
if.then48.us126.1: ; preds = %for.inc77.us127
%call71.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2)
br label %for.inc77.us127.1
for.inc77.us127.1: ; preds = %if.then48.us126.1, %for.inc77.us127
%arrayidx45.us124.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2
%49 = load i32, ptr %arrayidx45.us124.2, align 4, !tbaa !5
%cmp46.us125.2 = icmp eq i32 %49, 0
br i1 %cmp46.us125.2, label %if.then48.us126.2, label %for.inc77.us127.2
if.then48.us126.2: ; preds = %for.inc77.us127.1
%call71.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3)
br label %for.inc77.us127.2
for.inc77.us127.2: ; preds = %if.then48.us126.2, %for.inc77.us127.1
%arrayidx45.us124.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3
%50 = load i32, ptr %arrayidx45.us124.3, align 4, !tbaa !5
%cmp46.us125.3 = icmp eq i32 %50, 0
br i1 %cmp46.us125.3, label %if.then48.us126.3, label %for.inc77.us127.3
if.then48.us126.3: ; preds = %for.inc77.us127.2
%call71.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4)
br label %for.inc77.us127.3
for.inc77.us127.3: ; preds = %if.then48.us126.3, %for.inc77.us127.2
%arrayidx45.us124.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4
%51 = load i32, ptr %arrayidx45.us124.4, align 4, !tbaa !5
%cmp46.us125.4 = icmp eq i32 %51, 0
br i1 %cmp46.us125.4, label %if.then48.us126.4, label %for.inc77.us127.4
if.then48.us126.4: ; preds = %for.inc77.us127.3
%call71.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5)
br label %for.inc77.us127.4
for.inc77.us127.4: ; preds = %if.then48.us126.4, %for.inc77.us127.3
%arrayidx45.us124.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5
%52 = load i32, ptr %arrayidx45.us124.5, align 4, !tbaa !5
%cmp46.us125.5 = icmp eq i32 %52, 0
br i1 %cmp46.us125.5, label %if.then48.us126.5, label %for.inc77.us127.5
if.then48.us126.5: ; preds = %for.inc77.us127.4
%call71.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6)
br label %for.inc77.us127.5
for.inc77.us127.5: ; preds = %if.then48.us126.5, %for.inc77.us127.4
%arrayidx45.us124.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6
%53 = load i32, ptr %arrayidx45.us124.6, align 4, !tbaa !5
%cmp46.us125.6 = icmp eq i32 %53, 0
br i1 %cmp46.us125.6, label %if.then48.us126.6, label %for.inc77.us127.6
if.then48.us126.6: ; preds = %for.inc77.us127.5
%call71.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7)
br label %for.inc77.us127.6
for.inc77.us127.6: ; preds = %if.then48.us126.6, %for.inc77.us127.5
%arrayidx45.us124.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7
%54 = load i32, ptr %arrayidx45.us124.7, align 4, !tbaa !5
%cmp46.us125.7 = icmp eq i32 %54, 0
br i1 %cmp46.us125.7, label %if.then48.us126.7, label %for.inc77.us127.7
if.then48.us126.7: ; preds = %for.inc77.us127.6
%call71.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8)
br label %for.inc77.us127.7
for.inc77.us127.7: ; preds = %if.then48.us126.7, %for.inc77.us127.6
%arrayidx45.us124.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8
%55 = load i32, ptr %arrayidx45.us124.8, align 4, !tbaa !5
%cmp46.us125.8 = icmp eq i32 %55, 0
br i1 %cmp46.us125.8, label %if.then48.us126.8, label %for.inc77.us127.8
if.then48.us126.8: ; preds = %for.inc77.us127.7
%call71.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9)
br label %for.inc77.us127.8
for.inc77.us127.8: ; preds = %if.then48.us126.8, %for.inc77.us127.7
%arrayidx45.us124.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9
%56 = load i32, ptr %arrayidx45.us124.9, align 4, !tbaa !5
%cmp46.us125.9 = icmp eq i32 %56, 0
br i1 %cmp46.us125.9, label %if.then48.us126.9, label %for.inc77.us127.9
if.then48.us126.9: ; preds = %for.inc77.us127.8
%call71.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10)
br label %for.inc77.us127.9
for.inc77.us127.9: ; preds = %if.then48.us126.9, %for.inc77.us127.8
%arrayidx45.us124.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10
%57 = load i32, ptr %arrayidx45.us124.10, align 4, !tbaa !5
%cmp46.us125.10 = icmp eq i32 %57, 0
br i1 %cmp46.us125.10, label %if.then48.us126.10, label %for.inc77.us127.10
if.then48.us126.10: ; preds = %for.inc77.us127.9
%call71.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11)
br label %for.inc77.us127.10
for.inc77.us127.10: ; preds = %if.then48.us126.10, %for.inc77.us127.9
%arrayidx45.us124.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11
%58 = load i32, ptr %arrayidx45.us124.11, align 4, !tbaa !5
%cmp46.us125.11 = icmp eq i32 %58, 0
br i1 %cmp46.us125.11, label %if.then48.us126.11, label %for.inc77.us127.11
if.then48.us126.11: ; preds = %for.inc77.us127.10
%call71.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12)
br label %for.inc77.us127.11
for.inc77.us127.11: ; preds = %if.then48.us126.11, %for.inc77.us127.10
%arrayidx45.us124.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12
%59 = load i32, ptr %arrayidx45.us124.12, align 4, !tbaa !5
%cmp46.us125.12 = icmp eq i32 %59, 0
br i1 %cmp46.us125.12, label %for.inc80.sink.split, label %for.inc80
for.inc80.sink.split: ; preds = %for.inc77.us127.11, %for.inc77.us117.11, %for.inc77.us107.11, %for.inc77.us.11
%.str.5.sink = phi ptr [ @.str.2, %for.inc77.us.11 ], [ @.str.3, %for.inc77.us107.11 ], [ @.str.4, %for.inc77.us117.11 ], [ @.str.5, %for.inc77.us127.11 ]
%call71.us.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink, i32 noundef 13)
br label %for.inc80
for.inc80: ; preds = %for.inc80.sink.split, %for.inc77.us127.11, %for.inc77.us117.11, %for.inc77.us107.11, %for.inc77.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.end82, label %for.cond38.preheader, !llvm.loop !12
for.end82: ; preds = %for.inc80
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %M) #4
call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %card) #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: 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>
typedef struct{
char suit;
int num;
int exist;
} st_card;
st_card card[52] =
{
{ 'S', 1, 0 },
{ 'S', 2, 0 },
{ 'S', 3, 0 },
{ 'S', 4, 0 },
{ 'S', 5, 0 },
{ 'S', 6, 0 },
{ 'S', 7, 0 },
{ 'S', 8, 0 },
{ 'S', 9, 0 },
{ 'S', 10, 0 },
{ 'S', 11, 0 },
{ 'S', 12, 0 },
{ 'S', 13, 0 },
{ 'H', 1, 0 },
{ 'H', 2, 0 },
{ 'H', 3, 0 },
{ 'H', 4, 0 },
{ 'H', 5, 0 },
{ 'H', 6, 0 },
{ 'H', 7, 0 },
{ 'H', 8, 0 },
{ 'H', 9, 0 },
{ 'H', 10, 0 },
{ 'H', 11, 0 },
{ 'H', 12, 0 },
{ 'H', 13, 0 },
{ 'C', 1, 0 },
{ 'C', 2, 0 },
{ 'C', 3, 0 },
{ 'C', 4, 0 },
{ 'C', 5, 0 },
{ 'C', 6, 0 },
{ 'C', 7, 0 },
{ 'C', 8, 0 },
{ 'C', 9, 0 },
{ 'C', 10, 0 },
{ 'C', 11, 0 },
{ 'C', 12, 0 },
{ 'C', 13, 0 },
{ 'D', 1, 0 },
{ 'D', 2, 0 },
{ 'D', 3, 0 },
{ 'D', 4, 0 },
{ 'D', 5, 0 },
{ 'D', 6, 0 },
{ 'D', 7, 0 },
{ 'D', 8, 0 },
{ 'D', 9, 0 },
{ 'D', 10, 0 },
{ 'D', 11, 0 },
{ 'D', 12, 0 },
{ 'D', 13, 0 },
};
int main( void )
{
int i, n, num, offset;
char suit;
scanf("%d", &n);
for(i = 0; i < n; i++){
scanf(" %c %d", &suit, &num);
switch( suit ){
case 'S': offset = 0; break;
case 'H': offset = 13; break;
case 'C': offset = 26; break;
case 'D': offset = 39; break;
default: return 0;
}
card[offset + num - 1].exist = 1;
}
for(i = 0; i < 52; i++){
if(card[i].exist == 0){
printf("%c %d\n", card[i].suit, card[i].num);
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214635/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214635/source.c"
target datalayout = "e-m:e-p270: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.st_card = type { i8, i32, i32 }
@card = dso_local local_unnamed_addr global [52 x %struct.st_card] [%struct.st_card { i8 83, i32 1, i32 0 }, %struct.st_card { i8 83, i32 2, i32 0 }, %struct.st_card { i8 83, i32 3, i32 0 }, %struct.st_card { i8 83, i32 4, i32 0 }, %struct.st_card { i8 83, i32 5, i32 0 }, %struct.st_card { i8 83, i32 6, i32 0 }, %struct.st_card { i8 83, i32 7, i32 0 }, %struct.st_card { i8 83, i32 8, i32 0 }, %struct.st_card { i8 83, i32 9, i32 0 }, %struct.st_card { i8 83, i32 10, i32 0 }, %struct.st_card { i8 83, i32 11, i32 0 }, %struct.st_card { i8 83, i32 12, i32 0 }, %struct.st_card { i8 83, i32 13, i32 0 }, %struct.st_card { i8 72, i32 1, i32 0 }, %struct.st_card { i8 72, i32 2, i32 0 }, %struct.st_card { i8 72, i32 3, i32 0 }, %struct.st_card { i8 72, i32 4, i32 0 }, %struct.st_card { i8 72, i32 5, i32 0 }, %struct.st_card { i8 72, i32 6, i32 0 }, %struct.st_card { i8 72, i32 7, i32 0 }, %struct.st_card { i8 72, i32 8, i32 0 }, %struct.st_card { i8 72, i32 9, i32 0 }, %struct.st_card { i8 72, i32 10, i32 0 }, %struct.st_card { i8 72, i32 11, i32 0 }, %struct.st_card { i8 72, i32 12, i32 0 }, %struct.st_card { i8 72, i32 13, i32 0 }, %struct.st_card { i8 67, i32 1, i32 0 }, %struct.st_card { i8 67, i32 2, i32 0 }, %struct.st_card { i8 67, i32 3, i32 0 }, %struct.st_card { i8 67, i32 4, i32 0 }, %struct.st_card { i8 67, i32 5, i32 0 }, %struct.st_card { i8 67, i32 6, i32 0 }, %struct.st_card { i8 67, i32 7, i32 0 }, %struct.st_card { i8 67, i32 8, i32 0 }, %struct.st_card { i8 67, i32 9, i32 0 }, %struct.st_card { i8 67, i32 10, i32 0 }, %struct.st_card { i8 67, i32 11, i32 0 }, %struct.st_card { i8 67, i32 12, i32 0 }, %struct.st_card { i8 67, i32 13, i32 0 }, %struct.st_card { i8 68, i32 1, i32 0 }, %struct.st_card { i8 68, i32 2, i32 0 }, %struct.st_card { i8 68, i32 3, i32 0 }, %struct.st_card { i8 68, i32 4, i32 0 }, %struct.st_card { i8 68, i32 5, i32 0 }, %struct.st_card { i8 68, i32 6, i32 0 }, %struct.st_card { i8 68, i32 7, i32 0 }, %struct.st_card { i8 68, i32 8, i32 0 }, %struct.st_card { i8 68, i32 9, i32 0 }, %struct.st_card { i8 68, i32 10, i32 0 }, %struct.st_card { i8 68, i32 11, i32 0 }, %struct.st_card { i8 68, i32 12, i32 0 }, %struct.st_card { i8 68, i32 13, i32 0 }], align 16
@.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
%num = alloca i32, align 4
%suit = 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 %num) #3
call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %suit) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp36 = icmp sgt i32 %0, 0
br i1 %cmp36, label %for.body, label %for.body8.preheader
for.body: ; preds = %entry, %sw.epilog
%i.037 = phi i32 [ %inc, %sw.epilog ], [ 0, %entry ]
%call1 = 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
%conv = sext i8 %1 to i32
switch i32 %conv, label %cleanup [
i32 83, label %sw.epilog
i32 72, label %sw.bb2
i32 67, label %sw.bb3
i32 68, label %sw.bb4
]
sw.bb2: ; preds = %for.body
br label %sw.epilog
sw.bb3: ; preds = %for.body
br label %sw.epilog
sw.bb4: ; preds = %for.body
br label %sw.epilog
sw.epilog: ; preds = %for.body, %sw.bb4, %sw.bb3, %sw.bb2
%offset.0 = phi i32 [ 38, %sw.bb4 ], [ 25, %sw.bb3 ], [ 12, %sw.bb2 ], [ -1, %for.body ]
%2 = load i32, ptr %num, align 4, !tbaa !5
%sub = add i32 %offset.0, %2
%idxprom = sext i32 %sub to i64
%exist = getelementptr inbounds [52 x %struct.st_card], ptr @card, i64 0, i64 %idxprom, i32 2
store i32 1, ptr %exist, align 4, !tbaa !10
%inc = add nuw nsw i32 %i.037, 1
%3 = load i32, ptr %n, align 4, !tbaa !5
%cmp = icmp slt i32 %inc, %3
br i1 %cmp, label %for.body, label %for.body8.preheader, !llvm.loop !12
for.body8.preheader: ; preds = %sw.epilog, %entry
br label %for.body8
for.body8: ; preds = %for.body8.preheader, %for.inc22
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc22 ], [ 0, %for.body8.preheader ]
%exist11 = getelementptr inbounds [52 x %struct.st_card], ptr @card, i64 0, i64 %indvars.iv, i32 2
%4 = load i32, ptr %exist11, align 4, !tbaa !10
%cmp12 = icmp eq i32 %4, 0
br i1 %cmp12, label %if.then, label %for.inc22
if.then: ; preds = %for.body8
%arrayidx10 = getelementptr inbounds [52 x %struct.st_card], ptr @card, i64 0, i64 %indvars.iv
%5 = load i8, ptr %arrayidx10, align 4, !tbaa !14
%conv17 = sext i8 %5 to i32
%num20 = getelementptr inbounds [52 x %struct.st_card], ptr @card, i64 0, i64 %indvars.iv, i32 1
%6 = load i32, ptr %num20, align 4, !tbaa !15
%call21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv17, i32 noundef %6)
br label %for.inc22
for.inc22: ; preds = %for.body8, %if.then
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond.not = icmp eq i64 %indvars.iv.next, 52
br i1 %exitcond.not, label %cleanup, label %for.body8, !llvm.loop !16
cleanup: ; preds = %for.body, %for.inc22
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %suit) #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
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(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 = !{!11, !6, i64 8}
!11 = !{!"", !7, i64 0, !6, i64 4, !6, i64 8}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!11, !7, i64 0}
!15 = !{!11, !6, i64 4}
!16 = distinct !{!16, !13}
|
#include <stdio.h>
int main(){
int n, i;
int num;
char mar, sim[]={'S','H','C','D'};
int card[52];
for(i=0; i<52; i++) card[i]=0;
scanf( "%d", &n);
for( i=0; i<=n; i++){
scanf( "%c %d\n", &mar, &num );
switch(mar){
case 'S': card[ 0+num-1] = 1; break;
case 'H': card[13+num-1] = 1; break;
case 'C': card[26+num-1] = 1; break;
case 'D': card[39+num-1] = 1; break;
}
}
for( i=0; i<52; i++ ){
if( card[i] == 0 ){
printf( "%c %d\n", sim[i/13], (i%13)+1 );
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214679/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214679/source.c"
target datalayout = "e-m:e-p270: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.sim = 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\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
%mar = alloca i8, align 1
%card = alloca [52 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 %num) #4
call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %mar) #4
call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %card) #4
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %card, i8 0, i64 208, i1 false), !tbaa !5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp2.not53 = icmp slt i32 %0, 0
br i1 %cmp2.not53, label %for.body28.preheader, label %for.body3
for.body3: ; preds = %entry, %for.inc22
%i.154 = phi i32 [ %inc23, %for.inc22 ], [ 0, %entry ]
%call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %mar, ptr noundef nonnull %num)
%1 = load i8, ptr %mar, align 1, !tbaa !9
%conv = sext i8 %1 to i32
switch i32 %conv, label %for.inc22 [
i32 83, label %sw.bb
i32 72, label %sw.bb7
i32 67, label %sw.bb12
i32 68, label %sw.bb17
]
sw.bb: ; preds = %for.body3
%2 = load i32, ptr %num, align 4, !tbaa !5
%sub = add nsw i32 %2, -1
br label %for.inc22.sink.split
sw.bb7: ; preds = %for.body3
%3 = load i32, ptr %num, align 4, !tbaa !5
%sub9 = add nsw i32 %3, 12
br label %for.inc22.sink.split
sw.bb12: ; preds = %for.body3
%4 = load i32, ptr %num, align 4, !tbaa !5
%sub14 = add nsw i32 %4, 25
br label %for.inc22.sink.split
sw.bb17: ; preds = %for.body3
%5 = load i32, ptr %num, align 4, !tbaa !5
%sub19 = add nsw i32 %5, 38
br label %for.inc22.sink.split
for.inc22.sink.split: ; preds = %sw.bb17, %sw.bb12, %sw.bb7, %sw.bb
%sub.sink = phi i32 [ %sub, %sw.bb ], [ %sub9, %sw.bb7 ], [ %sub14, %sw.bb12 ], [ %sub19, %sw.bb17 ]
%idxprom5 = sext i32 %sub.sink to i64
%arrayidx6 = getelementptr inbounds [52 x i32], ptr %card, i64 0, i64 %idxprom5
store i32 1, ptr %arrayidx6, align 4, !tbaa !5
br label %for.inc22
for.inc22: ; preds = %for.inc22.sink.split, %for.body3
%inc23 = add nuw nsw i32 %i.154, 1
%6 = load i32, ptr %n, align 4, !tbaa !5
%cmp2.not.not = icmp slt i32 %i.154, %6
br i1 %cmp2.not.not, label %for.body3, label %for.body28.preheader, !llvm.loop !10
for.body28.preheader: ; preds = %for.inc22, %entry
br label %for.body28
for.body28: ; preds = %for.body28.preheader, %for.inc38
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc38 ], [ 0, %for.body28.preheader ]
%arrayidx30 = getelementptr inbounds [52 x i32], ptr %card, i64 0, i64 %indvars.iv
%7 = load i32, ptr %arrayidx30, align 4, !tbaa !5
%cmp31 = icmp eq i32 %7, 0
br i1 %cmp31, label %if.then, label %for.inc38
if.then: ; preds = %for.body28
%div.lhs.trunc = trunc i64 %indvars.iv to i8
%div50 = udiv i8 %div.lhs.trunc, 13
%idxprom33 = zext i8 %div50 to i64
%arrayidx34 = getelementptr inbounds [4 x i8], ptr @__const.main.sim, i64 0, i64 %idxprom33
%8 = load i8, ptr %arrayidx34, align 1, !tbaa !9
%conv35 = sext i8 %8 to i32
%rem51 = urem i8 %div.lhs.trunc, 13
%narrow = add nuw nsw i8 %rem51, 1
%add36 = zext i8 %narrow to i32
%call37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv35, i32 noundef %add36)
br label %for.inc38
for.inc38: ; preds = %for.body28, %if.then
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond.not = icmp eq i64 %indvars.iv.next, 52
br i1 %exitcond.not, label %for.end40, label %for.body28, !llvm.loop !12
for.end40: ; preds = %for.inc38
call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %card) #4
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %mar) #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 a[4][13],n,i,j,k,x;
char m;
for(i=0;i<4;i++){
for(j=0;j<13;j++){
a[i][j]=0;
}
}
scanf("%d",&n);
for(k=0;k<2*n;k++){
scanf("%c %d",&m,&x);
if(m=='S')a[0][x-1]=1;
else if(m=='H')a[1][x-1]=1;
else if(m=='C')a[2][x-1]=1;
else if(m=='D')a[3][x-1]=1;
}
for(i=0;i<4;i++){
for(j=0;j<13;j++){
if(a[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_214721/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214721/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:
%a = alloca [4 x [13 x i32]], align 16
%n = alloca i32, align 4
%x = alloca i32, align 4
%m = 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 %x) #4
call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %m) #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
%cmp10120 = icmp sgt i32 %0, 0
br i1 %cmp10120, label %for.body11, label %for.cond54.preheader.preheader
for.body11: ; preds = %entry, %for.inc47
%k.0121 = phi i32 [ %inc48, %for.inc47 ], [ 0, %entry ]
%call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %m, ptr noundef nonnull %x)
%1 = load i8, ptr %m, align 1, !tbaa !9
switch i8 %1, label %for.inc47 [
i8 83, label %if.then
i8 72, label %if.then21
i8 67, label %if.then30
i8 68, label %if.then39
]
if.then: ; 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 %a, i64 0, i64 %idxprom16
br label %for.inc47.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 %a, i64 0, i64 1, i64 %idxprom24
br label %for.inc47.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 %a, i64 0, i64 2, i64 %idxprom33
br label %for.inc47.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 %a, i64 0, i64 3, i64 %idxprom42
br label %for.inc47.sink.split
for.inc47.sink.split: ; preds = %if.then21, %if.then39, %if.then30, %if.then
%arrayidx17.sink = phi ptr [ %arrayidx17, %if.then ], [ %arrayidx34, %if.then30 ], [ %arrayidx43, %if.then39 ], [ %arrayidx25, %if.then21 ]
store i32 1, ptr %arrayidx17.sink, align 4, !tbaa !5
br label %for.inc47
for.inc47: ; preds = %for.inc47.sink.split, %for.body11
%inc48 = add nuw nsw i32 %k.0121, 1
%6 = load i32, ptr %n, align 4, !tbaa !5
%mul = shl nsw i32 %6, 1
%cmp10 = icmp slt i32 %inc48, %mul
br i1 %cmp10, label %for.body11, label %for.cond54.preheader.preheader, !llvm.loop !10
for.cond54.preheader.preheader: ; preds = %for.inc47, %entry
br label %for.cond54.preheader
for.cond54.preheader: ; preds = %for.cond54.preheader.preheader, %for.inc95
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc95 ], [ 0, %for.cond54.preheader.preheader ]
%7 = trunc i64 %indvars.iv to i32
switch i32 %7, label %for.inc95 [
i32 0, label %for.body57.us.preheader
i32 1, label %for.body57.us124.preheader
i32 2, label %for.body57.us134.preheader
i32 3, label %for.body57.us144.preheader
]
for.body57.us144.preheader: ; preds = %for.cond54.preheader
%arrayidx61.us147 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 0
%8 = load i32, ptr %arrayidx61.us147, align 4, !tbaa !5
%cmp62.us148 = icmp eq i32 %8, 0
br i1 %cmp62.us148, label %if.then64.us149, label %for.inc92.us150
for.body57.us134.preheader: ; preds = %for.cond54.preheader
%arrayidx61.us137 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 0
%9 = load i32, ptr %arrayidx61.us137, align 4, !tbaa !5
%cmp62.us138 = icmp eq i32 %9, 0
br i1 %cmp62.us138, label %if.then64.us139, label %for.inc92.us140
for.body57.us124.preheader: ; preds = %for.cond54.preheader
%arrayidx61.us127 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 0
%10 = load i32, ptr %arrayidx61.us127, align 4, !tbaa !5
%cmp62.us128 = icmp eq i32 %10, 0
br i1 %cmp62.us128, label %if.then64.us129, label %for.inc92.us130
for.body57.us.preheader: ; preds = %for.cond54.preheader
%arrayidx61.us = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 0
%11 = load i32, ptr %arrayidx61.us, align 4, !tbaa !5
%cmp62.us = icmp eq i32 %11, 0
br i1 %cmp62.us, label %if.then64.us, label %for.inc92.us
if.then64.us: ; preds = %for.body57.us.preheader
%call68.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 1)
br label %for.inc92.us
for.inc92.us: ; preds = %if.then64.us, %for.body57.us.preheader
%arrayidx61.us.1 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 1
%12 = load i32, ptr %arrayidx61.us.1, align 4, !tbaa !5
%cmp62.us.1 = icmp eq i32 %12, 0
br i1 %cmp62.us.1, label %if.then64.us.1, label %for.inc92.us.1
if.then64.us.1: ; preds = %for.inc92.us
%call68.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 2)
br label %for.inc92.us.1
for.inc92.us.1: ; preds = %if.then64.us.1, %for.inc92.us
%arrayidx61.us.2 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 2
%13 = load i32, ptr %arrayidx61.us.2, align 4, !tbaa !5
%cmp62.us.2 = icmp eq i32 %13, 0
br i1 %cmp62.us.2, label %if.then64.us.2, label %for.inc92.us.2
if.then64.us.2: ; preds = %for.inc92.us.1
%call68.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 3)
br label %for.inc92.us.2
for.inc92.us.2: ; preds = %if.then64.us.2, %for.inc92.us.1
%arrayidx61.us.3 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 3
%14 = load i32, ptr %arrayidx61.us.3, align 4, !tbaa !5
%cmp62.us.3 = icmp eq i32 %14, 0
br i1 %cmp62.us.3, label %if.then64.us.3, label %for.inc92.us.3
if.then64.us.3: ; preds = %for.inc92.us.2
%call68.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 4)
br label %for.inc92.us.3
for.inc92.us.3: ; preds = %if.then64.us.3, %for.inc92.us.2
%arrayidx61.us.4 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 4
%15 = load i32, ptr %arrayidx61.us.4, align 4, !tbaa !5
%cmp62.us.4 = icmp eq i32 %15, 0
br i1 %cmp62.us.4, label %if.then64.us.4, label %for.inc92.us.4
if.then64.us.4: ; preds = %for.inc92.us.3
%call68.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 5)
br label %for.inc92.us.4
for.inc92.us.4: ; preds = %if.then64.us.4, %for.inc92.us.3
%arrayidx61.us.5 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 5
%16 = load i32, ptr %arrayidx61.us.5, align 4, !tbaa !5
%cmp62.us.5 = icmp eq i32 %16, 0
br i1 %cmp62.us.5, label %if.then64.us.5, label %for.inc92.us.5
if.then64.us.5: ; preds = %for.inc92.us.4
%call68.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 6)
br label %for.inc92.us.5
for.inc92.us.5: ; preds = %if.then64.us.5, %for.inc92.us.4
%arrayidx61.us.6 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 6
%17 = load i32, ptr %arrayidx61.us.6, align 4, !tbaa !5
%cmp62.us.6 = icmp eq i32 %17, 0
br i1 %cmp62.us.6, label %if.then64.us.6, label %for.inc92.us.6
if.then64.us.6: ; preds = %for.inc92.us.5
%call68.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 7)
br label %for.inc92.us.6
for.inc92.us.6: ; preds = %if.then64.us.6, %for.inc92.us.5
%arrayidx61.us.7 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 7
%18 = load i32, ptr %arrayidx61.us.7, align 4, !tbaa !5
%cmp62.us.7 = icmp eq i32 %18, 0
br i1 %cmp62.us.7, label %if.then64.us.7, label %for.inc92.us.7
if.then64.us.7: ; preds = %for.inc92.us.6
%call68.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 8)
br label %for.inc92.us.7
for.inc92.us.7: ; preds = %if.then64.us.7, %for.inc92.us.6
%arrayidx61.us.8 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 8
%19 = load i32, ptr %arrayidx61.us.8, align 4, !tbaa !5
%cmp62.us.8 = icmp eq i32 %19, 0
br i1 %cmp62.us.8, label %if.then64.us.8, label %for.inc92.us.8
if.then64.us.8: ; preds = %for.inc92.us.7
%call68.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 9)
br label %for.inc92.us.8
for.inc92.us.8: ; preds = %if.then64.us.8, %for.inc92.us.7
%arrayidx61.us.9 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 9
%20 = load i32, ptr %arrayidx61.us.9, align 4, !tbaa !5
%cmp62.us.9 = icmp eq i32 %20, 0
br i1 %cmp62.us.9, label %if.then64.us.9, label %for.inc92.us.9
if.then64.us.9: ; preds = %for.inc92.us.8
%call68.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 10)
br label %for.inc92.us.9
for.inc92.us.9: ; preds = %if.then64.us.9, %for.inc92.us.8
%arrayidx61.us.10 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 10
%21 = load i32, ptr %arrayidx61.us.10, align 4, !tbaa !5
%cmp62.us.10 = icmp eq i32 %21, 0
br i1 %cmp62.us.10, label %if.then64.us.10, label %for.inc92.us.10
if.then64.us.10: ; preds = %for.inc92.us.9
%call68.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 11)
br label %for.inc92.us.10
for.inc92.us.10: ; preds = %if.then64.us.10, %for.inc92.us.9
%arrayidx61.us.11 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 11
%22 = load i32, ptr %arrayidx61.us.11, align 4, !tbaa !5
%cmp62.us.11 = icmp eq i32 %22, 0
br i1 %cmp62.us.11, label %if.then64.us.11, label %for.inc92.us.11
if.then64.us.11: ; preds = %for.inc92.us.10
%call68.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 12)
br label %for.inc92.us.11
for.inc92.us.11: ; preds = %if.then64.us.11, %for.inc92.us.10
%arrayidx61.us.12 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 12
%23 = load i32, ptr %arrayidx61.us.12, align 4, !tbaa !5
%cmp62.us.12 = icmp eq i32 %23, 0
br i1 %cmp62.us.12, label %for.inc95.sink.split, label %for.inc95
if.then64.us129: ; preds = %for.body57.us124.preheader
%call74.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1)
br label %for.inc92.us130
for.inc92.us130: ; preds = %if.then64.us129, %for.body57.us124.preheader
%arrayidx61.us127.1 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 1
%24 = load i32, ptr %arrayidx61.us127.1, align 4, !tbaa !5
%cmp62.us128.1 = icmp eq i32 %24, 0
br i1 %cmp62.us128.1, label %if.then64.us129.1, label %for.inc92.us130.1
if.then64.us129.1: ; preds = %for.inc92.us130
%call74.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2)
br label %for.inc92.us130.1
for.inc92.us130.1: ; preds = %if.then64.us129.1, %for.inc92.us130
%arrayidx61.us127.2 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 2
%25 = load i32, ptr %arrayidx61.us127.2, align 4, !tbaa !5
%cmp62.us128.2 = icmp eq i32 %25, 0
br i1 %cmp62.us128.2, label %if.then64.us129.2, label %for.inc92.us130.2
if.then64.us129.2: ; preds = %for.inc92.us130.1
%call74.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3)
br label %for.inc92.us130.2
for.inc92.us130.2: ; preds = %if.then64.us129.2, %for.inc92.us130.1
%arrayidx61.us127.3 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 3
%26 = load i32, ptr %arrayidx61.us127.3, align 4, !tbaa !5
%cmp62.us128.3 = icmp eq i32 %26, 0
br i1 %cmp62.us128.3, label %if.then64.us129.3, label %for.inc92.us130.3
if.then64.us129.3: ; preds = %for.inc92.us130.2
%call74.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4)
br label %for.inc92.us130.3
for.inc92.us130.3: ; preds = %if.then64.us129.3, %for.inc92.us130.2
%arrayidx61.us127.4 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 4
%27 = load i32, ptr %arrayidx61.us127.4, align 4, !tbaa !5
%cmp62.us128.4 = icmp eq i32 %27, 0
br i1 %cmp62.us128.4, label %if.then64.us129.4, label %for.inc92.us130.4
if.then64.us129.4: ; preds = %for.inc92.us130.3
%call74.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5)
br label %for.inc92.us130.4
for.inc92.us130.4: ; preds = %if.then64.us129.4, %for.inc92.us130.3
%arrayidx61.us127.5 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 5
%28 = load i32, ptr %arrayidx61.us127.5, align 4, !tbaa !5
%cmp62.us128.5 = icmp eq i32 %28, 0
br i1 %cmp62.us128.5, label %if.then64.us129.5, label %for.inc92.us130.5
if.then64.us129.5: ; preds = %for.inc92.us130.4
%call74.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6)
br label %for.inc92.us130.5
for.inc92.us130.5: ; preds = %if.then64.us129.5, %for.inc92.us130.4
%arrayidx61.us127.6 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 6
%29 = load i32, ptr %arrayidx61.us127.6, align 4, !tbaa !5
%cmp62.us128.6 = icmp eq i32 %29, 0
br i1 %cmp62.us128.6, label %if.then64.us129.6, label %for.inc92.us130.6
if.then64.us129.6: ; preds = %for.inc92.us130.5
%call74.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7)
br label %for.inc92.us130.6
for.inc92.us130.6: ; preds = %if.then64.us129.6, %for.inc92.us130.5
%arrayidx61.us127.7 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 7
%30 = load i32, ptr %arrayidx61.us127.7, align 4, !tbaa !5
%cmp62.us128.7 = icmp eq i32 %30, 0
br i1 %cmp62.us128.7, label %if.then64.us129.7, label %for.inc92.us130.7
if.then64.us129.7: ; preds = %for.inc92.us130.6
%call74.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8)
br label %for.inc92.us130.7
for.inc92.us130.7: ; preds = %if.then64.us129.7, %for.inc92.us130.6
%arrayidx61.us127.8 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 8
%31 = load i32, ptr %arrayidx61.us127.8, align 4, !tbaa !5
%cmp62.us128.8 = icmp eq i32 %31, 0
br i1 %cmp62.us128.8, label %if.then64.us129.8, label %for.inc92.us130.8
if.then64.us129.8: ; preds = %for.inc92.us130.7
%call74.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9)
br label %for.inc92.us130.8
for.inc92.us130.8: ; preds = %if.then64.us129.8, %for.inc92.us130.7
%arrayidx61.us127.9 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 9
%32 = load i32, ptr %arrayidx61.us127.9, align 4, !tbaa !5
%cmp62.us128.9 = icmp eq i32 %32, 0
br i1 %cmp62.us128.9, label %if.then64.us129.9, label %for.inc92.us130.9
if.then64.us129.9: ; preds = %for.inc92.us130.8
%call74.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10)
br label %for.inc92.us130.9
for.inc92.us130.9: ; preds = %if.then64.us129.9, %for.inc92.us130.8
%arrayidx61.us127.10 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 10
%33 = load i32, ptr %arrayidx61.us127.10, align 4, !tbaa !5
%cmp62.us128.10 = icmp eq i32 %33, 0
br i1 %cmp62.us128.10, label %if.then64.us129.10, label %for.inc92.us130.10
if.then64.us129.10: ; preds = %for.inc92.us130.9
%call74.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11)
br label %for.inc92.us130.10
for.inc92.us130.10: ; preds = %if.then64.us129.10, %for.inc92.us130.9
%arrayidx61.us127.11 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 11
%34 = load i32, ptr %arrayidx61.us127.11, align 4, !tbaa !5
%cmp62.us128.11 = icmp eq i32 %34, 0
br i1 %cmp62.us128.11, label %if.then64.us129.11, label %for.inc92.us130.11
if.then64.us129.11: ; preds = %for.inc92.us130.10
%call74.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12)
br label %for.inc92.us130.11
for.inc92.us130.11: ; preds = %if.then64.us129.11, %for.inc92.us130.10
%arrayidx61.us127.12 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 12
%35 = load i32, ptr %arrayidx61.us127.12, align 4, !tbaa !5
%cmp62.us128.12 = icmp eq i32 %35, 0
br i1 %cmp62.us128.12, label %for.inc95.sink.split, label %for.inc95
if.then64.us139: ; preds = %for.body57.us134.preheader
%call80.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1)
br label %for.inc92.us140
for.inc92.us140: ; preds = %if.then64.us139, %for.body57.us134.preheader
%arrayidx61.us137.1 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 1
%36 = load i32, ptr %arrayidx61.us137.1, align 4, !tbaa !5
%cmp62.us138.1 = icmp eq i32 %36, 0
br i1 %cmp62.us138.1, label %if.then64.us139.1, label %for.inc92.us140.1
if.then64.us139.1: ; preds = %for.inc92.us140
%call80.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2)
br label %for.inc92.us140.1
for.inc92.us140.1: ; preds = %if.then64.us139.1, %for.inc92.us140
%arrayidx61.us137.2 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 2
%37 = load i32, ptr %arrayidx61.us137.2, align 4, !tbaa !5
%cmp62.us138.2 = icmp eq i32 %37, 0
br i1 %cmp62.us138.2, label %if.then64.us139.2, label %for.inc92.us140.2
if.then64.us139.2: ; preds = %for.inc92.us140.1
%call80.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3)
br label %for.inc92.us140.2
for.inc92.us140.2: ; preds = %if.then64.us139.2, %for.inc92.us140.1
%arrayidx61.us137.3 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 3
%38 = load i32, ptr %arrayidx61.us137.3, align 4, !tbaa !5
%cmp62.us138.3 = icmp eq i32 %38, 0
br i1 %cmp62.us138.3, label %if.then64.us139.3, label %for.inc92.us140.3
if.then64.us139.3: ; preds = %for.inc92.us140.2
%call80.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4)
br label %for.inc92.us140.3
for.inc92.us140.3: ; preds = %if.then64.us139.3, %for.inc92.us140.2
%arrayidx61.us137.4 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 4
%39 = load i32, ptr %arrayidx61.us137.4, align 4, !tbaa !5
%cmp62.us138.4 = icmp eq i32 %39, 0
br i1 %cmp62.us138.4, label %if.then64.us139.4, label %for.inc92.us140.4
if.then64.us139.4: ; preds = %for.inc92.us140.3
%call80.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5)
br label %for.inc92.us140.4
for.inc92.us140.4: ; preds = %if.then64.us139.4, %for.inc92.us140.3
%arrayidx61.us137.5 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 5
%40 = load i32, ptr %arrayidx61.us137.5, align 4, !tbaa !5
%cmp62.us138.5 = icmp eq i32 %40, 0
br i1 %cmp62.us138.5, label %if.then64.us139.5, label %for.inc92.us140.5
if.then64.us139.5: ; preds = %for.inc92.us140.4
%call80.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6)
br label %for.inc92.us140.5
for.inc92.us140.5: ; preds = %if.then64.us139.5, %for.inc92.us140.4
%arrayidx61.us137.6 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 6
%41 = load i32, ptr %arrayidx61.us137.6, align 4, !tbaa !5
%cmp62.us138.6 = icmp eq i32 %41, 0
br i1 %cmp62.us138.6, label %if.then64.us139.6, label %for.inc92.us140.6
if.then64.us139.6: ; preds = %for.inc92.us140.5
%call80.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7)
br label %for.inc92.us140.6
for.inc92.us140.6: ; preds = %if.then64.us139.6, %for.inc92.us140.5
%arrayidx61.us137.7 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 7
%42 = load i32, ptr %arrayidx61.us137.7, align 4, !tbaa !5
%cmp62.us138.7 = icmp eq i32 %42, 0
br i1 %cmp62.us138.7, label %if.then64.us139.7, label %for.inc92.us140.7
if.then64.us139.7: ; preds = %for.inc92.us140.6
%call80.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8)
br label %for.inc92.us140.7
for.inc92.us140.7: ; preds = %if.then64.us139.7, %for.inc92.us140.6
%arrayidx61.us137.8 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 8
%43 = load i32, ptr %arrayidx61.us137.8, align 4, !tbaa !5
%cmp62.us138.8 = icmp eq i32 %43, 0
br i1 %cmp62.us138.8, label %if.then64.us139.8, label %for.inc92.us140.8
if.then64.us139.8: ; preds = %for.inc92.us140.7
%call80.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9)
br label %for.inc92.us140.8
for.inc92.us140.8: ; preds = %if.then64.us139.8, %for.inc92.us140.7
%arrayidx61.us137.9 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 9
%44 = load i32, ptr %arrayidx61.us137.9, align 4, !tbaa !5
%cmp62.us138.9 = icmp eq i32 %44, 0
br i1 %cmp62.us138.9, label %if.then64.us139.9, label %for.inc92.us140.9
if.then64.us139.9: ; preds = %for.inc92.us140.8
%call80.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10)
br label %for.inc92.us140.9
for.inc92.us140.9: ; preds = %if.then64.us139.9, %for.inc92.us140.8
%arrayidx61.us137.10 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 10
%45 = load i32, ptr %arrayidx61.us137.10, align 4, !tbaa !5
%cmp62.us138.10 = icmp eq i32 %45, 0
br i1 %cmp62.us138.10, label %if.then64.us139.10, label %for.inc92.us140.10
if.then64.us139.10: ; preds = %for.inc92.us140.9
%call80.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11)
br label %for.inc92.us140.10
for.inc92.us140.10: ; preds = %if.then64.us139.10, %for.inc92.us140.9
%arrayidx61.us137.11 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 11
%46 = load i32, ptr %arrayidx61.us137.11, align 4, !tbaa !5
%cmp62.us138.11 = icmp eq i32 %46, 0
br i1 %cmp62.us138.11, label %if.then64.us139.11, label %for.inc92.us140.11
if.then64.us139.11: ; preds = %for.inc92.us140.10
%call80.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12)
br label %for.inc92.us140.11
for.inc92.us140.11: ; preds = %if.then64.us139.11, %for.inc92.us140.10
%arrayidx61.us137.12 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 12
%47 = load i32, ptr %arrayidx61.us137.12, align 4, !tbaa !5
%cmp62.us138.12 = icmp eq i32 %47, 0
br i1 %cmp62.us138.12, label %for.inc95.sink.split, label %for.inc95
if.then64.us149: ; preds = %for.body57.us144.preheader
%call86.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1)
br label %for.inc92.us150
for.inc92.us150: ; preds = %if.then64.us149, %for.body57.us144.preheader
%arrayidx61.us147.1 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 1
%48 = load i32, ptr %arrayidx61.us147.1, align 4, !tbaa !5
%cmp62.us148.1 = icmp eq i32 %48, 0
br i1 %cmp62.us148.1, label %if.then64.us149.1, label %for.inc92.us150.1
if.then64.us149.1: ; preds = %for.inc92.us150
%call86.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2)
br label %for.inc92.us150.1
for.inc92.us150.1: ; preds = %if.then64.us149.1, %for.inc92.us150
%arrayidx61.us147.2 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 2
%49 = load i32, ptr %arrayidx61.us147.2, align 4, !tbaa !5
%cmp62.us148.2 = icmp eq i32 %49, 0
br i1 %cmp62.us148.2, label %if.then64.us149.2, label %for.inc92.us150.2
if.then64.us149.2: ; preds = %for.inc92.us150.1
%call86.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3)
br label %for.inc92.us150.2
for.inc92.us150.2: ; preds = %if.then64.us149.2, %for.inc92.us150.1
%arrayidx61.us147.3 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 3
%50 = load i32, ptr %arrayidx61.us147.3, align 4, !tbaa !5
%cmp62.us148.3 = icmp eq i32 %50, 0
br i1 %cmp62.us148.3, label %if.then64.us149.3, label %for.inc92.us150.3
if.then64.us149.3: ; preds = %for.inc92.us150.2
%call86.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4)
br label %for.inc92.us150.3
for.inc92.us150.3: ; preds = %if.then64.us149.3, %for.inc92.us150.2
%arrayidx61.us147.4 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 4
%51 = load i32, ptr %arrayidx61.us147.4, align 4, !tbaa !5
%cmp62.us148.4 = icmp eq i32 %51, 0
br i1 %cmp62.us148.4, label %if.then64.us149.4, label %for.inc92.us150.4
if.then64.us149.4: ; preds = %for.inc92.us150.3
%call86.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5)
br label %for.inc92.us150.4
for.inc92.us150.4: ; preds = %if.then64.us149.4, %for.inc92.us150.3
%arrayidx61.us147.5 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 5
%52 = load i32, ptr %arrayidx61.us147.5, align 4, !tbaa !5
%cmp62.us148.5 = icmp eq i32 %52, 0
br i1 %cmp62.us148.5, label %if.then64.us149.5, label %for.inc92.us150.5
if.then64.us149.5: ; preds = %for.inc92.us150.4
%call86.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6)
br label %for.inc92.us150.5
for.inc92.us150.5: ; preds = %if.then64.us149.5, %for.inc92.us150.4
%arrayidx61.us147.6 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 6
%53 = load i32, ptr %arrayidx61.us147.6, align 4, !tbaa !5
%cmp62.us148.6 = icmp eq i32 %53, 0
br i1 %cmp62.us148.6, label %if.then64.us149.6, label %for.inc92.us150.6
if.then64.us149.6: ; preds = %for.inc92.us150.5
%call86.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7)
br label %for.inc92.us150.6
for.inc92.us150.6: ; preds = %if.then64.us149.6, %for.inc92.us150.5
%arrayidx61.us147.7 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 7
%54 = load i32, ptr %arrayidx61.us147.7, align 4, !tbaa !5
%cmp62.us148.7 = icmp eq i32 %54, 0
br i1 %cmp62.us148.7, label %if.then64.us149.7, label %for.inc92.us150.7
if.then64.us149.7: ; preds = %for.inc92.us150.6
%call86.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8)
br label %for.inc92.us150.7
for.inc92.us150.7: ; preds = %if.then64.us149.7, %for.inc92.us150.6
%arrayidx61.us147.8 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 8
%55 = load i32, ptr %arrayidx61.us147.8, align 4, !tbaa !5
%cmp62.us148.8 = icmp eq i32 %55, 0
br i1 %cmp62.us148.8, label %if.then64.us149.8, label %for.inc92.us150.8
if.then64.us149.8: ; preds = %for.inc92.us150.7
%call86.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9)
br label %for.inc92.us150.8
for.inc92.us150.8: ; preds = %if.then64.us149.8, %for.inc92.us150.7
%arrayidx61.us147.9 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 9
%56 = load i32, ptr %arrayidx61.us147.9, align 4, !tbaa !5
%cmp62.us148.9 = icmp eq i32 %56, 0
br i1 %cmp62.us148.9, label %if.then64.us149.9, label %for.inc92.us150.9
if.then64.us149.9: ; preds = %for.inc92.us150.8
%call86.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10)
br label %for.inc92.us150.9
for.inc92.us150.9: ; preds = %if.then64.us149.9, %for.inc92.us150.8
%arrayidx61.us147.10 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 10
%57 = load i32, ptr %arrayidx61.us147.10, align 4, !tbaa !5
%cmp62.us148.10 = icmp eq i32 %57, 0
br i1 %cmp62.us148.10, label %if.then64.us149.10, label %for.inc92.us150.10
if.then64.us149.10: ; preds = %for.inc92.us150.9
%call86.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11)
br label %for.inc92.us150.10
for.inc92.us150.10: ; preds = %if.then64.us149.10, %for.inc92.us150.9
%arrayidx61.us147.11 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 11
%58 = load i32, ptr %arrayidx61.us147.11, align 4, !tbaa !5
%cmp62.us148.11 = icmp eq i32 %58, 0
br i1 %cmp62.us148.11, label %if.then64.us149.11, label %for.inc92.us150.11
if.then64.us149.11: ; preds = %for.inc92.us150.10
%call86.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12)
br label %for.inc92.us150.11
for.inc92.us150.11: ; preds = %if.then64.us149.11, %for.inc92.us150.10
%arrayidx61.us147.12 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 12
%59 = load i32, ptr %arrayidx61.us147.12, align 4, !tbaa !5
%cmp62.us148.12 = icmp eq i32 %59, 0
br i1 %cmp62.us148.12, label %for.inc95.sink.split, label %for.inc95
for.inc95.sink.split: ; preds = %for.inc92.us150.11, %for.inc92.us140.11, %for.inc92.us130.11, %for.inc92.us.11
%.str.5.sink = phi ptr [ @.str.2, %for.inc92.us.11 ], [ @.str.3, %for.inc92.us130.11 ], [ @.str.4, %for.inc92.us140.11 ], [ @.str.5, %for.inc92.us150.11 ]
%call86.us.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.5.sink, i32 noundef 13)
br label %for.inc95
for.inc95: ; preds = %for.inc95.sink.split, %for.inc92.us150.11, %for.inc92.us140.11, %for.inc92.us130.11, %for.inc92.us.11, %for.cond54.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.end97, label %for.cond54.preheader, !llvm.loop !12
for.end97: ; preds = %for.inc95
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %m) #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
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: 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 argc, const char * argv[]) {
int cards[4][13]={0},n,rank,i,j,a;
char mark;
scanf("%d",&n);
while(n>0){
scanf(" %c %d",&mark,&rank);
if(mark=='S'){
a=0;
}
else if(mark=='H'){
a=1;
}
else if(mark=='C'){
a=2;
}
else{
a=3;
}
cards[a][rank-1]=1;
n--;
}
for(i=0;i<4;i++){
for(j=0;j<13;j++){
if(cards[i][j]==0){
if(i==0){
mark='S';
}
else if(i==1){
mark='H';
}
else if(i==2){
mark='C';
}
else{
mark='D';
}
printf("%c %d\n",mark,j+1);
}
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214772/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214772/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 {
entry:
%cards = alloca [4 x [13 x i32]], align 16
%n = alloca i32, align 4
%rank = 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 %rank) #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)
%.pr = load i32, ptr %n, align 4, !tbaa !5
%cmp60 = icmp sgt i32 %.pr, 0
br i1 %cmp60, label %while.body, label %for.cond20.preheader.preheader
while.body: ; preds = %entry, %if.end15
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %mark, ptr noundef nonnull %rank)
%0 = load i8, ptr %mark, align 1, !tbaa !9
switch i8 %0, label %if.else13 [
i8 83, label %if.end15
i8 72, label %if.then7
i8 67, label %if.then12
]
if.then7: ; preds = %while.body
br label %if.end15
if.then12: ; preds = %while.body
br label %if.end15
if.else13: ; preds = %while.body
br label %if.end15
if.end15: ; preds = %while.body, %if.then7, %if.else13, %if.then12
%a.0 = phi i64 [ 1, %if.then7 ], [ 2, %if.then12 ], [ 3, %if.else13 ], [ 0, %while.body ]
%1 = load i32, ptr %rank, align 4, !tbaa !5
%sub = add nsw i32 %1, -1
%idxprom16 = sext i32 %sub to i64
%arrayidx17 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %a.0, i64 %idxprom16
store i32 1, ptr %arrayidx17, align 4, !tbaa !5
%2 = load i32, ptr %n, align 4, !tbaa !5
%dec = add nsw i32 %2, -1
store i32 %dec, ptr %n, align 4, !tbaa !5
%cmp = icmp sgt i32 %2, 1
br i1 %cmp, label %while.body, label %for.cond20.preheader.preheader, !llvm.loop !10
for.cond20.preheader.preheader: ; preds = %if.end15, %entry
br label %for.cond20.preheader
for.cond20.preheader: ; preds = %for.cond20.preheader.preheader, %for.inc49
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc49 ], [ 0, %for.cond20.preheader.preheader ]
%3 = trunc i64 %indvars.iv to i32
%arrayidx27 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 0
%4 = load i32, ptr %arrayidx27, align 4, !tbaa !5
%cmp28 = icmp eq i32 %4, 0
switch i32 %3, label %for.body23.preheader [
i32 0, label %for.body23.us.preheader
i32 1, label %for.body23.us63.preheader
i32 2, label %for.body23.us77.preheader
]
for.body23.us77.preheader: ; preds = %for.cond20.preheader
br i1 %cmp28, label %if.then30.us82, label %for.inc.us87
for.body23.us63.preheader: ; preds = %for.cond20.preheader
br i1 %cmp28, label %if.then30.us68, label %for.inc.us73
for.body23.us.preheader: ; preds = %for.cond20.preheader
br i1 %cmp28, label %if.then30.us, label %for.inc.us
for.body23.preheader: ; preds = %for.cond20.preheader
br i1 %cmp28, label %if.then30, label %for.inc
if.then30.us: ; preds = %for.body23.us.preheader
store i8 83, ptr %mark, align 1, !tbaa !9
%call47.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 1)
br label %for.inc.us
for.inc.us: ; preds = %if.then30.us, %for.body23.us.preheader
%arrayidx27.us.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1
%5 = load i32, ptr %arrayidx27.us.1, align 4, !tbaa !5
%cmp28.us.1 = icmp eq i32 %5, 0
br i1 %cmp28.us.1, label %if.then30.us.1, label %for.inc.us.1
if.then30.us.1: ; preds = %for.inc.us
store i8 83, ptr %mark, align 1, !tbaa !9
%call47.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 2)
br label %for.inc.us.1
for.inc.us.1: ; preds = %if.then30.us.1, %for.inc.us
%arrayidx27.us.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2
%6 = load i32, ptr %arrayidx27.us.2, align 4, !tbaa !5
%cmp28.us.2 = icmp eq i32 %6, 0
br i1 %cmp28.us.2, label %if.then30.us.2, label %for.inc.us.2
if.then30.us.2: ; preds = %for.inc.us.1
store i8 83, ptr %mark, align 1, !tbaa !9
%call47.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 3)
br label %for.inc.us.2
for.inc.us.2: ; preds = %if.then30.us.2, %for.inc.us.1
%arrayidx27.us.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3
%7 = load i32, ptr %arrayidx27.us.3, align 4, !tbaa !5
%cmp28.us.3 = icmp eq i32 %7, 0
br i1 %cmp28.us.3, label %if.then30.us.3, label %for.inc.us.3
if.then30.us.3: ; preds = %for.inc.us.2
store i8 83, ptr %mark, align 1, !tbaa !9
%call47.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 4)
br label %for.inc.us.3
for.inc.us.3: ; preds = %if.then30.us.3, %for.inc.us.2
%arrayidx27.us.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4
%8 = load i32, ptr %arrayidx27.us.4, align 4, !tbaa !5
%cmp28.us.4 = icmp eq i32 %8, 0
br i1 %cmp28.us.4, label %if.then30.us.4, label %for.inc.us.4
if.then30.us.4: ; preds = %for.inc.us.3
store i8 83, ptr %mark, align 1, !tbaa !9
%call47.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 5)
br label %for.inc.us.4
for.inc.us.4: ; preds = %if.then30.us.4, %for.inc.us.3
%arrayidx27.us.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5
%9 = load i32, ptr %arrayidx27.us.5, align 4, !tbaa !5
%cmp28.us.5 = icmp eq i32 %9, 0
br i1 %cmp28.us.5, label %if.then30.us.5, label %for.inc.us.5
if.then30.us.5: ; preds = %for.inc.us.4
store i8 83, ptr %mark, align 1, !tbaa !9
%call47.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 6)
br label %for.inc.us.5
for.inc.us.5: ; preds = %if.then30.us.5, %for.inc.us.4
%arrayidx27.us.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6
%10 = load i32, ptr %arrayidx27.us.6, align 4, !tbaa !5
%cmp28.us.6 = icmp eq i32 %10, 0
br i1 %cmp28.us.6, label %if.then30.us.6, label %for.inc.us.6
if.then30.us.6: ; preds = %for.inc.us.5
store i8 83, ptr %mark, align 1, !tbaa !9
%call47.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 7)
br label %for.inc.us.6
for.inc.us.6: ; preds = %if.then30.us.6, %for.inc.us.5
%arrayidx27.us.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7
%11 = load i32, ptr %arrayidx27.us.7, align 4, !tbaa !5
%cmp28.us.7 = icmp eq i32 %11, 0
br i1 %cmp28.us.7, label %if.then30.us.7, label %for.inc.us.7
if.then30.us.7: ; preds = %for.inc.us.6
store i8 83, ptr %mark, align 1, !tbaa !9
%call47.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 8)
br label %for.inc.us.7
for.inc.us.7: ; preds = %if.then30.us.7, %for.inc.us.6
%arrayidx27.us.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8
%12 = load i32, ptr %arrayidx27.us.8, align 4, !tbaa !5
%cmp28.us.8 = icmp eq i32 %12, 0
br i1 %cmp28.us.8, label %if.then30.us.8, label %for.inc.us.8
if.then30.us.8: ; preds = %for.inc.us.7
store i8 83, ptr %mark, align 1, !tbaa !9
%call47.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 9)
br label %for.inc.us.8
for.inc.us.8: ; preds = %if.then30.us.8, %for.inc.us.7
%arrayidx27.us.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9
%13 = load i32, ptr %arrayidx27.us.9, align 4, !tbaa !5
%cmp28.us.9 = icmp eq i32 %13, 0
br i1 %cmp28.us.9, label %if.then30.us.9, label %for.inc.us.9
if.then30.us.9: ; preds = %for.inc.us.8
store i8 83, ptr %mark, align 1, !tbaa !9
%call47.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 10)
br label %for.inc.us.9
for.inc.us.9: ; preds = %if.then30.us.9, %for.inc.us.8
%arrayidx27.us.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10
%14 = load i32, ptr %arrayidx27.us.10, align 4, !tbaa !5
%cmp28.us.10 = icmp eq i32 %14, 0
br i1 %cmp28.us.10, label %if.then30.us.10, label %for.inc.us.10
if.then30.us.10: ; preds = %for.inc.us.9
store i8 83, ptr %mark, align 1, !tbaa !9
%call47.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 11)
br label %for.inc.us.10
for.inc.us.10: ; preds = %if.then30.us.10, %for.inc.us.9
%arrayidx27.us.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11
%15 = load i32, ptr %arrayidx27.us.11, align 4, !tbaa !5
%cmp28.us.11 = icmp eq i32 %15, 0
br i1 %cmp28.us.11, label %if.then30.us.11, label %for.inc.us.11
if.then30.us.11: ; preds = %for.inc.us.10
store i8 83, ptr %mark, align 1, !tbaa !9
%call47.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef 12)
br label %for.inc.us.11
for.inc.us.11: ; preds = %if.then30.us.11, %for.inc.us.10
%arrayidx27.us.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12
%16 = load i32, ptr %arrayidx27.us.12, align 4, !tbaa !5
%cmp28.us.12 = icmp eq i32 %16, 0
br i1 %cmp28.us.12, label %if.then30.us.12, label %for.inc49
if.then30.us.12: ; preds = %for.inc.us.11
store i8 83, ptr %mark, align 1, !tbaa !9
br label %for.inc49.sink.split
if.then30.us68: ; preds = %for.body23.us63.preheader
store i8 72, ptr %mark, align 1, !tbaa !9
%call47.us72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 1)
br label %for.inc.us73
for.inc.us73: ; preds = %if.then30.us68, %for.body23.us63.preheader
%arrayidx27.us66.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1
%17 = load i32, ptr %arrayidx27.us66.1, align 4, !tbaa !5
%cmp28.us67.1 = icmp eq i32 %17, 0
br i1 %cmp28.us67.1, label %if.then30.us68.1, label %for.inc.us73.1
if.then30.us68.1: ; preds = %for.inc.us73
store i8 72, ptr %mark, align 1, !tbaa !9
%call47.us72.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 2)
br label %for.inc.us73.1
for.inc.us73.1: ; preds = %if.then30.us68.1, %for.inc.us73
%arrayidx27.us66.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2
%18 = load i32, ptr %arrayidx27.us66.2, align 4, !tbaa !5
%cmp28.us67.2 = icmp eq i32 %18, 0
br i1 %cmp28.us67.2, label %if.then30.us68.2, label %for.inc.us73.2
if.then30.us68.2: ; preds = %for.inc.us73.1
store i8 72, ptr %mark, align 1, !tbaa !9
%call47.us72.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 3)
br label %for.inc.us73.2
for.inc.us73.2: ; preds = %if.then30.us68.2, %for.inc.us73.1
%arrayidx27.us66.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3
%19 = load i32, ptr %arrayidx27.us66.3, align 4, !tbaa !5
%cmp28.us67.3 = icmp eq i32 %19, 0
br i1 %cmp28.us67.3, label %if.then30.us68.3, label %for.inc.us73.3
if.then30.us68.3: ; preds = %for.inc.us73.2
store i8 72, ptr %mark, align 1, !tbaa !9
%call47.us72.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 4)
br label %for.inc.us73.3
for.inc.us73.3: ; preds = %if.then30.us68.3, %for.inc.us73.2
%arrayidx27.us66.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4
%20 = load i32, ptr %arrayidx27.us66.4, align 4, !tbaa !5
%cmp28.us67.4 = icmp eq i32 %20, 0
br i1 %cmp28.us67.4, label %if.then30.us68.4, label %for.inc.us73.4
if.then30.us68.4: ; preds = %for.inc.us73.3
store i8 72, ptr %mark, align 1, !tbaa !9
%call47.us72.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 5)
br label %for.inc.us73.4
for.inc.us73.4: ; preds = %if.then30.us68.4, %for.inc.us73.3
%arrayidx27.us66.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5
%21 = load i32, ptr %arrayidx27.us66.5, align 4, !tbaa !5
%cmp28.us67.5 = icmp eq i32 %21, 0
br i1 %cmp28.us67.5, label %if.then30.us68.5, label %for.inc.us73.5
if.then30.us68.5: ; preds = %for.inc.us73.4
store i8 72, ptr %mark, align 1, !tbaa !9
%call47.us72.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 6)
br label %for.inc.us73.5
for.inc.us73.5: ; preds = %if.then30.us68.5, %for.inc.us73.4
%arrayidx27.us66.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6
%22 = load i32, ptr %arrayidx27.us66.6, align 4, !tbaa !5
%cmp28.us67.6 = icmp eq i32 %22, 0
br i1 %cmp28.us67.6, label %if.then30.us68.6, label %for.inc.us73.6
if.then30.us68.6: ; preds = %for.inc.us73.5
store i8 72, ptr %mark, align 1, !tbaa !9
%call47.us72.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 7)
br label %for.inc.us73.6
for.inc.us73.6: ; preds = %if.then30.us68.6, %for.inc.us73.5
%arrayidx27.us66.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7
%23 = load i32, ptr %arrayidx27.us66.7, align 4, !tbaa !5
%cmp28.us67.7 = icmp eq i32 %23, 0
br i1 %cmp28.us67.7, label %if.then30.us68.7, label %for.inc.us73.7
if.then30.us68.7: ; preds = %for.inc.us73.6
store i8 72, ptr %mark, align 1, !tbaa !9
%call47.us72.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 8)
br label %for.inc.us73.7
for.inc.us73.7: ; preds = %if.then30.us68.7, %for.inc.us73.6
%arrayidx27.us66.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8
%24 = load i32, ptr %arrayidx27.us66.8, align 4, !tbaa !5
%cmp28.us67.8 = icmp eq i32 %24, 0
br i1 %cmp28.us67.8, label %if.then30.us68.8, label %for.inc.us73.8
if.then30.us68.8: ; preds = %for.inc.us73.7
store i8 72, ptr %mark, align 1, !tbaa !9
%call47.us72.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 9)
br label %for.inc.us73.8
for.inc.us73.8: ; preds = %if.then30.us68.8, %for.inc.us73.7
%arrayidx27.us66.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9
%25 = load i32, ptr %arrayidx27.us66.9, align 4, !tbaa !5
%cmp28.us67.9 = icmp eq i32 %25, 0
br i1 %cmp28.us67.9, label %if.then30.us68.9, label %for.inc.us73.9
if.then30.us68.9: ; preds = %for.inc.us73.8
store i8 72, ptr %mark, align 1, !tbaa !9
%call47.us72.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 10)
br label %for.inc.us73.9
for.inc.us73.9: ; preds = %if.then30.us68.9, %for.inc.us73.8
%arrayidx27.us66.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10
%26 = load i32, ptr %arrayidx27.us66.10, align 4, !tbaa !5
%cmp28.us67.10 = icmp eq i32 %26, 0
br i1 %cmp28.us67.10, label %if.then30.us68.10, label %for.inc.us73.10
if.then30.us68.10: ; preds = %for.inc.us73.9
store i8 72, ptr %mark, align 1, !tbaa !9
%call47.us72.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 11)
br label %for.inc.us73.10
for.inc.us73.10: ; preds = %if.then30.us68.10, %for.inc.us73.9
%arrayidx27.us66.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11
%27 = load i32, ptr %arrayidx27.us66.11, align 4, !tbaa !5
%cmp28.us67.11 = icmp eq i32 %27, 0
br i1 %cmp28.us67.11, label %if.then30.us68.11, label %for.inc.us73.11
if.then30.us68.11: ; preds = %for.inc.us73.10
store i8 72, ptr %mark, align 1, !tbaa !9
%call47.us72.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef 12)
br label %for.inc.us73.11
for.inc.us73.11: ; preds = %if.then30.us68.11, %for.inc.us73.10
%arrayidx27.us66.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12
%28 = load i32, ptr %arrayidx27.us66.12, align 4, !tbaa !5
%cmp28.us67.12 = icmp eq i32 %28, 0
br i1 %cmp28.us67.12, label %if.then30.us68.12, label %for.inc49
if.then30.us68.12: ; preds = %for.inc.us73.11
store i8 72, ptr %mark, align 1, !tbaa !9
br label %for.inc49.sink.split
if.then30.us82: ; preds = %for.body23.us77.preheader
store i8 67, ptr %mark, align 1, !tbaa !9
%call47.us86 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 1)
br label %for.inc.us87
for.inc.us87: ; preds = %if.then30.us82, %for.body23.us77.preheader
%arrayidx27.us80.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1
%29 = load i32, ptr %arrayidx27.us80.1, align 4, !tbaa !5
%cmp28.us81.1 = icmp eq i32 %29, 0
br i1 %cmp28.us81.1, label %if.then30.us82.1, label %for.inc.us87.1
if.then30.us82.1: ; preds = %for.inc.us87
store i8 67, ptr %mark, align 1, !tbaa !9
%call47.us86.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 2)
br label %for.inc.us87.1
for.inc.us87.1: ; preds = %if.then30.us82.1, %for.inc.us87
%arrayidx27.us80.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2
%30 = load i32, ptr %arrayidx27.us80.2, align 4, !tbaa !5
%cmp28.us81.2 = icmp eq i32 %30, 0
br i1 %cmp28.us81.2, label %if.then30.us82.2, label %for.inc.us87.2
if.then30.us82.2: ; preds = %for.inc.us87.1
store i8 67, ptr %mark, align 1, !tbaa !9
%call47.us86.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 3)
br label %for.inc.us87.2
for.inc.us87.2: ; preds = %if.then30.us82.2, %for.inc.us87.1
%arrayidx27.us80.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3
%31 = load i32, ptr %arrayidx27.us80.3, align 4, !tbaa !5
%cmp28.us81.3 = icmp eq i32 %31, 0
br i1 %cmp28.us81.3, label %if.then30.us82.3, label %for.inc.us87.3
if.then30.us82.3: ; preds = %for.inc.us87.2
store i8 67, ptr %mark, align 1, !tbaa !9
%call47.us86.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 4)
br label %for.inc.us87.3
for.inc.us87.3: ; preds = %if.then30.us82.3, %for.inc.us87.2
%arrayidx27.us80.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4
%32 = load i32, ptr %arrayidx27.us80.4, align 4, !tbaa !5
%cmp28.us81.4 = icmp eq i32 %32, 0
br i1 %cmp28.us81.4, label %if.then30.us82.4, label %for.inc.us87.4
if.then30.us82.4: ; preds = %for.inc.us87.3
store i8 67, ptr %mark, align 1, !tbaa !9
%call47.us86.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 5)
br label %for.inc.us87.4
for.inc.us87.4: ; preds = %if.then30.us82.4, %for.inc.us87.3
%arrayidx27.us80.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5
%33 = load i32, ptr %arrayidx27.us80.5, align 4, !tbaa !5
%cmp28.us81.5 = icmp eq i32 %33, 0
br i1 %cmp28.us81.5, label %if.then30.us82.5, label %for.inc.us87.5
if.then30.us82.5: ; preds = %for.inc.us87.4
store i8 67, ptr %mark, align 1, !tbaa !9
%call47.us86.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 6)
br label %for.inc.us87.5
for.inc.us87.5: ; preds = %if.then30.us82.5, %for.inc.us87.4
%arrayidx27.us80.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6
%34 = load i32, ptr %arrayidx27.us80.6, align 4, !tbaa !5
%cmp28.us81.6 = icmp eq i32 %34, 0
br i1 %cmp28.us81.6, label %if.then30.us82.6, label %for.inc.us87.6
if.then30.us82.6: ; preds = %for.inc.us87.5
store i8 67, ptr %mark, align 1, !tbaa !9
%call47.us86.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 7)
br label %for.inc.us87.6
for.inc.us87.6: ; preds = %if.then30.us82.6, %for.inc.us87.5
%arrayidx27.us80.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7
%35 = load i32, ptr %arrayidx27.us80.7, align 4, !tbaa !5
%cmp28.us81.7 = icmp eq i32 %35, 0
br i1 %cmp28.us81.7, label %if.then30.us82.7, label %for.inc.us87.7
if.then30.us82.7: ; preds = %for.inc.us87.6
store i8 67, ptr %mark, align 1, !tbaa !9
%call47.us86.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 8)
br label %for.inc.us87.7
for.inc.us87.7: ; preds = %if.then30.us82.7, %for.inc.us87.6
%arrayidx27.us80.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8
%36 = load i32, ptr %arrayidx27.us80.8, align 4, !tbaa !5
%cmp28.us81.8 = icmp eq i32 %36, 0
br i1 %cmp28.us81.8, label %if.then30.us82.8, label %for.inc.us87.8
if.then30.us82.8: ; preds = %for.inc.us87.7
store i8 67, ptr %mark, align 1, !tbaa !9
%call47.us86.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 9)
br label %for.inc.us87.8
for.inc.us87.8: ; preds = %if.then30.us82.8, %for.inc.us87.7
%arrayidx27.us80.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9
%37 = load i32, ptr %arrayidx27.us80.9, align 4, !tbaa !5
%cmp28.us81.9 = icmp eq i32 %37, 0
br i1 %cmp28.us81.9, label %if.then30.us82.9, label %for.inc.us87.9
if.then30.us82.9: ; preds = %for.inc.us87.8
store i8 67, ptr %mark, align 1, !tbaa !9
%call47.us86.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 10)
br label %for.inc.us87.9
for.inc.us87.9: ; preds = %if.then30.us82.9, %for.inc.us87.8
%arrayidx27.us80.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10
%38 = load i32, ptr %arrayidx27.us80.10, align 4, !tbaa !5
%cmp28.us81.10 = icmp eq i32 %38, 0
br i1 %cmp28.us81.10, label %if.then30.us82.10, label %for.inc.us87.10
if.then30.us82.10: ; preds = %for.inc.us87.9
store i8 67, ptr %mark, align 1, !tbaa !9
%call47.us86.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 11)
br label %for.inc.us87.10
for.inc.us87.10: ; preds = %if.then30.us82.10, %for.inc.us87.9
%arrayidx27.us80.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11
%39 = load i32, ptr %arrayidx27.us80.11, align 4, !tbaa !5
%cmp28.us81.11 = icmp eq i32 %39, 0
br i1 %cmp28.us81.11, label %if.then30.us82.11, label %for.inc.us87.11
if.then30.us82.11: ; preds = %for.inc.us87.10
store i8 67, ptr %mark, align 1, !tbaa !9
%call47.us86.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef 12)
br label %for.inc.us87.11
for.inc.us87.11: ; preds = %if.then30.us82.11, %for.inc.us87.10
%arrayidx27.us80.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12
%40 = load i32, ptr %arrayidx27.us80.12, align 4, !tbaa !5
%cmp28.us81.12 = icmp eq i32 %40, 0
br i1 %cmp28.us81.12, label %if.then30.us82.12, label %for.inc49
if.then30.us82.12: ; preds = %for.inc.us87.11
store i8 67, ptr %mark, align 1, !tbaa !9
br label %for.inc49.sink.split
if.then30: ; preds = %for.body23.preheader
store i8 68, ptr %mark, align 1, !tbaa !9
%call47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 1)
br label %for.inc
for.inc: ; preds = %for.body23.preheader, %if.then30
%arrayidx27.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1
%41 = load i32, ptr %arrayidx27.1, align 4, !tbaa !5
%cmp28.1 = icmp eq i32 %41, 0
br i1 %cmp28.1, label %if.then30.1, label %for.inc.1
if.then30.1: ; preds = %for.inc
store i8 68, ptr %mark, align 1, !tbaa !9
%call47.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 2)
br label %for.inc.1
for.inc.1: ; preds = %if.then30.1, %for.inc
%arrayidx27.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2
%42 = load i32, ptr %arrayidx27.2, align 4, !tbaa !5
%cmp28.2 = icmp eq i32 %42, 0
br i1 %cmp28.2, label %if.then30.2, label %for.inc.2
if.then30.2: ; preds = %for.inc.1
store i8 68, ptr %mark, align 1, !tbaa !9
%call47.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 3)
br label %for.inc.2
for.inc.2: ; preds = %if.then30.2, %for.inc.1
%arrayidx27.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3
%43 = load i32, ptr %arrayidx27.3, align 4, !tbaa !5
%cmp28.3 = icmp eq i32 %43, 0
br i1 %cmp28.3, label %if.then30.3, label %for.inc.3
if.then30.3: ; preds = %for.inc.2
store i8 68, ptr %mark, align 1, !tbaa !9
%call47.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 4)
br label %for.inc.3
for.inc.3: ; preds = %if.then30.3, %for.inc.2
%arrayidx27.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4
%44 = load i32, ptr %arrayidx27.4, align 4, !tbaa !5
%cmp28.4 = icmp eq i32 %44, 0
br i1 %cmp28.4, label %if.then30.4, label %for.inc.4
if.then30.4: ; preds = %for.inc.3
store i8 68, ptr %mark, align 1, !tbaa !9
%call47.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 5)
br label %for.inc.4
for.inc.4: ; preds = %if.then30.4, %for.inc.3
%arrayidx27.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5
%45 = load i32, ptr %arrayidx27.5, align 4, !tbaa !5
%cmp28.5 = icmp eq i32 %45, 0
br i1 %cmp28.5, label %if.then30.5, label %for.inc.5
if.then30.5: ; preds = %for.inc.4
store i8 68, ptr %mark, align 1, !tbaa !9
%call47.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 6)
br label %for.inc.5
for.inc.5: ; preds = %if.then30.5, %for.inc.4
%arrayidx27.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6
%46 = load i32, ptr %arrayidx27.6, align 4, !tbaa !5
%cmp28.6 = icmp eq i32 %46, 0
br i1 %cmp28.6, label %if.then30.6, label %for.inc.6
if.then30.6: ; preds = %for.inc.5
store i8 68, ptr %mark, align 1, !tbaa !9
%call47.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 7)
br label %for.inc.6
for.inc.6: ; preds = %if.then30.6, %for.inc.5
%arrayidx27.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7
%47 = load i32, ptr %arrayidx27.7, align 4, !tbaa !5
%cmp28.7 = icmp eq i32 %47, 0
br i1 %cmp28.7, label %if.then30.7, label %for.inc.7
if.then30.7: ; preds = %for.inc.6
store i8 68, ptr %mark, align 1, !tbaa !9
%call47.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 8)
br label %for.inc.7
for.inc.7: ; preds = %if.then30.7, %for.inc.6
%arrayidx27.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8
%48 = load i32, ptr %arrayidx27.8, align 4, !tbaa !5
%cmp28.8 = icmp eq i32 %48, 0
br i1 %cmp28.8, label %if.then30.8, label %for.inc.8
if.then30.8: ; preds = %for.inc.7
store i8 68, ptr %mark, align 1, !tbaa !9
%call47.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 9)
br label %for.inc.8
for.inc.8: ; preds = %if.then30.8, %for.inc.7
%arrayidx27.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9
%49 = load i32, ptr %arrayidx27.9, align 4, !tbaa !5
%cmp28.9 = icmp eq i32 %49, 0
br i1 %cmp28.9, label %if.then30.9, label %for.inc.9
if.then30.9: ; preds = %for.inc.8
store i8 68, ptr %mark, align 1, !tbaa !9
%call47.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 10)
br label %for.inc.9
for.inc.9: ; preds = %if.then30.9, %for.inc.8
%arrayidx27.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10
%50 = load i32, ptr %arrayidx27.10, align 4, !tbaa !5
%cmp28.10 = icmp eq i32 %50, 0
br i1 %cmp28.10, label %if.then30.10, label %for.inc.10
if.then30.10: ; preds = %for.inc.9
store i8 68, ptr %mark, align 1, !tbaa !9
%call47.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 11)
br label %for.inc.10
for.inc.10: ; preds = %if.then30.10, %for.inc.9
%arrayidx27.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11
%51 = load i32, ptr %arrayidx27.11, align 4, !tbaa !5
%cmp28.11 = icmp eq i32 %51, 0
br i1 %cmp28.11, label %if.then30.11, label %for.inc.11
if.then30.11: ; preds = %for.inc.10
store i8 68, ptr %mark, align 1, !tbaa !9
%call47.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef 12)
br label %for.inc.11
for.inc.11: ; preds = %if.then30.11, %for.inc.10
%arrayidx27.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12
%52 = load i32, ptr %arrayidx27.12, align 4, !tbaa !5
%cmp28.12 = icmp eq i32 %52, 0
br i1 %cmp28.12, label %if.then30.12, label %for.inc49
if.then30.12: ; preds = %for.inc.11
store i8 68, ptr %mark, align 1, !tbaa !9
br label %for.inc49.sink.split
for.inc49.sink.split: ; preds = %if.then30.us.12, %if.then30.us68.12, %if.then30.us82.12, %if.then30.12
%.sink = phi i32 [ 68, %if.then30.12 ], [ 67, %if.then30.us82.12 ], [ 72, %if.then30.us68.12 ], [ 83, %if.then30.us.12 ]
%call47.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.sink, i32 noundef 13)
br label %for.inc49
for.inc49: ; preds = %for.inc49.sink.split, %for.inc.11, %for.inc.us87.11, %for.inc.us73.11, %for.inc.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.end51, label %for.cond20.preheader, !llvm.loop !12
for.end51: ; preds = %for.inc49
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %mark) #4
call void @llvm.lifetime.end.p0(i64 4, 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 %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>
#include <stdlib.h>
#include <string.h>
int main(void){
int n;
int s[13] = {};
int h[13] = {};
int c[13] = {};
int d[13] = {};
int number;
int i;
char *mark;
char input[6];
fgets(input, sizeof(input), stdin);
n = atoi(input);
for (i = 0; i < n; i++){
fgets(input, sizeof(input), stdin);
mark = strtok(input, " ");
number = atoi(strtok(NULL, " "));
switch (*mark){
case 67:
c[number - 1] = 1;
break;
case 68:
d[number - 1] = 1;
break;
case 72:
h[number - 1] = 1;
break;
case 83:
s[number - 1] = 1;
break;
}
}
for (i = 0; i < 13; i++){
if (s[i] != 1){
printf("S %d\n", (i + 1));
}
}
for (i = 0; i < 13; i++){
if (h[i] != 1){
printf("H %d\n", (i + 1));
}
}
for (i = 0; i < 13; i++){
if (c[i] != 1){
printf("C %d\n", (i + 1));
}
}
for (i = 0; i < 13; i++){
if (d[i] != 1){
printf("D %d\n", (i + 1));
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214815/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214815/source.c"
target datalayout = "e-m:e-p270: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 [2 x i8] c" \00", align 1
@.str.1 = private unnamed_addr constant [6 x i8] c"S %d\0A\00", align 1
@.str.2 = private unnamed_addr constant [6 x i8] c"H %d\0A\00", align 1
@.str.3 = private unnamed_addr constant [6 x i8] c"C %d\0A\00", align 1
@.str.4 = 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
%input = alloca [6 x i8], align 1
call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %s) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(52) %s, i8 0, i64 52, i1 false)
call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %h) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(52) %h, i8 0, i64 52, i1 false)
call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %c) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(52) %c, i8 0, i64 52, i1 false)
call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %d) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(52) %d, i8 0, i64 52, i1 false)
call void @llvm.lifetime.start.p0(i64 6, ptr nonnull %input) #5
%0 = load ptr, ptr @stdin, align 8, !tbaa !5
%call = call ptr @fgets(ptr noundef nonnull %input, i32 noundef 6, ptr noundef %0)
%call.i = call i64 @strtol(ptr nocapture noundef nonnull %input, ptr noundef null, i32 noundef 10) #5
%conv.i = trunc i64 %call.i to i32
%cmp103 = icmp sgt i32 %conv.i, 0
br i1 %cmp103, label %for.body, label %if.then
for.cond21.preheader: ; preds = %for.inc
%.pre = load i32, ptr %s, align 16, !tbaa !9
%cmp27.not = icmp eq i32 %.pre, 1
br i1 %cmp27.not, label %for.inc30, label %if.then
for.body: ; preds = %entry, %for.inc
%i.0104 = phi i32 [ %inc, %for.inc ], [ 0, %entry ]
%1 = load ptr, ptr @stdin, align 8, !tbaa !5
%call4 = call ptr @fgets(ptr noundef nonnull %input, i32 noundef 6, ptr noundef %1)
%call6 = call ptr @strtok(ptr noundef nonnull %input, ptr noundef nonnull @.str) #5
%call7 = call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str) #5
%call.i98 = call i64 @strtol(ptr nocapture noundef nonnull %call7, ptr noundef null, i32 noundef 10) #5
%2 = load i8, ptr %call6, align 1, !tbaa !11
%conv = sext i8 %2 to i32
switch i32 %conv, label %for.inc [
i32 67, label %for.inc.sink.split
i32 68, label %sw.bb9
i32 72, label %sw.bb13
i32 83, label %sw.bb17
]
sw.bb9: ; preds = %for.body
br label %for.inc.sink.split
sw.bb13: ; preds = %for.body
br label %for.inc.sink.split
sw.bb17: ; preds = %for.body
br label %for.inc.sink.split
for.inc.sink.split: ; preds = %for.body, %sw.bb17, %sw.bb13, %sw.bb9
%c.sink = phi ptr [ %d, %sw.bb9 ], [ %h, %sw.bb13 ], [ %s, %sw.bb17 ], [ %c, %for.body ]
%sub = shl i64 %call.i98, 32
%sext102 = add i64 %sub, -4294967296
%idxprom = ashr exact i64 %sext102, 32
%arrayidx = getelementptr inbounds [13 x i32], ptr %c.sink, i64 0, i64 %idxprom
store i32 1, ptr %arrayidx, align 4, !tbaa !9
br label %for.inc
for.inc: ; preds = %for.inc.sink.split, %for.body
%inc = add nuw nsw i32 %i.0104, 1
%exitcond.not = icmp eq i32 %inc, %conv.i
br i1 %exitcond.not, label %for.cond21.preheader, label %for.body, !llvm.loop !12
if.then: ; preds = %entry, %for.cond21.preheader
%call29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 1)
br label %for.inc30
for.inc30: ; preds = %for.cond21.preheader, %if.then
%arrayidx26.1 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 1
%3 = load i32, ptr %arrayidx26.1, align 4, !tbaa !9
%cmp27.not.1 = icmp eq i32 %3, 1
br i1 %cmp27.not.1, label %for.inc30.1, label %if.then.1
if.then.1: ; preds = %for.inc30
%call29.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 2)
br label %for.inc30.1
for.inc30.1: ; preds = %if.then.1, %for.inc30
%arrayidx26.2 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 2
%4 = load i32, ptr %arrayidx26.2, align 8, !tbaa !9
%cmp27.not.2 = icmp eq i32 %4, 1
br i1 %cmp27.not.2, label %for.inc30.2, label %if.then.2
if.then.2: ; preds = %for.inc30.1
%call29.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 3)
br label %for.inc30.2
for.inc30.2: ; preds = %if.then.2, %for.inc30.1
%arrayidx26.3 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 3
%5 = load i32, ptr %arrayidx26.3, align 4, !tbaa !9
%cmp27.not.3 = icmp eq i32 %5, 1
br i1 %cmp27.not.3, label %for.inc30.3, label %if.then.3
if.then.3: ; preds = %for.inc30.2
%call29.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 4)
br label %for.inc30.3
for.inc30.3: ; preds = %if.then.3, %for.inc30.2
%arrayidx26.4 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 4
%6 = load i32, ptr %arrayidx26.4, align 16, !tbaa !9
%cmp27.not.4 = icmp eq i32 %6, 1
br i1 %cmp27.not.4, label %for.inc30.4, label %if.then.4
if.then.4: ; preds = %for.inc30.3
%call29.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 5)
br label %for.inc30.4
for.inc30.4: ; preds = %if.then.4, %for.inc30.3
%arrayidx26.5 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 5
%7 = load i32, ptr %arrayidx26.5, align 4, !tbaa !9
%cmp27.not.5 = icmp eq i32 %7, 1
br i1 %cmp27.not.5, label %for.inc30.5, label %if.then.5
if.then.5: ; preds = %for.inc30.4
%call29.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 6)
br label %for.inc30.5
for.inc30.5: ; preds = %if.then.5, %for.inc30.4
%arrayidx26.6 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 6
%8 = load i32, ptr %arrayidx26.6, align 8, !tbaa !9
%cmp27.not.6 = icmp eq i32 %8, 1
br i1 %cmp27.not.6, label %for.inc30.6, label %if.then.6
if.then.6: ; preds = %for.inc30.5
%call29.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 7)
br label %for.inc30.6
for.inc30.6: ; preds = %if.then.6, %for.inc30.5
%arrayidx26.7 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 7
%9 = load i32, ptr %arrayidx26.7, align 4, !tbaa !9
%cmp27.not.7 = icmp eq i32 %9, 1
br i1 %cmp27.not.7, label %for.inc30.7, label %if.then.7
if.then.7: ; preds = %for.inc30.6
%call29.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 8)
br label %for.inc30.7
for.inc30.7: ; preds = %if.then.7, %for.inc30.6
%arrayidx26.8 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 8
%10 = load i32, ptr %arrayidx26.8, align 16, !tbaa !9
%cmp27.not.8 = icmp eq i32 %10, 1
br i1 %cmp27.not.8, label %for.inc30.8, label %if.then.8
if.then.8: ; preds = %for.inc30.7
%call29.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 9)
br label %for.inc30.8
for.inc30.8: ; preds = %if.then.8, %for.inc30.7
%arrayidx26.9 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 9
%11 = load i32, ptr %arrayidx26.9, align 4, !tbaa !9
%cmp27.not.9 = icmp eq i32 %11, 1
br i1 %cmp27.not.9, label %for.inc30.9, label %if.then.9
if.then.9: ; preds = %for.inc30.8
%call29.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 10)
br label %for.inc30.9
for.inc30.9: ; preds = %if.then.9, %for.inc30.8
%arrayidx26.10 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 10
%12 = load i32, ptr %arrayidx26.10, align 8, !tbaa !9
%cmp27.not.10 = icmp eq i32 %12, 1
br i1 %cmp27.not.10, label %for.inc30.10, label %if.then.10
if.then.10: ; preds = %for.inc30.9
%call29.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 11)
br label %for.inc30.10
for.inc30.10: ; preds = %if.then.10, %for.inc30.9
%arrayidx26.11 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 11
%13 = load i32, ptr %arrayidx26.11, align 4, !tbaa !9
%cmp27.not.11 = icmp eq i32 %13, 1
br i1 %cmp27.not.11, label %for.inc30.11, label %if.then.11
if.then.11: ; preds = %for.inc30.10
%call29.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 12)
br label %for.inc30.11
for.inc30.11: ; preds = %if.then.11, %for.inc30.10
%arrayidx26.12 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 12
%14 = load i32, ptr %arrayidx26.12, align 16, !tbaa !9
%cmp27.not.12 = icmp eq i32 %14, 1
br i1 %cmp27.not.12, label %for.inc30.12, label %if.then.12
if.then.12: ; preds = %for.inc30.11
%call29.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 13)
br label %for.inc30.12
for.inc30.12: ; preds = %if.then.12, %for.inc30.11
%15 = load i32, ptr %h, align 16, !tbaa !9
%cmp39.not = icmp eq i32 %15, 1
br i1 %cmp39.not, label %for.inc45, label %if.then41
if.then41: ; preds = %for.inc30.12
%call43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 1)
br label %for.inc45
for.inc45: ; preds = %for.inc30.12, %if.then41
%arrayidx38.1 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 1
%16 = load i32, ptr %arrayidx38.1, align 4, !tbaa !9
%cmp39.not.1 = icmp eq i32 %16, 1
br i1 %cmp39.not.1, label %for.inc45.1, label %if.then41.1
if.then41.1: ; preds = %for.inc45
%call43.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 2)
br label %for.inc45.1
for.inc45.1: ; preds = %if.then41.1, %for.inc45
%arrayidx38.2 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 2
%17 = load i32, ptr %arrayidx38.2, align 8, !tbaa !9
%cmp39.not.2 = icmp eq i32 %17, 1
br i1 %cmp39.not.2, label %for.inc45.2, label %if.then41.2
if.then41.2: ; preds = %for.inc45.1
%call43.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 3)
br label %for.inc45.2
for.inc45.2: ; preds = %if.then41.2, %for.inc45.1
%arrayidx38.3 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 3
%18 = load i32, ptr %arrayidx38.3, align 4, !tbaa !9
%cmp39.not.3 = icmp eq i32 %18, 1
br i1 %cmp39.not.3, label %for.inc45.3, label %if.then41.3
if.then41.3: ; preds = %for.inc45.2
%call43.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 4)
br label %for.inc45.3
for.inc45.3: ; preds = %if.then41.3, %for.inc45.2
%arrayidx38.4 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 4
%19 = load i32, ptr %arrayidx38.4, align 16, !tbaa !9
%cmp39.not.4 = icmp eq i32 %19, 1
br i1 %cmp39.not.4, label %for.inc45.4, label %if.then41.4
if.then41.4: ; preds = %for.inc45.3
%call43.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 5)
br label %for.inc45.4
for.inc45.4: ; preds = %if.then41.4, %for.inc45.3
%arrayidx38.5 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 5
%20 = load i32, ptr %arrayidx38.5, align 4, !tbaa !9
%cmp39.not.5 = icmp eq i32 %20, 1
br i1 %cmp39.not.5, label %for.inc45.5, label %if.then41.5
if.then41.5: ; preds = %for.inc45.4
%call43.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 6)
br label %for.inc45.5
for.inc45.5: ; preds = %if.then41.5, %for.inc45.4
%arrayidx38.6 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 6
%21 = load i32, ptr %arrayidx38.6, align 8, !tbaa !9
%cmp39.not.6 = icmp eq i32 %21, 1
br i1 %cmp39.not.6, label %for.inc45.6, label %if.then41.6
if.then41.6: ; preds = %for.inc45.5
%call43.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 7)
br label %for.inc45.6
for.inc45.6: ; preds = %if.then41.6, %for.inc45.5
%arrayidx38.7 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 7
%22 = load i32, ptr %arrayidx38.7, align 4, !tbaa !9
%cmp39.not.7 = icmp eq i32 %22, 1
br i1 %cmp39.not.7, label %for.inc45.7, label %if.then41.7
if.then41.7: ; preds = %for.inc45.6
%call43.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 8)
br label %for.inc45.7
for.inc45.7: ; preds = %if.then41.7, %for.inc45.6
%arrayidx38.8 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 8
%23 = load i32, ptr %arrayidx38.8, align 16, !tbaa !9
%cmp39.not.8 = icmp eq i32 %23, 1
br i1 %cmp39.not.8, label %for.inc45.8, label %if.then41.8
if.then41.8: ; preds = %for.inc45.7
%call43.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 9)
br label %for.inc45.8
for.inc45.8: ; preds = %if.then41.8, %for.inc45.7
%arrayidx38.9 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 9
%24 = load i32, ptr %arrayidx38.9, align 4, !tbaa !9
%cmp39.not.9 = icmp eq i32 %24, 1
br i1 %cmp39.not.9, label %for.inc45.9, label %if.then41.9
if.then41.9: ; preds = %for.inc45.8
%call43.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 10)
br label %for.inc45.9
for.inc45.9: ; preds = %if.then41.9, %for.inc45.8
%arrayidx38.10 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 10
%25 = load i32, ptr %arrayidx38.10, align 8, !tbaa !9
%cmp39.not.10 = icmp eq i32 %25, 1
br i1 %cmp39.not.10, label %for.inc45.10, label %if.then41.10
if.then41.10: ; preds = %for.inc45.9
%call43.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 11)
br label %for.inc45.10
for.inc45.10: ; preds = %if.then41.10, %for.inc45.9
%arrayidx38.11 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 11
%26 = load i32, ptr %arrayidx38.11, align 4, !tbaa !9
%cmp39.not.11 = icmp eq i32 %26, 1
br i1 %cmp39.not.11, label %for.inc45.11, label %if.then41.11
if.then41.11: ; preds = %for.inc45.10
%call43.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 12)
br label %for.inc45.11
for.inc45.11: ; preds = %if.then41.11, %for.inc45.10
%arrayidx38.12 = getelementptr inbounds [13 x i32], ptr %h, i64 0, i64 12
%27 = load i32, ptr %arrayidx38.12, align 16, !tbaa !9
%cmp39.not.12 = icmp eq i32 %27, 1
br i1 %cmp39.not.12, label %for.inc45.12, label %if.then41.12
if.then41.12: ; preds = %for.inc45.11
%call43.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 13)
br label %for.inc45.12
for.inc45.12: ; preds = %if.then41.12, %for.inc45.11
%28 = load i32, ptr %c, align 16, !tbaa !9
%cmp54.not = icmp eq i32 %28, 1
br i1 %cmp54.not, label %for.inc60, label %if.then56
if.then56: ; preds = %for.inc45.12
%call58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1)
br label %for.inc60
for.inc60: ; preds = %for.inc45.12, %if.then56
%arrayidx53.1 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 1
%29 = load i32, ptr %arrayidx53.1, align 4, !tbaa !9
%cmp54.not.1 = icmp eq i32 %29, 1
br i1 %cmp54.not.1, label %for.inc60.1, label %if.then56.1
if.then56.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.then56.1, %for.inc60
%arrayidx53.2 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 2
%30 = load i32, ptr %arrayidx53.2, align 8, !tbaa !9
%cmp54.not.2 = icmp eq i32 %30, 1
br i1 %cmp54.not.2, label %for.inc60.2, label %if.then56.2
if.then56.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.then56.2, %for.inc60.1
%arrayidx53.3 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 3
%31 = load i32, ptr %arrayidx53.3, align 4, !tbaa !9
%cmp54.not.3 = icmp eq i32 %31, 1
br i1 %cmp54.not.3, label %for.inc60.3, label %if.then56.3
if.then56.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.then56.3, %for.inc60.2
%arrayidx53.4 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 4
%32 = load i32, ptr %arrayidx53.4, align 16, !tbaa !9
%cmp54.not.4 = icmp eq i32 %32, 1
br i1 %cmp54.not.4, label %for.inc60.4, label %if.then56.4
if.then56.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.then56.4, %for.inc60.3
%arrayidx53.5 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 5
%33 = load i32, ptr %arrayidx53.5, align 4, !tbaa !9
%cmp54.not.5 = icmp eq i32 %33, 1
br i1 %cmp54.not.5, label %for.inc60.5, label %if.then56.5
if.then56.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.then56.5, %for.inc60.4
%arrayidx53.6 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 6
%34 = load i32, ptr %arrayidx53.6, align 8, !tbaa !9
%cmp54.not.6 = icmp eq i32 %34, 1
br i1 %cmp54.not.6, label %for.inc60.6, label %if.then56.6
if.then56.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.then56.6, %for.inc60.5
%arrayidx53.7 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 7
%35 = load i32, ptr %arrayidx53.7, align 4, !tbaa !9
%cmp54.not.7 = icmp eq i32 %35, 1
br i1 %cmp54.not.7, label %for.inc60.7, label %if.then56.7
if.then56.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.then56.7, %for.inc60.6
%arrayidx53.8 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 8
%36 = load i32, ptr %arrayidx53.8, align 16, !tbaa !9
%cmp54.not.8 = icmp eq i32 %36, 1
br i1 %cmp54.not.8, label %for.inc60.8, label %if.then56.8
if.then56.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.then56.8, %for.inc60.7
%arrayidx53.9 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 9
%37 = load i32, ptr %arrayidx53.9, align 4, !tbaa !9
%cmp54.not.9 = icmp eq i32 %37, 1
br i1 %cmp54.not.9, label %for.inc60.9, label %if.then56.9
if.then56.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.then56.9, %for.inc60.8
%arrayidx53.10 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 10
%38 = load i32, ptr %arrayidx53.10, align 8, !tbaa !9
%cmp54.not.10 = icmp eq i32 %38, 1
br i1 %cmp54.not.10, label %for.inc60.10, label %if.then56.10
if.then56.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.then56.10, %for.inc60.9
%arrayidx53.11 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 11
%39 = load i32, ptr %arrayidx53.11, align 4, !tbaa !9
%cmp54.not.11 = icmp eq i32 %39, 1
br i1 %cmp54.not.11, label %for.inc60.11, label %if.then56.11
if.then56.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.then56.11, %for.inc60.10
%arrayidx53.12 = getelementptr inbounds [13 x i32], ptr %c, i64 0, i64 12
%40 = load i32, ptr %arrayidx53.12, align 16, !tbaa !9
%cmp54.not.12 = icmp eq i32 %40, 1
br i1 %cmp54.not.12, label %for.inc60.12, label %if.then56.12
if.then56.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.then56.12, %for.inc60.11
%41 = load i32, ptr %d, align 16, !tbaa !9
%cmp69.not = icmp eq i32 %41, 1
br i1 %cmp69.not, label %for.inc75, label %if.then71
if.then71: ; 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.then71
%arrayidx68.1 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 1
%42 = load i32, ptr %arrayidx68.1, align 4, !tbaa !9
%cmp69.not.1 = icmp eq i32 %42, 1
br i1 %cmp69.not.1, label %for.inc75.1, label %if.then71.1
if.then71.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.then71.1, %for.inc75
%arrayidx68.2 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 2
%43 = load i32, ptr %arrayidx68.2, align 8, !tbaa !9
%cmp69.not.2 = icmp eq i32 %43, 1
br i1 %cmp69.not.2, label %for.inc75.2, label %if.then71.2
if.then71.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.then71.2, %for.inc75.1
%arrayidx68.3 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 3
%44 = load i32, ptr %arrayidx68.3, align 4, !tbaa !9
%cmp69.not.3 = icmp eq i32 %44, 1
br i1 %cmp69.not.3, label %for.inc75.3, label %if.then71.3
if.then71.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.then71.3, %for.inc75.2
%arrayidx68.4 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 4
%45 = load i32, ptr %arrayidx68.4, align 16, !tbaa !9
%cmp69.not.4 = icmp eq i32 %45, 1
br i1 %cmp69.not.4, label %for.inc75.4, label %if.then71.4
if.then71.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.then71.4, %for.inc75.3
%arrayidx68.5 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 5
%46 = load i32, ptr %arrayidx68.5, align 4, !tbaa !9
%cmp69.not.5 = icmp eq i32 %46, 1
br i1 %cmp69.not.5, label %for.inc75.5, label %if.then71.5
if.then71.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.then71.5, %for.inc75.4
%arrayidx68.6 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 6
%47 = load i32, ptr %arrayidx68.6, align 8, !tbaa !9
%cmp69.not.6 = icmp eq i32 %47, 1
br i1 %cmp69.not.6, label %for.inc75.6, label %if.then71.6
if.then71.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.then71.6, %for.inc75.5
%arrayidx68.7 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 7
%48 = load i32, ptr %arrayidx68.7, align 4, !tbaa !9
%cmp69.not.7 = icmp eq i32 %48, 1
br i1 %cmp69.not.7, label %for.inc75.7, label %if.then71.7
if.then71.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.then71.7, %for.inc75.6
%arrayidx68.8 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 8
%49 = load i32, ptr %arrayidx68.8, align 16, !tbaa !9
%cmp69.not.8 = icmp eq i32 %49, 1
br i1 %cmp69.not.8, label %for.inc75.8, label %if.then71.8
if.then71.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.then71.8, %for.inc75.7
%arrayidx68.9 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 9
%50 = load i32, ptr %arrayidx68.9, align 4, !tbaa !9
%cmp69.not.9 = icmp eq i32 %50, 1
br i1 %cmp69.not.9, label %for.inc75.9, label %if.then71.9
if.then71.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.then71.9, %for.inc75.8
%arrayidx68.10 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 10
%51 = load i32, ptr %arrayidx68.10, align 8, !tbaa !9
%cmp69.not.10 = icmp eq i32 %51, 1
br i1 %cmp69.not.10, label %for.inc75.10, label %if.then71.10
if.then71.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.then71.10, %for.inc75.9
%arrayidx68.11 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 11
%52 = load i32, ptr %arrayidx68.11, align 4, !tbaa !9
%cmp69.not.11 = icmp eq i32 %52, 1
br i1 %cmp69.not.11, label %for.inc75.11, label %if.then71.11
if.then71.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.then71.11, %for.inc75.10
%arrayidx68.12 = getelementptr inbounds [13 x i32], ptr %d, i64 0, i64 12
%53 = load i32, ptr %arrayidx68.12, align 16, !tbaa !9
%cmp69.not.12 = icmp eq i32 %53, 1
br i1 %cmp69.not.12, label %for.inc75.12, label %if.then71.12
if.then71.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.then71.12, %for.inc75.11
call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %input) #5
call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %d) #5
call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %c) #5
call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %h) #5
call void @llvm.lifetime.end.p0(i64 52, 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: 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: mustprogress nofree nounwind willreturn
declare ptr @strtok(ptr noundef, ptr nocapture noundef readonly) 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) #1
; Function Attrs: mustprogress nofree nounwind willreturn
declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { mustprogress nofree nounwind willreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{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"}
|
#include <stdio.h>
int main(void){
int n, m, i, j;
int cards[][13] = {{}, {}, {}, {}};
char ch;
char c[4] = {'S', 'H', 'C', 'D'};
scanf("%d", &n);
for(i = 0; i < 2 * n; i++){
scanf("%c %d", &ch, &m);
switch(ch){
case 'S':
cards[0][m - 1] = 1;
break;
case 'H':
cards[1][m - 1] = 1;
break;
case 'C':
cards[2][m - 1] = 1;
break;
case 'D':
cards[3][m - 1] = 1;
break;
}
}
for(i = 0; i < 4; i++){
for(j = 0; j < 13; j++){
if(!cards[i][j])
printf("%c %d\n", c[i], j + 1);
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214859/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214859/source.c"
target datalayout = "e-m:e-p270: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.c = 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 [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() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
%m = alloca i32, align 4
%cards = alloca [4 x [13 x i32]], align 16
%ch = 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 %m) #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 %ch) #4
%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.cond22.preheader.preheader
for.body: ; preds = %entry, %for.inc
%i.050 = phi i32 [ %inc, %for.inc ], [ 0, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %ch, ptr noundef nonnull %m)
%1 = load i8, ptr %ch, 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 %m, 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 %m, 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 %m, 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 %m, 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.050, 1
%6 = load i32, ptr %n, align 4, !tbaa !5
%mul = shl nsw i32 %6, 1
%cmp = icmp slt i32 %inc, %mul
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.inc34.12
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc34.12 ], [ 0, %for.cond22.preheader.preheader ]
%arrayidx31 = getelementptr inbounds [4 x i8], ptr @__const.main.c, 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
%tobool.not = icmp eq i32 %7, 0
br i1 %tobool.not, label %if.then, label %for.inc34
if.then: ; preds = %for.cond22.preheader
%8 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32 = sext i8 %8 to i32
%call33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32, i32 noundef 1)
br label %for.inc34
for.inc34: ; 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
%tobool.not.1 = icmp eq i32 %9, 0
br i1 %tobool.not.1, label %if.then.1, label %for.inc34.1
if.then.1: ; preds = %for.inc34
%10 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.1 = sext i8 %10 to i32
%call33.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.1, i32 noundef 2)
br label %for.inc34.1
for.inc34.1: ; preds = %if.then.1, %for.inc34
%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
%tobool.not.2 = icmp eq i32 %11, 0
br i1 %tobool.not.2, label %if.then.2, label %for.inc34.2
if.then.2: ; preds = %for.inc34.1
%12 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.2 = sext i8 %12 to i32
%call33.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.2, i32 noundef 3)
br label %for.inc34.2
for.inc34.2: ; preds = %if.then.2, %for.inc34.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
%tobool.not.3 = icmp eq i32 %13, 0
br i1 %tobool.not.3, label %if.then.3, label %for.inc34.3
if.then.3: ; preds = %for.inc34.2
%14 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.3 = sext i8 %14 to i32
%call33.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.3, i32 noundef 4)
br label %for.inc34.3
for.inc34.3: ; preds = %if.then.3, %for.inc34.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
%tobool.not.4 = icmp eq i32 %15, 0
br i1 %tobool.not.4, label %if.then.4, label %for.inc34.4
if.then.4: ; preds = %for.inc34.3
%16 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.4 = sext i8 %16 to i32
%call33.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.4, i32 noundef 5)
br label %for.inc34.4
for.inc34.4: ; preds = %if.then.4, %for.inc34.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
%tobool.not.5 = icmp eq i32 %17, 0
br i1 %tobool.not.5, label %if.then.5, label %for.inc34.5
if.then.5: ; preds = %for.inc34.4
%18 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.5 = sext i8 %18 to i32
%call33.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.5, i32 noundef 6)
br label %for.inc34.5
for.inc34.5: ; preds = %if.then.5, %for.inc34.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
%tobool.not.6 = icmp eq i32 %19, 0
br i1 %tobool.not.6, label %if.then.6, label %for.inc34.6
if.then.6: ; preds = %for.inc34.5
%20 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.6 = sext i8 %20 to i32
%call33.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.6, i32 noundef 7)
br label %for.inc34.6
for.inc34.6: ; preds = %if.then.6, %for.inc34.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
%tobool.not.7 = icmp eq i32 %21, 0
br i1 %tobool.not.7, label %if.then.7, label %for.inc34.7
if.then.7: ; preds = %for.inc34.6
%22 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.7 = sext i8 %22 to i32
%call33.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.7, i32 noundef 8)
br label %for.inc34.7
for.inc34.7: ; preds = %if.then.7, %for.inc34.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
%tobool.not.8 = icmp eq i32 %23, 0
br i1 %tobool.not.8, label %if.then.8, label %for.inc34.8
if.then.8: ; preds = %for.inc34.7
%24 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.8 = sext i8 %24 to i32
%call33.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.8, i32 noundef 9)
br label %for.inc34.8
for.inc34.8: ; preds = %if.then.8, %for.inc34.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
%tobool.not.9 = icmp eq i32 %25, 0
br i1 %tobool.not.9, label %if.then.9, label %for.inc34.9
if.then.9: ; preds = %for.inc34.8
%26 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.9 = sext i8 %26 to i32
%call33.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.9, i32 noundef 10)
br label %for.inc34.9
for.inc34.9: ; preds = %if.then.9, %for.inc34.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
%tobool.not.10 = icmp eq i32 %27, 0
br i1 %tobool.not.10, label %if.then.10, label %for.inc34.10
if.then.10: ; preds = %for.inc34.9
%28 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.10 = sext i8 %28 to i32
%call33.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.10, i32 noundef 11)
br label %for.inc34.10
for.inc34.10: ; preds = %if.then.10, %for.inc34.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
%tobool.not.11 = icmp eq i32 %29, 0
br i1 %tobool.not.11, label %if.then.11, label %for.inc34.11
if.then.11: ; preds = %for.inc34.10
%30 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.11 = sext i8 %30 to i32
%call33.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.11, i32 noundef 12)
br label %for.inc34.11
for.inc34.11: ; preds = %if.then.11, %for.inc34.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
%tobool.not.12 = icmp eq i32 %31, 0
br i1 %tobool.not.12, label %if.then.12, label %for.inc34.12
if.then.12: ; preds = %for.inc34.11
%32 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.12 = sext i8 %32 to i32
%call33.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.12, i32 noundef 13)
br label %for.inc34.12
for.inc34.12: ; preds = %if.then.12, %for.inc34.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.cond22.preheader, !llvm.loop !12
for.end39: ; preds = %for.inc34.12
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %ch) #4
call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %cards) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
|
#include<stdio.h>
int main(void)
{
int card[4][14] ={0};
char S[]="SHCD";
int n, m, i, j;
char s;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf(" %c %d", &s, &m);
for (j=0; j<4; j++)
if (s == S[j]) card[j][m] =1;
}
for (i = 0; i < 4; i++) {
for (j = 1; j < 14; j++) {
if (card[i][j] == 0) {
printf("%c %d\n", S[i], j);
}
}
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214901/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214901/source.c"
target datalayout = "e-m:e-p270: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 [5 x i8] c"SHCD\00", 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:
%card = alloca [4 x [14 x i32]], align 16
%n = alloca i32, align 4
%m = alloca i32, align 4
%s = alloca i8, align 1
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 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 %s) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp54 = icmp sgt i32 %0, 0
br i1 %cmp54, label %for.body, label %for.cond19.preheader.preheader
for.body: ; preds = %entry, %for.inc.3
%i.055 = phi i32 [ %inc13, %for.inc.3 ], [ 0, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s, ptr noundef nonnull %m)
%1 = load i8, ptr %s, align 1, !tbaa !9
%2 = load i32, ptr %m, align 4
%idxprom10 = sext i32 %2 to i64
switch i8 %1, label %for.inc.3 [
i8 83, label %for.inc.3.sink.split
i8 72, label %if.then.1
i8 67, label %if.then.2
i8 68, label %if.then.3
]
if.then.1: ; preds = %for.body
br label %for.inc.3.sink.split
if.then.2: ; preds = %for.body
br label %for.inc.3.sink.split
if.then.3: ; preds = %for.body
br label %for.inc.3.sink.split
for.inc.3.sink.split: ; preds = %for.body, %if.then.3, %if.then.2, %if.then.1
%.sink = phi i64 [ 1, %if.then.1 ], [ 2, %if.then.2 ], [ 3, %if.then.3 ], [ 0, %for.body ]
%arrayidx11.1 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %.sink, i64 %idxprom10
store i32 1, ptr %arrayidx11.1, align 4, !tbaa !5
br label %for.inc.3
for.inc.3: ; preds = %for.inc.3.sink.split, %for.body
%inc13 = add nuw nsw i32 %i.055, 1
%3 = load i32, ptr %n, align 4, !tbaa !5
%cmp = icmp slt i32 %inc13, %3
br i1 %cmp, label %for.body, label %for.cond19.preheader.preheader, !llvm.loop !10
for.cond19.preheader.preheader: ; preds = %for.inc.3, %entry
br label %for.cond19.preheader
for.cond19.preheader: ; preds = %for.cond19.preheader.preheader, %for.inc35.12
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc35.12 ], [ 0, %for.cond19.preheader.preheader ]
%arrayidx31 = getelementptr inbounds [5 x i8], ptr @__const.main.S, i64 0, i64 %indvars.iv
%arrayidx26 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1
%4 = load i32, ptr %arrayidx26, align 4, !tbaa !5
%cmp27 = icmp eq i32 %4, 0
br i1 %cmp27, label %if.then29, label %for.inc35
if.then29: ; preds = %for.cond19.preheader
%5 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32 = sext i8 %5 to i32
%call33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32, i32 noundef 1)
br label %for.inc35
for.inc35: ; preds = %for.cond19.preheader, %if.then29
%arrayidx26.1 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2
%6 = load i32, ptr %arrayidx26.1, align 8, !tbaa !5
%cmp27.1 = icmp eq i32 %6, 0
br i1 %cmp27.1, label %if.then29.1, label %for.inc35.1
if.then29.1: ; preds = %for.inc35
%7 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.1 = sext i8 %7 to i32
%call33.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.1, i32 noundef 2)
br label %for.inc35.1
for.inc35.1: ; preds = %if.then29.1, %for.inc35
%arrayidx26.2 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3
%8 = load i32, ptr %arrayidx26.2, align 4, !tbaa !5
%cmp27.2 = icmp eq i32 %8, 0
br i1 %cmp27.2, label %if.then29.2, label %for.inc35.2
if.then29.2: ; preds = %for.inc35.1
%9 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.2 = sext i8 %9 to i32
%call33.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.2, i32 noundef 3)
br label %for.inc35.2
for.inc35.2: ; preds = %if.then29.2, %for.inc35.1
%arrayidx26.3 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4
%10 = load i32, ptr %arrayidx26.3, align 8, !tbaa !5
%cmp27.3 = icmp eq i32 %10, 0
br i1 %cmp27.3, label %if.then29.3, label %for.inc35.3
if.then29.3: ; preds = %for.inc35.2
%11 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.3 = sext i8 %11 to i32
%call33.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.3, i32 noundef 4)
br label %for.inc35.3
for.inc35.3: ; preds = %if.then29.3, %for.inc35.2
%arrayidx26.4 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5
%12 = load i32, ptr %arrayidx26.4, align 4, !tbaa !5
%cmp27.4 = icmp eq i32 %12, 0
br i1 %cmp27.4, label %if.then29.4, label %for.inc35.4
if.then29.4: ; preds = %for.inc35.3
%13 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.4 = sext i8 %13 to i32
%call33.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.4, i32 noundef 5)
br label %for.inc35.4
for.inc35.4: ; preds = %if.then29.4, %for.inc35.3
%arrayidx26.5 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6
%14 = load i32, ptr %arrayidx26.5, align 8, !tbaa !5
%cmp27.5 = icmp eq i32 %14, 0
br i1 %cmp27.5, label %if.then29.5, label %for.inc35.5
if.then29.5: ; preds = %for.inc35.4
%15 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.5 = sext i8 %15 to i32
%call33.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.5, i32 noundef 6)
br label %for.inc35.5
for.inc35.5: ; preds = %if.then29.5, %for.inc35.4
%arrayidx26.6 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7
%16 = load i32, ptr %arrayidx26.6, align 4, !tbaa !5
%cmp27.6 = icmp eq i32 %16, 0
br i1 %cmp27.6, label %if.then29.6, label %for.inc35.6
if.then29.6: ; preds = %for.inc35.5
%17 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.6 = sext i8 %17 to i32
%call33.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.6, i32 noundef 7)
br label %for.inc35.6
for.inc35.6: ; preds = %if.then29.6, %for.inc35.5
%arrayidx26.7 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8
%18 = load i32, ptr %arrayidx26.7, align 8, !tbaa !5
%cmp27.7 = icmp eq i32 %18, 0
br i1 %cmp27.7, label %if.then29.7, label %for.inc35.7
if.then29.7: ; preds = %for.inc35.6
%19 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.7 = sext i8 %19 to i32
%call33.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.7, i32 noundef 8)
br label %for.inc35.7
for.inc35.7: ; preds = %if.then29.7, %for.inc35.6
%arrayidx26.8 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9
%20 = load i32, ptr %arrayidx26.8, align 4, !tbaa !5
%cmp27.8 = icmp eq i32 %20, 0
br i1 %cmp27.8, label %if.then29.8, label %for.inc35.8
if.then29.8: ; preds = %for.inc35.7
%21 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.8 = sext i8 %21 to i32
%call33.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.8, i32 noundef 9)
br label %for.inc35.8
for.inc35.8: ; preds = %if.then29.8, %for.inc35.7
%arrayidx26.9 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10
%22 = load i32, ptr %arrayidx26.9, align 8, !tbaa !5
%cmp27.9 = icmp eq i32 %22, 0
br i1 %cmp27.9, label %if.then29.9, label %for.inc35.9
if.then29.9: ; preds = %for.inc35.8
%23 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.9 = sext i8 %23 to i32
%call33.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.9, i32 noundef 10)
br label %for.inc35.9
for.inc35.9: ; preds = %if.then29.9, %for.inc35.8
%arrayidx26.10 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11
%24 = load i32, ptr %arrayidx26.10, align 4, !tbaa !5
%cmp27.10 = icmp eq i32 %24, 0
br i1 %cmp27.10, label %if.then29.10, label %for.inc35.10
if.then29.10: ; preds = %for.inc35.9
%25 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.10 = sext i8 %25 to i32
%call33.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.10, i32 noundef 11)
br label %for.inc35.10
for.inc35.10: ; preds = %if.then29.10, %for.inc35.9
%arrayidx26.11 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12
%26 = load i32, ptr %arrayidx26.11, align 8, !tbaa !5
%cmp27.11 = icmp eq i32 %26, 0
br i1 %cmp27.11, label %if.then29.11, label %for.inc35.11
if.then29.11: ; preds = %for.inc35.10
%27 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.11 = sext i8 %27 to i32
%call33.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.11, i32 noundef 12)
br label %for.inc35.11
for.inc35.11: ; preds = %if.then29.11, %for.inc35.10
%arrayidx26.12 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 13
%28 = load i32, ptr %arrayidx26.12, align 4, !tbaa !5
%cmp27.12 = icmp eq i32 %28, 0
br i1 %cmp27.12, label %if.then29.12, label %for.inc35.12
if.then29.12: ; preds = %for.inc35.11
%29 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.12 = sext i8 %29 to i32
%call33.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv32.12, i32 noundef 13)
br label %for.inc35.12
for.inc35.12: ; preds = %if.then29.12, %for.inc35.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.cond19.preheader, !llvm.loop !12
for.end40: ; preds = %for.inc35.12
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %s) #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 224, 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
|
#include <stdio.h>
int main(void){
int n, m, i, j, k;
char c;
int card[4][13] = {0};
char mark[4] = {'S', 'H', 'C', 'D'};
scanf("%d\n",&n);
for(i=0; i<n; i++) {
scanf("%c %d\n", &c, &m);
for(j=0; j<4; j++) {
if (c == mark[j]) {
card[j][m-1] = 1;
break;
}
}
}
for(j=0; j<4; j++) {
for(k=0; k<13; k++) {
if (card[j][k] == 0) {
printf("%c %d\n", mark[j], k+1);
}
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214952/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214952/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@__const.main.mark = private unnamed_addr constant [4 x i8] c"SHCD", align 1
@.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
@.str.1 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
%m = alloca i32, align 4
%c = alloca i8, align 1
%card = 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 %m) #4
call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c) #4
call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %card) #4
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %card, i8 0, i64 208, i1 false)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp53 = icmp sgt i32 %0, 0
br i1 %cmp53, label %for.body, label %for.cond19.preheader.preheader
for.body: ; preds = %entry, %for.inc12
%i.054 = phi i32 [ %inc13, %for.inc12 ], [ 0, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %c, ptr noundef nonnull %m)
%1 = load i8, ptr %c, align 1, !tbaa !9
switch i8 %1, label %for.inc12 [
i8 83, label %if.then
i8 72, label %if.then.fold.split
i8 67, label %if.then.fold.split62
i8 68, label %if.then.fold.split63
]
if.then.fold.split: ; preds = %for.body
br label %if.then
if.then.fold.split62: ; preds = %for.body
br label %if.then
if.then.fold.split63: ; preds = %for.body
br label %if.then
if.then: ; preds = %for.body, %if.then.fold.split63, %if.then.fold.split62, %if.then.fold.split
%idxprom.lcssa = phi i64 [ 0, %for.body ], [ 1, %if.then.fold.split ], [ 2, %if.then.fold.split62 ], [ 3, %if.then.fold.split63 ]
%2 = load i32, ptr %m, align 4, !tbaa !5
%sub = add nsw i32 %2, -1
%idxprom10 = sext i32 %sub to i64
%arrayidx11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %idxprom.lcssa, i64 %idxprom10
store i32 1, ptr %arrayidx11, align 4, !tbaa !5
br label %for.inc12
for.inc12: ; preds = %for.body, %if.then
%inc13 = add nuw nsw i32 %i.054, 1
%3 = load i32, ptr %n, align 4, !tbaa !5
%cmp = icmp slt i32 %inc13, %3
br i1 %cmp, label %for.body, label %for.cond19.preheader.preheader, !llvm.loop !10
for.cond19.preheader.preheader: ; preds = %for.inc12, %entry
br label %for.cond19.preheader
for.cond19.preheader: ; preds = %for.cond19.preheader.preheader, %for.inc35.12
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc35.12 ], [ 0, %for.cond19.preheader.preheader ]
%arrayidx31 = getelementptr inbounds [4 x i8], ptr @__const.main.mark, i64 0, i64 %indvars.iv
%arrayidx26 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 0
%4 = load i32, ptr %arrayidx26, align 4, !tbaa !5
%cmp27 = icmp eq i32 %4, 0
br i1 %cmp27, label %if.then29, label %for.inc35
if.then29: ; preds = %for.cond19.preheader
%5 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32 = sext i8 %5 to i32
%call33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32, i32 noundef 1)
br label %for.inc35
for.inc35: ; preds = %for.cond19.preheader, %if.then29
%arrayidx26.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1
%6 = load i32, ptr %arrayidx26.1, align 4, !tbaa !5
%cmp27.1 = icmp eq i32 %6, 0
br i1 %cmp27.1, label %if.then29.1, label %for.inc35.1
if.then29.1: ; preds = %for.inc35
%7 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.1 = sext i8 %7 to i32
%call33.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.1, i32 noundef 2)
br label %for.inc35.1
for.inc35.1: ; preds = %if.then29.1, %for.inc35
%arrayidx26.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2
%8 = load i32, ptr %arrayidx26.2, align 4, !tbaa !5
%cmp27.2 = icmp eq i32 %8, 0
br i1 %cmp27.2, label %if.then29.2, label %for.inc35.2
if.then29.2: ; preds = %for.inc35.1
%9 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.2 = sext i8 %9 to i32
%call33.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.2, i32 noundef 3)
br label %for.inc35.2
for.inc35.2: ; preds = %if.then29.2, %for.inc35.1
%arrayidx26.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3
%10 = load i32, ptr %arrayidx26.3, align 4, !tbaa !5
%cmp27.3 = icmp eq i32 %10, 0
br i1 %cmp27.3, label %if.then29.3, label %for.inc35.3
if.then29.3: ; preds = %for.inc35.2
%11 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.3 = sext i8 %11 to i32
%call33.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.3, i32 noundef 4)
br label %for.inc35.3
for.inc35.3: ; preds = %if.then29.3, %for.inc35.2
%arrayidx26.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4
%12 = load i32, ptr %arrayidx26.4, align 4, !tbaa !5
%cmp27.4 = icmp eq i32 %12, 0
br i1 %cmp27.4, label %if.then29.4, label %for.inc35.4
if.then29.4: ; preds = %for.inc35.3
%13 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.4 = sext i8 %13 to i32
%call33.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.4, i32 noundef 5)
br label %for.inc35.4
for.inc35.4: ; preds = %if.then29.4, %for.inc35.3
%arrayidx26.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5
%14 = load i32, ptr %arrayidx26.5, align 4, !tbaa !5
%cmp27.5 = icmp eq i32 %14, 0
br i1 %cmp27.5, label %if.then29.5, label %for.inc35.5
if.then29.5: ; preds = %for.inc35.4
%15 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.5 = sext i8 %15 to i32
%call33.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.5, i32 noundef 6)
br label %for.inc35.5
for.inc35.5: ; preds = %if.then29.5, %for.inc35.4
%arrayidx26.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6
%16 = load i32, ptr %arrayidx26.6, align 4, !tbaa !5
%cmp27.6 = icmp eq i32 %16, 0
br i1 %cmp27.6, label %if.then29.6, label %for.inc35.6
if.then29.6: ; preds = %for.inc35.5
%17 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.6 = sext i8 %17 to i32
%call33.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.6, i32 noundef 7)
br label %for.inc35.6
for.inc35.6: ; preds = %if.then29.6, %for.inc35.5
%arrayidx26.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7
%18 = load i32, ptr %arrayidx26.7, align 4, !tbaa !5
%cmp27.7 = icmp eq i32 %18, 0
br i1 %cmp27.7, label %if.then29.7, label %for.inc35.7
if.then29.7: ; preds = %for.inc35.6
%19 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.7 = sext i8 %19 to i32
%call33.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.7, i32 noundef 8)
br label %for.inc35.7
for.inc35.7: ; preds = %if.then29.7, %for.inc35.6
%arrayidx26.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8
%20 = load i32, ptr %arrayidx26.8, align 4, !tbaa !5
%cmp27.8 = icmp eq i32 %20, 0
br i1 %cmp27.8, label %if.then29.8, label %for.inc35.8
if.then29.8: ; preds = %for.inc35.7
%21 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.8 = sext i8 %21 to i32
%call33.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.8, i32 noundef 9)
br label %for.inc35.8
for.inc35.8: ; preds = %if.then29.8, %for.inc35.7
%arrayidx26.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9
%22 = load i32, ptr %arrayidx26.9, align 4, !tbaa !5
%cmp27.9 = icmp eq i32 %22, 0
br i1 %cmp27.9, label %if.then29.9, label %for.inc35.9
if.then29.9: ; preds = %for.inc35.8
%23 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.9 = sext i8 %23 to i32
%call33.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.9, i32 noundef 10)
br label %for.inc35.9
for.inc35.9: ; preds = %if.then29.9, %for.inc35.8
%arrayidx26.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10
%24 = load i32, ptr %arrayidx26.10, align 4, !tbaa !5
%cmp27.10 = icmp eq i32 %24, 0
br i1 %cmp27.10, label %if.then29.10, label %for.inc35.10
if.then29.10: ; preds = %for.inc35.9
%25 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.10 = sext i8 %25 to i32
%call33.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.10, i32 noundef 11)
br label %for.inc35.10
for.inc35.10: ; preds = %if.then29.10, %for.inc35.9
%arrayidx26.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11
%26 = load i32, ptr %arrayidx26.11, align 4, !tbaa !5
%cmp27.11 = icmp eq i32 %26, 0
br i1 %cmp27.11, label %if.then29.11, label %for.inc35.11
if.then29.11: ; preds = %for.inc35.10
%27 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.11 = sext i8 %27 to i32
%call33.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.11, i32 noundef 12)
br label %for.inc35.11
for.inc35.11: ; preds = %if.then29.11, %for.inc35.10
%arrayidx26.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12
%28 = load i32, ptr %arrayidx26.12, align 4, !tbaa !5
%cmp27.12 = icmp eq i32 %28, 0
br i1 %cmp27.12, label %if.then29.12, label %for.inc35.12
if.then29.12: ; preds = %for.inc35.11
%29 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.12 = sext i8 %29 to i32
%call33.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.12, i32 noundef 13)
br label %for.inc35.12
for.inc35.12: ; preds = %if.then29.12, %for.inc35.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.cond19.preheader, !llvm.loop !12
for.end40: ; preds = %for.inc35.12
call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %card) #4
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
|
#include <stdio.h>
int main(void){
int cards[128][14] = {{0}};
int i, n, num;
char c;
scanf("%d", &n);
for(i = 0; i < n; i++) {
scanf("%c", &c);
scanf("%c %d", &c, &num);
cards[c][num] = 1;
}
for(i = 1; i <= 13; i++) {
if(cards['S'][i] == 0) {
printf("S %d\n", i);
}
}
for(i = 1; i <= 13; i++) {
if(cards['H'][i] == 0) {
printf("H %d\n", i);
}
}
for(i = 1; i <= 13; i++) {
if(cards['C'][i] == 0) {
printf("C %d\n", i);
}
}
for(i = 1; i <= 13; i++) {
if(cards['D'][i] == 0) {
printf("D %d\n", i);
}
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214996/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214996/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [128 x [14 x i32]], align 16
%n = alloca i32, align 4
%num = alloca i32, align 4
%c = alloca i8, align 1
call void @llvm.lifetime.start.p0(i64 7168, ptr nonnull %cards) #4
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(7168) %cards, i8 0, i64 7168, 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 %c) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp72 = icmp sgt i32 %0, 0
br i1 %cmp72, label %for.body, label %for.cond5.preheader
for.cond5.preheader: ; preds = %for.body, %entry
%arrayidx10 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 83, i64 1
%1 = load i32, ptr %arrayidx10, align 4, !tbaa !5
%cmp11 = icmp eq i32 %1, 0
br i1 %cmp11, label %if.then, label %for.inc13
for.body: ; preds = %entry, %for.body
%i.073 = phi i32 [ %inc, %for.body ], [ 0, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %c)
%call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %c, ptr noundef nonnull %num)
%2 = load i8, ptr %c, align 1, !tbaa !9
%idxprom = sext i8 %2 to i64
%3 = load i32, ptr %num, align 4, !tbaa !5
%idxprom3 = sext i32 %3 to i64
%arrayidx4 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 %idxprom, i64 %idxprom3
store i32 1, ptr %arrayidx4, align 4, !tbaa !5
%inc = add nuw nsw i32 %i.073, 1
%4 = load i32, ptr %n, align 4, !tbaa !5
%cmp = icmp slt i32 %inc, %4
br i1 %cmp, label %for.body, label %for.cond5.preheader, !llvm.loop !10
if.then: ; preds = %for.cond5.preheader
%call12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1)
br label %for.inc13
for.inc13: ; preds = %for.cond5.preheader, %if.then
%arrayidx10.1 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 83, i64 2
%5 = load i32, ptr %arrayidx10.1, align 16, !tbaa !5
%cmp11.1 = icmp eq i32 %5, 0
br i1 %cmp11.1, label %if.then.1, label %for.inc13.1
if.then.1: ; preds = %for.inc13
%call12.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2)
br label %for.inc13.1
for.inc13.1: ; preds = %if.then.1, %for.inc13
%arrayidx10.2 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 83, i64 3
%6 = load i32, ptr %arrayidx10.2, align 4, !tbaa !5
%cmp11.2 = icmp eq i32 %6, 0
br i1 %cmp11.2, label %if.then.2, label %for.inc13.2
if.then.2: ; preds = %for.inc13.1
%call12.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3)
br label %for.inc13.2
for.inc13.2: ; preds = %if.then.2, %for.inc13.1
%arrayidx10.3 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 83, i64 4
%7 = load i32, ptr %arrayidx10.3, align 8, !tbaa !5
%cmp11.3 = icmp eq i32 %7, 0
br i1 %cmp11.3, label %if.then.3, label %for.inc13.3
if.then.3: ; preds = %for.inc13.2
%call12.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4)
br label %for.inc13.3
for.inc13.3: ; preds = %if.then.3, %for.inc13.2
%arrayidx10.4 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 83, i64 5
%8 = load i32, ptr %arrayidx10.4, align 4, !tbaa !5
%cmp11.4 = icmp eq i32 %8, 0
br i1 %cmp11.4, label %if.then.4, label %for.inc13.4
if.then.4: ; preds = %for.inc13.3
%call12.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5)
br label %for.inc13.4
for.inc13.4: ; preds = %if.then.4, %for.inc13.3
%arrayidx10.5 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 83, i64 6
%9 = load i32, ptr %arrayidx10.5, align 16, !tbaa !5
%cmp11.5 = icmp eq i32 %9, 0
br i1 %cmp11.5, label %if.then.5, label %for.inc13.5
if.then.5: ; preds = %for.inc13.4
%call12.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6)
br label %for.inc13.5
for.inc13.5: ; preds = %if.then.5, %for.inc13.4
%arrayidx10.6 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 83, i64 7
%10 = load i32, ptr %arrayidx10.6, align 4, !tbaa !5
%cmp11.6 = icmp eq i32 %10, 0
br i1 %cmp11.6, label %if.then.6, label %for.inc13.6
if.then.6: ; preds = %for.inc13.5
%call12.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7)
br label %for.inc13.6
for.inc13.6: ; preds = %if.then.6, %for.inc13.5
%arrayidx10.7 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 83, i64 8
%11 = load i32, ptr %arrayidx10.7, align 8, !tbaa !5
%cmp11.7 = icmp eq i32 %11, 0
br i1 %cmp11.7, label %if.then.7, label %for.inc13.7
if.then.7: ; preds = %for.inc13.6
%call12.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8)
br label %for.inc13.7
for.inc13.7: ; preds = %if.then.7, %for.inc13.6
%arrayidx10.8 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 83, i64 9
%12 = load i32, ptr %arrayidx10.8, align 4, !tbaa !5
%cmp11.8 = icmp eq i32 %12, 0
br i1 %cmp11.8, label %if.then.8, label %for.inc13.8
if.then.8: ; preds = %for.inc13.7
%call12.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9)
br label %for.inc13.8
for.inc13.8: ; preds = %if.then.8, %for.inc13.7
%arrayidx10.9 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 83, i64 10
%13 = load i32, ptr %arrayidx10.9, align 16, !tbaa !5
%cmp11.9 = icmp eq i32 %13, 0
br i1 %cmp11.9, label %if.then.9, label %for.inc13.9
if.then.9: ; preds = %for.inc13.8
%call12.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10)
br label %for.inc13.9
for.inc13.9: ; preds = %if.then.9, %for.inc13.8
%arrayidx10.10 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 83, i64 11
%14 = load i32, ptr %arrayidx10.10, align 4, !tbaa !5
%cmp11.10 = icmp eq i32 %14, 0
br i1 %cmp11.10, label %if.then.10, label %for.inc13.10
if.then.10: ; preds = %for.inc13.9
%call12.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11)
br label %for.inc13.10
for.inc13.10: ; preds = %if.then.10, %for.inc13.9
%arrayidx10.11 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 83, i64 12
%15 = load i32, ptr %arrayidx10.11, align 8, !tbaa !5
%cmp11.11 = icmp eq i32 %15, 0
br i1 %cmp11.11, label %if.then.11, label %for.inc13.11
if.then.11: ; preds = %for.inc13.10
%call12.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12)
br label %for.inc13.11
for.inc13.11: ; preds = %if.then.11, %for.inc13.10
%arrayidx10.12 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 83, i64 13
%16 = load i32, ptr %arrayidx10.12, align 4, !tbaa !5
%cmp11.12 = icmp eq i32 %16, 0
br i1 %cmp11.12, label %if.then.12, label %for.inc13.12
if.then.12: ; preds = %for.inc13.11
%call12.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 13)
br label %for.inc13.12
for.inc13.12: ; preds = %if.then.12, %for.inc13.11
%arrayidx21 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 72, i64 1
%17 = load i32, ptr %arrayidx21, align 4, !tbaa !5
%cmp22 = icmp eq i32 %17, 0
br i1 %cmp22, label %if.then23, label %for.inc26
if.then23: ; preds = %for.inc13.12
%call24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1)
br label %for.inc26
for.inc26: ; preds = %for.inc13.12, %if.then23
%arrayidx21.1 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 72, i64 2
%18 = load i32, ptr %arrayidx21.1, align 8, !tbaa !5
%cmp22.1 = icmp eq i32 %18, 0
br i1 %cmp22.1, label %if.then23.1, label %for.inc26.1
if.then23.1: ; preds = %for.inc26
%call24.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2)
br label %for.inc26.1
for.inc26.1: ; preds = %if.then23.1, %for.inc26
%arrayidx21.2 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 72, i64 3
%19 = load i32, ptr %arrayidx21.2, align 4, !tbaa !5
%cmp22.2 = icmp eq i32 %19, 0
br i1 %cmp22.2, label %if.then23.2, label %for.inc26.2
if.then23.2: ; preds = %for.inc26.1
%call24.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3)
br label %for.inc26.2
for.inc26.2: ; preds = %if.then23.2, %for.inc26.1
%arrayidx21.3 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 72, i64 4
%20 = load i32, ptr %arrayidx21.3, align 16, !tbaa !5
%cmp22.3 = icmp eq i32 %20, 0
br i1 %cmp22.3, label %if.then23.3, label %for.inc26.3
if.then23.3: ; preds = %for.inc26.2
%call24.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4)
br label %for.inc26.3
for.inc26.3: ; preds = %if.then23.3, %for.inc26.2
%arrayidx21.4 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 72, i64 5
%21 = load i32, ptr %arrayidx21.4, align 4, !tbaa !5
%cmp22.4 = icmp eq i32 %21, 0
br i1 %cmp22.4, label %if.then23.4, label %for.inc26.4
if.then23.4: ; preds = %for.inc26.3
%call24.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5)
br label %for.inc26.4
for.inc26.4: ; preds = %if.then23.4, %for.inc26.3
%arrayidx21.5 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 72, i64 6
%22 = load i32, ptr %arrayidx21.5, align 8, !tbaa !5
%cmp22.5 = icmp eq i32 %22, 0
br i1 %cmp22.5, label %if.then23.5, label %for.inc26.5
if.then23.5: ; preds = %for.inc26.4
%call24.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6)
br label %for.inc26.5
for.inc26.5: ; preds = %if.then23.5, %for.inc26.4
%arrayidx21.6 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 72, i64 7
%23 = load i32, ptr %arrayidx21.6, align 4, !tbaa !5
%cmp22.6 = icmp eq i32 %23, 0
br i1 %cmp22.6, label %if.then23.6, label %for.inc26.6
if.then23.6: ; preds = %for.inc26.5
%call24.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7)
br label %for.inc26.6
for.inc26.6: ; preds = %if.then23.6, %for.inc26.5
%arrayidx21.7 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 72, i64 8
%24 = load i32, ptr %arrayidx21.7, align 16, !tbaa !5
%cmp22.7 = icmp eq i32 %24, 0
br i1 %cmp22.7, label %if.then23.7, label %for.inc26.7
if.then23.7: ; preds = %for.inc26.6
%call24.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8)
br label %for.inc26.7
for.inc26.7: ; preds = %if.then23.7, %for.inc26.6
%arrayidx21.8 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 72, i64 9
%25 = load i32, ptr %arrayidx21.8, align 4, !tbaa !5
%cmp22.8 = icmp eq i32 %25, 0
br i1 %cmp22.8, label %if.then23.8, label %for.inc26.8
if.then23.8: ; preds = %for.inc26.7
%call24.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9)
br label %for.inc26.8
for.inc26.8: ; preds = %if.then23.8, %for.inc26.7
%arrayidx21.9 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 72, i64 10
%26 = load i32, ptr %arrayidx21.9, align 8, !tbaa !5
%cmp22.9 = icmp eq i32 %26, 0
br i1 %cmp22.9, label %if.then23.9, label %for.inc26.9
if.then23.9: ; preds = %for.inc26.8
%call24.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10)
br label %for.inc26.9
for.inc26.9: ; preds = %if.then23.9, %for.inc26.8
%arrayidx21.10 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 72, i64 11
%27 = load i32, ptr %arrayidx21.10, align 4, !tbaa !5
%cmp22.10 = icmp eq i32 %27, 0
br i1 %cmp22.10, label %if.then23.10, label %for.inc26.10
if.then23.10: ; preds = %for.inc26.9
%call24.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11)
br label %for.inc26.10
for.inc26.10: ; preds = %if.then23.10, %for.inc26.9
%arrayidx21.11 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 72, i64 12
%28 = load i32, ptr %arrayidx21.11, align 16, !tbaa !5
%cmp22.11 = icmp eq i32 %28, 0
br i1 %cmp22.11, label %if.then23.11, label %for.inc26.11
if.then23.11: ; preds = %for.inc26.10
%call24.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12)
br label %for.inc26.11
for.inc26.11: ; preds = %if.then23.11, %for.inc26.10
%arrayidx21.12 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 72, i64 13
%29 = load i32, ptr %arrayidx21.12, align 4, !tbaa !5
%cmp22.12 = icmp eq i32 %29, 0
br i1 %cmp22.12, label %if.then23.12, label %for.inc26.12
if.then23.12: ; preds = %for.inc26.11
%call24.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 13)
br label %for.inc26.12
for.inc26.12: ; preds = %if.then23.12, %for.inc26.11
%arrayidx34 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 67, i64 1
%30 = load i32, ptr %arrayidx34, align 4, !tbaa !5
%cmp35 = icmp eq i32 %30, 0
br i1 %cmp35, label %if.then36, label %for.inc39
if.then36: ; preds = %for.inc26.12
%call37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1)
br label %for.inc39
for.inc39: ; preds = %for.inc26.12, %if.then36
%arrayidx34.1 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 67, i64 2
%31 = load i32, ptr %arrayidx34.1, align 16, !tbaa !5
%cmp35.1 = icmp eq i32 %31, 0
br i1 %cmp35.1, label %if.then36.1, label %for.inc39.1
if.then36.1: ; preds = %for.inc39
%call37.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2)
br label %for.inc39.1
for.inc39.1: ; preds = %if.then36.1, %for.inc39
%arrayidx34.2 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 67, i64 3
%32 = load i32, ptr %arrayidx34.2, align 4, !tbaa !5
%cmp35.2 = icmp eq i32 %32, 0
br i1 %cmp35.2, label %if.then36.2, label %for.inc39.2
if.then36.2: ; preds = %for.inc39.1
%call37.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3)
br label %for.inc39.2
for.inc39.2: ; preds = %if.then36.2, %for.inc39.1
%arrayidx34.3 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 67, i64 4
%33 = load i32, ptr %arrayidx34.3, align 8, !tbaa !5
%cmp35.3 = icmp eq i32 %33, 0
br i1 %cmp35.3, label %if.then36.3, label %for.inc39.3
if.then36.3: ; preds = %for.inc39.2
%call37.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4)
br label %for.inc39.3
for.inc39.3: ; preds = %if.then36.3, %for.inc39.2
%arrayidx34.4 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 67, i64 5
%34 = load i32, ptr %arrayidx34.4, align 4, !tbaa !5
%cmp35.4 = icmp eq i32 %34, 0
br i1 %cmp35.4, label %if.then36.4, label %for.inc39.4
if.then36.4: ; preds = %for.inc39.3
%call37.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5)
br label %for.inc39.4
for.inc39.4: ; preds = %if.then36.4, %for.inc39.3
%arrayidx34.5 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 67, i64 6
%35 = load i32, ptr %arrayidx34.5, align 16, !tbaa !5
%cmp35.5 = icmp eq i32 %35, 0
br i1 %cmp35.5, label %if.then36.5, label %for.inc39.5
if.then36.5: ; preds = %for.inc39.4
%call37.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6)
br label %for.inc39.5
for.inc39.5: ; preds = %if.then36.5, %for.inc39.4
%arrayidx34.6 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 67, i64 7
%36 = load i32, ptr %arrayidx34.6, align 4, !tbaa !5
%cmp35.6 = icmp eq i32 %36, 0
br i1 %cmp35.6, label %if.then36.6, label %for.inc39.6
if.then36.6: ; preds = %for.inc39.5
%call37.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7)
br label %for.inc39.6
for.inc39.6: ; preds = %if.then36.6, %for.inc39.5
%arrayidx34.7 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 67, i64 8
%37 = load i32, ptr %arrayidx34.7, align 8, !tbaa !5
%cmp35.7 = icmp eq i32 %37, 0
br i1 %cmp35.7, label %if.then36.7, label %for.inc39.7
if.then36.7: ; preds = %for.inc39.6
%call37.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8)
br label %for.inc39.7
for.inc39.7: ; preds = %if.then36.7, %for.inc39.6
%arrayidx34.8 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 67, i64 9
%38 = load i32, ptr %arrayidx34.8, align 4, !tbaa !5
%cmp35.8 = icmp eq i32 %38, 0
br i1 %cmp35.8, label %if.then36.8, label %for.inc39.8
if.then36.8: ; preds = %for.inc39.7
%call37.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9)
br label %for.inc39.8
for.inc39.8: ; preds = %if.then36.8, %for.inc39.7
%arrayidx34.9 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 67, i64 10
%39 = load i32, ptr %arrayidx34.9, align 16, !tbaa !5
%cmp35.9 = icmp eq i32 %39, 0
br i1 %cmp35.9, label %if.then36.9, label %for.inc39.9
if.then36.9: ; preds = %for.inc39.8
%call37.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10)
br label %for.inc39.9
for.inc39.9: ; preds = %if.then36.9, %for.inc39.8
%arrayidx34.10 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 67, i64 11
%40 = load i32, ptr %arrayidx34.10, align 4, !tbaa !5
%cmp35.10 = icmp eq i32 %40, 0
br i1 %cmp35.10, label %if.then36.10, label %for.inc39.10
if.then36.10: ; preds = %for.inc39.9
%call37.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11)
br label %for.inc39.10
for.inc39.10: ; preds = %if.then36.10, %for.inc39.9
%arrayidx34.11 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 67, i64 12
%41 = load i32, ptr %arrayidx34.11, align 8, !tbaa !5
%cmp35.11 = icmp eq i32 %41, 0
br i1 %cmp35.11, label %if.then36.11, label %for.inc39.11
if.then36.11: ; preds = %for.inc39.10
%call37.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12)
br label %for.inc39.11
for.inc39.11: ; preds = %if.then36.11, %for.inc39.10
%arrayidx34.12 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 67, i64 13
%42 = load i32, ptr %arrayidx34.12, align 4, !tbaa !5
%cmp35.12 = icmp eq i32 %42, 0
br i1 %cmp35.12, label %if.then36.12, label %for.inc39.12
if.then36.12: ; preds = %for.inc39.11
%call37.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 13)
br label %for.inc39.12
for.inc39.12: ; preds = %if.then36.12, %for.inc39.11
%arrayidx47 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 68, i64 1
%43 = load i32, ptr %arrayidx47, align 4, !tbaa !5
%cmp48 = icmp eq i32 %43, 0
br i1 %cmp48, label %if.then49, label %for.inc52
if.then49: ; preds = %for.inc39.12
%call50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 1)
br label %for.inc52
for.inc52: ; preds = %for.inc39.12, %if.then49
%arrayidx47.1 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 68, i64 2
%44 = load i32, ptr %arrayidx47.1, align 8, !tbaa !5
%cmp48.1 = icmp eq i32 %44, 0
br i1 %cmp48.1, label %if.then49.1, label %for.inc52.1
if.then49.1: ; preds = %for.inc52
%call50.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 2)
br label %for.inc52.1
for.inc52.1: ; preds = %if.then49.1, %for.inc52
%arrayidx47.2 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 68, i64 3
%45 = load i32, ptr %arrayidx47.2, align 4, !tbaa !5
%cmp48.2 = icmp eq i32 %45, 0
br i1 %cmp48.2, label %if.then49.2, label %for.inc52.2
if.then49.2: ; preds = %for.inc52.1
%call50.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 3)
br label %for.inc52.2
for.inc52.2: ; preds = %if.then49.2, %for.inc52.1
%arrayidx47.3 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 68, i64 4
%46 = load i32, ptr %arrayidx47.3, align 16, !tbaa !5
%cmp48.3 = icmp eq i32 %46, 0
br i1 %cmp48.3, label %if.then49.3, label %for.inc52.3
if.then49.3: ; preds = %for.inc52.2
%call50.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 4)
br label %for.inc52.3
for.inc52.3: ; preds = %if.then49.3, %for.inc52.2
%arrayidx47.4 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 68, i64 5
%47 = load i32, ptr %arrayidx47.4, align 4, !tbaa !5
%cmp48.4 = icmp eq i32 %47, 0
br i1 %cmp48.4, label %if.then49.4, label %for.inc52.4
if.then49.4: ; preds = %for.inc52.3
%call50.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 5)
br label %for.inc52.4
for.inc52.4: ; preds = %if.then49.4, %for.inc52.3
%arrayidx47.5 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 68, i64 6
%48 = load i32, ptr %arrayidx47.5, align 8, !tbaa !5
%cmp48.5 = icmp eq i32 %48, 0
br i1 %cmp48.5, label %if.then49.5, label %for.inc52.5
if.then49.5: ; preds = %for.inc52.4
%call50.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 6)
br label %for.inc52.5
for.inc52.5: ; preds = %if.then49.5, %for.inc52.4
%arrayidx47.6 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 68, i64 7
%49 = load i32, ptr %arrayidx47.6, align 4, !tbaa !5
%cmp48.6 = icmp eq i32 %49, 0
br i1 %cmp48.6, label %if.then49.6, label %for.inc52.6
if.then49.6: ; preds = %for.inc52.5
%call50.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 7)
br label %for.inc52.6
for.inc52.6: ; preds = %if.then49.6, %for.inc52.5
%arrayidx47.7 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 68, i64 8
%50 = load i32, ptr %arrayidx47.7, align 16, !tbaa !5
%cmp48.7 = icmp eq i32 %50, 0
br i1 %cmp48.7, label %if.then49.7, label %for.inc52.7
if.then49.7: ; preds = %for.inc52.6
%call50.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 8)
br label %for.inc52.7
for.inc52.7: ; preds = %if.then49.7, %for.inc52.6
%arrayidx47.8 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 68, i64 9
%51 = load i32, ptr %arrayidx47.8, align 4, !tbaa !5
%cmp48.8 = icmp eq i32 %51, 0
br i1 %cmp48.8, label %if.then49.8, label %for.inc52.8
if.then49.8: ; preds = %for.inc52.7
%call50.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 9)
br label %for.inc52.8
for.inc52.8: ; preds = %if.then49.8, %for.inc52.7
%arrayidx47.9 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 68, i64 10
%52 = load i32, ptr %arrayidx47.9, align 8, !tbaa !5
%cmp48.9 = icmp eq i32 %52, 0
br i1 %cmp48.9, label %if.then49.9, label %for.inc52.9
if.then49.9: ; preds = %for.inc52.8
%call50.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 10)
br label %for.inc52.9
for.inc52.9: ; preds = %if.then49.9, %for.inc52.8
%arrayidx47.10 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 68, i64 11
%53 = load i32, ptr %arrayidx47.10, align 4, !tbaa !5
%cmp48.10 = icmp eq i32 %53, 0
br i1 %cmp48.10, label %if.then49.10, label %for.inc52.10
if.then49.10: ; preds = %for.inc52.9
%call50.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 11)
br label %for.inc52.10
for.inc52.10: ; preds = %if.then49.10, %for.inc52.9
%arrayidx47.11 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 68, i64 12
%54 = load i32, ptr %arrayidx47.11, align 16, !tbaa !5
%cmp48.11 = icmp eq i32 %54, 0
br i1 %cmp48.11, label %if.then49.11, label %for.inc52.11
if.then49.11: ; preds = %for.inc52.10
%call50.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 12)
br label %for.inc52.11
for.inc52.11: ; preds = %if.then49.11, %for.inc52.10
%arrayidx47.12 = getelementptr inbounds [128 x [14 x i32]], ptr %cards, i64 0, i64 68, i64 13
%55 = load i32, ptr %arrayidx47.12, align 4, !tbaa !5
%cmp48.12 = icmp eq i32 %55, 0
br i1 %cmp48.12, label %if.then49.12, label %for.inc52.12
if.then49.12: ; preds = %for.inc52.11
%call50.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 13)
br label %for.inc52.12
for.inc52.12: ; preds = %if.then49.12, %for.inc52.11
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c) #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 7168, 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"}
|
#include<stdio.h>
int main(void)
{
int i,j,k,cards[4][13];
char z;
for (i = 0; i < 4; i++)
{
for (j = 0; j < 13; j++)
{
cards[i][j] = 0;
}
}
scanf("%d",&k);
for(i=0;i < k;i++)
{
scanf("%c", &z);
scanf("%c %d", &z,&j);
if(z == 'S')
{
cards[0][j - 1] = 1;
}
if(z == 'H')
{
cards[1][j - 1] = 1;
}
if(z == 'C')
{
cards[2][j - 1] = 1;
}
if(z == 'D')
{
cards[3][j - 1] = 1;
}
}
for(i=0;i<13;i++)
{
if(cards[0][i] == 0)
{
printf("S %d\n",i+1);
}
}
for(i=0;i<13;i++)
{
if(cards[1][i] == 0)
{
printf("H %d\n",i+1);
}
}
for(i=0;i<13;i++)
{
if(cards[2][i] == 0)
{
printf("C %d\n",i+1);
}
}
for(i=0;i<13;i++)
{
if(cards[3][i] == 0)
{
printf("D %d\n",i+1);
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215038/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215038/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:
%j = alloca i32, align 4
%k = alloca i32, align 4
%cards = alloca [4 x [13 x i32]], align 16
%z = alloca i8, align 1
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %j) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #4
call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %cards) #4
call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %z) #4
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %cards, 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 %k)
%0 = load i32, ptr %k, align 4, !tbaa !5
%cmp10138 = icmp sgt i32 %0, 0
br i1 %cmp10138, label %for.body11, label %for.cond49.preheader
for.cond49.preheader: ; preds = %for.inc46, %entry
%1 = load i32, ptr %cards, align 16, !tbaa !5
%cmp56 = icmp eq i32 %1, 0
br i1 %cmp56, label %if.then58, label %for.inc61
for.body11: ; preds = %entry, %for.inc46
%i.1139 = phi i32 [ %inc47, %for.inc46 ], [ 0, %entry ]
%call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %z)
%call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %z, ptr noundef nonnull %j)
%2 = load i8, ptr %z, align 1, !tbaa !9
switch i8 %2, label %for.inc46 [
i8 83, label %if.end.thread
i8 72, label %if.then22
i8 67, label %if.then31
i8 68, label %if.then40
]
if.end.thread: ; preds = %for.body11
%3 = load i32, ptr %j, align 4, !tbaa !5
%sub = add nsw i32 %3, -1
%idxprom17 = sext i32 %sub to i64
%arrayidx18 = getelementptr inbounds [13 x i32], ptr %cards, i64 0, i64 %idxprom17
br label %for.inc46.sink.split
if.then22: ; preds = %for.body11
%4 = load i32, ptr %j, 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 %cards, i64 0, i64 1, i64 %idxprom25
br label %for.inc46.sink.split
if.then31: ; preds = %for.body11
%5 = load i32, ptr %j, align 4, !tbaa !5
%sub33 = add nsw i32 %5, -1
%idxprom34 = sext i32 %sub33 to i64
%arrayidx35 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 %idxprom34
br label %for.inc46.sink.split
if.then40: ; preds = %for.body11
%6 = load i32, ptr %j, align 4, !tbaa !5
%sub42 = add nsw i32 %6, -1
%idxprom43 = sext i32 %sub42 to i64
%arrayidx44 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 %idxprom43
br label %for.inc46.sink.split
for.inc46.sink.split: ; preds = %if.then40, %if.then31, %if.end.thread, %if.then22
%arrayidx26.sink = phi ptr [ %arrayidx26, %if.then22 ], [ %arrayidx18, %if.end.thread ], [ %arrayidx35, %if.then31 ], [ %arrayidx44, %if.then40 ]
store i32 1, ptr %arrayidx26.sink, align 4, !tbaa !5
br label %for.inc46
for.inc46: ; preds = %for.inc46.sink.split, %for.body11
%inc47 = add nuw nsw i32 %i.1139, 1
%7 = load i32, ptr %k, align 4, !tbaa !5
%cmp10 = icmp slt i32 %inc47, %7
br i1 %cmp10, label %for.body11, label %for.cond49.preheader, !llvm.loop !10
if.then58: ; preds = %for.cond49.preheader
%call59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1)
br label %for.inc61
for.inc61: ; preds = %for.cond49.preheader, %if.then58
%arrayidx55.1 = getelementptr inbounds [13 x i32], ptr %cards, i64 0, i64 1
%8 = load i32, ptr %arrayidx55.1, align 4, !tbaa !5
%cmp56.1 = icmp eq i32 %8, 0
br i1 %cmp56.1, label %if.then58.1, label %for.inc61.1
if.then58.1: ; preds = %for.inc61
%call59.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2)
br label %for.inc61.1
for.inc61.1: ; preds = %if.then58.1, %for.inc61
%arrayidx55.2 = getelementptr inbounds [13 x i32], ptr %cards, i64 0, i64 2
%9 = load i32, ptr %arrayidx55.2, align 8, !tbaa !5
%cmp56.2 = icmp eq i32 %9, 0
br i1 %cmp56.2, label %if.then58.2, label %for.inc61.2
if.then58.2: ; preds = %for.inc61.1
%call59.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3)
br label %for.inc61.2
for.inc61.2: ; preds = %if.then58.2, %for.inc61.1
%arrayidx55.3 = getelementptr inbounds [13 x i32], ptr %cards, i64 0, i64 3
%10 = load i32, ptr %arrayidx55.3, align 4, !tbaa !5
%cmp56.3 = icmp eq i32 %10, 0
br i1 %cmp56.3, label %if.then58.3, label %for.inc61.3
if.then58.3: ; preds = %for.inc61.2
%call59.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4)
br label %for.inc61.3
for.inc61.3: ; preds = %if.then58.3, %for.inc61.2
%arrayidx55.4 = getelementptr inbounds [13 x i32], ptr %cards, i64 0, i64 4
%11 = load i32, ptr %arrayidx55.4, align 16, !tbaa !5
%cmp56.4 = icmp eq i32 %11, 0
br i1 %cmp56.4, label %if.then58.4, label %for.inc61.4
if.then58.4: ; preds = %for.inc61.3
%call59.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5)
br label %for.inc61.4
for.inc61.4: ; preds = %if.then58.4, %for.inc61.3
%arrayidx55.5 = getelementptr inbounds [13 x i32], ptr %cards, i64 0, i64 5
%12 = load i32, ptr %arrayidx55.5, align 4, !tbaa !5
%cmp56.5 = icmp eq i32 %12, 0
br i1 %cmp56.5, label %if.then58.5, label %for.inc61.5
if.then58.5: ; preds = %for.inc61.4
%call59.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6)
br label %for.inc61.5
for.inc61.5: ; preds = %if.then58.5, %for.inc61.4
%arrayidx55.6 = getelementptr inbounds [13 x i32], ptr %cards, i64 0, i64 6
%13 = load i32, ptr %arrayidx55.6, align 8, !tbaa !5
%cmp56.6 = icmp eq i32 %13, 0
br i1 %cmp56.6, label %if.then58.6, label %for.inc61.6
if.then58.6: ; preds = %for.inc61.5
%call59.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7)
br label %for.inc61.6
for.inc61.6: ; preds = %if.then58.6, %for.inc61.5
%arrayidx55.7 = getelementptr inbounds [13 x i32], ptr %cards, i64 0, i64 7
%14 = load i32, ptr %arrayidx55.7, align 4, !tbaa !5
%cmp56.7 = icmp eq i32 %14, 0
br i1 %cmp56.7, label %if.then58.7, label %for.inc61.7
if.then58.7: ; preds = %for.inc61.6
%call59.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8)
br label %for.inc61.7
for.inc61.7: ; preds = %if.then58.7, %for.inc61.6
%arrayidx55.8 = getelementptr inbounds [13 x i32], ptr %cards, i64 0, i64 8
%15 = load i32, ptr %arrayidx55.8, align 16, !tbaa !5
%cmp56.8 = icmp eq i32 %15, 0
br i1 %cmp56.8, label %if.then58.8, label %for.inc61.8
if.then58.8: ; preds = %for.inc61.7
%call59.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9)
br label %for.inc61.8
for.inc61.8: ; preds = %if.then58.8, %for.inc61.7
%arrayidx55.9 = getelementptr inbounds [13 x i32], ptr %cards, i64 0, i64 9
%16 = load i32, ptr %arrayidx55.9, align 4, !tbaa !5
%cmp56.9 = icmp eq i32 %16, 0
br i1 %cmp56.9, label %if.then58.9, label %for.inc61.9
if.then58.9: ; preds = %for.inc61.8
%call59.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10)
br label %for.inc61.9
for.inc61.9: ; preds = %if.then58.9, %for.inc61.8
%arrayidx55.10 = getelementptr inbounds [13 x i32], ptr %cards, i64 0, i64 10
%17 = load i32, ptr %arrayidx55.10, align 8, !tbaa !5
%cmp56.10 = icmp eq i32 %17, 0
br i1 %cmp56.10, label %if.then58.10, label %for.inc61.10
if.then58.10: ; preds = %for.inc61.9
%call59.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11)
br label %for.inc61.10
for.inc61.10: ; preds = %if.then58.10, %for.inc61.9
%arrayidx55.11 = getelementptr inbounds [13 x i32], ptr %cards, i64 0, i64 11
%18 = load i32, ptr %arrayidx55.11, align 4, !tbaa !5
%cmp56.11 = icmp eq i32 %18, 0
br i1 %cmp56.11, label %if.then58.11, label %for.inc61.11
if.then58.11: ; preds = %for.inc61.10
%call59.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12)
br label %for.inc61.11
for.inc61.11: ; preds = %if.then58.11, %for.inc61.10
%arrayidx55.12 = getelementptr inbounds [13 x i32], ptr %cards, i64 0, i64 12
%19 = load i32, ptr %arrayidx55.12, align 16, !tbaa !5
%cmp56.12 = icmp eq i32 %19, 0
br i1 %cmp56.12, label %if.then58.12, label %for.inc61.12
if.then58.12: ; preds = %for.inc61.11
%call59.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 13)
br label %for.inc61.12
for.inc61.12: ; preds = %if.then58.12, %for.inc61.11
%arrayidx70 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 0
%20 = load i32, ptr %arrayidx70, align 4, !tbaa !5
%cmp71 = icmp eq i32 %20, 0
br i1 %cmp71, label %if.then73, label %for.inc77
if.then73: ; preds = %for.inc61.12
%call75 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1)
br label %for.inc77
for.inc77: ; preds = %for.inc61.12, %if.then73
%arrayidx70.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 1
%21 = load i32, ptr %arrayidx70.1, align 8, !tbaa !5
%cmp71.1 = icmp eq i32 %21, 0
br i1 %cmp71.1, label %if.then73.1, label %for.inc77.1
if.then73.1: ; preds = %for.inc77
%call75.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2)
br label %for.inc77.1
for.inc77.1: ; preds = %if.then73.1, %for.inc77
%arrayidx70.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 2
%22 = load i32, ptr %arrayidx70.2, align 4, !tbaa !5
%cmp71.2 = icmp eq i32 %22, 0
br i1 %cmp71.2, label %if.then73.2, label %for.inc77.2
if.then73.2: ; preds = %for.inc77.1
%call75.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3)
br label %for.inc77.2
for.inc77.2: ; preds = %if.then73.2, %for.inc77.1
%arrayidx70.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 3
%23 = load i32, ptr %arrayidx70.3, align 16, !tbaa !5
%cmp71.3 = icmp eq i32 %23, 0
br i1 %cmp71.3, label %if.then73.3, label %for.inc77.3
if.then73.3: ; preds = %for.inc77.2
%call75.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4)
br label %for.inc77.3
for.inc77.3: ; preds = %if.then73.3, %for.inc77.2
%arrayidx70.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 4
%24 = load i32, ptr %arrayidx70.4, align 4, !tbaa !5
%cmp71.4 = icmp eq i32 %24, 0
br i1 %cmp71.4, label %if.then73.4, label %for.inc77.4
if.then73.4: ; preds = %for.inc77.3
%call75.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5)
br label %for.inc77.4
for.inc77.4: ; preds = %if.then73.4, %for.inc77.3
%arrayidx70.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 5
%25 = load i32, ptr %arrayidx70.5, align 8, !tbaa !5
%cmp71.5 = icmp eq i32 %25, 0
br i1 %cmp71.5, label %if.then73.5, label %for.inc77.5
if.then73.5: ; preds = %for.inc77.4
%call75.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6)
br label %for.inc77.5
for.inc77.5: ; preds = %if.then73.5, %for.inc77.4
%arrayidx70.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 6
%26 = load i32, ptr %arrayidx70.6, align 4, !tbaa !5
%cmp71.6 = icmp eq i32 %26, 0
br i1 %cmp71.6, label %if.then73.6, label %for.inc77.6
if.then73.6: ; preds = %for.inc77.5
%call75.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7)
br label %for.inc77.6
for.inc77.6: ; preds = %if.then73.6, %for.inc77.5
%arrayidx70.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 7
%27 = load i32, ptr %arrayidx70.7, align 16, !tbaa !5
%cmp71.7 = icmp eq i32 %27, 0
br i1 %cmp71.7, label %if.then73.7, label %for.inc77.7
if.then73.7: ; preds = %for.inc77.6
%call75.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8)
br label %for.inc77.7
for.inc77.7: ; preds = %if.then73.7, %for.inc77.6
%arrayidx70.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 8
%28 = load i32, ptr %arrayidx70.8, align 4, !tbaa !5
%cmp71.8 = icmp eq i32 %28, 0
br i1 %cmp71.8, label %if.then73.8, label %for.inc77.8
if.then73.8: ; preds = %for.inc77.7
%call75.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9)
br label %for.inc77.8
for.inc77.8: ; preds = %if.then73.8, %for.inc77.7
%arrayidx70.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 9
%29 = load i32, ptr %arrayidx70.9, align 8, !tbaa !5
%cmp71.9 = icmp eq i32 %29, 0
br i1 %cmp71.9, label %if.then73.9, label %for.inc77.9
if.then73.9: ; preds = %for.inc77.8
%call75.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10)
br label %for.inc77.9
for.inc77.9: ; preds = %if.then73.9, %for.inc77.8
%arrayidx70.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 10
%30 = load i32, ptr %arrayidx70.10, align 4, !tbaa !5
%cmp71.10 = icmp eq i32 %30, 0
br i1 %cmp71.10, label %if.then73.10, label %for.inc77.10
if.then73.10: ; preds = %for.inc77.9
%call75.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11)
br label %for.inc77.10
for.inc77.10: ; preds = %if.then73.10, %for.inc77.9
%arrayidx70.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 11
%31 = load i32, ptr %arrayidx70.11, align 16, !tbaa !5
%cmp71.11 = icmp eq i32 %31, 0
br i1 %cmp71.11, label %if.then73.11, label %for.inc77.11
if.then73.11: ; preds = %for.inc77.10
%call75.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12)
br label %for.inc77.11
for.inc77.11: ; preds = %if.then73.11, %for.inc77.10
%arrayidx70.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 12
%32 = load i32, ptr %arrayidx70.12, align 4, !tbaa !5
%cmp71.12 = icmp eq i32 %32, 0
br i1 %cmp71.12, label %if.then73.12, label %for.inc77.12
if.then73.12: ; preds = %for.inc77.11
%call75.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 13)
br label %for.inc77.12
for.inc77.12: ; preds = %if.then73.12, %for.inc77.11
%arrayidx86 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 0
%33 = load i32, ptr %arrayidx86, align 8, !tbaa !5
%cmp87 = icmp eq i32 %33, 0
br i1 %cmp87, label %if.then89, label %for.inc93
if.then89: ; preds = %for.inc77.12
%call91 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1)
br label %for.inc93
for.inc93: ; preds = %for.inc77.12, %if.then89
%arrayidx86.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 1
%34 = load i32, ptr %arrayidx86.1, align 4, !tbaa !5
%cmp87.1 = icmp eq i32 %34, 0
br i1 %cmp87.1, label %if.then89.1, label %for.inc93.1
if.then89.1: ; preds = %for.inc93
%call91.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2)
br label %for.inc93.1
for.inc93.1: ; preds = %if.then89.1, %for.inc93
%arrayidx86.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 2
%35 = load i32, ptr %arrayidx86.2, align 16, !tbaa !5
%cmp87.2 = icmp eq i32 %35, 0
br i1 %cmp87.2, label %if.then89.2, label %for.inc93.2
if.then89.2: ; preds = %for.inc93.1
%call91.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3)
br label %for.inc93.2
for.inc93.2: ; preds = %if.then89.2, %for.inc93.1
%arrayidx86.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 3
%36 = load i32, ptr %arrayidx86.3, align 4, !tbaa !5
%cmp87.3 = icmp eq i32 %36, 0
br i1 %cmp87.3, label %if.then89.3, label %for.inc93.3
if.then89.3: ; preds = %for.inc93.2
%call91.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4)
br label %for.inc93.3
for.inc93.3: ; preds = %if.then89.3, %for.inc93.2
%arrayidx86.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 4
%37 = load i32, ptr %arrayidx86.4, align 8, !tbaa !5
%cmp87.4 = icmp eq i32 %37, 0
br i1 %cmp87.4, label %if.then89.4, label %for.inc93.4
if.then89.4: ; preds = %for.inc93.3
%call91.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5)
br label %for.inc93.4
for.inc93.4: ; preds = %if.then89.4, %for.inc93.3
%arrayidx86.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 5
%38 = load i32, ptr %arrayidx86.5, align 4, !tbaa !5
%cmp87.5 = icmp eq i32 %38, 0
br i1 %cmp87.5, label %if.then89.5, label %for.inc93.5
if.then89.5: ; preds = %for.inc93.4
%call91.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6)
br label %for.inc93.5
for.inc93.5: ; preds = %if.then89.5, %for.inc93.4
%arrayidx86.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 6
%39 = load i32, ptr %arrayidx86.6, align 16, !tbaa !5
%cmp87.6 = icmp eq i32 %39, 0
br i1 %cmp87.6, label %if.then89.6, label %for.inc93.6
if.then89.6: ; preds = %for.inc93.5
%call91.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7)
br label %for.inc93.6
for.inc93.6: ; preds = %if.then89.6, %for.inc93.5
%arrayidx86.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 7
%40 = load i32, ptr %arrayidx86.7, align 4, !tbaa !5
%cmp87.7 = icmp eq i32 %40, 0
br i1 %cmp87.7, label %if.then89.7, label %for.inc93.7
if.then89.7: ; preds = %for.inc93.6
%call91.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8)
br label %for.inc93.7
for.inc93.7: ; preds = %if.then89.7, %for.inc93.6
%arrayidx86.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 8
%41 = load i32, ptr %arrayidx86.8, align 8, !tbaa !5
%cmp87.8 = icmp eq i32 %41, 0
br i1 %cmp87.8, label %if.then89.8, label %for.inc93.8
if.then89.8: ; preds = %for.inc93.7
%call91.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9)
br label %for.inc93.8
for.inc93.8: ; preds = %if.then89.8, %for.inc93.7
%arrayidx86.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 9
%42 = load i32, ptr %arrayidx86.9, align 4, !tbaa !5
%cmp87.9 = icmp eq i32 %42, 0
br i1 %cmp87.9, label %if.then89.9, label %for.inc93.9
if.then89.9: ; preds = %for.inc93.8
%call91.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10)
br label %for.inc93.9
for.inc93.9: ; preds = %if.then89.9, %for.inc93.8
%arrayidx86.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 10
%43 = load i32, ptr %arrayidx86.10, align 16, !tbaa !5
%cmp87.10 = icmp eq i32 %43, 0
br i1 %cmp87.10, label %if.then89.10, label %for.inc93.10
if.then89.10: ; preds = %for.inc93.9
%call91.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11)
br label %for.inc93.10
for.inc93.10: ; preds = %if.then89.10, %for.inc93.9
%arrayidx86.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 11
%44 = load i32, ptr %arrayidx86.11, align 4, !tbaa !5
%cmp87.11 = icmp eq i32 %44, 0
br i1 %cmp87.11, label %if.then89.11, label %for.inc93.11
if.then89.11: ; preds = %for.inc93.10
%call91.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12)
br label %for.inc93.11
for.inc93.11: ; preds = %if.then89.11, %for.inc93.10
%arrayidx86.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 12
%45 = load i32, ptr %arrayidx86.12, align 8, !tbaa !5
%cmp87.12 = icmp eq i32 %45, 0
br i1 %cmp87.12, label %if.then89.12, label %for.inc93.12
if.then89.12: ; preds = %for.inc93.11
%call91.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 13)
br label %for.inc93.12
for.inc93.12: ; preds = %if.then89.12, %for.inc93.11
%arrayidx102 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 0
%46 = load i32, ptr %arrayidx102, align 4, !tbaa !5
%cmp103 = icmp eq i32 %46, 0
br i1 %cmp103, label %if.then105, label %for.inc109
if.then105: ; preds = %for.inc93.12
%call107 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 1)
br label %for.inc109
for.inc109: ; preds = %for.inc93.12, %if.then105
%arrayidx102.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 1
%47 = load i32, ptr %arrayidx102.1, align 16, !tbaa !5
%cmp103.1 = icmp eq i32 %47, 0
br i1 %cmp103.1, label %if.then105.1, label %for.inc109.1
if.then105.1: ; preds = %for.inc109
%call107.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 2)
br label %for.inc109.1
for.inc109.1: ; preds = %if.then105.1, %for.inc109
%arrayidx102.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 2
%48 = load i32, ptr %arrayidx102.2, align 4, !tbaa !5
%cmp103.2 = icmp eq i32 %48, 0
br i1 %cmp103.2, label %if.then105.2, label %for.inc109.2
if.then105.2: ; preds = %for.inc109.1
%call107.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 3)
br label %for.inc109.2
for.inc109.2: ; preds = %if.then105.2, %for.inc109.1
%arrayidx102.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 3
%49 = load i32, ptr %arrayidx102.3, align 8, !tbaa !5
%cmp103.3 = icmp eq i32 %49, 0
br i1 %cmp103.3, label %if.then105.3, label %for.inc109.3
if.then105.3: ; preds = %for.inc109.2
%call107.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 4)
br label %for.inc109.3
for.inc109.3: ; preds = %if.then105.3, %for.inc109.2
%arrayidx102.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 4
%50 = load i32, ptr %arrayidx102.4, align 4, !tbaa !5
%cmp103.4 = icmp eq i32 %50, 0
br i1 %cmp103.4, label %if.then105.4, label %for.inc109.4
if.then105.4: ; preds = %for.inc109.3
%call107.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 5)
br label %for.inc109.4
for.inc109.4: ; preds = %if.then105.4, %for.inc109.3
%arrayidx102.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 5
%51 = load i32, ptr %arrayidx102.5, align 16, !tbaa !5
%cmp103.5 = icmp eq i32 %51, 0
br i1 %cmp103.5, label %if.then105.5, label %for.inc109.5
if.then105.5: ; preds = %for.inc109.4
%call107.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 6)
br label %for.inc109.5
for.inc109.5: ; preds = %if.then105.5, %for.inc109.4
%arrayidx102.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 6
%52 = load i32, ptr %arrayidx102.6, align 4, !tbaa !5
%cmp103.6 = icmp eq i32 %52, 0
br i1 %cmp103.6, label %if.then105.6, label %for.inc109.6
if.then105.6: ; preds = %for.inc109.5
%call107.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 7)
br label %for.inc109.6
for.inc109.6: ; preds = %if.then105.6, %for.inc109.5
%arrayidx102.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 7
%53 = load i32, ptr %arrayidx102.7, align 8, !tbaa !5
%cmp103.7 = icmp eq i32 %53, 0
br i1 %cmp103.7, label %if.then105.7, label %for.inc109.7
if.then105.7: ; preds = %for.inc109.6
%call107.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 8)
br label %for.inc109.7
for.inc109.7: ; preds = %if.then105.7, %for.inc109.6
%arrayidx102.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 8
%54 = load i32, ptr %arrayidx102.8, align 4, !tbaa !5
%cmp103.8 = icmp eq i32 %54, 0
br i1 %cmp103.8, label %if.then105.8, label %for.inc109.8
if.then105.8: ; preds = %for.inc109.7
%call107.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 9)
br label %for.inc109.8
for.inc109.8: ; preds = %if.then105.8, %for.inc109.7
%arrayidx102.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 9
%55 = load i32, ptr %arrayidx102.9, align 16, !tbaa !5
%cmp103.9 = icmp eq i32 %55, 0
br i1 %cmp103.9, label %if.then105.9, label %for.inc109.9
if.then105.9: ; preds = %for.inc109.8
%call107.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 10)
br label %for.inc109.9
for.inc109.9: ; preds = %if.then105.9, %for.inc109.8
%arrayidx102.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 10
%56 = load i32, ptr %arrayidx102.10, align 4, !tbaa !5
%cmp103.10 = icmp eq i32 %56, 0
br i1 %cmp103.10, label %if.then105.10, label %for.inc109.10
if.then105.10: ; preds = %for.inc109.9
%call107.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 11)
br label %for.inc109.10
for.inc109.10: ; preds = %if.then105.10, %for.inc109.9
%arrayidx102.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 11
%57 = load i32, ptr %arrayidx102.11, align 8, !tbaa !5
%cmp103.11 = icmp eq i32 %57, 0
br i1 %cmp103.11, label %if.then105.11, label %for.inc109.11
if.then105.11: ; preds = %for.inc109.10
%call107.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 12)
br label %for.inc109.11
for.inc109.11: ; preds = %if.then105.11, %for.inc109.10
%arrayidx102.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 12
%58 = load i32, ptr %arrayidx102.12, align 4, !tbaa !5
%cmp103.12 = icmp eq i32 %58, 0
br i1 %cmp103.12, label %if.then105.12, label %for.inc109.12
if.then105.12: ; preds = %for.inc109.11
%call107.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 13)
br label %for.inc109.12
for.inc109.12: ; preds = %if.then105.12, %for.inc109.11
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %z) #4
call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %cards) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %j) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
|
#include <stdio.h>
int main(void) {
int i,j,p,n,num,c[4][13]={0};
char s[2],ref[]="SHCD";
scanf("%d",&n);
while (n--){
scanf("%s %d",&s,&num);
if (s[0]=='S') p=0;
if (s[0]=='H') p=1;
if (s[0]=='C') p=2;
if (s[0]=='D') p=3;
c[p][num-1]=1;
}
for (i=0;i<4;i++){
for (j=0;j<13;j++){
if (c[i][j]==0){
printf("%c %d\n",ref[i],j+1);
}
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215081/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215081/source.c"
target datalayout = "e-m:e-p270: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.ref = private unnamed_addr constant [5 x i8] c"SHCD\00", align 1
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [6 x i8] c"%s %d\00", align 1
@.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
%num = alloca i32, align 4
%c = alloca [4 x [13 x i32]], align 16
%s = alloca [2 x i8], align 1
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #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 2, ptr nonnull %s) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%dec51 = add nsw i32 %0, -1
store i32 %dec51, ptr %n, align 4, !tbaa !5
%tobool.not52 = icmp eq i32 %0, 0
br i1 %tobool.not52, label %for.cond26.preheader.preheader, label %while.body
while.body: ; preds = %entry, %while.body
%p.053 = phi i32 [ %p.4, %while.body ], [ undef, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s, ptr noundef nonnull %num)
%1 = load i8, ptr %s, align 1, !tbaa !9
%cmp = icmp eq i8 %1, 83
%spec.select = select i1 %cmp, i32 0, i32 %p.053
%cmp5 = icmp eq i8 %1, 72
%p.2 = select i1 %cmp5, i32 1, i32 %spec.select
%cmp11 = icmp eq i8 %1, 67
%p.3 = select i1 %cmp11, i32 2, i32 %p.2
%cmp17 = icmp eq i8 %1, 68
%p.4 = select i1 %cmp17, i32 3, i32 %p.3
%idxprom = sext i32 %p.4 to i64
%2 = load i32, ptr %num, align 4, !tbaa !5
%sub = add nsw i32 %2, -1
%idxprom22 = sext i32 %sub to i64
%arrayidx23 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 %idxprom, i64 %idxprom22
store i32 1, ptr %arrayidx23, align 4, !tbaa !5
%3 = load i32, ptr %n, align 4, !tbaa !5
%dec = add nsw i32 %3, -1
store i32 %dec, ptr %n, align 4, !tbaa !5
%tobool.not = icmp eq i32 %3, 0
br i1 %tobool.not, label %for.cond26.preheader.preheader, label %while.body, !llvm.loop !10
for.cond26.preheader.preheader: ; preds = %while.body, %entry
br label %for.cond26.preheader
for.cond26.preheader: ; preds = %for.cond26.preheader.preheader, %for.inc.12
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc.12 ], [ 0, %for.cond26.preheader.preheader ]
%arrayidx38 = getelementptr inbounds [5 x i8], ptr @__const.main.ref, i64 0, i64 %indvars.iv
%arrayidx33 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 %indvars.iv, i64 0
%4 = load i32, ptr %arrayidx33, align 4, !tbaa !5
%cmp34 = icmp eq i32 %4, 0
br i1 %cmp34, label %if.then36, label %for.inc
if.then36: ; preds = %for.cond26.preheader
%5 = load i8, ptr %arrayidx38, align 1, !tbaa !9
%conv39 = sext i8 %5 to i32
%call40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv39, i32 noundef 1)
br label %for.inc
for.inc: ; preds = %for.cond26.preheader, %if.then36
%arrayidx33.1 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 %indvars.iv, i64 1
%6 = load i32, ptr %arrayidx33.1, align 4, !tbaa !5
%cmp34.1 = icmp eq i32 %6, 0
br i1 %cmp34.1, label %if.then36.1, label %for.inc.1
if.then36.1: ; preds = %for.inc
%7 = load i8, ptr %arrayidx38, align 1, !tbaa !9
%conv39.1 = sext i8 %7 to i32
%call40.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv39.1, i32 noundef 2)
br label %for.inc.1
for.inc.1: ; preds = %if.then36.1, %for.inc
%arrayidx33.2 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 %indvars.iv, i64 2
%8 = load i32, ptr %arrayidx33.2, align 4, !tbaa !5
%cmp34.2 = icmp eq i32 %8, 0
br i1 %cmp34.2, label %if.then36.2, label %for.inc.2
if.then36.2: ; preds = %for.inc.1
%9 = load i8, ptr %arrayidx38, align 1, !tbaa !9
%conv39.2 = sext i8 %9 to i32
%call40.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv39.2, i32 noundef 3)
br label %for.inc.2
for.inc.2: ; preds = %if.then36.2, %for.inc.1
%arrayidx33.3 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 %indvars.iv, i64 3
%10 = load i32, ptr %arrayidx33.3, align 4, !tbaa !5
%cmp34.3 = icmp eq i32 %10, 0
br i1 %cmp34.3, label %if.then36.3, label %for.inc.3
if.then36.3: ; preds = %for.inc.2
%11 = load i8, ptr %arrayidx38, align 1, !tbaa !9
%conv39.3 = sext i8 %11 to i32
%call40.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv39.3, i32 noundef 4)
br label %for.inc.3
for.inc.3: ; preds = %if.then36.3, %for.inc.2
%arrayidx33.4 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 %indvars.iv, i64 4
%12 = load i32, ptr %arrayidx33.4, align 4, !tbaa !5
%cmp34.4 = icmp eq i32 %12, 0
br i1 %cmp34.4, label %if.then36.4, label %for.inc.4
if.then36.4: ; preds = %for.inc.3
%13 = load i8, ptr %arrayidx38, align 1, !tbaa !9
%conv39.4 = sext i8 %13 to i32
%call40.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv39.4, i32 noundef 5)
br label %for.inc.4
for.inc.4: ; preds = %if.then36.4, %for.inc.3
%arrayidx33.5 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 %indvars.iv, i64 5
%14 = load i32, ptr %arrayidx33.5, align 4, !tbaa !5
%cmp34.5 = icmp eq i32 %14, 0
br i1 %cmp34.5, label %if.then36.5, label %for.inc.5
if.then36.5: ; preds = %for.inc.4
%15 = load i8, ptr %arrayidx38, align 1, !tbaa !9
%conv39.5 = sext i8 %15 to i32
%call40.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv39.5, i32 noundef 6)
br label %for.inc.5
for.inc.5: ; preds = %if.then36.5, %for.inc.4
%arrayidx33.6 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 %indvars.iv, i64 6
%16 = load i32, ptr %arrayidx33.6, align 4, !tbaa !5
%cmp34.6 = icmp eq i32 %16, 0
br i1 %cmp34.6, label %if.then36.6, label %for.inc.6
if.then36.6: ; preds = %for.inc.5
%17 = load i8, ptr %arrayidx38, align 1, !tbaa !9
%conv39.6 = sext i8 %17 to i32
%call40.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv39.6, i32 noundef 7)
br label %for.inc.6
for.inc.6: ; preds = %if.then36.6, %for.inc.5
%arrayidx33.7 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 %indvars.iv, i64 7
%18 = load i32, ptr %arrayidx33.7, align 4, !tbaa !5
%cmp34.7 = icmp eq i32 %18, 0
br i1 %cmp34.7, label %if.then36.7, label %for.inc.7
if.then36.7: ; preds = %for.inc.6
%19 = load i8, ptr %arrayidx38, align 1, !tbaa !9
%conv39.7 = sext i8 %19 to i32
%call40.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv39.7, i32 noundef 8)
br label %for.inc.7
for.inc.7: ; preds = %if.then36.7, %for.inc.6
%arrayidx33.8 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 %indvars.iv, i64 8
%20 = load i32, ptr %arrayidx33.8, align 4, !tbaa !5
%cmp34.8 = icmp eq i32 %20, 0
br i1 %cmp34.8, label %if.then36.8, label %for.inc.8
if.then36.8: ; preds = %for.inc.7
%21 = load i8, ptr %arrayidx38, align 1, !tbaa !9
%conv39.8 = sext i8 %21 to i32
%call40.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv39.8, i32 noundef 9)
br label %for.inc.8
for.inc.8: ; preds = %if.then36.8, %for.inc.7
%arrayidx33.9 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 %indvars.iv, i64 9
%22 = load i32, ptr %arrayidx33.9, align 4, !tbaa !5
%cmp34.9 = icmp eq i32 %22, 0
br i1 %cmp34.9, label %if.then36.9, label %for.inc.9
if.then36.9: ; preds = %for.inc.8
%23 = load i8, ptr %arrayidx38, align 1, !tbaa !9
%conv39.9 = sext i8 %23 to i32
%call40.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv39.9, i32 noundef 10)
br label %for.inc.9
for.inc.9: ; preds = %if.then36.9, %for.inc.8
%arrayidx33.10 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 %indvars.iv, i64 10
%24 = load i32, ptr %arrayidx33.10, align 4, !tbaa !5
%cmp34.10 = icmp eq i32 %24, 0
br i1 %cmp34.10, label %if.then36.10, label %for.inc.10
if.then36.10: ; preds = %for.inc.9
%25 = load i8, ptr %arrayidx38, align 1, !tbaa !9
%conv39.10 = sext i8 %25 to i32
%call40.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv39.10, i32 noundef 11)
br label %for.inc.10
for.inc.10: ; preds = %if.then36.10, %for.inc.9
%arrayidx33.11 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 %indvars.iv, i64 11
%26 = load i32, ptr %arrayidx33.11, align 4, !tbaa !5
%cmp34.11 = icmp eq i32 %26, 0
br i1 %cmp34.11, label %if.then36.11, label %for.inc.11
if.then36.11: ; preds = %for.inc.10
%27 = load i8, ptr %arrayidx38, align 1, !tbaa !9
%conv39.11 = sext i8 %27 to i32
%call40.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv39.11, i32 noundef 12)
br label %for.inc.11
for.inc.11: ; preds = %if.then36.11, %for.inc.10
%arrayidx33.12 = getelementptr inbounds [4 x [13 x i32]], ptr %c, i64 0, i64 %indvars.iv, i64 12
%28 = load i32, ptr %arrayidx33.12, align 4, !tbaa !5
%cmp34.12 = icmp eq i32 %28, 0
br i1 %cmp34.12, label %if.then36.12, label %for.inc.12
if.then36.12: ; preds = %for.inc.11
%29 = load i8, ptr %arrayidx38, align 1, !tbaa !9
%conv39.12 = sext i8 %29 to i32
%call40.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv39.12, i32 noundef 13)
br label %for.inc.12
for.inc.12: ; preds = %if.then36.12, %for.inc.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.end44, label %for.cond26.preheader, !llvm.loop !12
for.end44: ; preds = %for.inc.12
call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %s) #4
call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %c) #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: 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>
#define EXIST 1
#define LOST 0
int main(void)
{
int i, j, n, rank;
char suit;
int cards[4][13];
char s[4] = { 'S', 'H', 'C', 'D'};
/* 初期化 */
for ( i=0; i<4; ++i)
for ( j=0; j<13; ++j)
cards[i][j] = LOST;
scanf("%d\n", &n);
for ( i=0; i<n; ++i){
scanf("%c %d\n", &suit, &rank);
switch (suit) {
case 'S':
cards[0][rank-1] = 1;
break;
case 'H':
cards[1][rank-1] = 1;
break;
case 'C':
cards[2][rank-1] = 1;
break;
case 'D':
cards[3][rank-1] = 1;
break;
}
}
/* 書き出し */
for ( i=0; i<4; ++i)
for ( j=0; j<13; ++j)
if ( cards[i][j] == LOST)
printf("%c %d\n", s[i], j+1);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215124/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215124/source.c"
target datalayout = "e-m:e-p270: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 [4 x i8] c"SHCD", align 1
@.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
@.str.1 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
%rank = alloca i32, align 4
%suit = alloca i8, align 1
%cards = 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 %rank) #4
call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %suit) #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), !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
%cmp1074 = icmp sgt i32 %0, 0
br i1 %cmp1074, label %for.body11, label %for.cond38.preheader.preheader
for.body11: ; preds = %entry, %for.inc31
%i.175 = phi i32 [ %inc32, %for.inc31 ], [ 0, %entry ]
%call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %suit, ptr noundef nonnull %rank)
%1 = load i8, ptr %suit, align 1, !tbaa !9
%conv = sext i8 %1 to i32
switch i32 %conv, label %for.inc31 [
i32 83, label %sw.bb
i32 72, label %sw.bb16
i32 67, label %sw.bb21
i32 68, label %sw.bb26
]
sw.bb: ; preds = %for.body11
%2 = load i32, ptr %rank, align 4, !tbaa !5
%sub = add nsw i32 %2, -1
%idxprom14 = sext i32 %sub to i64
%arrayidx15 = getelementptr inbounds [13 x i32], ptr %cards, i64 0, i64 %idxprom14
br label %for.inc31.sink.split
sw.bb16: ; preds = %for.body11
%3 = load i32, ptr %rank, align 4, !tbaa !5
%sub18 = add nsw i32 %3, -1
%idxprom19 = sext i32 %sub18 to i64
%arrayidx20 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 %idxprom19
br label %for.inc31.sink.split
sw.bb21: ; preds = %for.body11
%4 = load i32, ptr %rank, align 4, !tbaa !5
%sub23 = add nsw i32 %4, -1
%idxprom24 = sext i32 %sub23 to i64
%arrayidx25 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 %idxprom24
br label %for.inc31.sink.split
sw.bb26: ; preds = %for.body11
%5 = load i32, ptr %rank, 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.inc31.sink.split
for.inc31.sink.split: ; preds = %sw.bb26, %sw.bb21, %sw.bb16, %sw.bb
%arrayidx15.sink = phi ptr [ %arrayidx15, %sw.bb ], [ %arrayidx20, %sw.bb16 ], [ %arrayidx25, %sw.bb21 ], [ %arrayidx30, %sw.bb26 ]
store i32 1, ptr %arrayidx15.sink, align 4, !tbaa !5
br label %for.inc31
for.inc31: ; preds = %for.inc31.sink.split, %for.body11
%inc32 = add nuw nsw i32 %i.175, 1
%6 = load i32, ptr %n, align 4, !tbaa !5
%cmp10 = icmp slt i32 %inc32, %6
br i1 %cmp10, label %for.body11, label %for.cond38.preheader.preheader, !llvm.loop !10
for.cond38.preheader.preheader: ; preds = %for.inc31, %entry
br label %for.cond38.preheader
for.cond38.preheader: ; preds = %for.cond38.preheader.preheader, %for.inc52.12
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc52.12 ], [ 0, %for.cond38.preheader.preheader ]
%arrayidx49 = getelementptr inbounds [4 x i8], ptr @__const.main.s, i64 0, i64 %indvars.iv
%arrayidx45 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 0
%7 = load i32, ptr %arrayidx45, align 4, !tbaa !5
%cmp46 = icmp eq i32 %7, 0
br i1 %cmp46, label %if.then, label %for.inc52
if.then: ; preds = %for.cond38.preheader
%8 = load i8, ptr %arrayidx49, align 1, !tbaa !9
%conv50 = sext i8 %8 to i32
%call51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv50, i32 noundef 1)
br label %for.inc52
for.inc52: ; preds = %for.cond38.preheader, %if.then
%arrayidx45.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1
%9 = load i32, ptr %arrayidx45.1, align 4, !tbaa !5
%cmp46.1 = icmp eq i32 %9, 0
br i1 %cmp46.1, label %if.then.1, label %for.inc52.1
if.then.1: ; preds = %for.inc52
%10 = load i8, ptr %arrayidx49, align 1, !tbaa !9
%conv50.1 = sext i8 %10 to i32
%call51.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv50.1, i32 noundef 2)
br label %for.inc52.1
for.inc52.1: ; preds = %if.then.1, %for.inc52
%arrayidx45.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2
%11 = load i32, ptr %arrayidx45.2, align 4, !tbaa !5
%cmp46.2 = icmp eq i32 %11, 0
br i1 %cmp46.2, label %if.then.2, label %for.inc52.2
if.then.2: ; preds = %for.inc52.1
%12 = load i8, ptr %arrayidx49, align 1, !tbaa !9
%conv50.2 = sext i8 %12 to i32
%call51.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv50.2, i32 noundef 3)
br label %for.inc52.2
for.inc52.2: ; preds = %if.then.2, %for.inc52.1
%arrayidx45.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3
%13 = load i32, ptr %arrayidx45.3, align 4, !tbaa !5
%cmp46.3 = icmp eq i32 %13, 0
br i1 %cmp46.3, label %if.then.3, label %for.inc52.3
if.then.3: ; preds = %for.inc52.2
%14 = load i8, ptr %arrayidx49, align 1, !tbaa !9
%conv50.3 = sext i8 %14 to i32
%call51.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv50.3, i32 noundef 4)
br label %for.inc52.3
for.inc52.3: ; preds = %if.then.3, %for.inc52.2
%arrayidx45.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4
%15 = load i32, ptr %arrayidx45.4, align 4, !tbaa !5
%cmp46.4 = icmp eq i32 %15, 0
br i1 %cmp46.4, label %if.then.4, label %for.inc52.4
if.then.4: ; preds = %for.inc52.3
%16 = load i8, ptr %arrayidx49, align 1, !tbaa !9
%conv50.4 = sext i8 %16 to i32
%call51.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv50.4, i32 noundef 5)
br label %for.inc52.4
for.inc52.4: ; preds = %if.then.4, %for.inc52.3
%arrayidx45.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5
%17 = load i32, ptr %arrayidx45.5, align 4, !tbaa !5
%cmp46.5 = icmp eq i32 %17, 0
br i1 %cmp46.5, label %if.then.5, label %for.inc52.5
if.then.5: ; preds = %for.inc52.4
%18 = load i8, ptr %arrayidx49, align 1, !tbaa !9
%conv50.5 = sext i8 %18 to i32
%call51.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv50.5, i32 noundef 6)
br label %for.inc52.5
for.inc52.5: ; preds = %if.then.5, %for.inc52.4
%arrayidx45.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6
%19 = load i32, ptr %arrayidx45.6, align 4, !tbaa !5
%cmp46.6 = icmp eq i32 %19, 0
br i1 %cmp46.6, label %if.then.6, label %for.inc52.6
if.then.6: ; preds = %for.inc52.5
%20 = load i8, ptr %arrayidx49, align 1, !tbaa !9
%conv50.6 = sext i8 %20 to i32
%call51.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv50.6, i32 noundef 7)
br label %for.inc52.6
for.inc52.6: ; preds = %if.then.6, %for.inc52.5
%arrayidx45.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7
%21 = load i32, ptr %arrayidx45.7, align 4, !tbaa !5
%cmp46.7 = icmp eq i32 %21, 0
br i1 %cmp46.7, label %if.then.7, label %for.inc52.7
if.then.7: ; preds = %for.inc52.6
%22 = load i8, ptr %arrayidx49, align 1, !tbaa !9
%conv50.7 = sext i8 %22 to i32
%call51.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv50.7, i32 noundef 8)
br label %for.inc52.7
for.inc52.7: ; preds = %if.then.7, %for.inc52.6
%arrayidx45.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8
%23 = load i32, ptr %arrayidx45.8, align 4, !tbaa !5
%cmp46.8 = icmp eq i32 %23, 0
br i1 %cmp46.8, label %if.then.8, label %for.inc52.8
if.then.8: ; preds = %for.inc52.7
%24 = load i8, ptr %arrayidx49, align 1, !tbaa !9
%conv50.8 = sext i8 %24 to i32
%call51.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv50.8, i32 noundef 9)
br label %for.inc52.8
for.inc52.8: ; preds = %if.then.8, %for.inc52.7
%arrayidx45.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9
%25 = load i32, ptr %arrayidx45.9, align 4, !tbaa !5
%cmp46.9 = icmp eq i32 %25, 0
br i1 %cmp46.9, label %if.then.9, label %for.inc52.9
if.then.9: ; preds = %for.inc52.8
%26 = load i8, ptr %arrayidx49, align 1, !tbaa !9
%conv50.9 = sext i8 %26 to i32
%call51.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv50.9, i32 noundef 10)
br label %for.inc52.9
for.inc52.9: ; preds = %if.then.9, %for.inc52.8
%arrayidx45.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10
%27 = load i32, ptr %arrayidx45.10, align 4, !tbaa !5
%cmp46.10 = icmp eq i32 %27, 0
br i1 %cmp46.10, label %if.then.10, label %for.inc52.10
if.then.10: ; preds = %for.inc52.9
%28 = load i8, ptr %arrayidx49, align 1, !tbaa !9
%conv50.10 = sext i8 %28 to i32
%call51.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv50.10, i32 noundef 11)
br label %for.inc52.10
for.inc52.10: ; preds = %if.then.10, %for.inc52.9
%arrayidx45.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11
%29 = load i32, ptr %arrayidx45.11, align 4, !tbaa !5
%cmp46.11 = icmp eq i32 %29, 0
br i1 %cmp46.11, label %if.then.11, label %for.inc52.11
if.then.11: ; preds = %for.inc52.10
%30 = load i8, ptr %arrayidx49, align 1, !tbaa !9
%conv50.11 = sext i8 %30 to i32
%call51.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv50.11, i32 noundef 12)
br label %for.inc52.11
for.inc52.11: ; preds = %if.then.11, %for.inc52.10
%arrayidx45.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12
%31 = load i32, ptr %arrayidx45.12, align 4, !tbaa !5
%cmp46.12 = icmp eq i32 %31, 0
br i1 %cmp46.12, label %if.then.12, label %for.inc52.12
if.then.12: ; preds = %for.inc52.11
%32 = load i8, ptr %arrayidx49, align 1, !tbaa !9
%conv50.12 = sext i8 %32 to i32
%call51.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv50.12, i32 noundef 13)
br label %for.inc52.12
for.inc52.12: ; preds = %if.then.12, %for.inc52.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.end57, label %for.cond38.preheader, !llvm.loop !12
for.end57: ; preds = %for.inc52.12
call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %cards) #4
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %suit) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %rank) #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 i,j,n,m,cn;
char c,s[5]={'S','H','C','D','\0'};
static int card[4][13];
scanf("%d\n",&n);
for(i=0;i<n;i++){
scanf("%c %d\n",&c,&m);
for(j=0;j<4;j++)
if(s[j]==c)
card[j][m-1]=1;
}
for(i=0;i<4;i++)
for(j=0;j<13;j++)
if(card[i][j]==0)
printf("%c %d\n",s[i],j+1);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215175/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215175/source.c"
target datalayout = "e-m:e-p270: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 [5 x i8] c"SHCD\00", align 1
@main.card = internal unnamed_addr global [4 x [13 x i32]] zeroinitializer, align 16
@.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
@.str.1 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
%m = alloca i32, align 4
%c = 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 %m) #3
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 %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp54 = icmp sgt i32 %0, 0
br i1 %cmp54, label %for.body, label %for.cond19.preheader.preheader
for.body: ; preds = %entry, %for.inc.3
%i.055 = phi i32 [ %inc13, %for.inc.3 ], [ 0, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %c, ptr noundef nonnull %m)
%1 = load i8, ptr %c, align 1, !tbaa !9
%2 = load i32, ptr %m, align 4
%sub = add nsw i32 %2, -1
%idxprom10 = sext i32 %sub to i64
switch i8 %1, label %for.inc.3 [
i8 83, label %for.inc.3.sink.split
i8 72, label %if.then.1
i8 67, label %if.then.2
i8 68, label %if.then.3
]
if.then.1: ; preds = %for.body
br label %for.inc.3.sink.split
if.then.2: ; preds = %for.body
br label %for.inc.3.sink.split
if.then.3: ; preds = %for.body
br label %for.inc.3.sink.split
for.inc.3.sink.split: ; preds = %for.body, %if.then.3, %if.then.2, %if.then.1
%.sink = phi i64 [ 1, %if.then.1 ], [ 2, %if.then.2 ], [ 3, %if.then.3 ], [ 0, %for.body ]
%arrayidx11.1 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %.sink, i64 %idxprom10
store i32 1, ptr %arrayidx11.1, align 4, !tbaa !5
br label %for.inc.3
for.inc.3: ; preds = %for.inc.3.sink.split, %for.body
%inc13 = add nuw nsw i32 %i.055, 1
%3 = load i32, ptr %n, align 4, !tbaa !5
%cmp = icmp slt i32 %inc13, %3
br i1 %cmp, label %for.body, label %for.cond19.preheader.preheader, !llvm.loop !10
for.cond19.preheader.preheader: ; preds = %for.inc.3, %entry
br label %for.cond19.preheader
for.cond19.preheader: ; preds = %for.cond19.preheader.preheader, %for.inc35.12
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc35.12 ], [ 0, %for.cond19.preheader.preheader ]
%arrayidx31 = getelementptr inbounds [5 x i8], ptr @__const.main.s, i64 0, i64 %indvars.iv
%arrayidx26 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 0
%4 = load i32, ptr %arrayidx26, align 4, !tbaa !5
%cmp27 = icmp eq i32 %4, 0
br i1 %cmp27, label %if.then29, label %for.inc35
if.then29: ; preds = %for.cond19.preheader
%5 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32 = sext i8 %5 to i32
%call33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32, i32 noundef 1)
br label %for.inc35
for.inc35: ; preds = %for.cond19.preheader, %if.then29
%arrayidx26.1 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 1
%6 = load i32, ptr %arrayidx26.1, align 4, !tbaa !5
%cmp27.1 = icmp eq i32 %6, 0
br i1 %cmp27.1, label %if.then29.1, label %for.inc35.1
if.then29.1: ; preds = %for.inc35
%7 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.1 = sext i8 %7 to i32
%call33.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.1, i32 noundef 2)
br label %for.inc35.1
for.inc35.1: ; preds = %if.then29.1, %for.inc35
%arrayidx26.2 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 2
%8 = load i32, ptr %arrayidx26.2, align 4, !tbaa !5
%cmp27.2 = icmp eq i32 %8, 0
br i1 %cmp27.2, label %if.then29.2, label %for.inc35.2
if.then29.2: ; preds = %for.inc35.1
%9 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.2 = sext i8 %9 to i32
%call33.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.2, i32 noundef 3)
br label %for.inc35.2
for.inc35.2: ; preds = %if.then29.2, %for.inc35.1
%arrayidx26.3 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 3
%10 = load i32, ptr %arrayidx26.3, align 4, !tbaa !5
%cmp27.3 = icmp eq i32 %10, 0
br i1 %cmp27.3, label %if.then29.3, label %for.inc35.3
if.then29.3: ; preds = %for.inc35.2
%11 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.3 = sext i8 %11 to i32
%call33.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.3, i32 noundef 4)
br label %for.inc35.3
for.inc35.3: ; preds = %if.then29.3, %for.inc35.2
%arrayidx26.4 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 4
%12 = load i32, ptr %arrayidx26.4, align 4, !tbaa !5
%cmp27.4 = icmp eq i32 %12, 0
br i1 %cmp27.4, label %if.then29.4, label %for.inc35.4
if.then29.4: ; preds = %for.inc35.3
%13 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.4 = sext i8 %13 to i32
%call33.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.4, i32 noundef 5)
br label %for.inc35.4
for.inc35.4: ; preds = %if.then29.4, %for.inc35.3
%arrayidx26.5 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 5
%14 = load i32, ptr %arrayidx26.5, align 4, !tbaa !5
%cmp27.5 = icmp eq i32 %14, 0
br i1 %cmp27.5, label %if.then29.5, label %for.inc35.5
if.then29.5: ; preds = %for.inc35.4
%15 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.5 = sext i8 %15 to i32
%call33.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.5, i32 noundef 6)
br label %for.inc35.5
for.inc35.5: ; preds = %if.then29.5, %for.inc35.4
%arrayidx26.6 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 6
%16 = load i32, ptr %arrayidx26.6, align 4, !tbaa !5
%cmp27.6 = icmp eq i32 %16, 0
br i1 %cmp27.6, label %if.then29.6, label %for.inc35.6
if.then29.6: ; preds = %for.inc35.5
%17 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.6 = sext i8 %17 to i32
%call33.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.6, i32 noundef 7)
br label %for.inc35.6
for.inc35.6: ; preds = %if.then29.6, %for.inc35.5
%arrayidx26.7 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 7
%18 = load i32, ptr %arrayidx26.7, align 4, !tbaa !5
%cmp27.7 = icmp eq i32 %18, 0
br i1 %cmp27.7, label %if.then29.7, label %for.inc35.7
if.then29.7: ; preds = %for.inc35.6
%19 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.7 = sext i8 %19 to i32
%call33.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.7, i32 noundef 8)
br label %for.inc35.7
for.inc35.7: ; preds = %if.then29.7, %for.inc35.6
%arrayidx26.8 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 8
%20 = load i32, ptr %arrayidx26.8, align 4, !tbaa !5
%cmp27.8 = icmp eq i32 %20, 0
br i1 %cmp27.8, label %if.then29.8, label %for.inc35.8
if.then29.8: ; preds = %for.inc35.7
%21 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.8 = sext i8 %21 to i32
%call33.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.8, i32 noundef 9)
br label %for.inc35.8
for.inc35.8: ; preds = %if.then29.8, %for.inc35.7
%arrayidx26.9 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 9
%22 = load i32, ptr %arrayidx26.9, align 4, !tbaa !5
%cmp27.9 = icmp eq i32 %22, 0
br i1 %cmp27.9, label %if.then29.9, label %for.inc35.9
if.then29.9: ; preds = %for.inc35.8
%23 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.9 = sext i8 %23 to i32
%call33.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.9, i32 noundef 10)
br label %for.inc35.9
for.inc35.9: ; preds = %if.then29.9, %for.inc35.8
%arrayidx26.10 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 10
%24 = load i32, ptr %arrayidx26.10, align 4, !tbaa !5
%cmp27.10 = icmp eq i32 %24, 0
br i1 %cmp27.10, label %if.then29.10, label %for.inc35.10
if.then29.10: ; preds = %for.inc35.9
%25 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.10 = sext i8 %25 to i32
%call33.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.10, i32 noundef 11)
br label %for.inc35.10
for.inc35.10: ; preds = %if.then29.10, %for.inc35.9
%arrayidx26.11 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 11
%26 = load i32, ptr %arrayidx26.11, align 4, !tbaa !5
%cmp27.11 = icmp eq i32 %26, 0
br i1 %cmp27.11, label %if.then29.11, label %for.inc35.11
if.then29.11: ; preds = %for.inc35.10
%27 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.11 = sext i8 %27 to i32
%call33.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.11, i32 noundef 12)
br label %for.inc35.11
for.inc35.11: ; preds = %if.then29.11, %for.inc35.10
%arrayidx26.12 = getelementptr inbounds [4 x [13 x i32]], ptr @main.card, i64 0, i64 %indvars.iv, i64 12
%28 = load i32, ptr %arrayidx26.12, align 4, !tbaa !5
%cmp27.12 = icmp eq i32 %28, 0
br i1 %cmp27.12, label %if.then29.12, label %for.inc35.12
if.then29.12: ; preds = %for.inc35.11
%29 = load i8, ptr %arrayidx31, align 1, !tbaa !9
%conv32.12 = sext i8 %29 to i32
%call33.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv32.12, i32 noundef 13)
br label %for.inc35.12
for.inc35.12: ; preds = %if.then29.12, %for.inc35.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.cond19.preheader, !llvm.loop !12
for.end40: ; preds = %for.inc35.12
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
|
#include <stdio.h>
int main(void){
int card[4][14] ;
int n , no , i , j ;
char e , d ;
for(i = 0 ; i < 4 ; i++){
for(j = 0 ; j < 14 ; j++){
card[i][j] = 0;
}
}
scanf("%d" , &n);
for(i = 0 ; i < n ; i++){
scanf("%c" , &d);
scanf("%c %d" , &e , &no);
if(e == 'S'){
card[0][no] = 1;
}
else if(e == 'H'){
card[1][no] = 1;
}
else if(e == 'C'){
card[2][no] = 1;
}
else if(e == 'D'){
card[3][no] = 1;
}
}
for(j = 1 ; j < 14 ; j++){
if(card[0][j] != 1){
printf("S %d\n" , j);
}
}
for(j = 1 ; j < 14 ; j++){
if(card[1][j] != 1){
printf("H %d\n" , j);
}
}
for(j = 1 ; j < 14 ; j++){
if(card[2][j] != 1){
printf("C %d\n" , j);
}
}
for(j = 1 ; j < 14 ; j++){
if(card[3][j] != 1){
printf("D %d\n" , j);
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215225/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215225/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:
%card = alloca [4 x [14 x i32]], align 16
%n = alloca i32, align 4
%no = alloca i32, align 4
%e = alloca i8, align 1
%d = alloca i8, align 1
call void @llvm.lifetime.start.p0(i64 224, 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 %no) #4
call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %e) #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) %card, i8 0, i64 224, 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
%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 %card, 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 %e, ptr noundef nonnull %no)
%2 = load i8, ptr %e, 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 %no, align 4, !tbaa !5
%idxprom17 = sext i32 %3 to i64
%arrayidx18 = getelementptr inbounds [14 x i32], ptr %card, i64 0, i64 %idxprom17
br label %for.inc45.sink.split
if.then22: ; preds = %for.body11
%4 = load i32, ptr %no, align 4, !tbaa !5
%idxprom24 = sext i32 %4 to i64
%arrayidx25 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 %idxprom24
br label %for.inc45.sink.split
if.then30: ; preds = %for.body11
%5 = load i32, ptr %no, align 4, !tbaa !5
%idxprom32 = sext i32 %5 to i64
%arrayidx33 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 %idxprom32
br label %for.inc45.sink.split
if.then38: ; preds = %for.body11
%6 = load i32, ptr %no, align 4, !tbaa !5
%idxprom40 = sext i32 %6 to i64
%arrayidx41 = getelementptr inbounds [4 x [14 x i32]], ptr %card, 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 %n, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %card, 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 %e) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %no) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4
call void @llvm.lifetime.end.p0(i64 224, 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"}
|
#include<stdio.h>
int main()
{
int t[4][14];
int n, i,j,c;
char m, d;
for(i=0; i < 4; i++){
for(j=0; j < 14; j++){
t[i][j]=0;
}
}
scanf("%d", &c);
for(i = 0; i < c; i++){
scanf("%c", &d);
scanf("%c %d", &m, &n);
if(m == 'S'){
t[0][n] = 1;
}
else if(m == 'H'){
t[1][n] = 1;
}
else if(m == 'C'){
t[2][n] = 1;
}
else if(m == 'D'){
t[3][n] = 1;
}
}
for(j=1; j < 14; j++){
if(t[0][j] != 1){
printf("S %d\n", j);
}
}
for(j=1; j < 14; j++){
if(t[1][j] != 1){
printf("H %d\n", j);
}
}
for(j=1; j < 14; j++){
if(t[2][j] != 1){
printf("C %d\n", j);
}
}
for(j=1; j < 14; j++){
if(t[3][j] != 1){
printf("D %d\n", j);
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215276/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215276/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:
%t = 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 %t) #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) %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t, 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 %t) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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,h,k,numb,cards[4][13];
for(i=0;i<4;i++){
for(h=0;h<13;h++){
cards[i][h]=0;
}
}
char kind;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%c",&kind);
scanf("%c %d",&kind,&numb);
if(kind=='S')k=0;
if(kind=='H')k=1;
if(kind=='C')k=2;
if(kind=='D')k=3;
cards[k][numb-1]=1;
}
for(i=0;i<4;i++){
for(h=0;h<13;h++){
if(cards[i][h]==0){
if(i==0)printf("S");
if(i==1)printf("H");
if(i==2)printf("C");
if(i==3)printf("D");
printf(" %d\n",h+1);
}
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215319/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215319/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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.7 = private unnamed_addr constant [5 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
%numb = alloca i32, align 4
%cards = alloca [4 x [13 x i32]], align 16
%kind = alloca i8, align 1
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %numb) #5
call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %cards) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %cards, i8 0, i64 208, i1 false), !tbaa !5
call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %kind) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp10103 = icmp sgt i32 %0, 0
br i1 %cmp10103, label %for.body11, label %for.cond42.preheader.preheader
for.body11: ; preds = %entry, %for.body11
%k.0105 = phi i32 [ %k.4, %for.body11 ], [ undef, %entry ]
%i.1104 = phi i32 [ %inc36, %for.body11 ], [ 0, %entry ]
%call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %kind)
%call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %kind, ptr noundef nonnull %numb)
%1 = load i8, ptr %kind, align 1, !tbaa !9
%cmp14 = icmp eq i8 %1, 83
%spec.select = select i1 %cmp14, i32 0, i32 %k.0105
%cmp17 = icmp eq i8 %1, 72
%k.2 = select i1 %cmp17, i32 1, i32 %spec.select
%cmp22 = icmp eq i8 %1, 67
%k.3 = select i1 %cmp22, i32 2, i32 %k.2
%cmp27 = icmp eq i8 %1, 68
%k.4 = select i1 %cmp27, i32 3, i32 %k.3
%idxprom31 = sext i32 %k.4 to i64
%2 = load i32, ptr %numb, align 4, !tbaa !5
%sub = add nsw i32 %2, -1
%idxprom33 = sext i32 %sub to i64
%arrayidx34 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %idxprom31, i64 %idxprom33
store i32 1, ptr %arrayidx34, align 4, !tbaa !5
%inc36 = add nuw nsw i32 %i.1104, 1
%3 = load i32, ptr %n, align 4, !tbaa !5
%cmp10 = icmp slt i32 %inc36, %3
br i1 %cmp10, label %for.body11, label %for.cond42.preheader.preheader, !llvm.loop !10
for.cond42.preheader.preheader: ; preds = %for.body11, %entry
br label %for.cond42.preheader
for.cond42.preheader: ; preds = %for.cond42.preheader.preheader, %for.inc78
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc78 ], [ 0, %for.cond42.preheader.preheader ]
%4 = trunc i64 %indvars.iv to i32
%arrayidx49 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 0
%5 = load i32, ptr %arrayidx49, align 4, !tbaa !5
%cmp50 = icmp eq i32 %5, 0
switch i32 %4, label %for.body45.preheader [
i32 0, label %for.body45.us.preheader
i32 1, label %for.body45.us108.preheader
i32 2, label %for.body45.us121.preheader
i32 3, label %for.body45.us134.preheader
]
for.body45.us134.preheader: ; preds = %for.cond42.preheader
br i1 %cmp50, label %if.then52.us139, label %for.inc75.us143
for.body45.us121.preheader: ; preds = %for.cond42.preheader
br i1 %cmp50, label %if.then52.us126, label %for.inc75.us130
for.body45.us108.preheader: ; preds = %for.cond42.preheader
br i1 %cmp50, label %if.then52.us113, label %for.inc75.us117
for.body45.us.preheader: ; preds = %for.cond42.preheader
br i1 %cmp50, label %if.then52.us, label %for.inc75.us
for.body45.preheader: ; preds = %for.cond42.preheader
br i1 %cmp50, label %if.then52, label %for.inc75
if.then52.us: ; preds = %for.body45.us.preheader
%putchar.us = call i32 @putchar(i32 83)
%call73.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 1)
br label %for.inc75.us
for.inc75.us: ; preds = %if.then52.us, %for.body45.us.preheader
%arrayidx49.us.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1
%6 = load i32, ptr %arrayidx49.us.1, align 4, !tbaa !5
%cmp50.us.1 = icmp eq i32 %6, 0
br i1 %cmp50.us.1, label %if.then52.us.1, label %for.inc75.us.1
if.then52.us.1: ; preds = %for.inc75.us
%putchar.us.1 = call i32 @putchar(i32 83)
%call73.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 2)
br label %for.inc75.us.1
for.inc75.us.1: ; preds = %if.then52.us.1, %for.inc75.us
%arrayidx49.us.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2
%7 = load i32, ptr %arrayidx49.us.2, align 4, !tbaa !5
%cmp50.us.2 = icmp eq i32 %7, 0
br i1 %cmp50.us.2, label %if.then52.us.2, label %for.inc75.us.2
if.then52.us.2: ; preds = %for.inc75.us.1
%putchar.us.2 = call i32 @putchar(i32 83)
%call73.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 3)
br label %for.inc75.us.2
for.inc75.us.2: ; preds = %if.then52.us.2, %for.inc75.us.1
%arrayidx49.us.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3
%8 = load i32, ptr %arrayidx49.us.3, align 4, !tbaa !5
%cmp50.us.3 = icmp eq i32 %8, 0
br i1 %cmp50.us.3, label %if.then52.us.3, label %for.inc75.us.3
if.then52.us.3: ; preds = %for.inc75.us.2
%putchar.us.3 = call i32 @putchar(i32 83)
%call73.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 4)
br label %for.inc75.us.3
for.inc75.us.3: ; preds = %if.then52.us.3, %for.inc75.us.2
%arrayidx49.us.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4
%9 = load i32, ptr %arrayidx49.us.4, align 4, !tbaa !5
%cmp50.us.4 = icmp eq i32 %9, 0
br i1 %cmp50.us.4, label %if.then52.us.4, label %for.inc75.us.4
if.then52.us.4: ; preds = %for.inc75.us.3
%putchar.us.4 = call i32 @putchar(i32 83)
%call73.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 5)
br label %for.inc75.us.4
for.inc75.us.4: ; preds = %if.then52.us.4, %for.inc75.us.3
%arrayidx49.us.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5
%10 = load i32, ptr %arrayidx49.us.5, align 4, !tbaa !5
%cmp50.us.5 = icmp eq i32 %10, 0
br i1 %cmp50.us.5, label %if.then52.us.5, label %for.inc75.us.5
if.then52.us.5: ; preds = %for.inc75.us.4
%putchar.us.5 = call i32 @putchar(i32 83)
%call73.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 6)
br label %for.inc75.us.5
for.inc75.us.5: ; preds = %if.then52.us.5, %for.inc75.us.4
%arrayidx49.us.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6
%11 = load i32, ptr %arrayidx49.us.6, align 4, !tbaa !5
%cmp50.us.6 = icmp eq i32 %11, 0
br i1 %cmp50.us.6, label %if.then52.us.6, label %for.inc75.us.6
if.then52.us.6: ; preds = %for.inc75.us.5
%putchar.us.6 = call i32 @putchar(i32 83)
%call73.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 7)
br label %for.inc75.us.6
for.inc75.us.6: ; preds = %if.then52.us.6, %for.inc75.us.5
%arrayidx49.us.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7
%12 = load i32, ptr %arrayidx49.us.7, align 4, !tbaa !5
%cmp50.us.7 = icmp eq i32 %12, 0
br i1 %cmp50.us.7, label %if.then52.us.7, label %for.inc75.us.7
if.then52.us.7: ; preds = %for.inc75.us.6
%putchar.us.7 = call i32 @putchar(i32 83)
%call73.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 8)
br label %for.inc75.us.7
for.inc75.us.7: ; preds = %if.then52.us.7, %for.inc75.us.6
%arrayidx49.us.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8
%13 = load i32, ptr %arrayidx49.us.8, align 4, !tbaa !5
%cmp50.us.8 = icmp eq i32 %13, 0
br i1 %cmp50.us.8, label %if.then52.us.8, label %for.inc75.us.8
if.then52.us.8: ; preds = %for.inc75.us.7
%putchar.us.8 = call i32 @putchar(i32 83)
%call73.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 9)
br label %for.inc75.us.8
for.inc75.us.8: ; preds = %if.then52.us.8, %for.inc75.us.7
%arrayidx49.us.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9
%14 = load i32, ptr %arrayidx49.us.9, align 4, !tbaa !5
%cmp50.us.9 = icmp eq i32 %14, 0
br i1 %cmp50.us.9, label %if.then52.us.9, label %for.inc75.us.9
if.then52.us.9: ; preds = %for.inc75.us.8
%putchar.us.9 = call i32 @putchar(i32 83)
%call73.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 10)
br label %for.inc75.us.9
for.inc75.us.9: ; preds = %if.then52.us.9, %for.inc75.us.8
%arrayidx49.us.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10
%15 = load i32, ptr %arrayidx49.us.10, align 4, !tbaa !5
%cmp50.us.10 = icmp eq i32 %15, 0
br i1 %cmp50.us.10, label %if.then52.us.10, label %for.inc75.us.10
if.then52.us.10: ; preds = %for.inc75.us.9
%putchar.us.10 = call i32 @putchar(i32 83)
%call73.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 11)
br label %for.inc75.us.10
for.inc75.us.10: ; preds = %if.then52.us.10, %for.inc75.us.9
%arrayidx49.us.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11
%16 = load i32, ptr %arrayidx49.us.11, align 4, !tbaa !5
%cmp50.us.11 = icmp eq i32 %16, 0
br i1 %cmp50.us.11, label %if.then52.us.11, label %for.inc75.us.11
if.then52.us.11: ; preds = %for.inc75.us.10
%putchar.us.11 = call i32 @putchar(i32 83)
%call73.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 12)
br label %for.inc75.us.11
for.inc75.us.11: ; preds = %if.then52.us.11, %for.inc75.us.10
%arrayidx49.us.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12
%17 = load i32, ptr %arrayidx49.us.12, align 4, !tbaa !5
%cmp50.us.12 = icmp eq i32 %17, 0
br i1 %cmp50.us.12, label %for.inc78.sink.split.sink.split, label %for.inc78
if.then52.us113: ; preds = %for.body45.us108.preheader
%putchar98.us = call i32 @putchar(i32 72)
%call73.us116 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 1)
br label %for.inc75.us117
for.inc75.us117: ; preds = %if.then52.us113, %for.body45.us108.preheader
%arrayidx49.us111.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1
%18 = load i32, ptr %arrayidx49.us111.1, align 4, !tbaa !5
%cmp50.us112.1 = icmp eq i32 %18, 0
br i1 %cmp50.us112.1, label %if.then52.us113.1, label %for.inc75.us117.1
if.then52.us113.1: ; preds = %for.inc75.us117
%putchar98.us.1 = call i32 @putchar(i32 72)
%call73.us116.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 2)
br label %for.inc75.us117.1
for.inc75.us117.1: ; preds = %if.then52.us113.1, %for.inc75.us117
%arrayidx49.us111.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2
%19 = load i32, ptr %arrayidx49.us111.2, align 4, !tbaa !5
%cmp50.us112.2 = icmp eq i32 %19, 0
br i1 %cmp50.us112.2, label %if.then52.us113.2, label %for.inc75.us117.2
if.then52.us113.2: ; preds = %for.inc75.us117.1
%putchar98.us.2 = call i32 @putchar(i32 72)
%call73.us116.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 3)
br label %for.inc75.us117.2
for.inc75.us117.2: ; preds = %if.then52.us113.2, %for.inc75.us117.1
%arrayidx49.us111.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3
%20 = load i32, ptr %arrayidx49.us111.3, align 4, !tbaa !5
%cmp50.us112.3 = icmp eq i32 %20, 0
br i1 %cmp50.us112.3, label %if.then52.us113.3, label %for.inc75.us117.3
if.then52.us113.3: ; preds = %for.inc75.us117.2
%putchar98.us.3 = call i32 @putchar(i32 72)
%call73.us116.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 4)
br label %for.inc75.us117.3
for.inc75.us117.3: ; preds = %if.then52.us113.3, %for.inc75.us117.2
%arrayidx49.us111.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4
%21 = load i32, ptr %arrayidx49.us111.4, align 4, !tbaa !5
%cmp50.us112.4 = icmp eq i32 %21, 0
br i1 %cmp50.us112.4, label %if.then52.us113.4, label %for.inc75.us117.4
if.then52.us113.4: ; preds = %for.inc75.us117.3
%putchar98.us.4 = call i32 @putchar(i32 72)
%call73.us116.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 5)
br label %for.inc75.us117.4
for.inc75.us117.4: ; preds = %if.then52.us113.4, %for.inc75.us117.3
%arrayidx49.us111.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5
%22 = load i32, ptr %arrayidx49.us111.5, align 4, !tbaa !5
%cmp50.us112.5 = icmp eq i32 %22, 0
br i1 %cmp50.us112.5, label %if.then52.us113.5, label %for.inc75.us117.5
if.then52.us113.5: ; preds = %for.inc75.us117.4
%putchar98.us.5 = call i32 @putchar(i32 72)
%call73.us116.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 6)
br label %for.inc75.us117.5
for.inc75.us117.5: ; preds = %if.then52.us113.5, %for.inc75.us117.4
%arrayidx49.us111.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6
%23 = load i32, ptr %arrayidx49.us111.6, align 4, !tbaa !5
%cmp50.us112.6 = icmp eq i32 %23, 0
br i1 %cmp50.us112.6, label %if.then52.us113.6, label %for.inc75.us117.6
if.then52.us113.6: ; preds = %for.inc75.us117.5
%putchar98.us.6 = call i32 @putchar(i32 72)
%call73.us116.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 7)
br label %for.inc75.us117.6
for.inc75.us117.6: ; preds = %if.then52.us113.6, %for.inc75.us117.5
%arrayidx49.us111.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7
%24 = load i32, ptr %arrayidx49.us111.7, align 4, !tbaa !5
%cmp50.us112.7 = icmp eq i32 %24, 0
br i1 %cmp50.us112.7, label %if.then52.us113.7, label %for.inc75.us117.7
if.then52.us113.7: ; preds = %for.inc75.us117.6
%putchar98.us.7 = call i32 @putchar(i32 72)
%call73.us116.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 8)
br label %for.inc75.us117.7
for.inc75.us117.7: ; preds = %if.then52.us113.7, %for.inc75.us117.6
%arrayidx49.us111.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8
%25 = load i32, ptr %arrayidx49.us111.8, align 4, !tbaa !5
%cmp50.us112.8 = icmp eq i32 %25, 0
br i1 %cmp50.us112.8, label %if.then52.us113.8, label %for.inc75.us117.8
if.then52.us113.8: ; preds = %for.inc75.us117.7
%putchar98.us.8 = call i32 @putchar(i32 72)
%call73.us116.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 9)
br label %for.inc75.us117.8
for.inc75.us117.8: ; preds = %if.then52.us113.8, %for.inc75.us117.7
%arrayidx49.us111.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9
%26 = load i32, ptr %arrayidx49.us111.9, align 4, !tbaa !5
%cmp50.us112.9 = icmp eq i32 %26, 0
br i1 %cmp50.us112.9, label %if.then52.us113.9, label %for.inc75.us117.9
if.then52.us113.9: ; preds = %for.inc75.us117.8
%putchar98.us.9 = call i32 @putchar(i32 72)
%call73.us116.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 10)
br label %for.inc75.us117.9
for.inc75.us117.9: ; preds = %if.then52.us113.9, %for.inc75.us117.8
%arrayidx49.us111.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10
%27 = load i32, ptr %arrayidx49.us111.10, align 4, !tbaa !5
%cmp50.us112.10 = icmp eq i32 %27, 0
br i1 %cmp50.us112.10, label %if.then52.us113.10, label %for.inc75.us117.10
if.then52.us113.10: ; preds = %for.inc75.us117.9
%putchar98.us.10 = call i32 @putchar(i32 72)
%call73.us116.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 11)
br label %for.inc75.us117.10
for.inc75.us117.10: ; preds = %if.then52.us113.10, %for.inc75.us117.9
%arrayidx49.us111.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11
%28 = load i32, ptr %arrayidx49.us111.11, align 4, !tbaa !5
%cmp50.us112.11 = icmp eq i32 %28, 0
br i1 %cmp50.us112.11, label %if.then52.us113.11, label %for.inc75.us117.11
if.then52.us113.11: ; preds = %for.inc75.us117.10
%putchar98.us.11 = call i32 @putchar(i32 72)
%call73.us116.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 12)
br label %for.inc75.us117.11
for.inc75.us117.11: ; preds = %if.then52.us113.11, %for.inc75.us117.10
%arrayidx49.us111.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12
%29 = load i32, ptr %arrayidx49.us111.12, align 4, !tbaa !5
%cmp50.us112.12 = icmp eq i32 %29, 0
br i1 %cmp50.us112.12, label %for.inc78.sink.split.sink.split, label %for.inc78
if.then52.us126: ; preds = %for.body45.us121.preheader
%putchar99.us = call i32 @putchar(i32 67)
%call73.us129 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 1)
br label %for.inc75.us130
for.inc75.us130: ; preds = %if.then52.us126, %for.body45.us121.preheader
%arrayidx49.us124.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1
%30 = load i32, ptr %arrayidx49.us124.1, align 4, !tbaa !5
%cmp50.us125.1 = icmp eq i32 %30, 0
br i1 %cmp50.us125.1, label %if.then52.us126.1, label %for.inc75.us130.1
if.then52.us126.1: ; preds = %for.inc75.us130
%putchar99.us.1 = call i32 @putchar(i32 67)
%call73.us129.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 2)
br label %for.inc75.us130.1
for.inc75.us130.1: ; preds = %if.then52.us126.1, %for.inc75.us130
%arrayidx49.us124.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2
%31 = load i32, ptr %arrayidx49.us124.2, align 4, !tbaa !5
%cmp50.us125.2 = icmp eq i32 %31, 0
br i1 %cmp50.us125.2, label %if.then52.us126.2, label %for.inc75.us130.2
if.then52.us126.2: ; preds = %for.inc75.us130.1
%putchar99.us.2 = call i32 @putchar(i32 67)
%call73.us129.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 3)
br label %for.inc75.us130.2
for.inc75.us130.2: ; preds = %if.then52.us126.2, %for.inc75.us130.1
%arrayidx49.us124.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3
%32 = load i32, ptr %arrayidx49.us124.3, align 4, !tbaa !5
%cmp50.us125.3 = icmp eq i32 %32, 0
br i1 %cmp50.us125.3, label %if.then52.us126.3, label %for.inc75.us130.3
if.then52.us126.3: ; preds = %for.inc75.us130.2
%putchar99.us.3 = call i32 @putchar(i32 67)
%call73.us129.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 4)
br label %for.inc75.us130.3
for.inc75.us130.3: ; preds = %if.then52.us126.3, %for.inc75.us130.2
%arrayidx49.us124.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4
%33 = load i32, ptr %arrayidx49.us124.4, align 4, !tbaa !5
%cmp50.us125.4 = icmp eq i32 %33, 0
br i1 %cmp50.us125.4, label %if.then52.us126.4, label %for.inc75.us130.4
if.then52.us126.4: ; preds = %for.inc75.us130.3
%putchar99.us.4 = call i32 @putchar(i32 67)
%call73.us129.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 5)
br label %for.inc75.us130.4
for.inc75.us130.4: ; preds = %if.then52.us126.4, %for.inc75.us130.3
%arrayidx49.us124.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5
%34 = load i32, ptr %arrayidx49.us124.5, align 4, !tbaa !5
%cmp50.us125.5 = icmp eq i32 %34, 0
br i1 %cmp50.us125.5, label %if.then52.us126.5, label %for.inc75.us130.5
if.then52.us126.5: ; preds = %for.inc75.us130.4
%putchar99.us.5 = call i32 @putchar(i32 67)
%call73.us129.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 6)
br label %for.inc75.us130.5
for.inc75.us130.5: ; preds = %if.then52.us126.5, %for.inc75.us130.4
%arrayidx49.us124.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6
%35 = load i32, ptr %arrayidx49.us124.6, align 4, !tbaa !5
%cmp50.us125.6 = icmp eq i32 %35, 0
br i1 %cmp50.us125.6, label %if.then52.us126.6, label %for.inc75.us130.6
if.then52.us126.6: ; preds = %for.inc75.us130.5
%putchar99.us.6 = call i32 @putchar(i32 67)
%call73.us129.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 7)
br label %for.inc75.us130.6
for.inc75.us130.6: ; preds = %if.then52.us126.6, %for.inc75.us130.5
%arrayidx49.us124.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7
%36 = load i32, ptr %arrayidx49.us124.7, align 4, !tbaa !5
%cmp50.us125.7 = icmp eq i32 %36, 0
br i1 %cmp50.us125.7, label %if.then52.us126.7, label %for.inc75.us130.7
if.then52.us126.7: ; preds = %for.inc75.us130.6
%putchar99.us.7 = call i32 @putchar(i32 67)
%call73.us129.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 8)
br label %for.inc75.us130.7
for.inc75.us130.7: ; preds = %if.then52.us126.7, %for.inc75.us130.6
%arrayidx49.us124.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8
%37 = load i32, ptr %arrayidx49.us124.8, align 4, !tbaa !5
%cmp50.us125.8 = icmp eq i32 %37, 0
br i1 %cmp50.us125.8, label %if.then52.us126.8, label %for.inc75.us130.8
if.then52.us126.8: ; preds = %for.inc75.us130.7
%putchar99.us.8 = call i32 @putchar(i32 67)
%call73.us129.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 9)
br label %for.inc75.us130.8
for.inc75.us130.8: ; preds = %if.then52.us126.8, %for.inc75.us130.7
%arrayidx49.us124.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9
%38 = load i32, ptr %arrayidx49.us124.9, align 4, !tbaa !5
%cmp50.us125.9 = icmp eq i32 %38, 0
br i1 %cmp50.us125.9, label %if.then52.us126.9, label %for.inc75.us130.9
if.then52.us126.9: ; preds = %for.inc75.us130.8
%putchar99.us.9 = call i32 @putchar(i32 67)
%call73.us129.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 10)
br label %for.inc75.us130.9
for.inc75.us130.9: ; preds = %if.then52.us126.9, %for.inc75.us130.8
%arrayidx49.us124.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10
%39 = load i32, ptr %arrayidx49.us124.10, align 4, !tbaa !5
%cmp50.us125.10 = icmp eq i32 %39, 0
br i1 %cmp50.us125.10, label %if.then52.us126.10, label %for.inc75.us130.10
if.then52.us126.10: ; preds = %for.inc75.us130.9
%putchar99.us.10 = call i32 @putchar(i32 67)
%call73.us129.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 11)
br label %for.inc75.us130.10
for.inc75.us130.10: ; preds = %if.then52.us126.10, %for.inc75.us130.9
%arrayidx49.us124.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11
%40 = load i32, ptr %arrayidx49.us124.11, align 4, !tbaa !5
%cmp50.us125.11 = icmp eq i32 %40, 0
br i1 %cmp50.us125.11, label %if.then52.us126.11, label %for.inc75.us130.11
if.then52.us126.11: ; preds = %for.inc75.us130.10
%putchar99.us.11 = call i32 @putchar(i32 67)
%call73.us129.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 12)
br label %for.inc75.us130.11
for.inc75.us130.11: ; preds = %if.then52.us126.11, %for.inc75.us130.10
%arrayidx49.us124.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12
%41 = load i32, ptr %arrayidx49.us124.12, align 4, !tbaa !5
%cmp50.us125.12 = icmp eq i32 %41, 0
br i1 %cmp50.us125.12, label %for.inc78.sink.split.sink.split, label %for.inc78
if.then52.us139: ; preds = %for.body45.us134.preheader
%putchar100.us = call i32 @putchar(i32 68)
%call73.us142 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 1)
br label %for.inc75.us143
for.inc75.us143: ; preds = %if.then52.us139, %for.body45.us134.preheader
%arrayidx49.us137.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1
%42 = load i32, ptr %arrayidx49.us137.1, align 4, !tbaa !5
%cmp50.us138.1 = icmp eq i32 %42, 0
br i1 %cmp50.us138.1, label %if.then52.us139.1, label %for.inc75.us143.1
if.then52.us139.1: ; preds = %for.inc75.us143
%putchar100.us.1 = call i32 @putchar(i32 68)
%call73.us142.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 2)
br label %for.inc75.us143.1
for.inc75.us143.1: ; preds = %if.then52.us139.1, %for.inc75.us143
%arrayidx49.us137.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2
%43 = load i32, ptr %arrayidx49.us137.2, align 4, !tbaa !5
%cmp50.us138.2 = icmp eq i32 %43, 0
br i1 %cmp50.us138.2, label %if.then52.us139.2, label %for.inc75.us143.2
if.then52.us139.2: ; preds = %for.inc75.us143.1
%putchar100.us.2 = call i32 @putchar(i32 68)
%call73.us142.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 3)
br label %for.inc75.us143.2
for.inc75.us143.2: ; preds = %if.then52.us139.2, %for.inc75.us143.1
%arrayidx49.us137.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3
%44 = load i32, ptr %arrayidx49.us137.3, align 4, !tbaa !5
%cmp50.us138.3 = icmp eq i32 %44, 0
br i1 %cmp50.us138.3, label %if.then52.us139.3, label %for.inc75.us143.3
if.then52.us139.3: ; preds = %for.inc75.us143.2
%putchar100.us.3 = call i32 @putchar(i32 68)
%call73.us142.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 4)
br label %for.inc75.us143.3
for.inc75.us143.3: ; preds = %if.then52.us139.3, %for.inc75.us143.2
%arrayidx49.us137.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4
%45 = load i32, ptr %arrayidx49.us137.4, align 4, !tbaa !5
%cmp50.us138.4 = icmp eq i32 %45, 0
br i1 %cmp50.us138.4, label %if.then52.us139.4, label %for.inc75.us143.4
if.then52.us139.4: ; preds = %for.inc75.us143.3
%putchar100.us.4 = call i32 @putchar(i32 68)
%call73.us142.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 5)
br label %for.inc75.us143.4
for.inc75.us143.4: ; preds = %if.then52.us139.4, %for.inc75.us143.3
%arrayidx49.us137.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5
%46 = load i32, ptr %arrayidx49.us137.5, align 4, !tbaa !5
%cmp50.us138.5 = icmp eq i32 %46, 0
br i1 %cmp50.us138.5, label %if.then52.us139.5, label %for.inc75.us143.5
if.then52.us139.5: ; preds = %for.inc75.us143.4
%putchar100.us.5 = call i32 @putchar(i32 68)
%call73.us142.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 6)
br label %for.inc75.us143.5
for.inc75.us143.5: ; preds = %if.then52.us139.5, %for.inc75.us143.4
%arrayidx49.us137.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6
%47 = load i32, ptr %arrayidx49.us137.6, align 4, !tbaa !5
%cmp50.us138.6 = icmp eq i32 %47, 0
br i1 %cmp50.us138.6, label %if.then52.us139.6, label %for.inc75.us143.6
if.then52.us139.6: ; preds = %for.inc75.us143.5
%putchar100.us.6 = call i32 @putchar(i32 68)
%call73.us142.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 7)
br label %for.inc75.us143.6
for.inc75.us143.6: ; preds = %if.then52.us139.6, %for.inc75.us143.5
%arrayidx49.us137.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7
%48 = load i32, ptr %arrayidx49.us137.7, align 4, !tbaa !5
%cmp50.us138.7 = icmp eq i32 %48, 0
br i1 %cmp50.us138.7, label %if.then52.us139.7, label %for.inc75.us143.7
if.then52.us139.7: ; preds = %for.inc75.us143.6
%putchar100.us.7 = call i32 @putchar(i32 68)
%call73.us142.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 8)
br label %for.inc75.us143.7
for.inc75.us143.7: ; preds = %if.then52.us139.7, %for.inc75.us143.6
%arrayidx49.us137.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8
%49 = load i32, ptr %arrayidx49.us137.8, align 4, !tbaa !5
%cmp50.us138.8 = icmp eq i32 %49, 0
br i1 %cmp50.us138.8, label %if.then52.us139.8, label %for.inc75.us143.8
if.then52.us139.8: ; preds = %for.inc75.us143.7
%putchar100.us.8 = call i32 @putchar(i32 68)
%call73.us142.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 9)
br label %for.inc75.us143.8
for.inc75.us143.8: ; preds = %if.then52.us139.8, %for.inc75.us143.7
%arrayidx49.us137.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9
%50 = load i32, ptr %arrayidx49.us137.9, align 4, !tbaa !5
%cmp50.us138.9 = icmp eq i32 %50, 0
br i1 %cmp50.us138.9, label %if.then52.us139.9, label %for.inc75.us143.9
if.then52.us139.9: ; preds = %for.inc75.us143.8
%putchar100.us.9 = call i32 @putchar(i32 68)
%call73.us142.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 10)
br label %for.inc75.us143.9
for.inc75.us143.9: ; preds = %if.then52.us139.9, %for.inc75.us143.8
%arrayidx49.us137.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10
%51 = load i32, ptr %arrayidx49.us137.10, align 4, !tbaa !5
%cmp50.us138.10 = icmp eq i32 %51, 0
br i1 %cmp50.us138.10, label %if.then52.us139.10, label %for.inc75.us143.10
if.then52.us139.10: ; preds = %for.inc75.us143.9
%putchar100.us.10 = call i32 @putchar(i32 68)
%call73.us142.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 11)
br label %for.inc75.us143.10
for.inc75.us143.10: ; preds = %if.then52.us139.10, %for.inc75.us143.9
%arrayidx49.us137.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11
%52 = load i32, ptr %arrayidx49.us137.11, align 4, !tbaa !5
%cmp50.us138.11 = icmp eq i32 %52, 0
br i1 %cmp50.us138.11, label %if.then52.us139.11, label %for.inc75.us143.11
if.then52.us139.11: ; preds = %for.inc75.us143.10
%putchar100.us.11 = call i32 @putchar(i32 68)
%call73.us142.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 12)
br label %for.inc75.us143.11
for.inc75.us143.11: ; preds = %if.then52.us139.11, %for.inc75.us143.10
%arrayidx49.us137.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12
%53 = load i32, ptr %arrayidx49.us137.12, align 4, !tbaa !5
%cmp50.us138.12 = icmp eq i32 %53, 0
br i1 %cmp50.us138.12, label %for.inc78.sink.split.sink.split, label %for.inc78
if.then52: ; preds = %for.body45.preheader
%call73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 1)
br label %for.inc75
for.inc75: ; preds = %for.body45.preheader, %if.then52
%arrayidx49.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1
%54 = load i32, ptr %arrayidx49.1, align 4, !tbaa !5
%cmp50.1 = icmp eq i32 %54, 0
br i1 %cmp50.1, label %if.then52.1, label %for.inc75.1
if.then52.1: ; preds = %for.inc75
%call73.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 2)
br label %for.inc75.1
for.inc75.1: ; preds = %if.then52.1, %for.inc75
%arrayidx49.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2
%55 = load i32, ptr %arrayidx49.2, align 4, !tbaa !5
%cmp50.2 = icmp eq i32 %55, 0
br i1 %cmp50.2, label %if.then52.2, label %for.inc75.2
if.then52.2: ; preds = %for.inc75.1
%call73.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 3)
br label %for.inc75.2
for.inc75.2: ; preds = %if.then52.2, %for.inc75.1
%arrayidx49.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3
%56 = load i32, ptr %arrayidx49.3, align 4, !tbaa !5
%cmp50.3 = icmp eq i32 %56, 0
br i1 %cmp50.3, label %if.then52.3, label %for.inc75.3
if.then52.3: ; preds = %for.inc75.2
%call73.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 4)
br label %for.inc75.3
for.inc75.3: ; preds = %if.then52.3, %for.inc75.2
%arrayidx49.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4
%57 = load i32, ptr %arrayidx49.4, align 4, !tbaa !5
%cmp50.4 = icmp eq i32 %57, 0
br i1 %cmp50.4, label %if.then52.4, label %for.inc75.4
if.then52.4: ; preds = %for.inc75.3
%call73.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 5)
br label %for.inc75.4
for.inc75.4: ; preds = %if.then52.4, %for.inc75.3
%arrayidx49.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5
%58 = load i32, ptr %arrayidx49.5, align 4, !tbaa !5
%cmp50.5 = icmp eq i32 %58, 0
br i1 %cmp50.5, label %if.then52.5, label %for.inc75.5
if.then52.5: ; preds = %for.inc75.4
%call73.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 6)
br label %for.inc75.5
for.inc75.5: ; preds = %if.then52.5, %for.inc75.4
%arrayidx49.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6
%59 = load i32, ptr %arrayidx49.6, align 4, !tbaa !5
%cmp50.6 = icmp eq i32 %59, 0
br i1 %cmp50.6, label %if.then52.6, label %for.inc75.6
if.then52.6: ; preds = %for.inc75.5
%call73.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 7)
br label %for.inc75.6
for.inc75.6: ; preds = %if.then52.6, %for.inc75.5
%arrayidx49.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7
%60 = load i32, ptr %arrayidx49.7, align 4, !tbaa !5
%cmp50.7 = icmp eq i32 %60, 0
br i1 %cmp50.7, label %if.then52.7, label %for.inc75.7
if.then52.7: ; preds = %for.inc75.6
%call73.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 8)
br label %for.inc75.7
for.inc75.7: ; preds = %if.then52.7, %for.inc75.6
%arrayidx49.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8
%61 = load i32, ptr %arrayidx49.8, align 4, !tbaa !5
%cmp50.8 = icmp eq i32 %61, 0
br i1 %cmp50.8, label %if.then52.8, label %for.inc75.8
if.then52.8: ; preds = %for.inc75.7
%call73.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 9)
br label %for.inc75.8
for.inc75.8: ; preds = %if.then52.8, %for.inc75.7
%arrayidx49.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9
%62 = load i32, ptr %arrayidx49.9, align 4, !tbaa !5
%cmp50.9 = icmp eq i32 %62, 0
br i1 %cmp50.9, label %if.then52.9, label %for.inc75.9
if.then52.9: ; preds = %for.inc75.8
%call73.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 10)
br label %for.inc75.9
for.inc75.9: ; preds = %if.then52.9, %for.inc75.8
%arrayidx49.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10
%63 = load i32, ptr %arrayidx49.10, align 4, !tbaa !5
%cmp50.10 = icmp eq i32 %63, 0
br i1 %cmp50.10, label %if.then52.10, label %for.inc75.10
if.then52.10: ; preds = %for.inc75.9
%call73.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 11)
br label %for.inc75.10
for.inc75.10: ; preds = %if.then52.10, %for.inc75.9
%arrayidx49.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11
%64 = load i32, ptr %arrayidx49.11, align 4, !tbaa !5
%cmp50.11 = icmp eq i32 %64, 0
br i1 %cmp50.11, label %if.then52.11, label %for.inc75.11
if.then52.11: ; preds = %for.inc75.10
%call73.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 12)
br label %for.inc75.11
for.inc75.11: ; preds = %if.then52.11, %for.inc75.10
%arrayidx49.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12
%65 = load i32, ptr %arrayidx49.12, align 4, !tbaa !5
%cmp50.12 = icmp eq i32 %65, 0
br i1 %cmp50.12, label %for.inc78.sink.split, label %for.inc78
for.inc78.sink.split.sink.split: ; preds = %for.inc75.us143.11, %for.inc75.us130.11, %for.inc75.us117.11, %for.inc75.us.11
%.sink = phi i32 [ 83, %for.inc75.us.11 ], [ 72, %for.inc75.us117.11 ], [ 67, %for.inc75.us130.11 ], [ 68, %for.inc75.us143.11 ]
%putchar.us.12 = call i32 @putchar(i32 %.sink)
br label %for.inc78.sink.split
for.inc78.sink.split: ; preds = %for.inc78.sink.split.sink.split, %for.inc75.11
%call73.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 13)
br label %for.inc78
for.inc78: ; preds = %for.inc78.sink.split, %for.inc75.11, %for.inc75.us143.11, %for.inc75.us130.11, %for.inc75.us117.11, %for.inc75.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.end80, label %for.cond42.preheader, !llvm.loop !12
for.end80: ; preds = %for.inc78
call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %kind) #5
call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %cards) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %numb) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @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"}
!12 = distinct !{!12, !11}
|
#include <stdio.h>
int main()
{
int a[4][13]={0};
int i, j, k, x, n;
char m;
scanf("%d", &n);
for(k = 0; k < n; k++){
scanf(" %c%d", &m, &x);
if(m == 'S')
a[0][x - 1] = 1;
else if(m == 'H')
a[1][x - 1] = 1;
else if(m == 'C')
a[2][x - 1] = 1;
else if(m == 'D')
a[3][x - 1] = 1;
}
for(i = 0; i < 4; i++){
for(j = 0; j < 13; j++){
if(a[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_215362/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215362/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:
%a = alloca [4 x [13 x i32]], align 16
%x = alloca i32, align 4
%n = alloca i32, align 4
%m = alloca i8, align 1
call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %a) #4
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %a, i8 0, i64 208, i1 false)
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4
call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %m) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp95 = icmp sgt i32 %0, 0
br i1 %cmp95, label %for.body, label %for.cond38.preheader.preheader
for.body: ; preds = %entry, %for.inc
%k.096 = phi i32 [ %inc, %for.inc ], [ 0, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %m, ptr noundef nonnull %x)
%1 = load i8, ptr %m, 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 %x, align 4, !tbaa !5
%sub = add nsw i32 %2, -1
%idxprom = sext i32 %sub to i64
%arrayidx4 = getelementptr inbounds [13 x i32], ptr %a, i64 0, i64 %idxprom
br label %for.inc.sink.split
if.then8: ; preds = %for.body
%3 = load i32, ptr %x, 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 %a, i64 0, i64 1, i64 %idxprom11
br label %for.inc.sink.split
if.then17: ; preds = %for.body
%4 = load i32, ptr %x, 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 %a, i64 0, i64 2, i64 %idxprom20
br label %for.inc.sink.split
if.then26: ; preds = %for.body
%5 = load i32, ptr %x, 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 %a, 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 %k.096, 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.us99.preheader
i32 2, label %for.body41.us109.preheader
i32 3, label %for.body41.us119.preheader
]
for.body41.us119.preheader: ; preds = %for.cond38.preheader
%arrayidx45.us122 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 0
%8 = load i32, ptr %arrayidx45.us122, align 4, !tbaa !5
%cmp46.us123 = icmp eq i32 %8, 0
br i1 %cmp46.us123, label %if.then48.us124, label %for.inc76.us125
for.body41.us109.preheader: ; preds = %for.cond38.preheader
%arrayidx45.us112 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 0
%9 = load i32, ptr %arrayidx45.us112, align 4, !tbaa !5
%cmp46.us113 = icmp eq i32 %9, 0
br i1 %cmp46.us113, label %if.then48.us114, label %for.inc76.us115
for.body41.us99.preheader: ; preds = %for.cond38.preheader
%arrayidx45.us102 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 0
%10 = load i32, ptr %arrayidx45.us102, align 4, !tbaa !5
%cmp46.us103 = icmp eq i32 %10, 0
br i1 %cmp46.us103, label %if.then48.us104, label %for.inc76.us105
for.body41.us.preheader: ; preds = %for.cond38.preheader
%arrayidx45.us = getelementptr inbounds [4 x [13 x i32]], ptr %a, 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 %a, 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 %a, 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 %a, 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 %a, 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 %a, 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 %a, 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 %a, 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 %a, 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 %a, 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 %a, 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 %a, 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 %a, 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.us104: ; preds = %for.body41.us99.preheader
%call58.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1)
br label %for.inc76.us105
for.inc76.us105: ; preds = %if.then48.us104, %for.body41.us99.preheader
%arrayidx45.us102.1 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 1
%24 = load i32, ptr %arrayidx45.us102.1, align 4, !tbaa !5
%cmp46.us103.1 = icmp eq i32 %24, 0
br i1 %cmp46.us103.1, label %if.then48.us104.1, label %for.inc76.us105.1
if.then48.us104.1: ; preds = %for.inc76.us105
%call58.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2)
br label %for.inc76.us105.1
for.inc76.us105.1: ; preds = %if.then48.us104.1, %for.inc76.us105
%arrayidx45.us102.2 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 2
%25 = load i32, ptr %arrayidx45.us102.2, align 4, !tbaa !5
%cmp46.us103.2 = icmp eq i32 %25, 0
br i1 %cmp46.us103.2, label %if.then48.us104.2, label %for.inc76.us105.2
if.then48.us104.2: ; preds = %for.inc76.us105.1
%call58.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3)
br label %for.inc76.us105.2
for.inc76.us105.2: ; preds = %if.then48.us104.2, %for.inc76.us105.1
%arrayidx45.us102.3 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 3
%26 = load i32, ptr %arrayidx45.us102.3, align 4, !tbaa !5
%cmp46.us103.3 = icmp eq i32 %26, 0
br i1 %cmp46.us103.3, label %if.then48.us104.3, label %for.inc76.us105.3
if.then48.us104.3: ; preds = %for.inc76.us105.2
%call58.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4)
br label %for.inc76.us105.3
for.inc76.us105.3: ; preds = %if.then48.us104.3, %for.inc76.us105.2
%arrayidx45.us102.4 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 4
%27 = load i32, ptr %arrayidx45.us102.4, align 4, !tbaa !5
%cmp46.us103.4 = icmp eq i32 %27, 0
br i1 %cmp46.us103.4, label %if.then48.us104.4, label %for.inc76.us105.4
if.then48.us104.4: ; preds = %for.inc76.us105.3
%call58.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5)
br label %for.inc76.us105.4
for.inc76.us105.4: ; preds = %if.then48.us104.4, %for.inc76.us105.3
%arrayidx45.us102.5 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 5
%28 = load i32, ptr %arrayidx45.us102.5, align 4, !tbaa !5
%cmp46.us103.5 = icmp eq i32 %28, 0
br i1 %cmp46.us103.5, label %if.then48.us104.5, label %for.inc76.us105.5
if.then48.us104.5: ; preds = %for.inc76.us105.4
%call58.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6)
br label %for.inc76.us105.5
for.inc76.us105.5: ; preds = %if.then48.us104.5, %for.inc76.us105.4
%arrayidx45.us102.6 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 6
%29 = load i32, ptr %arrayidx45.us102.6, align 4, !tbaa !5
%cmp46.us103.6 = icmp eq i32 %29, 0
br i1 %cmp46.us103.6, label %if.then48.us104.6, label %for.inc76.us105.6
if.then48.us104.6: ; preds = %for.inc76.us105.5
%call58.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7)
br label %for.inc76.us105.6
for.inc76.us105.6: ; preds = %if.then48.us104.6, %for.inc76.us105.5
%arrayidx45.us102.7 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 7
%30 = load i32, ptr %arrayidx45.us102.7, align 4, !tbaa !5
%cmp46.us103.7 = icmp eq i32 %30, 0
br i1 %cmp46.us103.7, label %if.then48.us104.7, label %for.inc76.us105.7
if.then48.us104.7: ; preds = %for.inc76.us105.6
%call58.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8)
br label %for.inc76.us105.7
for.inc76.us105.7: ; preds = %if.then48.us104.7, %for.inc76.us105.6
%arrayidx45.us102.8 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 8
%31 = load i32, ptr %arrayidx45.us102.8, align 4, !tbaa !5
%cmp46.us103.8 = icmp eq i32 %31, 0
br i1 %cmp46.us103.8, label %if.then48.us104.8, label %for.inc76.us105.8
if.then48.us104.8: ; preds = %for.inc76.us105.7
%call58.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9)
br label %for.inc76.us105.8
for.inc76.us105.8: ; preds = %if.then48.us104.8, %for.inc76.us105.7
%arrayidx45.us102.9 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 9
%32 = load i32, ptr %arrayidx45.us102.9, align 4, !tbaa !5
%cmp46.us103.9 = icmp eq i32 %32, 0
br i1 %cmp46.us103.9, label %if.then48.us104.9, label %for.inc76.us105.9
if.then48.us104.9: ; preds = %for.inc76.us105.8
%call58.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10)
br label %for.inc76.us105.9
for.inc76.us105.9: ; preds = %if.then48.us104.9, %for.inc76.us105.8
%arrayidx45.us102.10 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 10
%33 = load i32, ptr %arrayidx45.us102.10, align 4, !tbaa !5
%cmp46.us103.10 = icmp eq i32 %33, 0
br i1 %cmp46.us103.10, label %if.then48.us104.10, label %for.inc76.us105.10
if.then48.us104.10: ; preds = %for.inc76.us105.9
%call58.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11)
br label %for.inc76.us105.10
for.inc76.us105.10: ; preds = %if.then48.us104.10, %for.inc76.us105.9
%arrayidx45.us102.11 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 11
%34 = load i32, ptr %arrayidx45.us102.11, align 4, !tbaa !5
%cmp46.us103.11 = icmp eq i32 %34, 0
br i1 %cmp46.us103.11, label %if.then48.us104.11, label %for.inc76.us105.11
if.then48.us104.11: ; preds = %for.inc76.us105.10
%call58.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12)
br label %for.inc76.us105.11
for.inc76.us105.11: ; preds = %if.then48.us104.11, %for.inc76.us105.10
%arrayidx45.us102.12 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 12
%35 = load i32, ptr %arrayidx45.us102.12, align 4, !tbaa !5
%cmp46.us103.12 = icmp eq i32 %35, 0
br i1 %cmp46.us103.12, label %for.inc79.sink.split, label %for.inc79
if.then48.us114: ; preds = %for.body41.us109.preheader
%call64.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1)
br label %for.inc76.us115
for.inc76.us115: ; preds = %if.then48.us114, %for.body41.us109.preheader
%arrayidx45.us112.1 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 1
%36 = load i32, ptr %arrayidx45.us112.1, align 4, !tbaa !5
%cmp46.us113.1 = icmp eq i32 %36, 0
br i1 %cmp46.us113.1, label %if.then48.us114.1, label %for.inc76.us115.1
if.then48.us114.1: ; preds = %for.inc76.us115
%call64.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2)
br label %for.inc76.us115.1
for.inc76.us115.1: ; preds = %if.then48.us114.1, %for.inc76.us115
%arrayidx45.us112.2 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 2
%37 = load i32, ptr %arrayidx45.us112.2, align 4, !tbaa !5
%cmp46.us113.2 = icmp eq i32 %37, 0
br i1 %cmp46.us113.2, label %if.then48.us114.2, label %for.inc76.us115.2
if.then48.us114.2: ; preds = %for.inc76.us115.1
%call64.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3)
br label %for.inc76.us115.2
for.inc76.us115.2: ; preds = %if.then48.us114.2, %for.inc76.us115.1
%arrayidx45.us112.3 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 3
%38 = load i32, ptr %arrayidx45.us112.3, align 4, !tbaa !5
%cmp46.us113.3 = icmp eq i32 %38, 0
br i1 %cmp46.us113.3, label %if.then48.us114.3, label %for.inc76.us115.3
if.then48.us114.3: ; preds = %for.inc76.us115.2
%call64.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4)
br label %for.inc76.us115.3
for.inc76.us115.3: ; preds = %if.then48.us114.3, %for.inc76.us115.2
%arrayidx45.us112.4 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 4
%39 = load i32, ptr %arrayidx45.us112.4, align 4, !tbaa !5
%cmp46.us113.4 = icmp eq i32 %39, 0
br i1 %cmp46.us113.4, label %if.then48.us114.4, label %for.inc76.us115.4
if.then48.us114.4: ; preds = %for.inc76.us115.3
%call64.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5)
br label %for.inc76.us115.4
for.inc76.us115.4: ; preds = %if.then48.us114.4, %for.inc76.us115.3
%arrayidx45.us112.5 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 5
%40 = load i32, ptr %arrayidx45.us112.5, align 4, !tbaa !5
%cmp46.us113.5 = icmp eq i32 %40, 0
br i1 %cmp46.us113.5, label %if.then48.us114.5, label %for.inc76.us115.5
if.then48.us114.5: ; preds = %for.inc76.us115.4
%call64.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6)
br label %for.inc76.us115.5
for.inc76.us115.5: ; preds = %if.then48.us114.5, %for.inc76.us115.4
%arrayidx45.us112.6 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 6
%41 = load i32, ptr %arrayidx45.us112.6, align 4, !tbaa !5
%cmp46.us113.6 = icmp eq i32 %41, 0
br i1 %cmp46.us113.6, label %if.then48.us114.6, label %for.inc76.us115.6
if.then48.us114.6: ; preds = %for.inc76.us115.5
%call64.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7)
br label %for.inc76.us115.6
for.inc76.us115.6: ; preds = %if.then48.us114.6, %for.inc76.us115.5
%arrayidx45.us112.7 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 7
%42 = load i32, ptr %arrayidx45.us112.7, align 4, !tbaa !5
%cmp46.us113.7 = icmp eq i32 %42, 0
br i1 %cmp46.us113.7, label %if.then48.us114.7, label %for.inc76.us115.7
if.then48.us114.7: ; preds = %for.inc76.us115.6
%call64.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8)
br label %for.inc76.us115.7
for.inc76.us115.7: ; preds = %if.then48.us114.7, %for.inc76.us115.6
%arrayidx45.us112.8 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 8
%43 = load i32, ptr %arrayidx45.us112.8, align 4, !tbaa !5
%cmp46.us113.8 = icmp eq i32 %43, 0
br i1 %cmp46.us113.8, label %if.then48.us114.8, label %for.inc76.us115.8
if.then48.us114.8: ; preds = %for.inc76.us115.7
%call64.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9)
br label %for.inc76.us115.8
for.inc76.us115.8: ; preds = %if.then48.us114.8, %for.inc76.us115.7
%arrayidx45.us112.9 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 9
%44 = load i32, ptr %arrayidx45.us112.9, align 4, !tbaa !5
%cmp46.us113.9 = icmp eq i32 %44, 0
br i1 %cmp46.us113.9, label %if.then48.us114.9, label %for.inc76.us115.9
if.then48.us114.9: ; preds = %for.inc76.us115.8
%call64.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10)
br label %for.inc76.us115.9
for.inc76.us115.9: ; preds = %if.then48.us114.9, %for.inc76.us115.8
%arrayidx45.us112.10 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 10
%45 = load i32, ptr %arrayidx45.us112.10, align 4, !tbaa !5
%cmp46.us113.10 = icmp eq i32 %45, 0
br i1 %cmp46.us113.10, label %if.then48.us114.10, label %for.inc76.us115.10
if.then48.us114.10: ; preds = %for.inc76.us115.9
%call64.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11)
br label %for.inc76.us115.10
for.inc76.us115.10: ; preds = %if.then48.us114.10, %for.inc76.us115.9
%arrayidx45.us112.11 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 11
%46 = load i32, ptr %arrayidx45.us112.11, align 4, !tbaa !5
%cmp46.us113.11 = icmp eq i32 %46, 0
br i1 %cmp46.us113.11, label %if.then48.us114.11, label %for.inc76.us115.11
if.then48.us114.11: ; preds = %for.inc76.us115.10
%call64.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12)
br label %for.inc76.us115.11
for.inc76.us115.11: ; preds = %if.then48.us114.11, %for.inc76.us115.10
%arrayidx45.us112.12 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 12
%47 = load i32, ptr %arrayidx45.us112.12, align 4, !tbaa !5
%cmp46.us113.12 = icmp eq i32 %47, 0
br i1 %cmp46.us113.12, label %for.inc79.sink.split, label %for.inc79
if.then48.us124: ; preds = %for.body41.us119.preheader
%call70.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1)
br label %for.inc76.us125
for.inc76.us125: ; preds = %if.then48.us124, %for.body41.us119.preheader
%arrayidx45.us122.1 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 1
%48 = load i32, ptr %arrayidx45.us122.1, align 4, !tbaa !5
%cmp46.us123.1 = icmp eq i32 %48, 0
br i1 %cmp46.us123.1, label %if.then48.us124.1, label %for.inc76.us125.1
if.then48.us124.1: ; preds = %for.inc76.us125
%call70.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2)
br label %for.inc76.us125.1
for.inc76.us125.1: ; preds = %if.then48.us124.1, %for.inc76.us125
%arrayidx45.us122.2 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 2
%49 = load i32, ptr %arrayidx45.us122.2, align 4, !tbaa !5
%cmp46.us123.2 = icmp eq i32 %49, 0
br i1 %cmp46.us123.2, label %if.then48.us124.2, label %for.inc76.us125.2
if.then48.us124.2: ; preds = %for.inc76.us125.1
%call70.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3)
br label %for.inc76.us125.2
for.inc76.us125.2: ; preds = %if.then48.us124.2, %for.inc76.us125.1
%arrayidx45.us122.3 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 3
%50 = load i32, ptr %arrayidx45.us122.3, align 4, !tbaa !5
%cmp46.us123.3 = icmp eq i32 %50, 0
br i1 %cmp46.us123.3, label %if.then48.us124.3, label %for.inc76.us125.3
if.then48.us124.3: ; preds = %for.inc76.us125.2
%call70.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4)
br label %for.inc76.us125.3
for.inc76.us125.3: ; preds = %if.then48.us124.3, %for.inc76.us125.2
%arrayidx45.us122.4 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 4
%51 = load i32, ptr %arrayidx45.us122.4, align 4, !tbaa !5
%cmp46.us123.4 = icmp eq i32 %51, 0
br i1 %cmp46.us123.4, label %if.then48.us124.4, label %for.inc76.us125.4
if.then48.us124.4: ; preds = %for.inc76.us125.3
%call70.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5)
br label %for.inc76.us125.4
for.inc76.us125.4: ; preds = %if.then48.us124.4, %for.inc76.us125.3
%arrayidx45.us122.5 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 5
%52 = load i32, ptr %arrayidx45.us122.5, align 4, !tbaa !5
%cmp46.us123.5 = icmp eq i32 %52, 0
br i1 %cmp46.us123.5, label %if.then48.us124.5, label %for.inc76.us125.5
if.then48.us124.5: ; preds = %for.inc76.us125.4
%call70.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6)
br label %for.inc76.us125.5
for.inc76.us125.5: ; preds = %if.then48.us124.5, %for.inc76.us125.4
%arrayidx45.us122.6 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 6
%53 = load i32, ptr %arrayidx45.us122.6, align 4, !tbaa !5
%cmp46.us123.6 = icmp eq i32 %53, 0
br i1 %cmp46.us123.6, label %if.then48.us124.6, label %for.inc76.us125.6
if.then48.us124.6: ; preds = %for.inc76.us125.5
%call70.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7)
br label %for.inc76.us125.6
for.inc76.us125.6: ; preds = %if.then48.us124.6, %for.inc76.us125.5
%arrayidx45.us122.7 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 7
%54 = load i32, ptr %arrayidx45.us122.7, align 4, !tbaa !5
%cmp46.us123.7 = icmp eq i32 %54, 0
br i1 %cmp46.us123.7, label %if.then48.us124.7, label %for.inc76.us125.7
if.then48.us124.7: ; preds = %for.inc76.us125.6
%call70.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8)
br label %for.inc76.us125.7
for.inc76.us125.7: ; preds = %if.then48.us124.7, %for.inc76.us125.6
%arrayidx45.us122.8 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 8
%55 = load i32, ptr %arrayidx45.us122.8, align 4, !tbaa !5
%cmp46.us123.8 = icmp eq i32 %55, 0
br i1 %cmp46.us123.8, label %if.then48.us124.8, label %for.inc76.us125.8
if.then48.us124.8: ; preds = %for.inc76.us125.7
%call70.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9)
br label %for.inc76.us125.8
for.inc76.us125.8: ; preds = %if.then48.us124.8, %for.inc76.us125.7
%arrayidx45.us122.9 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 9
%56 = load i32, ptr %arrayidx45.us122.9, align 4, !tbaa !5
%cmp46.us123.9 = icmp eq i32 %56, 0
br i1 %cmp46.us123.9, label %if.then48.us124.9, label %for.inc76.us125.9
if.then48.us124.9: ; preds = %for.inc76.us125.8
%call70.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10)
br label %for.inc76.us125.9
for.inc76.us125.9: ; preds = %if.then48.us124.9, %for.inc76.us125.8
%arrayidx45.us122.10 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 10
%57 = load i32, ptr %arrayidx45.us122.10, align 4, !tbaa !5
%cmp46.us123.10 = icmp eq i32 %57, 0
br i1 %cmp46.us123.10, label %if.then48.us124.10, label %for.inc76.us125.10
if.then48.us124.10: ; preds = %for.inc76.us125.9
%call70.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11)
br label %for.inc76.us125.10
for.inc76.us125.10: ; preds = %if.then48.us124.10, %for.inc76.us125.9
%arrayidx45.us122.11 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 11
%58 = load i32, ptr %arrayidx45.us122.11, align 4, !tbaa !5
%cmp46.us123.11 = icmp eq i32 %58, 0
br i1 %cmp46.us123.11, label %if.then48.us124.11, label %for.inc76.us125.11
if.then48.us124.11: ; preds = %for.inc76.us125.10
%call70.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12)
br label %for.inc76.us125.11
for.inc76.us125.11: ; preds = %if.then48.us124.11, %for.inc76.us125.10
%arrayidx45.us122.12 = getelementptr inbounds [4 x [13 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 12
%59 = load i32, ptr %arrayidx45.us122.12, align 4, !tbaa !5
%cmp46.us123.12 = icmp eq i32 %59, 0
br i1 %cmp46.us123.12, label %for.inc79.sink.split, label %for.inc79
for.inc79.sink.split: ; preds = %for.inc76.us125.11, %for.inc76.us115.11, %for.inc76.us105.11, %for.inc76.us.11
%.str.5.sink = phi ptr [ @.str.2, %for.inc76.us.11 ], [ @.str.3, %for.inc76.us105.11 ], [ @.str.4, %for.inc76.us115.11 ], [ @.str.5, %for.inc76.us125.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.us125.11, %for.inc76.us115.11, %for.inc76.us105.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 %m) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #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: 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>
typedef long long ll;
int main(void)
{
ll a,b,k;
scanf("%lld %lld %lld",&a,&b,&k);
if(b-a+1<2*k){
for(ll i=a;i<=b;i++){
printf("%lld\n",i);
}
}else{
for(ll i=a;i<a+k;i++){
printf("%lld\n",i);
}
for(ll i=b-k+1;i<=b;i++){
printf("%lld\n",i);
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215412/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215412/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
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) #3
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #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 %k)
%0 = load i64, ptr %b, align 8, !tbaa !5
%1 = load i64, ptr %a, align 8, !tbaa !5
%sub = add i64 %0, 1
%add = sub i64 %sub, %1
%2 = load i64, ptr %k, align 8, !tbaa !5
%mul = shl nsw i64 %2, 1
%cmp = icmp slt i64 %add, %mul
br i1 %cmp, label %for.cond.preheader, label %for.cond4.preheader
for.cond4.preheader: ; preds = %entry
%cmp632 = icmp sgt i64 %2, 0
br i1 %cmp632, label %for.body8, label %if.end
for.cond.preheader: ; preds = %entry
%cmp1.not36 = icmp sgt i64 %1, %0
br i1 %cmp1.not36, label %if.end, label %for.body
for.body: ; preds = %for.cond.preheader, %for.body
%i.037 = phi i64 [ %inc, %for.body ], [ %1, %for.cond.preheader ]
%call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %i.037)
%inc = add nsw i64 %i.037, 1
%3 = load i64, ptr %b, align 8, !tbaa !5
%cmp1.not.not = icmp slt i64 %i.037, %3
br i1 %cmp1.not.not, label %for.body, label %if.end, !llvm.loop !9
for.cond.cleanup7: ; preds = %for.body8
%cmp17.not.not34 = icmp sgt i64 %5, 0
br i1 %cmp17.not.not34, label %for.body19.preheader, label %if.end
for.body19.preheader: ; preds = %for.cond.cleanup7
%.pre = load i64, ptr %b, align 8, !tbaa !5
%sub14 = sub nsw i64 %.pre, %5
br label %for.body19
for.body8: ; preds = %for.cond4.preheader, %for.body8
%i3.033 = phi i64 [ %inc11, %for.body8 ], [ %1, %for.cond4.preheader ]
%call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %i3.033)
%inc11 = add nsw i64 %i3.033, 1
%4 = load i64, ptr %a, align 8, !tbaa !5
%5 = load i64, ptr %k, align 8, !tbaa !5
%add5 = add nsw i64 %5, %4
%cmp6 = icmp slt i64 %inc11, %add5
br i1 %cmp6, label %for.body8, label %for.cond.cleanup7, !llvm.loop !11
for.body19: ; preds = %for.body19.preheader, %for.body19
%i13.0.in35 = phi i64 [ %i13.0, %for.body19 ], [ %sub14, %for.body19.preheader ]
%i13.0 = add nsw i64 %i13.0.in35, 1
%call20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %i13.0)
%6 = load i64, ptr %b, align 8, !tbaa !5
%cmp17.not.not = icmp slt i64 %i13.0, %6
br i1 %cmp17.not.not, label %for.body19, label %if.end, !llvm.loop !12
if.end: ; preds = %for.body19, %for.body, %for.cond4.preheader, %for.cond.cleanup7, %for.cond.preheader
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %k) #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"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include <stdio.h>
int main() {
int a, b, k, n;
scanf("%d%d%d", &a, &b, &k);
if (k >= b - a + 1) {
for (n = a; n <= b; n++)
printf("%d\n", n);
return 0;
}
for (n = a; n < a + k; n++)
printf("%d\n", n);
if (n < b - k + 1)
n = b - k + 1;
for ( ; n <= b; n++)
printf("%d\n", n);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215456/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215456/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %k, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%2 = load i32, ptr %a, align 4, !tbaa !5
%sub = sub nsw i32 %1, %2
%cmp.not.not = icmp sgt i32 %0, %sub
br i1 %cmp.not.not, label %for.cond.preheader, label %for.cond3.preheader
for.cond3.preheader: ; preds = %entry
%cmp539 = icmp sgt i32 %0, 0
br i1 %cmp539, label %for.body6, label %for.end10
for.cond.preheader: ; preds = %entry
%cmp1.not44 = icmp sgt i32 %2, %1
br i1 %cmp1.not44, label %cleanup, label %for.body
for.body: ; preds = %for.cond.preheader, %for.body
%n.045 = phi i32 [ %inc, %for.body ], [ %2, %for.cond.preheader ]
%call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %n.045)
%inc = add nsw i32 %n.045, 1
%3 = load i32, ptr %b, align 4, !tbaa !5
%cmp1.not.not = icmp slt i32 %n.045, %3
br i1 %cmp1.not.not, label %for.body, label %cleanup, !llvm.loop !9
for.body6: ; preds = %for.cond3.preheader, %for.body6
%n.140 = phi i32 [ %inc9, %for.body6 ], [ %2, %for.cond3.preheader ]
%call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %n.140)
%inc9 = add nsw i32 %n.140, 1
%4 = load i32, ptr %a, align 4, !tbaa !5
%5 = load i32, ptr %k, align 4, !tbaa !5
%add4 = add nsw i32 %5, %4
%cmp5 = icmp slt i32 %inc9, %add4
br i1 %cmp5, label %for.body6, label %for.end10.loopexit, !llvm.loop !11
for.end10.loopexit: ; preds = %for.body6
%.pre = load i32, ptr %b, align 4, !tbaa !5
br label %for.end10
for.end10: ; preds = %for.end10.loopexit, %for.cond3.preheader
%6 = phi i32 [ %1, %for.cond3.preheader ], [ %.pre, %for.end10.loopexit ]
%n.1.lcssa = phi i32 [ %2, %for.cond3.preheader ], [ %inc9, %for.end10.loopexit ]
%.lcssa = phi i32 [ %0, %for.cond3.preheader ], [ %5, %for.end10.loopexit ]
%sub11 = sub nsw i32 %6, %.lcssa
%cmp13.not = icmp sgt i32 %n.1.lcssa, %sub11
%add12 = add nsw i32 %sub11, 1
%spec.select = select i1 %cmp13.not, i32 %n.1.lcssa, i32 %add12
%cmp19.not42 = icmp sgt i32 %spec.select, %6
br i1 %cmp19.not42, label %cleanup, label %for.body20
for.body20: ; preds = %for.end10, %for.body20
%n.343 = phi i32 [ %inc23, %for.body20 ], [ %spec.select, %for.end10 ]
%call21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %n.343)
%inc23 = add nsw i32 %n.343, 1
%7 = load i32, ptr %b, align 4, !tbaa !5
%cmp19.not.not = icmp slt i32 %n.343, %7
br i1 %cmp19.not.not, label %for.body20, label %cleanup, !llvm.loop !12
cleanup: ; preds = %for.body20, %for.body, %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 <string.h>
#include <stdbool.h>
#include <math.h>
int main()
{
int T;
scanf("%d",&T);
int N[T];
for(int t = 0; t <T;++t)
{
scanf("%d",&N[t]);
}
long long int sum[T];
for (int i = 0; i<T;++i)
{
sum[i] = 0;
}
for (int i =0;i<T;++i)
{
sum[i] += pow(2,N[i]);
int j = 1;
while (j <= N[i]/2)
{
sum[i] -= pow(2,N[i]-j);
++j;
}
while(j < N[i])
{
sum[i] += pow(2,N[i]-j);
++j;
}
printf("%lld\n",sum[i] );
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2155/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2155/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%lld\0A\00", align 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) #6
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %T)
%0 = load i32, ptr %T, 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 %T, align 4, !tbaa !5
%cmp84 = icmp sgt i32 %3, 0
br i1 %cmp84, label %for.body, label %for.cond.cleanup15
for.cond.cleanup: ; preds = %for.body
%4 = zext i32 %5 to i64
%vla2 = alloca i64, i64 %4, align 16
%cmp486 = icmp sgt i32 %5, 0
br i1 %cmp486, label %for.body16.preheader, label %for.cond.cleanup15
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, ptr noundef nonnull %arrayidx)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%5 = load i32, ptr %T, 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.cond.cleanup, !llvm.loop !9
for.body16.preheader: ; preds = %for.cond.cleanup
%7 = shl nuw nsw i64 %4, 3
call void @llvm.memset.p0.i64(ptr nonnull align 16 %vla2, i8 0, i64 %7, i1 false), !tbaa !11
br label %for.body16
for.cond.cleanup15: ; preds = %while.end55, %entry, %for.cond.cleanup
call void @llvm.stackrestore.p0(ptr %2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %T) #6
ret i32 0
for.body16: ; preds = %for.body16.preheader, %while.end55
%indvars.iv102 = phi i64 [ 0, %for.body16.preheader ], [ %indvars.iv.next103, %while.end55 ]
%arrayidx18 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv102
%8 = load i32, ptr %arrayidx18, align 4, !tbaa !5
%ldexp = call double @ldexp(double 1.000000e+00, i32 %8) #6
%arrayidx21 = getelementptr inbounds i64, ptr %vla2, i64 %indvars.iv102
%9 = load i64, ptr %arrayidx21, align 8, !tbaa !11
%conv22 = sitofp i64 %9 to double
%add = fadd double %ldexp, %conv22
%conv23 = fptosi double %add to i64
store i64 %conv23, ptr %arrayidx21, align 8, !tbaa !11
%10 = load i32, ptr %arrayidx18, align 4, !tbaa !5
%cmp26.not89 = icmp slt i32 %10, 2
br i1 %cmp26.not89, label %while.cond38.preheader, label %while.body
while.cond.while.cond38.preheader_crit_edge: ; preds = %while.body
store i64 %conv36, ptr %arrayidx21, align 8, !tbaa !11
br label %while.cond38.preheader
while.cond38.preheader: ; preds = %while.cond.while.cond38.preheader_crit_edge, %for.body16
%arrayidx21.promoted94 = phi i64 [ %conv36, %while.cond.while.cond38.preheader_crit_edge ], [ %conv23, %for.body16 ]
%11 = phi i32 [ %14, %while.cond.while.cond38.preheader_crit_edge ], [ %10, %for.body16 ]
%j.0.lcssa = phi i32 [ %inc37, %while.cond.while.cond38.preheader_crit_edge ], [ 1, %for.body16 ]
%cmp4192 = icmp slt i32 %j.0.lcssa, %11
br i1 %cmp4192, label %while.body43, label %while.end55
while.body: ; preds = %for.body16, %while.body
%12 = phi i64 [ %conv36, %while.body ], [ %conv23, %for.body16 ]
%13 = phi i32 [ %14, %while.body ], [ %10, %for.body16 ]
%j.090 = phi i32 [ %inc37, %while.body ], [ 1, %for.body16 ]
%sub = sub nsw i32 %13, %j.090
%ldexp83 = call double @ldexp(double 1.000000e+00, i32 %sub) #6
%conv34 = sitofp i64 %12 to double
%sub35 = fsub double %conv34, %ldexp83
%conv36 = fptosi double %sub35 to i64
%inc37 = add nuw nsw i32 %j.090, 1
%14 = load i32, ptr %arrayidx18, align 4, !tbaa !5
%div = sdiv i32 %14, 2
%cmp26.not.not = icmp slt i32 %j.090, %div
br i1 %cmp26.not.not, label %while.body, label %while.cond.while.cond38.preheader_crit_edge, !llvm.loop !13
while.body43: ; preds = %while.cond38.preheader, %while.body43
%15 = phi i64 [ %conv53, %while.body43 ], [ %arrayidx21.promoted94, %while.cond38.preheader ]
%16 = phi i32 [ %17, %while.body43 ], [ %11, %while.cond38.preheader ]
%j.193 = phi i32 [ %inc54, %while.body43 ], [ %j.0.lcssa, %while.cond38.preheader ]
%sub46 = sub nsw i32 %16, %j.193
%ldexp82 = call double @ldexp(double 1.000000e+00, i32 %sub46) #6
%conv51 = sitofp i64 %15 to double
%add52 = fadd double %ldexp82, %conv51
%conv53 = fptosi double %add52 to i64
%inc54 = add nuw nsw i32 %j.193, 1
%17 = load i32, ptr %arrayidx18, align 4, !tbaa !5
%cmp41 = icmp slt i32 %inc54, %17
br i1 %cmp41, label %while.body43, label %while.cond38.while.end55_crit_edge, !llvm.loop !14
while.cond38.while.end55_crit_edge: ; preds = %while.body43
store i64 %conv53, ptr %arrayidx21, align 8, !tbaa !11
br label %while.end55
while.end55: ; preds = %while.cond38.while.end55_crit_edge, %while.cond38.preheader
%18 = phi i64 [ %conv53, %while.cond38.while.end55_crit_edge ], [ %arrayidx21.promoted94, %while.cond38.preheader ]
%call58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %18)
%indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
%19 = load i32, ptr %T, align 4, !tbaa !5
%20 = sext i32 %19 to i64
%cmp14 = icmp slt i64 %indvars.iv.next103, %20
br i1 %cmp14, label %for.body16, label %for.cond.cleanup15, !llvm.loop !15
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3
; Function Attrs: nofree willreturn
declare double @ldexp(double, i32) 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 nocallback nofree nosync nounwind willreturn }
attributes #4 = { nofree willreturn }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
|
#include <stdio.h>
#define TRUE 1
#define FALSE 0
int main(void){
int a,b,k;
int i;
scanf("%d %d %d",&a,&b,&k);
for( i=a; i<=b; i++){
( a+k <= i && i <= b-k) ? : printf("%d\n",i);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215542/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215542/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
%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 %b, align 4, !tbaa !5
%cmp.not8 = icmp sgt i32 %0, %1
br i1 %cmp.not8, label %for.end, label %for.body
for.body: ; preds = %entry, %for.inc
%2 = phi i32 [ %6, %for.inc ], [ %1, %entry ]
%i.09 = phi i32 [ %inc, %for.inc ], [ %0, %entry ]
%3 = load i32, ptr %a, align 4, !tbaa !5
%4 = load i32, ptr %k, align 4, !tbaa !5
%add = add nsw i32 %4, %3
%cmp1.not = icmp sle i32 %add, %i.09
%sub = sub nsw i32 %2, %4
%cmp2 = icmp sle i32 %i.09, %sub
%5 = select i1 %cmp1.not, i1 %cmp2, i1 false
br i1 %5, label %for.inc, label %cond.false
cond.false: ; preds = %for.body
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.09)
%.pre = load i32, ptr %b, align 4, !tbaa !5
br label %for.inc
for.inc: ; preds = %cond.false, %for.body
%6 = phi i32 [ %.pre, %cond.false ], [ %2, %for.body ]
%inc = add nsw i32 %i.09, 1
%cmp.not.not = icmp slt i32 %i.09, %6
br i1 %cmp.not.not, label %for.body, label %for.end, !llvm.loop !9
for.end: ; preds = %for.inc, %entry
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"}
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
int main(void){
int i,j;
int a,b,k;
scanf("%d %d %d",&a,&b,&k);
if(ceil(((float)b-a+1)/2)<=k)
for(i=a;i<=b;i++)
printf("%d\n",i);
else{
for(i=a;i<a+k;i++)
printf("%d\n",i);
for(i=k;i>0;i--){
printf("%d\n",b-i+1);
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215586/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215586/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
%k = 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 %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 i32, ptr %b, align 4, !tbaa !5
%conv = sitofp i32 %0 to float
%1 = load i32, ptr %a, align 4, !tbaa !5
%conv1 = sitofp i32 %1 to float
%sub = fsub float %conv, %conv1
%add = fadd float %sub, 1.000000e+00
%div = fmul float %add, 5.000000e-01
%2 = call float @llvm.ceil.f32(float %div)
%3 = fpext float %2 to double
%4 = load i32, ptr %k, align 4, !tbaa !5
%conv3 = sitofp i32 %4 to double
%cmp = fcmp ugt double %3, %conv3
br i1 %cmp, label %for.cond8.preheader, label %for.cond.preheader
for.cond.preheader: ; preds = %entry
%cmp5.not35 = icmp sgt i32 %1, %0
br i1 %cmp5.not35, label %if.end, label %for.body
for.cond8.preheader: ; preds = %entry
%cmp1038 = icmp sgt i32 %4, 0
br i1 %cmp1038, label %for.body12, label %if.end
for.body: ; preds = %for.cond.preheader, %for.body
%i.036 = phi i32 [ %inc, %for.body ], [ %1, %for.cond.preheader ]
%call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.036)
%inc = add nsw i32 %i.036, 1
%5 = load i32, ptr %b, align 4, !tbaa !5
%cmp5.not.not = icmp slt i32 %i.036, %5
br i1 %cmp5.not.not, label %for.body, label %if.end, !llvm.loop !9
for.cond17.preheader: ; preds = %for.body12
%cmp1840 = icmp sgt i32 %7, 0
br i1 %cmp1840, label %for.body20, label %if.end
for.body12: ; preds = %for.cond8.preheader, %for.body12
%i.139 = phi i32 [ %inc15, %for.body12 ], [ %1, %for.cond8.preheader ]
%call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.139)
%inc15 = add nsw i32 %i.139, 1
%6 = load i32, ptr %a, align 4, !tbaa !5
%7 = load i32, ptr %k, align 4, !tbaa !5
%add9 = add nsw i32 %7, %6
%cmp10 = icmp slt i32 %inc15, %add9
br i1 %cmp10, label %for.body12, label %for.cond17.preheader, !llvm.loop !11
for.body20: ; preds = %for.cond17.preheader, %for.body20
%i.241 = phi i32 [ %dec, %for.body20 ], [ %7, %for.cond17.preheader ]
%8 = load i32, ptr %b, align 4, !tbaa !5
%reass.sub = sub i32 %8, %i.241
%add22 = add i32 %reass.sub, 1
%call23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add22)
%dec = add nsw i32 %i.241, -1
%cmp18 = icmp ugt i32 %i.241, 1
br i1 %cmp18, label %for.body20, label %if.end, !llvm.loop !12
if.end: ; preds = %for.body, %for.body20, %for.cond8.preheader, %for.cond.preheader, %for.cond17.preheader
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.ceil.f32(float) #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
double shop(int n,int i){
const int tanka[3] = {380,550,850};
const int per[3] = {5,4,3};
const double wari[3] = {0.8,0.85,0.88};
return tanka[i] * (n - n % per[i]) * wari[i] + (double)tanka[i] * (n % per[i]);
}
int main(void){
int i, j, k, n;
int const wei[3] = {200,300,500};
double kingaku, *dp;
scanf("%d",&n);
n /= 100;
while(n != 0){
dp = (double *)malloc(sizeof(double) * (n + 1));
for(i = 0;i <= n;i++)
*(dp + i) = 0x7FFFFFFF;
*dp = 0;
for(i = 0;i < 3;i++){
for(j = n;j >= 0;j--){
if(*(dp + j) != 0x7FFFFFFF){
for(k = 0;wei[i] * k + j * 100 <= n * 100;k++){
kingaku = shop(k,i) + dp[j];
if(kingaku < dp[(wei[i] * k) / 100 + j])
dp[(wei[i] * k) / 100 + j] = kingaku;
}
}
}
}
printf("%d\n",(int)dp[n]);
scanf("%d",&n);
n /= 100;
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215650/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215650/source.c"
target datalayout = "e-m:e-p270: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.shop.tanka = private unnamed_addr constant [3 x i32] [i32 380, i32 550, i32 850], align 4
@__const.shop.per = private unnamed_addr constant [3 x i32] [i32 5, i32 4, i32 3], align 4
@__const.shop.wari = private unnamed_addr constant [3 x double] [double 8.000000e-01, double 8.500000e-01, double 8.800000e-01], 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: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
define dso_local double @shop(i32 noundef %n, i32 noundef %i) local_unnamed_addr #0 {
entry:
%idxprom = sext i32 %i to i64
%arrayidx = getelementptr inbounds [3 x i32], ptr @__const.shop.tanka, i64 0, i64 %idxprom
%0 = load i32, ptr %arrayidx, align 4, !tbaa !5
%arrayidx2 = getelementptr inbounds [3 x i32], ptr @__const.shop.per, i64 0, i64 %idxprom
%1 = load i32, ptr %arrayidx2, align 4, !tbaa !5
%rem = srem i32 %n, %1
%sub = sub nsw i32 %n, %rem
%mul = mul nsw i32 %sub, %0
%conv = sitofp i32 %mul to double
%arrayidx4 = getelementptr inbounds [3 x double], ptr @__const.shop.wari, i64 0, i64 %idxprom
%2 = load double, ptr %arrayidx4, align 8, !tbaa !9
%conv8 = sitofp i32 %0 to double
%conv12 = sitofp i32 %rem to double
%mul13 = fmul double %conv8, %conv12
%3 = tail call double @llvm.fmuladd.f64(double %conv, double %2, double %mul13)
ret double %3
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #3 {
entry:
%n = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%storemerge.in94 = load i32, ptr %n, align 4, !tbaa !5
%storemerge95 = sdiv i32 %storemerge.in94, 100
store i32 %storemerge95, ptr %n, align 4, !tbaa !5
%storemerge.in.off96 = add i32 %storemerge.in94, 99
%cmp.not97 = icmp ult i32 %storemerge.in.off96, 199
br i1 %cmp.not97, label %while.end, label %while.body
while.body: ; preds = %entry, %for.end53
%storemerge98 = phi i32 [ %storemerge, %for.end53 ], [ %storemerge95, %entry ]
%add = add nsw i32 %storemerge98, 1
%conv = sext i32 %add to i64
%mul = shl nsw i64 %conv, 3
%call1 = call noalias ptr @malloc(i64 noundef %mul) #7
%cmp2.not85 = icmp slt i32 %storemerge98, 0
br i1 %cmp2.not85, label %for.end.thread, label %for.body.preheader
for.end.thread: ; preds = %while.body
store double 0.000000e+00, ptr %call1, align 8, !tbaa !9
br label %for.end53
for.body.preheader: ; preds = %while.body
%wide.trip.count = zext i32 %add to i64
%min.iters.check = icmp ult i32 %add, 4
br i1 %min.iters.check, label %for.body.preheader110, label %vector.ph
vector.ph: ; preds = %for.body.preheader
%n.vec = and i64 %wide.trip.count, 4294967292
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%0 = getelementptr inbounds double, ptr %call1, i64 %index
store <2 x double> <double 0x41DFFFFFFFC00000, double 0x41DFFFFFFFC00000>, ptr %0, align 8, !tbaa !9
%1 = getelementptr inbounds double, ptr %0, i64 2
store <2 x double> <double 0x41DFFFFFFFC00000, double 0x41DFFFFFFFC00000>, ptr %1, align 8, !tbaa !9
%index.next = add nuw i64 %index, 4
%2 = icmp eq i64 %index.next, %n.vec
br i1 %2, label %middle.block, label %vector.body, !llvm.loop !11
middle.block: ; preds = %vector.body
%cmp.n = icmp eq i64 %n.vec, %wide.trip.count
br i1 %cmp.n, label %for.end, label %for.body.preheader110
for.body.preheader110: ; preds = %for.body.preheader, %middle.block
%indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ]
br label %for.body
for.body: ; preds = %for.body.preheader110, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader110 ]
%add.ptr = getelementptr inbounds double, ptr %call1, i64 %indvars.iv
store double 0x41DFFFFFFFC00000, ptr %add.ptr, 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 !15
for.end: ; preds = %for.body, %middle.block
store double 0.000000e+00, ptr %call1, align 8, !tbaa !9
%cmp990 = icmp sgt i32 %storemerge98, -1
%mul20 = mul nsw i32 %storemerge98, 100
br i1 %cmp990, label %for.cond8.preheader.us.preheader, label %for.end53
for.cond8.preheader.us.preheader: ; preds = %for.end
%3 = zext i32 %storemerge98 to i64
br label %for.body11.us
for.body11.us: ; preds = %for.cond8.preheader.us.preheader, %for.inc49.us
%indvars.iv101 = phi i64 [ %3, %for.cond8.preheader.us.preheader ], [ %indvars.iv.next102, %for.inc49.us ]
%add.ptr13.us = getelementptr inbounds double, ptr %call1, i64 %indvars.iv101
%4 = load double, ptr %add.ptr13.us, align 8, !tbaa !9
%cmp14.us = fcmp une double %4, 0x41DFFFFFFFC00000
br i1 %cmp14.us, label %for.cond16.preheader.us, label %for.inc49.us
for.body23.us: ; preds = %for.cond16.preheader.us, %for.inc45.us
%mul1789.us = phi i32 [ %mul17.us, %for.inc45.us ], [ 0, %for.cond16.preheader.us ]
%k.088.us = phi i32 [ %inc46.us, %for.inc45.us ], [ 0, %for.cond16.preheader.us ]
%rem.i.us.urem = urem i32 %k.088.us, 5
%sub.i.us = sub nuw nsw i32 %k.088.us, %rem.i.us.urem
%mul.i.us = mul nsw i32 %sub.i.us, 380
%conv.i.us = sitofp i32 %mul.i.us to double
%conv12.i.us = sitofp i32 %rem.i.us.urem to double
%mul13.i.us = fmul double %conv12.i.us, 3.800000e+02
%5 = call double @llvm.fmuladd.f64(double %conv.i.us, double 8.000000e-01, double %mul13.i.us)
%6 = load double, ptr %add.ptr13.us, align 8, !tbaa !9
%add27.us = fadd double %6, %5
%div31.us = sdiv i32 %mul1789.us, 100
%add32.us = add nsw i32 %div31.us, %8
%idxprom33.us = sext i32 %add32.us to i64
%arrayidx34.us = getelementptr inbounds double, ptr %call1, i64 %idxprom33.us
%7 = load double, ptr %arrayidx34.us, align 8, !tbaa !9
%cmp35.us = fcmp olt double %add27.us, %7
br i1 %cmp35.us, label %if.then37.us, label %for.inc45.us
if.then37.us: ; preds = %for.body23.us
store double %add27.us, ptr %arrayidx34.us, align 8, !tbaa !9
br label %for.inc45.us
for.inc45.us: ; preds = %if.then37.us, %for.body23.us
%inc46.us = add nuw nsw i32 %k.088.us, 1
%mul17.us = mul nsw i32 %inc46.us, 200
%add19.us = add nsw i32 %mul17.us, %mul18.us
%cmp21.not.us = icmp sgt i32 %add19.us, %mul20
br i1 %cmp21.not.us, label %for.inc49.us, label %for.body23.us, !llvm.loop !16
for.inc49.us: ; preds = %for.inc45.us, %for.cond16.preheader.us, %for.body11.us
%indvars.iv.next102 = add nsw i64 %indvars.iv101, -1
%cmp9.us = icmp sgt i64 %indvars.iv101, 0
br i1 %cmp9.us, label %for.body11.us, label %for.body11.us.1, !llvm.loop !17
for.cond16.preheader.us: ; preds = %for.body11.us
%8 = trunc i64 %indvars.iv101 to i32
%mul18.us = mul nsw i32 %8, 100
%cmp21.not87.us = icmp sgt i32 %mul18.us, %mul20
br i1 %cmp21.not87.us, label %for.inc49.us, label %for.body23.us
for.body11.us.1: ; preds = %for.inc49.us, %for.inc49.us.1
%indvars.iv101.1 = phi i64 [ %indvars.iv.next102.1, %for.inc49.us.1 ], [ %3, %for.inc49.us ]
%add.ptr13.us.1 = getelementptr inbounds double, ptr %call1, i64 %indvars.iv101.1
%9 = load double, ptr %add.ptr13.us.1, align 8, !tbaa !9
%cmp14.us.1 = fcmp une double %9, 0x41DFFFFFFFC00000
br i1 %cmp14.us.1, label %for.cond16.preheader.us.1, label %for.inc49.us.1
for.cond16.preheader.us.1: ; preds = %for.body11.us.1
%10 = trunc i64 %indvars.iv101.1 to i32
%mul18.us.1 = mul nsw i32 %10, 100
%cmp21.not87.us.1 = icmp sgt i32 %mul18.us.1, %mul20
br i1 %cmp21.not87.us.1, label %for.inc49.us.1, label %for.body23.us.1
for.body23.us.1: ; preds = %for.cond16.preheader.us.1, %for.inc45.us.1
%mul1789.us.1 = phi i32 [ %mul17.us.1, %for.inc45.us.1 ], [ 0, %for.cond16.preheader.us.1 ]
%k.088.us.1 = phi i32 [ %inc46.us.1, %for.inc45.us.1 ], [ 0, %for.cond16.preheader.us.1 ]
%rem.i.us.1.urem = and i32 %k.088.us.1, 3
%sub.i.us.1 = and i32 %k.088.us.1, 2147483644
%mul.i.us.1 = mul nsw i32 %sub.i.us.1, 550
%conv.i.us.1 = sitofp i32 %mul.i.us.1 to double
%conv12.i.us.1 = sitofp i32 %rem.i.us.1.urem to double
%mul13.i.us.1 = fmul double %conv12.i.us.1, 5.500000e+02
%11 = call double @llvm.fmuladd.f64(double %conv.i.us.1, double 8.500000e-01, double %mul13.i.us.1)
%12 = load double, ptr %add.ptr13.us.1, align 8, !tbaa !9
%add27.us.1 = fadd double %12, %11
%div31.us.1 = sdiv i32 %mul1789.us.1, 100
%add32.us.1 = add nsw i32 %div31.us.1, %10
%idxprom33.us.1 = sext i32 %add32.us.1 to i64
%arrayidx34.us.1 = getelementptr inbounds double, ptr %call1, i64 %idxprom33.us.1
%13 = load double, ptr %arrayidx34.us.1, align 8, !tbaa !9
%cmp35.us.1 = fcmp olt double %add27.us.1, %13
br i1 %cmp35.us.1, label %if.then37.us.1, label %for.inc45.us.1
if.then37.us.1: ; preds = %for.body23.us.1
store double %add27.us.1, ptr %arrayidx34.us.1, align 8, !tbaa !9
br label %for.inc45.us.1
for.inc45.us.1: ; preds = %if.then37.us.1, %for.body23.us.1
%inc46.us.1 = add nuw nsw i32 %k.088.us.1, 1
%mul17.us.1 = mul nsw i32 %inc46.us.1, 300
%add19.us.1 = add nsw i32 %mul17.us.1, %mul18.us.1
%cmp21.not.us.1 = icmp sgt i32 %add19.us.1, %mul20
br i1 %cmp21.not.us.1, label %for.inc49.us.1, label %for.body23.us.1, !llvm.loop !16
for.inc49.us.1: ; preds = %for.inc45.us.1, %for.cond16.preheader.us.1, %for.body11.us.1
%indvars.iv.next102.1 = add nsw i64 %indvars.iv101.1, -1
%cmp9.us.1 = icmp sgt i64 %indvars.iv101.1, 0
br i1 %cmp9.us.1, label %for.body11.us.1, label %for.body11.us.2, !llvm.loop !17
for.body11.us.2: ; preds = %for.inc49.us.1, %for.inc49.us.2
%indvars.iv101.2 = phi i64 [ %indvars.iv.next102.2, %for.inc49.us.2 ], [ %3, %for.inc49.us.1 ]
%add.ptr13.us.2 = getelementptr inbounds double, ptr %call1, i64 %indvars.iv101.2
%14 = load double, ptr %add.ptr13.us.2, align 8, !tbaa !9
%cmp14.us.2 = fcmp une double %14, 0x41DFFFFFFFC00000
br i1 %cmp14.us.2, label %for.cond16.preheader.us.2, label %for.inc49.us.2
for.cond16.preheader.us.2: ; preds = %for.body11.us.2
%15 = trunc i64 %indvars.iv101.2 to i32
%mul18.us.2 = mul nsw i32 %15, 100
%cmp21.not87.us.2 = icmp sgt i32 %mul18.us.2, %mul20
br i1 %cmp21.not87.us.2, label %for.inc49.us.2, label %for.body23.us.2
for.body23.us.2: ; preds = %for.cond16.preheader.us.2, %for.inc45.us.2
%mul1789.us.2 = phi i32 [ %mul17.us.2, %for.inc45.us.2 ], [ 0, %for.cond16.preheader.us.2 ]
%k.088.us.2 = phi i32 [ %inc46.us.2, %for.inc45.us.2 ], [ 0, %for.cond16.preheader.us.2 ]
%rem.i.us.2.urem = urem i32 %k.088.us.2, 3
%sub.i.us.2 = sub nuw nsw i32 %k.088.us.2, %rem.i.us.2.urem
%mul.i.us.2 = mul nsw i32 %sub.i.us.2, 850
%conv.i.us.2 = sitofp i32 %mul.i.us.2 to double
%conv12.i.us.2 = sitofp i32 %rem.i.us.2.urem to double
%mul13.i.us.2 = fmul double %conv12.i.us.2, 8.500000e+02
%16 = call double @llvm.fmuladd.f64(double %conv.i.us.2, double 8.800000e-01, double %mul13.i.us.2)
%17 = load double, ptr %add.ptr13.us.2, align 8, !tbaa !9
%add27.us.2 = fadd double %17, %16
%div31.us.2 = sdiv i32 %mul1789.us.2, 100
%add32.us.2 = add nsw i32 %div31.us.2, %15
%idxprom33.us.2 = sext i32 %add32.us.2 to i64
%arrayidx34.us.2 = getelementptr inbounds double, ptr %call1, i64 %idxprom33.us.2
%18 = load double, ptr %arrayidx34.us.2, align 8, !tbaa !9
%cmp35.us.2 = fcmp olt double %add27.us.2, %18
br i1 %cmp35.us.2, label %if.then37.us.2, label %for.inc45.us.2
if.then37.us.2: ; preds = %for.body23.us.2
store double %add27.us.2, ptr %arrayidx34.us.2, align 8, !tbaa !9
br label %for.inc45.us.2
for.inc45.us.2: ; preds = %if.then37.us.2, %for.body23.us.2
%inc46.us.2 = add nuw nsw i32 %k.088.us.2, 1
%mul17.us.2 = mul nsw i32 %inc46.us.2, 500
%add19.us.2 = add nsw i32 %mul17.us.2, %mul18.us.2
%cmp21.not.us.2 = icmp sgt i32 %add19.us.2, %mul20
br i1 %cmp21.not.us.2, label %for.inc49.us.2, label %for.body23.us.2, !llvm.loop !16
for.inc49.us.2: ; preds = %for.inc45.us.2, %for.cond16.preheader.us.2, %for.body11.us.2
%indvars.iv.next102.2 = add nsw i64 %indvars.iv101.2, -1
%cmp9.us.2 = icmp sgt i64 %indvars.iv101.2, 0
br i1 %cmp9.us.2, label %for.body11.us.2, label %for.end53, !llvm.loop !17
for.end53: ; preds = %for.inc49.us.2, %for.end, %for.end.thread
%idxprom54 = sext i32 %storemerge98 to i64
%arrayidx55 = getelementptr inbounds double, ptr %call1, i64 %idxprom54
%19 = load double, ptr %arrayidx55, align 8, !tbaa !9
%conv56 = fptosi double %19 to i32
%call57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv56)
%call58 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%storemerge.in = load i32, ptr %n, align 4, !tbaa !5
%storemerge = sdiv i32 %storemerge.in, 100
store i32 %storemerge, ptr %n, align 4, !tbaa !5
%storemerge.in.off = add i32 %storemerge.in, 99
%cmp.not = icmp ult i32 %storemerge.in.off, 199
br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !18
while.end: ; preds = %for.end53, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6
ret i32 0
}
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4
; Function Attrs: 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 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 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 = { 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 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12, !13, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !12, !14, !13}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
|
#include <stdio.h>
#include <string.h>
void reverse(char *S) {
char tmp;
int i;
int length = strlen(S);
for (i = 1; i <= length / 2; i++) {
tmp = S[i - 1];
S[i - 1] = S[length - i];
S[length - i] = tmp;
}
}
int main() {
char S[3], ans[3];
int i;
scanf("%s", S);
if (strlen(S) > 2)
reverse(S);
printf("%s", S);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215694/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215694/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind memory(argmem: readwrite) uwtable
define dso_local void @reverse(ptr nocapture noundef %S) local_unnamed_addr #0 {
entry:
%call = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %S) #5
%conv = trunc i64 %call to i32
%cmp.not22 = icmp slt i32 %conv, 2
br i1 %cmp.not22, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %entry
%sext = shl i64 %call, 32
%0 = ashr exact i64 %sext, 32
%invariant.gep = getelementptr i8, ptr %S, i64 -1
%1 = lshr i64 %call, 1
%2 = and i64 %1, 2147483647
%xtraiter = and i64 %1, 1
%3 = icmp eq i64 %2, 1
br i1 %3, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new
for.body.preheader.new: ; preds = %for.body.preheader
%unroll_iter = sub nsw i64 %2, %xtraiter
%4 = getelementptr i8, ptr %S, i64 %0
br label %for.body
for.body: ; preds = %for.body, %for.body.preheader.new
%indvars.iv = phi i64 [ 1, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.body ]
%niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ]
%gep = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv
%5 = load i8, ptr %gep, align 1, !tbaa !5
%6 = sub nsw i64 %0, %indvars.iv
%arrayidx4 = getelementptr inbounds i8, ptr %S, i64 %6
%7 = load i8, ptr %arrayidx4, align 1, !tbaa !5
store i8 %7, ptr %gep, align 1, !tbaa !5
store i8 %5, ptr %arrayidx4, align 1, !tbaa !5
%indvars.iv.next.neg = xor i64 %indvars.iv, -1
%gep.1 = getelementptr i8, ptr %S, i64 %indvars.iv
%8 = load i8, ptr %gep.1, align 1, !tbaa !5
%arrayidx4.1 = getelementptr i8, ptr %4, i64 %indvars.iv.next.neg
%9 = load i8, ptr %arrayidx4.1, align 1, !tbaa !5
store i8 %9, ptr %gep.1, align 1, !tbaa !5
store i8 %8, ptr %arrayidx4.1, align 1, !tbaa !5
%indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
%niter.next.1 = add i64 %niter, 2
%niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !8
for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader
%indvars.iv.unr = phi i64 [ 1, %for.body.preheader ], [ %indvars.iv.next.1, %for.body ]
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.end, label %for.body.epil
for.body.epil: ; preds = %for.end.loopexit.unr-lcssa
%gep.epil = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv.unr
%10 = load i8, ptr %gep.epil, align 1, !tbaa !5
%11 = sub nsw i64 %0, %indvars.iv.unr
%arrayidx4.epil = getelementptr inbounds i8, ptr %S, i64 %11
%12 = load i8, ptr %arrayidx4.epil, align 1, !tbaa !5
store i8 %12, ptr %gep.epil, align 1, !tbaa !5
store i8 %10, ptr %arrayidx4.epil, align 1, !tbaa !5
br label %for.end
for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %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 nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #3 {
entry:
%S = alloca [3 x i8], align 1
call void @llvm.lifetime.start.p0(i64 3, 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) #5
%cmp = icmp ule i64 %call2, 2
%conv.i = trunc i64 %call2 to i32
%cmp.not22.i = icmp slt i32 %conv.i, 2
%or.cond = or i1 %cmp, %cmp.not22.i
br i1 %or.cond, label %if.end, label %for.body.preheader.i
for.body.preheader.i: ; preds = %entry
%sext.i = shl i64 %call2, 32
%0 = ashr exact i64 %sext.i, 32
%invariant.gep.i = getelementptr i8, ptr %S, i64 -1
%1 = lshr i64 %call2, 1
%2 = and i64 %1, 2147483647
%xtraiter = and i64 %1, 1
%3 = icmp eq i64 %2, 1
br i1 %3, label %if.end.loopexit.unr-lcssa, label %for.body.preheader.i.new
for.body.preheader.i.new: ; preds = %for.body.preheader.i
%unroll_iter = sub nsw i64 %2, %xtraiter
%4 = getelementptr i8, ptr %S, i64 %0
br label %for.body.i
for.body.i: ; preds = %for.body.i, %for.body.preheader.i.new
%indvars.iv.i = phi i64 [ 1, %for.body.preheader.i.new ], [ %indvars.iv.next.i.1, %for.body.i ]
%niter = phi i64 [ 0, %for.body.preheader.i.new ], [ %niter.next.1, %for.body.i ]
%gep.i = getelementptr i8, ptr %invariant.gep.i, i64 %indvars.iv.i
%5 = load i8, ptr %gep.i, align 1, !tbaa !5
%6 = sub nsw i64 %0, %indvars.iv.i
%arrayidx4.i = getelementptr inbounds i8, ptr %S, i64 %6
%7 = load i8, ptr %arrayidx4.i, align 1, !tbaa !5
store i8 %7, ptr %gep.i, align 1, !tbaa !5
store i8 %5, ptr %arrayidx4.i, align 1, !tbaa !5
%indvars.iv.next.i.neg = xor i64 %indvars.iv.i, -1
%gep.i.1 = getelementptr i8, ptr %S, i64 %indvars.iv.i
%8 = load i8, ptr %gep.i.1, align 1, !tbaa !5
%arrayidx4.i.1 = getelementptr i8, ptr %4, i64 %indvars.iv.next.i.neg
%9 = load i8, ptr %arrayidx4.i.1, align 1, !tbaa !5
store i8 %9, ptr %gep.i.1, align 1, !tbaa !5
store i8 %8, ptr %arrayidx4.i.1, align 1, !tbaa !5
%indvars.iv.next.i.1 = add nuw nsw i64 %indvars.iv.i, 2
%niter.next.1 = add nuw i64 %niter, 2
%niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
br i1 %niter.ncmp.1, label %if.end.loopexit.unr-lcssa, label %for.body.i, !llvm.loop !8
if.end.loopexit.unr-lcssa: ; preds = %for.body.i, %for.body.preheader.i
%indvars.iv.i.unr = phi i64 [ 1, %for.body.preheader.i ], [ %indvars.iv.next.i.1, %for.body.i ]
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %if.end, label %for.body.i.epil
for.body.i.epil: ; preds = %if.end.loopexit.unr-lcssa
%gep.i.epil = getelementptr i8, ptr %invariant.gep.i, i64 %indvars.iv.i.unr
%10 = load i8, ptr %gep.i.epil, align 1, !tbaa !5
%11 = sub nsw i64 %0, %indvars.iv.i.unr
%arrayidx4.i.epil = getelementptr inbounds i8, ptr %S, i64 %11
%12 = load i8, ptr %arrayidx4.i.epil, align 1, !tbaa !5
store i8 %12, ptr %gep.i.epil, align 1, !tbaa !5
store i8 %10, ptr %arrayidx4.i.epil, align 1, !tbaa !5
br label %if.end
if.end: ; preds = %for.body.i.epil, %if.end.loopexit.unr-lcssa, %entry
%call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull %S)
call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %S) #6
ret i32 0
}
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4
attributes #0 = { nofree nounwind memory(argmem: 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 memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind willreturn memory(read) }
attributes #6 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
|
#include<stdio.h>
#include<string.h>
int main(void){
char s[100];
char t[4];
int len;
int i;
scanf("%s",s);
len=strlen(s);
if(len==2){
printf("%s",s);
}else{
t[0]=s[2];
t[1]=s[1];
t[2]=s[0];
printf("%s",t);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215737/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215737/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%s = alloca [100 x i8], align 16
%t = alloca [4 x i8], align 1
call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %s) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s)
%call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #5
%0 = and i64 %call2, 4294967295
%cmp = icmp eq i64 %0, 2
br i1 %cmp, label %if.end, label %if.else
if.else: ; preds = %entry
%arrayidx = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 2
%1 = load i8, ptr %arrayidx, align 2, !tbaa !5
store i8 %1, ptr %t, align 1, !tbaa !5
%arrayidx7 = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 1
%2 = load i8, ptr %arrayidx7, align 1, !tbaa !5
%arrayidx8 = getelementptr inbounds [4 x i8], ptr %t, i64 0, i64 1
store i8 %2, ptr %arrayidx8, align 1, !tbaa !5
%3 = load i8, ptr %s, align 16, !tbaa !5
%arrayidx10 = getelementptr inbounds [4 x i8], ptr %t, i64 0, i64 2
store i8 %3, ptr %arrayidx10, align 1, !tbaa !5
br label %if.end
if.end: ; preds = %entry, %if.else
%t.sink = phi ptr [ %t, %if.else ], [ %s, %entry ]
%call12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull %t.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4
call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %s) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
#include<string.h>
int main()
{
char s[5];
scanf("%s", s);
if (strlen(s) == 2)
printf("%s\n", s);
else
printf("%c%c%c\n", s[2], s[1], s[0]);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215788/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215788/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1
@.str.2 = private unnamed_addr constant [8 x i8] c"%c%c%c\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%s = alloca [5 x i8], align 1
call void @llvm.lifetime.start.p0(i64 5, 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
%cmp = icmp eq i64 %call2, 2
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %s)
br label %if.end
if.else: ; preds = %entry
%arrayidx = getelementptr inbounds [5 x i8], ptr %s, i64 0, i64 2
%0 = load i8, ptr %arrayidx, align 1, !tbaa !5
%conv = sext i8 %0 to i32
%arrayidx5 = getelementptr inbounds [5 x i8], ptr %s, i64 0, i64 1
%1 = load i8, ptr %arrayidx5, align 1, !tbaa !5
%conv6 = sext i8 %1 to i32
%2 = load i8, ptr %s, align 1, !tbaa !5
%conv8 = sext i8 %2 to i32
%call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv, i32 noundef %conv6, i32 noundef %conv8)
br label %if.end
if.end: ; preds = %if.else, %if.then
call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %s) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void){
int N;
scanf("%d", &N);
switch(N%10){
case 2:
case 4:
case 5:
case 7:
case 9:
printf("hon\n");
break;
case 0:
case 1:
case 6:
case 8:
printf("pon\n");
break;
case 3:
printf("bon\n");
break;
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215845/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215845/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@str = private unnamed_addr constant [4 x i8] c"bon\00", align 1
@str.4 = private unnamed_addr constant [4 x i8] c"pon\00", align 1
@str.5 = private unnamed_addr constant [4 x i8] c"hon\00", align 1
@reltable.main = private unnamed_addr constant [10 x 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.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), i32 trunc (i64 sub (i64 ptrtoint (ptr @str 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), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 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), 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
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
%rem = srem i32 %0, 10
%1 = icmp ult i32 %rem, 10
br i1 %1, label %switch.lookup, label %sw.epilog
switch.lookup: ; preds = %entry
%2 = sext i32 %rem to i64
%reltable.shift = shl i64 %2, 2
%reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift)
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %reltable.intrinsic)
br label %sw.epilog
sw.epilog: ; preds = %entry, %switch.lookup
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
; Function Attrs: nocallback nofree nosync nounwind 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 = { nofree nounwind "no-trapping-math"="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 willreturn memory(argmem: read) }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
#define LENGTH 256
int main() {
char input[LENGTH];
int n;
fgets(input, LENGTH,stdin);
sscanf(input, "%d", &n);
int rem = n % 10;
if(rem == 2 || rem == 4 || rem == 5 || rem == 7 || rem == 9) {
printf("hon \n");
} else if(rem == 0 || rem == 1 || rem == 6 || rem == 8) {
printf("pon \n");
} else if(rem == 3) {
printf("bon \n");
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215896/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215896/source.c"
target datalayout = "e-m:e-p270: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 = private unnamed_addr constant [5 x i8] c"bon \00", align 1
@str.4 = private unnamed_addr constant [5 x i8] c"pon \00", align 1
@str.5 = private unnamed_addr constant [5 x i8] c"hon \00", align 1
@reltable.main = private unnamed_addr constant [10 x 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.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), i32 trunc (i64 sub (i64 ptrtoint (ptr @str 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), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 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), 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:
%input = alloca [256 x i8], align 16
%n = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %input) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5
%0 = load ptr, ptr @stdin, align 8, !tbaa !5
%call = call ptr @fgets(ptr noundef nonnull %input, i32 noundef 256, ptr noundef %0)
%call2 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %input, ptr noundef nonnull @.str, ptr noundef nonnull %n) #5
%1 = load i32, ptr %n, align 4, !tbaa !9
%rem3 = srem i32 %1, 10
%2 = icmp ult i32 %rem3, 10
br i1 %2, label %switch.lookup, label %if.end26
switch.lookup: ; preds = %entry
%3 = sext i32 %rem3 to i64
%reltable.shift = shl i64 %3, 2
%reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift)
%puts42 = call i32 @puts(ptr nonnull dereferenceable(1) %reltable.intrinsic)
br label %if.end26
if.end26: ; preds = %entry, %switch.lookup
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5
call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %input) #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: nofree nounwind
declare noundef i32 @__isoc99_sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_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 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 = { nofree nounwind "no-trapping-math"="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 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 = !{!"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}
|
#include <stdio.h>
int
main (void)
{
int n;
scanf ("%d", &n);
n %= 10;
if (n == 0 || n == 1 || n == 6 || n == 8)
puts ("pon");
else if (n == 3)
puts ("bon");
else
puts ("hon");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215939/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215939/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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"pon\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"bon\00", align 1
@.str.3 = private unnamed_addr constant [4 x i8] c"hon\00", align 1
@reltable.main = private unnamed_addr constant [9 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 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.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.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32)], align 4
; 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
%rem = srem i32 %0, 10
store i32 %rem, ptr %n, align 4, !tbaa !5
%1 = icmp ult i32 %rem, 9
br i1 %1, label %switch.lookup, label %if.end12
switch.lookup: ; preds = %entry
%2 = sext i32 %rem to i64
%reltable.shift = shl i64 %2, 2
%reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift)
br label %if.end12
if.end12: ; preds = %entry, %switch.lookup
%.str.2.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @.str.3, %entry ]
%call9 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.2.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read)
declare ptr @llvm.load.relative.i64(ptr, i64) #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind 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)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
#include <math.h>
int main(void)
{
int a,s;
scanf("%d",&a);
s=a%10;
if(s==3)
printf("bon\n");
else if((s==0)||(s==1)||(s==6)||(s==8))
printf("pon\n");
else
printf("hon\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215982/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215982/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@str = private unnamed_addr constant [4 x i8] c"hon\00", align 1
@str.4 = private unnamed_addr constant [4 x i8] c"pon\00", align 1
@str.5 = private unnamed_addr constant [4 x i8] c"bon\00", align 1
@reltable.main = private unnamed_addr constant [9 x 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.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str 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), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str 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 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)], align 4
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%0 = load i32, ptr %a, align 4, !tbaa !5
%rem = srem i32 %0, 10
%1 = icmp ult i32 %rem, 9
br i1 %1, label %switch.lookup, label %if.end12
switch.lookup: ; preds = %entry
%2 = sext i32 %rem to i64
%reltable.shift = shl i64 %2, 2
%reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift)
br label %if.end12
if.end12: ; preds = %entry, %switch.lookup
%str.4.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @str, %entry ]
%puts19 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: 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 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 = { nofree nounwind "no-trapping-math"="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 willreturn memory(argmem: read) }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void){
int N, a;
scanf("%d", &N);
a = N % 10;
if(a == 3){
printf("bon\n");
}
else if(a == 0 || a == 1 || a == 6 || a == 8){
printf("pon\n");
}
else {
printf("hon\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216024/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216024/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@str = private unnamed_addr constant [4 x i8] c"hon\00", align 1
@str.4 = private unnamed_addr constant [4 x i8] c"pon\00", align 1
@str.5 = private unnamed_addr constant [4 x i8] c"bon\00", align 1
@reltable.main = private unnamed_addr constant [9 x 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.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str 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), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str 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 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)], align 4
; 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
%rem = srem i32 %0, 10
%1 = icmp ult i32 %rem, 9
br i1 %1, label %switch.lookup, label %if.end12
switch.lookup: ; preds = %entry
%2 = sext i32 %rem to i64
%reltable.shift = shl i64 %2, 2
%reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift)
br label %if.end12
if.end12: ; preds = %entry, %switch.lookup
%str.4.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @str, %entry ]
%puts19 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
; Function Attrs: nocallback nofree nosync nounwind 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 = { nofree nounwind "no-trapping-math"="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 willreturn memory(argmem: read) }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
int m;
int main(){
scanf("%d",&m);
int n=m%10;
if(n==2 || n==4 || n==5 || n==7 || n==9){
printf("hon\n");}
else{
if(n==0 || n==1 || n==6 || n==8){
printf("pon\n");}
else{
printf("bon\n");}}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216068/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216068/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
@m = dso_local global i32 0, align 4
@str = private unnamed_addr constant [4 x i8] c"bon\00", align 1
@str.4 = private unnamed_addr constant [4 x i8] c"pon\00", align 1
@str.5 = private unnamed_addr constant [4 x i8] c"hon\00", align 1
@reltable.main = private unnamed_addr constant [10 x 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.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), i32 trunc (i64 sub (i64 ptrtoint (ptr @str 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), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 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), 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:
%call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @m)
%0 = load i32, ptr @m, align 4, !tbaa !5
%rem = srem i32 %0, 10
%1 = icmp ult i32 %rem, 10
br i1 %1, label %switch.lookup, label %if.end20
switch.lookup: ; preds = %entry
%2 = sext i32 %rem to i64
%reltable.shift = shl i64 %2, 2
%reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift)
br label %if.end20
if.end20: ; preds = %entry, %switch.lookup
%str.4.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @str, %entry ]
%puts35 = tail call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
ret i32 0
}
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read)
declare ptr @llvm.load.relative.i64(ptr, i64) #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: 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"}
|
/* ex3_1
suzuto */
#include <stdio.h>
int main(void) {
int num, first_place; /*変数の宣言*/
scanf("%d",&num); /*本数の入力*/
first_place = num % 10; /*本数の一の位をfirst_placeに代入*/
switch (first_place) {
case 2:
case 4:
case 5:
case 7:
case 9:
printf("hon\n"); /*読み方が「ほん」の時*/
break;
case 0:
case 1:
case 6:
case 8:
printf("pon\n"); /*読み方が「ぽん」の時*/
break;
case 3:
printf("bon\n"); /*読み方が「ぼん」の時*/
break;
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216110/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216110/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@str = private unnamed_addr constant [4 x i8] c"bon\00", align 1
@str.4 = private unnamed_addr constant [4 x i8] c"pon\00", align 1
@str.5 = private unnamed_addr constant [4 x i8] c"hon\00", align 1
@reltable.main = private unnamed_addr constant [10 x 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.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), i32 trunc (i64 sub (i64 ptrtoint (ptr @str 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), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 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), 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:
%num = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %num)
%0 = load i32, ptr %num, align 4, !tbaa !5
%rem = srem i32 %0, 10
%1 = icmp ult i32 %rem, 10
br i1 %1, label %switch.lookup, label %sw.epilog
switch.lookup: ; preds = %entry
%2 = sext i32 %rem to i64
%reltable.shift = shl i64 %2, 2
%reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift)
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %reltable.intrinsic)
br label %sw.epilog
sw.epilog: ; preds = %entry, %switch.lookup
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #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 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 = { nofree nounwind "no-trapping-math"="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 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"}
|
//ex3_2
//TKC001
#include<stdio.h>
int main(void){
int num, units;
scanf("%d", &num);
//一の位を求める
units = num % 10;
switch (units)
{
//bonを出力
case 3:
printf("bon");
break;
//ponを出力
case 0:
case 1:
case 6:
case 8:
printf("pon");
break;
//honを出力
default:
printf("hon");
break;
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216161/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216161/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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"bon\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"pon\00", align 1
@.str.3 = private unnamed_addr constant [4 x i8] c"hon\00", align 1
@reltable.main = private unnamed_addr constant [9 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.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.1 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.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32)], align 4
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%num = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %num)
%0 = load i32, ptr %num, align 4, !tbaa !5
%rem = srem i32 %0, 10
%1 = icmp ult i32 %rem, 9
br i1 %1, label %switch.lookup, label %sw.epilog
switch.lookup: ; preds = %entry
%2 = sext i32 %rem to i64
%reltable.shift = shl i64 %2, 2
%reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift)
br label %sw.epilog
sw.epilog: ; preds = %entry, %switch.lookup
%.str.3.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @.str.3, %entry ]
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #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 willreturn memory(argmem: read)
declare ptr @llvm.load.relative.i64(ptr, i64) #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind 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)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
/* ex3_2
ruuu0048 */
#include <stdio.h>
int main(void){
int book_number,keta; //本の数とその数の一桁の変数を宣言
scanf("%d",&book_number); //変数に本の数を入力する
keta = book_number % 10; //本の一桁を計算し代入
//条件分岐して助数詞を出力
if(keta == 3){ //一桁目が3なら
printf("bon\n");
}
else if(keta == 0 || keta == 1 || keta == 6 || keta == 8) //一桁目が0,1,6,8なら
{
printf("pon\n");
}
else //それ以外なら
{
printf("hon\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216204/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216204/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@str = private unnamed_addr constant [4 x i8] c"hon\00", align 1
@str.4 = private unnamed_addr constant [4 x i8] c"pon\00", align 1
@str.5 = private unnamed_addr constant [4 x i8] c"bon\00", align 1
@reltable.main = private unnamed_addr constant [9 x 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.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str 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), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str 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 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)], align 4
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%book_number = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %book_number) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %book_number)
%0 = load i32, ptr %book_number, align 4, !tbaa !5
%rem = srem i32 %0, 10
%1 = icmp ult i32 %rem, 9
br i1 %1, label %switch.lookup, label %if.end12
switch.lookup: ; preds = %entry
%2 = sext i32 %rem to i64
%reltable.shift = shl i64 %2, 2
%reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift)
br label %if.end12
if.end12: ; preds = %entry, %switch.lookup
%str.4.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @str, %entry ]
%puts19 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %book_number) #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 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 = { nofree nounwind "no-trapping-math"="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 willreturn memory(argmem: read) }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int n,n_ichinokurai;
char buf[10];
char yomikata[3][4] = {("hon"),("bon"),("pon")};
fgets(buf, sizeof(buf), stdin);
sscanf(buf, "%d\n", &n);
n_ichinokurai = n % 10;
if(n_ichinokurai==3){
printf("%s\n",yomikata[1]);
}
else if(n_ichinokurai==0 || n_ichinokurai==1 ||n_ichinokurai==6 ||n_ichinokurai==8){
printf("%s\n",yomikata[2]);
}
else if(n_ichinokurai==2 || n_ichinokurai==4 ||n_ichinokurai==5 ||n_ichinokurai==7||n_ichinokurai==9){
printf("%s\n",yomikata[0]);
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216248/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216248/source.c"
target datalayout = "e-m:e-p270: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.yomikata = private unnamed_addr constant [3 x [4 x i8]] [[4 x i8] c"hon\00", [4 x i8] c"bon\00", [4 x i8] c"pon\00"], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
@reltable.main = private unnamed_addr constant [10 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr getelementptr inbounds ([3 x [4 x i8]], ptr @__const.main.yomikata, i64 0, i64 2) to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr getelementptr inbounds ([3 x [4 x i8]], ptr @__const.main.yomikata, i64 0, i64 2) to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @__const.main.yomikata to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr getelementptr inbounds ([3 x [4 x i8]], ptr @__const.main.yomikata, i64 0, i64 1) to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @__const.main.yomikata to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @__const.main.yomikata to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr getelementptr inbounds ([3 x [4 x i8]], ptr @__const.main.yomikata, i64 0, i64 2) to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @__const.main.yomikata to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr getelementptr inbounds ([3 x [4 x i8]], ptr @__const.main.yomikata, i64 0, i64 2) to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @__const.main.yomikata 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
%buf = alloca [10 x i8], align 1
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5
call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %buf) #5
%0 = load ptr, ptr @stdin, align 8, !tbaa !5
%call = call ptr @fgets(ptr noundef nonnull %buf, i32 noundef 10, ptr noundef %0)
%call2 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %buf, ptr noundef nonnull @.str, ptr noundef nonnull %n) #5
%1 = load i32, ptr %n, align 4, !tbaa !9
%rem = srem i32 %1, 10
%2 = icmp ult i32 %rem, 10
br i1 %2, label %switch.lookup, label %if.end30
switch.lookup: ; preds = %entry
%3 = sext i32 %rem to i64
%reltable.shift = shl i64 %3, 2
%reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift)
%puts46 = call i32 @puts(ptr nonnull dereferenceable(1) %reltable.intrinsic)
br label %if.end30
if.end30: ; preds = %entry, %switch.lookup
call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %buf) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_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 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 = { nofree nounwind "no-trapping-math"="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 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 = !{!"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}
|
#include <stdio.h>
int main(void) {
int N;
scanf("%d",&N);
if(N <1||999<N){
return 0;
}
switch(N % 10 ){
case 2 :
case 4 :
case 5 :
case 7 :
case 9 : puts("hon"); break;
case 0 :
case 1 :
case 6 :
case 8 : puts("pon"); break;
default : puts("bon"); break;
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216291/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216291/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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"hon\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"pon\00", align 1
@.str.3 = private unnamed_addr constant [4 x i8] c"bon\00", align 1
@reltable.main = private unnamed_addr constant [10 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.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32)], align 4
; 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
%1 = add i32 %0, -1000
%or.cond = icmp ult i32 %1, -999
br i1 %or.cond, label %cleanup, label %switch.lookup
switch.lookup: ; preds = %entry
%rem.lhs.trunc = trunc i32 %0 to i16
%rem6 = urem i16 %rem.lhs.trunc, 10
%2 = zext i16 %rem6 to i64
%reltable.shift = shl i64 %2, 2
%reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift)
%call2 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %reltable.intrinsic)
br label %cleanup
cleanup: ; preds = %switch.lookup, %entry
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 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read)
declare ptr @llvm.load.relative.i64(ptr, i64) #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind 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(){
int T,n,m;
scanf("%d",&T);
if(0<=T<100){
m=T%10;
if(m==2||m==4||m==5||m==7||m==9) printf("hon");
if(m==0||m==1||m==6||m==8) printf("pon");
if(m==3) printf("bon");
}
else{
n=T%100;
m=n%10;
if(m==2||m==4||m==5||m==7||m==9) printf("hon");
if(m==0||m==1||m==6||m==8) printf("pon");
if(m==3) printf("bon");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216356/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216356/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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"hon\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"pon\00", align 1
@.str.3 = private unnamed_addr constant [4 x i8] c"bon\00", align 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) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %T)
%0 = load i32, ptr %T, align 4, !tbaa !5
%rem = srem i32 %0, 10
switch i32 %rem, label %if.end75 [
i32 9, label %if.then16
i32 7, label %if.then16
i32 5, label %if.then16
i32 4, label %if.then16
i32 2, label %if.then16
i32 8, label %if.then29
i32 6, label %if.then29
i32 1, label %if.then29
i32 0, label %if.then29
i32 3, label %if.then34
]
if.then16: ; preds = %entry, %entry, %entry, %entry, %entry
%call17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
switch i32 %rem, label %if.end75 [
i32 8, label %if.end75.sink.split
i32 6, label %if.end75.sink.split
i32 3, label %if.then34
]
if.then29: ; preds = %entry, %entry, %entry, %entry
%call30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
%cmp32 = icmp eq i32 %rem, 3
br i1 %cmp32, label %if.then34, label %if.end75
if.then34: ; preds = %if.then16, %entry, %if.then29
br label %if.end75.sink.split
if.end75.sink.split: ; preds = %if.then16, %if.then16, %if.then34
%.str.2.sink = phi ptr [ @.str.3, %if.then34 ], [ @.str.2, %if.then16 ], [ @.str.2, %if.then16 ]
%call30108 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink)
br label %if.end75
if.end75: ; preds = %if.end75.sink.split, %entry, %if.then16, %if.then29
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %T) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
#include<math.h>
int main(){
int t,k;
scanf("%d",&t);
for(k=0;k<t;k++){
int n;
scanf("%d",&n);
int i,j,a=pow(2,n),b=0;
for(i=1;i<n/2;i++)
a += pow(2,i);
for(j=n/2;j<n;j++)
b += pow(2,j);
printf("%d\n",a-b);
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2164/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2164/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%t = alloca i32, align 4
%n = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t)
%0 = load i32, ptr %t, align 4, !tbaa !5
%cmp48 = icmp sgt i32 %0, 0
br i1 %cmp48, label %for.body, label %for.end28
for.body: ; preds = %entry, %for.end24
%k.049 = phi i32 [ %inc27, %for.end24 ], [ 0, %entry ]
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%1 = load i32, ptr %n, align 4, !tbaa !5
%ldexp = call double @ldexp(double 1.000000e+00, i32 %1) #4
%a.038 = fptosi double %ldexp to i32
%2 = load i32, ptr %n, align 4, !tbaa !5
%div39 = sdiv i32 %2, 2
%cmp540 = icmp sgt i32 %2, 3
br i1 %cmp540, label %for.body7, label %for.cond13.preheader
for.cond13.preheader: ; preds = %for.body7, %for.body
%3 = phi i32 [ %2, %for.body ], [ %4, %for.body7 ]
%a.0.lcssa = phi i32 [ %a.038, %for.body ], [ %a.0, %for.body7 ]
%div.lcssa = phi i32 [ %div39, %for.body ], [ %div, %for.body7 ]
%cmp1444 = icmp slt i32 %div.lcssa, %3
br i1 %cmp1444, label %for.body16, label %for.end24
for.body7: ; preds = %for.body, %for.body7
%a.042 = phi i32 [ %a.0, %for.body7 ], [ %a.038, %for.body ]
%i.041 = phi i32 [ %inc, %for.body7 ], [ 1, %for.body ]
%ldexp37 = call double @ldexp(double 1.000000e+00, i32 %i.041) #4
%conv10 = sitofp i32 %a.042 to double
%add = fadd double %ldexp37, %conv10
%inc = add nuw nsw i32 %i.041, 1
%a.0 = fptosi double %add to i32
%4 = load i32, ptr %n, align 4, !tbaa !5
%div = sdiv i32 %4, 2
%cmp5 = icmp slt i32 %inc, %div
br i1 %cmp5, label %for.body7, label %for.cond13.preheader, !llvm.loop !9
for.body16: ; preds = %for.cond13.preheader, %for.body16
%b.046 = phi i32 [ %conv21, %for.body16 ], [ 0, %for.cond13.preheader ]
%j.045 = phi i32 [ %inc23, %for.body16 ], [ %div.lcssa, %for.cond13.preheader ]
%ldexp36 = call double @ldexp(double 1.000000e+00, i32 %j.045) #4
%conv19 = sitofp i32 %b.046 to double
%add20 = fadd double %ldexp36, %conv19
%conv21 = fptosi double %add20 to i32
%inc23 = add nsw i32 %j.045, 1
%5 = load i32, ptr %n, align 4, !tbaa !5
%cmp14 = icmp slt i32 %inc23, %5
br i1 %cmp14, label %for.body16, label %for.end24, !llvm.loop !11
for.end24: ; preds = %for.body16, %for.cond13.preheader
%b.0.lcssa = phi i32 [ 0, %for.cond13.preheader ], [ %conv21, %for.body16 ]
%sub = sub nsw i32 %a.0.lcssa, %b.0.lcssa
%call25 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4
%inc27 = add nuw nsw i32 %k.049, 1
%6 = load i32, ptr %t, align 4, !tbaa !5
%cmp = icmp slt i32 %inc27, %6
br i1 %cmp, label %for.body, label %for.end28, !llvm.loop !12
for.end28: ; preds = %for.end24, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: 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 willreturn
declare double @ldexp(double, i32) 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 willreturn }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include <stdio.h>
int main(void){
int N;
scanf("%d", &N);
switch(N % 10){
case 2:
case 4:
case 5:
case 7:
case 9:
printf("hon\n");
break;
case 0:
case 1:
case 6:
case 8:
printf("pon\n");
break;
case 3:
printf("bon\n");
break;
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216442/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216442/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@str = private unnamed_addr constant [4 x i8] c"bon\00", align 1
@str.4 = private unnamed_addr constant [4 x i8] c"pon\00", align 1
@str.5 = private unnamed_addr constant [4 x i8] c"hon\00", align 1
@reltable.main = private unnamed_addr constant [10 x 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.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), i32 trunc (i64 sub (i64 ptrtoint (ptr @str 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), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 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), 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
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
%rem = srem i32 %0, 10
%1 = icmp ult i32 %rem, 10
br i1 %1, label %switch.lookup, label %sw.epilog
switch.lookup: ; preds = %entry
%2 = sext i32 %rem to i64
%reltable.shift = shl i64 %2, 2
%reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift)
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %reltable.intrinsic)
br label %sw.epilog
sw.epilog: ; preds = %entry, %switch.lookup
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
; Function Attrs: nocallback nofree nosync nounwind 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 = { nofree nounwind "no-trapping-math"="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 willreturn memory(argmem: read) }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include<math.h>
int main(){
int n;
scanf("%d",&n);
if(n%10==3){
printf("bon\n");
}
else if(n%10==0 || n%10==1 || n%10==6 || n%10==8 ){
printf("pon\n");
}
else{
printf("hon\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216493/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216493/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@str = private unnamed_addr constant [4 x i8] c"hon\00", align 1
@str.4 = private unnamed_addr constant [4 x i8] c"pon\00", align 1
@str.5 = private unnamed_addr constant [4 x i8] c"bon\00", align 1
@reltable.main = private unnamed_addr constant [9 x 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.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str 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), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str 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 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)], align 4
; 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
%rem = srem i32 %0, 10
%1 = icmp ult i32 %rem, 9
br i1 %1, label %switch.lookup, label %if.end16
switch.lookup: ; preds = %entry
%2 = sext i32 %rem to i64
%reltable.shift = shl i64 %2, 2
%reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift)
br label %if.end16
if.end16: ; preds = %entry, %switch.lookup
%str.4.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @str, %entry ]
%puts17 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
; Function Attrs: nocallback nofree nosync nounwind 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 = { nofree nounwind "no-trapping-math"="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 willreturn memory(argmem: read) }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void){
int N;
scanf("%d",&N);
if(N % 10 == 3){
printf("bon");
}else if(N % 10 == 0 || N % 10 == 1 || N % 10 == 6 || N % 10 == 8){
printf("pon");
}else{
printf("hon");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216536/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216536/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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"bon\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"pon\00", align 1
@.str.3 = private unnamed_addr constant [4 x i8] c"hon\00", align 1
@reltable.main = private unnamed_addr constant [9 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.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.1 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.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32)], align 4
; Function Attrs: 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
%rem = srem i32 %0, 10
%1 = icmp ult i32 %rem, 9
br i1 %1, label %switch.lookup, label %if.end16
switch.lookup: ; preds = %entry
%2 = sext i32 %rem to i64
%reltable.shift = shl i64 %2, 2
%reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift)
br label %if.end16
if.end16: ; preds = %entry, %switch.lookup
%.str.2.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @.str.3, %entry ]
%call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read)
declare ptr @llvm.load.relative.i64(ptr, i64) #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind 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)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
int main()
{
int t;
int i,j;
long long x,y,a,b;
scanf("%d",&t);
while(t--)
{
scanf("%lld%lld%lld%lld",&x,&y,&a,&b);
if(abs(x)>abs(y))
{
j=x;
x=y;
y=j;
}
if(x*y<0)printf("%lld\n",(abs(x)+abs(y))*a);
else
{
if(a*2<b)
{
printf("%lld\n",(abs(x)+abs(y))*a);
}
else
{
printf("%lld\n",abs(x)*b+(abs(y)-abs(x))*a);
}
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21658/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21658/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [17 x i8] c"%lld%lld%lld%lld\00", align 1
@.str.2 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%t = alloca i32, align 4
%x = alloca i64, align 8
%y = alloca i64, align 8
%a = alloca i64, align 8
%b = alloca i64, align 8
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x) #4
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %y) #4
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 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t)
%0 = load i32, ptr %t, align 4, !tbaa !5
%dec36 = add nsw i32 %0, -1
store i32 %dec36, ptr %t, align 4, !tbaa !5
%tobool.not37 = icmp eq i32 %0, 0
br i1 %tobool.not37, label %while.end, label %while.body
while.body: ; preds = %entry, %if.end35
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x, ptr noundef nonnull %y, ptr noundef nonnull %a, ptr noundef nonnull %b)
%1 = load i64, ptr %x, align 8, !tbaa !9
%conv = trunc i64 %1 to i32
%2 = call i32 @llvm.abs.i32(i32 %conv, i1 true)
%3 = load i64, ptr %y, align 8, !tbaa !9
%conv2 = trunc i64 %3 to i32
%4 = call i32 @llvm.abs.i32(i32 %conv2, i1 true)
%cmp = icmp ugt i32 %2, %4
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %while.body
store i64 %3, ptr %x, align 8, !tbaa !9
%sext = shl i64 %1, 32
%conv5 = ashr exact i64 %sext, 32
store i64 %conv5, ptr %y, align 8, !tbaa !9
br label %if.end
if.end: ; preds = %if.then, %while.body
%5 = phi i64 [ %conv5, %if.then ], [ %3, %while.body ]
%6 = phi i64 [ %3, %if.then ], [ %1, %while.body ]
%mul = mul nsw i64 %5, %6
%cmp6 = icmp slt i64 %mul, 0
br i1 %cmp6, label %if.then8, label %if.else
if.then8: ; preds = %if.end
%conv9 = trunc i64 %6 to i32
%7 = call i32 @llvm.abs.i32(i32 %conv9, i1 true)
%conv10 = trunc i64 %5 to i32
%8 = call i32 @llvm.abs.i32(i32 %conv10, i1 true)
%add = add nuw nsw i32 %8, %7
%conv11 = zext i32 %add to i64
%9 = load i64, ptr %a, align 8, !tbaa !9
%mul12 = mul nsw i64 %9, %conv11
br label %if.end35
if.else: ; preds = %if.end
%10 = load i64, ptr %a, align 8, !tbaa !9
%mul14 = shl nsw i64 %10, 1
%11 = load i64, ptr %b, align 8, !tbaa !9
%cmp15 = icmp slt i64 %mul14, %11
%conv18 = trunc i64 %6 to i32
%12 = call i32 @llvm.abs.i32(i32 %conv18, i1 true)
br i1 %cmp15, label %if.then17, label %if.else24
if.then17: ; preds = %if.else
%conv19 = trunc i64 %5 to i32
%13 = call i32 @llvm.abs.i32(i32 %conv19, i1 true)
%add20 = add nuw nsw i32 %13, %12
%conv21 = zext i32 %add20 to i64
%mul22 = mul nsw i64 %10, %conv21
br label %if.end35
if.else24: ; preds = %if.else
%conv26 = zext i32 %12 to i64
%mul27 = mul nsw i64 %11, %conv26
%conv28 = trunc i64 %5 to i32
%14 = call i32 @llvm.abs.i32(i32 %conv28, i1 true)
%sub = sub nsw i32 %14, %12
%conv30 = sext i32 %sub to i64
%mul31 = mul nsw i64 %10, %conv30
%add32 = add nsw i64 %mul27, %mul31
br label %if.end35
if.end35: ; preds = %if.then17, %if.else24, %if.then8
%mul22.sink = phi i64 [ %mul22, %if.then17 ], [ %add32, %if.else24 ], [ %mul12, %if.then8 ]
%call23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %mul22.sink)
%15 = load i32, ptr %t, align 4, !tbaa !5
%dec = add nsw i32 %15, -1
store i32 %dec, ptr %t, align 4, !tbaa !5
%tobool.not = icmp eq i32 %15, 0
br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !11
while.end: ; preds = %if.end35, %entry
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %y) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %x) #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 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
|
// AOJ 2898: Prime Number
// 2019.2.19 bal4u
//#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#define MAX 10000000+2
#define SQRT 3162 // = sqrt(MAX)
char noPrime[MAX+1] = { 1, 1, 0, 0 };
void sieve()
{
int i, j;
for (i = 3; i <= SQRT; i+=2) {
if (noPrime[i] == 0) {
for (j = i*i; j < MAX; j += i) noPrime[j] = 1;
}
}
}
int main()
{
int i, N, ans;
sieve();
scanf("%d", &N);
ans = 0;
if (N >= 3) ans++;
for (i = 5; i <= N; i+=6) {
if (noPrime[i] == 0 && noPrime[i+2] == 0) ans++;
}
printf("%d\n", ans << 1);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216622/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216622/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@noPrime = dso_local local_unnamed_addr global <{ i8, i8, [10000001 x i8] }> <{ i8 1, i8 1, [10000001 x i8] 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 norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable
define dso_local void @sieve() local_unnamed_addr #0 {
entry:
br label %for.body
for.body: ; preds = %for.inc9.1, %entry
%indvars.iv30 = phi i64 [ 16, %entry ], [ %indvars.iv.next31.1, %for.inc9.1 ]
%indvars.iv25 = phi i64 [ 3, %entry ], [ %indvars.iv.next26.1, %for.inc9.1 ]
%indvars.iv23 = phi i32 [ 9, %entry ], [ %indvars.iv.next24.1, %for.inc9.1 ]
%arrayidx = getelementptr inbounds [10000003 x i8], ptr @noPrime, i64 0, i64 %indvars.iv25
%0 = load i8, ptr %arrayidx, align 1, !tbaa !5
%cmp1 = icmp eq i8 %0, 0
br i1 %cmp1, label %for.body6.preheader, label %for.inc9
for.body6.preheader: ; preds = %for.body
%1 = zext i32 %indvars.iv23 to i64
br label %for.body6
for.body6: ; preds = %for.body6.preheader, %for.body6
%indvars.iv27 = phi i64 [ %1, %for.body6.preheader ], [ %indvars.iv.next28, %for.body6 ]
%arrayidx8 = getelementptr inbounds [10000003 x i8], ptr @noPrime, i64 0, i64 %indvars.iv27
store i8 1, ptr %arrayidx8, align 1, !tbaa !5
%indvars.iv.next28 = add nuw nsw i64 %indvars.iv27, %indvars.iv25
%cmp4 = icmp ult i64 %indvars.iv.next28, 10000002
br i1 %cmp4, label %for.body6, label %for.inc9, !llvm.loop !8
for.inc9: ; preds = %for.body6, %for.body
%indvars.iv.next26 = add nuw nsw i64 %indvars.iv25, 2
%2 = trunc i64 %indvars.iv30 to i32
%indvars.iv.next24 = add i32 %indvars.iv23, %2
%arrayidx.1 = getelementptr inbounds [10000003 x i8], ptr @noPrime, i64 0, i64 %indvars.iv.next26
%3 = load i8, ptr %arrayidx.1, align 1, !tbaa !5
%cmp1.1 = icmp eq i8 %3, 0
br i1 %cmp1.1, label %for.body6.preheader.1, label %for.inc9.1
for.body6.preheader.1: ; preds = %for.inc9
%4 = zext i32 %indvars.iv.next24 to i64
br label %for.body6.1
for.body6.1: ; preds = %for.body6.1, %for.body6.preheader.1
%indvars.iv27.1 = phi i64 [ %4, %for.body6.preheader.1 ], [ %indvars.iv.next28.1, %for.body6.1 ]
%arrayidx8.1 = getelementptr inbounds [10000003 x i8], ptr @noPrime, i64 0, i64 %indvars.iv27.1
store i8 1, ptr %arrayidx8.1, align 1, !tbaa !5
%indvars.iv.next28.1 = add nuw nsw i64 %indvars.iv27.1, %indvars.iv.next26
%cmp4.1 = icmp ult i64 %indvars.iv.next28.1, 10000002
br i1 %cmp4.1, label %for.body6.1, label %for.inc9.1, !llvm.loop !8
for.inc9.1: ; preds = %for.body6.1, %for.inc9
%indvars.iv.next26.1 = add nuw nsw i64 %indvars.iv25, 4
%cmp.1 = icmp ult i64 %indvars.iv25, 3159
%indvars.iv.next31.1 = add nuw nsw i64 %indvars.iv30, 16
%5 = trunc i64 %indvars.iv30 to i32
%6 = or i32 %5, 8
%indvars.iv.next24.1 = add i32 %indvars.iv.next24, %6
br i1 %cmp.1, label %for.body, label %for.end11, !llvm.loop !10
for.end11: ; preds = %for.inc9.1
ret void
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #2 {
entry:
%N = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #4
br label %for.body.i
for.body.i: ; preds = %for.inc9.i.1, %entry
%indvars.iv = phi i64 [ 16, %entry ], [ %indvars.iv.next.1, %for.inc9.i.1 ]
%indvars.iv25.i = phi i64 [ 3, %entry ], [ %indvars.iv.next26.i.1, %for.inc9.i.1 ]
%indvars.iv23.i = phi i32 [ 9, %entry ], [ %indvars.iv.next24.i.1, %for.inc9.i.1 ]
%arrayidx.i = getelementptr inbounds [10000003 x i8], ptr @noPrime, i64 0, i64 %indvars.iv25.i
%0 = load i8, ptr %arrayidx.i, align 1, !tbaa !5
%cmp1.i = icmp eq i8 %0, 0
br i1 %cmp1.i, label %for.body6.preheader.i, label %for.inc9.i
for.body6.preheader.i: ; preds = %for.body.i
%1 = zext i32 %indvars.iv23.i to i64
br label %for.body6.i
for.body6.i: ; preds = %for.body6.i, %for.body6.preheader.i
%indvars.iv27.i = phi i64 [ %1, %for.body6.preheader.i ], [ %indvars.iv.next28.i, %for.body6.i ]
%arrayidx8.i = getelementptr inbounds [10000003 x i8], ptr @noPrime, i64 0, i64 %indvars.iv27.i
store i8 1, ptr %arrayidx8.i, align 1, !tbaa !5
%indvars.iv.next28.i = add nuw nsw i64 %indvars.iv27.i, %indvars.iv25.i
%cmp4.i = icmp ult i64 %indvars.iv.next28.i, 10000002
br i1 %cmp4.i, label %for.body6.i, label %for.inc9.i, !llvm.loop !8
for.inc9.i: ; preds = %for.body6.i, %for.body.i
%indvars.iv.next26.i = add nuw nsw i64 %indvars.iv25.i, 2
%2 = trunc i64 %indvars.iv to i32
%indvars.iv.next24.i = add i32 %indvars.iv23.i, %2
%arrayidx.i.1 = getelementptr inbounds [10000003 x i8], ptr @noPrime, i64 0, i64 %indvars.iv.next26.i
%3 = load i8, ptr %arrayidx.i.1, align 1, !tbaa !5
%cmp1.i.1 = icmp eq i8 %3, 0
br i1 %cmp1.i.1, label %for.body6.preheader.i.1, label %for.inc9.i.1
for.body6.preheader.i.1: ; preds = %for.inc9.i
%4 = zext i32 %indvars.iv.next24.i to i64
br label %for.body6.i.1
for.body6.i.1: ; preds = %for.body6.i.1, %for.body6.preheader.i.1
%indvars.iv27.i.1 = phi i64 [ %4, %for.body6.preheader.i.1 ], [ %indvars.iv.next28.i.1, %for.body6.i.1 ]
%arrayidx8.i.1 = getelementptr inbounds [10000003 x i8], ptr @noPrime, i64 0, i64 %indvars.iv27.i.1
store i8 1, ptr %arrayidx8.i.1, align 1, !tbaa !5
%indvars.iv.next28.i.1 = add nuw nsw i64 %indvars.iv27.i.1, %indvars.iv.next26.i
%cmp4.i.1 = icmp ult i64 %indvars.iv.next28.i.1, 10000002
br i1 %cmp4.i.1, label %for.body6.i.1, label %for.inc9.i.1, !llvm.loop !8
for.inc9.i.1: ; preds = %for.body6.i.1, %for.inc9.i
%indvars.iv.next26.i.1 = add nuw nsw i64 %indvars.iv25.i, 4
%cmp.i.1 = icmp ult i64 %indvars.iv25.i, 3159
%indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 16
%5 = trunc i64 %indvars.iv to i32
%6 = or i32 %5, 8
%indvars.iv.next24.i.1 = add i32 %indvars.iv.next24.i, %6
br i1 %cmp.i.1, label %for.body.i, label %sieve.exit, !llvm.loop !10
sieve.exit: ; preds = %for.inc9.i.1
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N)
%7 = load i32, ptr %N, align 4, !tbaa !11
%cmp = icmp sgt i32 %7, 2
%spec.select = zext i1 %cmp to i32
%cmp1.not20 = icmp slt i32 %7, 5
br i1 %cmp1.not20, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %sieve.exit
%8 = zext i32 %7 to i64
br label %for.body
for.body: ; preds = %for.body.preheader, %for.inc
%indvars.iv24 = phi i64 [ 5, %for.body.preheader ], [ %indvars.iv.next25, %for.inc ]
%ans.122 = phi i32 [ %spec.select, %for.body.preheader ], [ %ans.2, %for.inc ]
%arrayidx = getelementptr inbounds [10000003 x i8], ptr @noPrime, i64 0, i64 %indvars.iv24
%9 = load i8, ptr %arrayidx, align 1, !tbaa !5
%cmp2 = icmp eq i8 %9, 0
br i1 %cmp2, label %land.lhs.true, label %for.inc
land.lhs.true: ; preds = %for.body
%10 = add nuw nsw i64 %indvars.iv24, 2
%arrayidx5 = getelementptr inbounds [10000003 x i8], ptr @noPrime, i64 0, i64 %10
%11 = load i8, ptr %arrayidx5, align 1, !tbaa !5
%cmp7 = icmp eq i8 %11, 0
%inc10 = zext i1 %cmp7 to i32
%spec.select19 = add nsw i32 %ans.122, %inc10
br label %for.inc
for.inc: ; preds = %land.lhs.true, %for.body
%ans.2 = phi i32 [ %ans.122, %for.body ], [ %spec.select19, %land.lhs.true ]
%indvars.iv.next25 = add nuw nsw i64 %indvars.iv24, 6
%cmp1.not = icmp ugt i64 %indvars.iv.next25, %8
br i1 %cmp1.not, label %for.end, label %for.body, !llvm.loop !13
for.end: ; preds = %for.inc, %sieve.exit
%ans.1.lcssa = phi i32 [ %spec.select, %sieve.exit ], [ %ans.2, %for.inc ]
%shl = shl i32 %ans.1.lcssa, 1
%call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %shl)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #4
ret i32 0
}
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
attributes #0 = { nofree norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !6, i64 0}
!13 = distinct !{!13, !9}
|
#include<stdio.h>
int main(){
int i,k,n;
char s[1000];
scanf("%d",&k);
scanf("%s",s);
for(n = 0; s[n] != '\0'; n++){
//printf("%c",s[n]);
}
if(n <= k){
printf("%s\n",s);
}else{
for(i = 0; i < k; i++){
printf("%c",s[i]);
}
printf("...\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216666/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216666/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1
@str = private unnamed_addr constant [4 x i8] c"...\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%k = alloca i32, align 4
%s = alloca [1000 x i8], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #4
call void @llvm.lifetime.start.p0(i64 1000, ptr nonnull %s) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s)
br label %for.cond
for.cond: ; preds = %for.cond, %entry
%indvars.iv = phi i64 [ %indvars.iv.next, %for.cond ], [ 0, %entry ]
%arrayidx = getelementptr inbounds [1000 x i8], ptr %s, i64 0, i64 %indvars.iv
%0 = load i8, ptr %arrayidx, align 1, !tbaa !5
%cmp.not = icmp eq i8 %0, 0
%indvars.iv.next = add nuw i64 %indvars.iv, 1
br i1 %cmp.not, label %for.end, label %for.cond, !llvm.loop !8
for.end: ; preds = %for.cond
%1 = trunc i64 %indvars.iv to i32
%2 = load i32, ptr %k, align 4, !tbaa !10
%cmp3.not = icmp slt i32 %2, %1
br i1 %cmp3.not, label %for.cond7.preheader, label %if.end
for.cond7.preheader: ; preds = %for.end
%cmp824 = icmp sgt i32 %2, 0
br i1 %cmp824, label %for.body10, label %if.end
for.body10: ; preds = %for.cond7.preheader, %for.body10
%indvars.iv27 = phi i64 [ %indvars.iv.next28, %for.body10 ], [ 0, %for.cond7.preheader ]
%arrayidx12 = getelementptr inbounds [1000 x i8], ptr %s, i64 0, i64 %indvars.iv27
%3 = load i8, ptr %arrayidx12, align 1, !tbaa !5
%conv13 = sext i8 %3 to i32
%putchar = call i32 @putchar(i32 %conv13)
%indvars.iv.next28 = add nuw nsw i64 %indvars.iv27, 1
%4 = load i32, ptr %k, align 4, !tbaa !10
%5 = sext i32 %4 to i64
%cmp8 = icmp slt i64 %indvars.iv.next28, %5
br i1 %cmp8, label %for.body10, label %if.end, !llvm.loop !12
if.end: ; preds = %for.body10, %for.cond7.preheader, %for.end
%str.sink = phi ptr [ %s, %for.end ], [ @str, %for.cond7.preheader ], [ @str, %for.body10 ]
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink)
call void @llvm.lifetime.end.p0(i64 1000, ptr nonnull %s) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = distinct !{!12, !9}
|
#include<stdio.h>
#include<string.h>
int main(){
int k;
char s[100];
int len=0;
int i;
scanf("%d",&k);
scanf("%s",s);
len=strlen(s);
for(i=0;i<len;i++){
if(i<k){
printf("%c",s[i]);
}else{
printf("...");
break;
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216709/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216709/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1
@.str.3 = private unnamed_addr constant [4 x i8] c"...\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%k = alloca i32, align 4
%s = alloca [100 x i8], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5
call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %s) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s)
%call3 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #6
%conv = trunc i64 %call3 to i32
%cmp13 = icmp sgt i32 %conv, 0
br i1 %cmp13, label %for.body.preheader, label %for.end
for.body.preheader: ; preds = %entry
%wide.trip.count = and i64 %call3, 4294967295
br label %for.body
for.body: ; preds = %for.body.preheader, %if.then
%indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %if.then ]
%0 = load i32, ptr %k, align 4, !tbaa !5
%1 = sext i32 %0 to i64
%cmp5 = icmp slt i64 %indvars.iv, %1
br i1 %cmp5, label %if.then, label %if.else
if.then: ; preds = %for.body
%arrayidx = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %indvars.iv
%2 = load i8, ptr %arrayidx, align 1, !tbaa !9
%conv7 = sext i8 %2 to i32
%putchar = call i32 @putchar(i32 %conv7)
%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 !10
if.else: ; preds = %for.body
%call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
br label %for.end
for.end: ; preds = %if.then, %entry, %if.else
call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %s) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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>
#include <stdlib.h>
int main(){
long long t, x, y, a, b, max, min;
long long val1, val2, val;
scanf("%lld", &t);
while(t--){
scanf("%lld%lld%lld%lld", &x, &y, &a, &b);
max=x;
if(y>max)
max=y;
min=x+y-max;
val1=x+y;
val1*=a;
val2=min;
val2*=b;
val2+=(max-min)*a;
if(val1<val2)
val=val1;
else
val=val2;
printf("%lld\n", val);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21676/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21676/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%lld\00", align 1
@.str.1 = private unnamed_addr constant [17 x i8] c"%lld%lld%lld%lld\00", align 1
@.str.2 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%t = alloca i64, align 8
%x = alloca i64, align 8
%y = alloca i64, align 8
%a = alloca i64, align 8
%b = alloca i64, align 8
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %t) #4
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x) #4
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %y) #4
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 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t)
%0 = load i64, ptr %t, align 8, !tbaa !5
%dec20 = add nsw i64 %0, -1
store i64 %dec20, ptr %t, align 8, !tbaa !5
%tobool.not21 = icmp eq i64 %0, 0
br i1 %tobool.not21, label %while.end, label %while.body
while.body: ; preds = %entry, %while.body
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x, ptr noundef nonnull %y, ptr noundef nonnull %a, ptr noundef nonnull %b)
%1 = load i64, ptr %x, align 8, !tbaa !5
%2 = load i64, ptr %y, align 8, !tbaa !5
%spec.select = call i64 @llvm.smax.i64(i64 %2, i64 %1)
%add = add nsw i64 %2, %1
%sub = sub nsw i64 %add, %spec.select
%3 = load i64, ptr %a, align 8, !tbaa !5
%mul = mul nsw i64 %add, %3
%4 = load i64, ptr %b, align 8, !tbaa !5
%mul3 = mul nsw i64 %sub, %4
%sub4 = sub nsw i64 %spec.select, %sub
%mul5 = mul nsw i64 %sub4, %3
%add6 = add nsw i64 %mul5, %mul3
%val.0 = call i64 @llvm.smin.i64(i64 %mul, i64 %add6)
%call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %val.0)
%5 = load i64, ptr %t, align 8, !tbaa !5
%dec = add nsw i64 %5, -1
store i64 %dec, ptr %t, align 8, !tbaa !5
%tobool.not = icmp eq i64 %5, 0
br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !9
while.end: ; preds = %while.body, %entry
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %y) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %x) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %t) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #3
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
|
#include <stdio.h>
#include <string.h>
#define rep(i, n) for(int i=0; i<(n); ++i)
#define max 100001
void debug(char * string, long int target) {
printf("%s", string);
printf("%ld", target);
printf("%c", '\n');
}
int main() {
short K, n;
char S[max];
scanf("%hd%s", &K, S);
n = strlen(S);
if (n <= K) {
printf("%s", S);
} else {
rep(i, K) {
printf("%c", S[i]);
}
printf("...");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216802/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216802/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%ld\00", align 1
@.str.3 = private unnamed_addr constant [6 x i8] c"%hd%s\00", align 1
@.str.4 = private unnamed_addr constant [4 x i8] c"...\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local void @debug(ptr noundef %string, i64 noundef %target) local_unnamed_addr #0 {
entry:
%call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef %string)
%call1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %target)
%putchar = tail call i32 @putchar(i32 10)
ret void
}
; 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:
%K = alloca i16, align 2
%S = alloca [100001 x i8], align 16
call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %K) #5
call void @llvm.lifetime.start.p0(i64 100001, ptr nonnull %S) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %K, ptr noundef nonnull %S)
%call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %S) #6
%conv = trunc i64 %call2 to i32
%sext = shl i32 %conv, 16
%conv3 = ashr exact i32 %sext, 16
%0 = load i16, ptr %K, align 2, !tbaa !5
%conv4 = sext i16 %0 to i32
%cmp.not = icmp sgt i32 %conv3, %conv4
br i1 %cmp.not, label %for.cond.preheader, label %if.then
for.cond.preheader: ; preds = %entry
%cmp917 = icmp sgt i16 %0, 0
br i1 %cmp917, label %for.body, label %for.cond.cleanup
if.then: ; preds = %entry
%call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull %S)
br label %if.end
for.cond.cleanup: ; preds = %for.body, %for.cond.preheader
%call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
br label %if.end
for.body: ; preds = %for.cond.preheader, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.cond.preheader ]
%arrayidx = getelementptr inbounds [100001 x i8], ptr %S, i64 0, i64 %indvars.iv
%1 = load i8, ptr %arrayidx, align 1, !tbaa !9
%conv11 = sext i8 %1 to i32
%putchar = call i32 @putchar(i32 %conv11)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%2 = load i16, ptr %K, align 2, !tbaa !5
%3 = sext i16 %2 to i64
%cmp9 = icmp slt i64 %indvars.iv.next, %3
br i1 %cmp9, label %for.body, label %for.cond.cleanup, !llvm.loop !10
if.end: ; preds = %for.cond.cleanup, %if.then
call void @llvm.lifetime.end.p0(i64 100001, ptr nonnull %S) #5
call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %K) #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 #1
; 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) #2
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind "no-trapping-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 memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"short", !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>
#include <stdlib.h>
#include <string.h>
int main(void) {
int k;
scanf("%d", &k);
char s[200];
scanf("%*c%s", s);
if (strlen(s) <= k)printf("%s\n", s);
else {
for (int i = 0; i < k; ++i)printf("%c", s[i]);
printf("...\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216846/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216846/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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%s\00", align 1
@str = private unnamed_addr constant [4 x i8] c"...\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%k = alloca i32, align 4
%s = alloca [200 x i8], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k)
call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %s) #5
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s)
%call3 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #6
%0 = load i32, ptr %k, align 4, !tbaa !5
%conv = sext i32 %0 to i64
%cmp.not = icmp ugt i64 %call3, %conv
br i1 %cmp.not, label %for.cond.preheader, label %if.end
for.cond.preheader: ; preds = %entry
%cmp715 = icmp sgt i32 %0, 0
br i1 %cmp715, label %for.body, label %if.end
for.body: ; preds = %for.cond.preheader, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.cond.preheader ]
%arrayidx = getelementptr inbounds [200 x i8], ptr %s, i64 0, i64 %indvars.iv
%1 = load i8, ptr %arrayidx, align 1, !tbaa !9
%conv9 = sext i8 %1 to i32
%putchar = call i32 @putchar(i32 %conv9)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%2 = load i32, ptr %k, align 4, !tbaa !5
%3 = sext i32 %2 to i64
%cmp7 = icmp slt i64 %indvars.iv.next, %3
br i1 %cmp7, label %for.body, label %if.end, !llvm.loop !10
if.end: ; preds = %for.body, %for.cond.preheader, %entry
%str.sink = phi ptr [ %s, %entry ], [ @str, %for.cond.preheader ], [ @str, %for.body ]
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink)
call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %s) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 min_two(int x,int y)
{
if(x>=y) return y;
else return x;
}
int main()
{
int t;
long long x,y,a,b,min1,money=0;
scanf("%d",&t);
while(t){
scanf("%lld %lld",&x,&y);
scanf("%lld %lld",&a,&b);
min1=min_two(x,y);
if(a*2<=b){//两步代价大于一步一步的代价
money=(x+y)*a;
}
else{
x-=min1;
y-=min1;
money=(x+y)*a+min1*b;
}
printf("%lld\n",money);
t--;
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21689/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21689/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%lld %lld\00", align 1
@.str.2 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
define dso_local i32 @min_two(i32 noundef %x, i32 noundef %y) local_unnamed_addr #0 {
entry:
%x.y = tail call i32 @llvm.smin.i32(i32 %x, i32 %y)
ret i32 %x.y
}
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #1 {
entry:
%t = alloca i32, align 4
%x = alloca i64, align 8
%y = alloca i64, align 8
%a = alloca i64, align 8
%b = alloca i64, align 8
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #5
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x) #5
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %y) #5
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #5
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t)
%.pr = load i32, ptr %t, align 4, !tbaa !5
%tobool.not16 = icmp eq i32 %.pr, 0
br i1 %tobool.not16, label %while.end, label %while.body
while.body: ; preds = %entry, %if.end
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x, ptr noundef nonnull %y)
%call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i64, ptr %x, align 8, !tbaa !9
%1 = load i64, ptr %y, align 8, !tbaa !9
%2 = load i64, ptr %a, align 8, !tbaa !9
%mul = shl nsw i64 %2, 1
%3 = load i64, ptr %b, align 8, !tbaa !9
%cmp.not = icmp sgt i64 %mul, %3
br i1 %cmp.not, label %if.else, label %if.then
if.then: ; preds = %while.body
%add = add nsw i64 %1, %0
%mul7 = mul nsw i64 %add, %2
br label %if.end
if.else: ; preds = %while.body
%conv = trunc i64 %0 to i32
%conv3 = trunc i64 %1 to i32
%x.y.i = call i32 @llvm.smin.i32(i32 %conv, i32 %conv3)
%conv5 = sext i32 %x.y.i to i64
%sub = sub nsw i64 %0, %conv5
store i64 %sub, ptr %x, align 8, !tbaa !9
%sub8 = sub nsw i64 %1, %conv5
store i64 %sub8, ptr %y, align 8, !tbaa !9
%add9 = add nsw i64 %sub, %sub8
%mul10 = mul nsw i64 %add9, %2
%mul11 = mul nsw i64 %3, %conv5
%add12 = add nsw i64 %mul10, %mul11
br label %if.end
if.end: ; preds = %if.else, %if.then
%money.0 = phi i64 [ %mul7, %if.then ], [ %add12, %if.else ]
%call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %money.0)
%4 = load i32, ptr %t, align 4, !tbaa !5
%dec = add nsw i32 %4, -1
store i32 %dec, ptr %t, align 4, !tbaa !5
%tobool.not = icmp eq i32 %dec, 0
br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !11
while.end: ; preds = %if.end, %entry
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #5
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #5
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %y) #5
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %x) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #4
attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
|
#include <stdio.h>
#include <string.h>
int main(){
int k;char s[128];
scanf("%d", &k);
if(k<1||k>100)
return 0;
scanf("%s", s);
if(strlen(s)<1||strlen(s)>100)
return 0;
if(strlen(s)<=k){
printf("%s",s);
return 0;
}
char c[k+1];
for(int i=0;i<k;i++){
c[i]=s[i];
}
c[k]='\0';
printf("%s",strcat(c,"..."));
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216932/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216932/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%k = alloca i32, align 4
%s = alloca [128 x i8], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #6
call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %s) #6
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k)
%0 = load i32, ptr %k, align 4
%1 = add i32 %0, -101
%or.cond = icmp ult i32 %1, -100
br i1 %or.cond, label %cleanup, label %if.end
if.end: ; preds = %entry
%call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s)
%call4 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #7
%2 = add i64 %call4, -101
%or.cond32 = icmp ult i64 %2, -100
br i1 %or.cond32, label %cleanup, label %if.end11
if.end11: ; preds = %if.end
%3 = load i32, ptr %k, align 4, !tbaa !5
%conv = sext i32 %3 to i64
%cmp14.not = icmp ugt i64 %call4, %conv
br i1 %cmp14.not, label %if.end19, label %if.then16
if.then16: ; preds = %if.end11
%call18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull %s)
br label %cleanup
if.end19: ; preds = %if.end11
%add = add nsw i32 %3, 1
%4 = zext i32 %add to i64
%5 = call ptr @llvm.stacksave.p0()
%vla = alloca i8, i64 %4, align 16
%6 = load i32, ptr %k, align 4, !tbaa !5
%cmp2033 = icmp sgt i32 %6, 0
br i1 %cmp2033, label %for.body.preheader, label %for.cond.cleanup
for.body.preheader: ; preds = %if.end19
%7 = zext i32 %6 to i64
call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %vla, ptr nonnull align 16 %s, i64 %7, i1 false), !tbaa !9
br label %for.cond.cleanup
for.cond.cleanup: ; preds = %for.body.preheader, %if.end19
%idxprom24 = sext i32 %6 to i64
%arrayidx25 = getelementptr inbounds i8, ptr %vla, i64 %idxprom24
store i8 0, ptr %arrayidx25, align 1, !tbaa !9
%strlen = call i64 @strlen(ptr nonnull dereferenceable(1) %vla)
%endptr = getelementptr inbounds i8, ptr %vla, i64 %strlen
store i32 3026478, ptr %endptr, align 1
%call27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull %vla)
call void @llvm.stackrestore.p0(ptr %5)
br label %cleanup
cleanup: ; preds = %if.end, %entry, %for.cond.cleanup, %if.then16
call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %s) #6
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #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: 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
declare ptr @llvm.stacksave.p0() #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 willreturn
declare void @llvm.stackrestore.p0(ptr) #4
; 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) #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 memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
int ret;
int k;
char s[101];
char sbuf[200];
char *pbuf;
memset(s,0,sizeof(s));
memset(sbuf, 0, sizeof(sbuf));
int n;
ret = scanf("%d", &k);
ret = scanf(" %s", s);
n = strlen(s);
if (n <= k)
printf("%s\n",s);
else {
pbuf = strncpy(sbuf, s, k);
pbuf = strcat(pbuf, "...");
printf("%s\n",pbuf);
}
fflush(stdout);
return EXIT_SUCCESS;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216976/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216976/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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" %s\00", align 1
@stdout = external local_unnamed_addr global ptr, align 8
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%k = alloca i32, align 4
%s = alloca [101 x i8], align 16
%sbuf = alloca [200 x i8], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #7
call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %s) #7
call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %sbuf) #7
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(101) %s, i8 0, i64 101, i1 false)
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(200) %sbuf, i8 0, i64 200, i1 false)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k)
%call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s)
%call5 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #8
%conv = trunc i64 %call5 to i32
%0 = load i32, ptr %k, align 4, !tbaa !5
%cmp.not = icmp slt i32 %0, %conv
br i1 %cmp.not, label %if.else, label %if.end
if.else: ; preds = %entry
%conv11 = sext i32 %0 to i64
%call12 = call ptr @strncpy(ptr noundef nonnull %sbuf, ptr noundef nonnull %s, i64 noundef %conv11) #7
%strlen = call i64 @strlen(ptr nonnull dereferenceable(1) %sbuf)
%endptr = getelementptr inbounds i8, ptr %sbuf, i64 %strlen
store i32 3026478, ptr %endptr, align 1
br label %if.end
if.end: ; preds = %entry, %if.else
%sbuf.sink = phi ptr [ %sbuf, %if.else ], [ %s, %entry ]
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %sbuf.sink)
%1 = load ptr, ptr @stdout, align 8, !tbaa !9
%call15 = call i32 @fflush(ptr noundef %1)
call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %sbuf) #7
call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %s) #7
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #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: 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 nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4
; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strncpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly, i64 noundef) local_unnamed_addr #5
; Function Attrs: nofree nounwind
declare noundef i32 @fflush(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 @puts(ptr nocapture noundef readonly) local_unnamed_addr #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 = { 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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nofree nounwind }
attributes #7 = { nounwind }
attributes #8 = { 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}
|
#include<stdio.h>
#include<stdlib.h>
#include <string.h>
int main(void)
{
char s[120];
int k,i;
scanf("%d",&k);
scanf("%s",s);
if(strlen(s)<=k) printf("%s",s);
else
{
for ( i = 0; i < k; i++)
{
printf("%c",s[i]);
}
printf("...");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217018/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217018/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1
@.str.3 = private unnamed_addr constant [4 x i8] c"...\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%s = alloca [120 x i8], align 16
%k = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %s) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s)
%call3 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #6
%0 = load i32, ptr %k, align 4, !tbaa !5
%conv = sext i32 %0 to i64
%cmp.not = icmp ugt i64 %call3, %conv
br i1 %cmp.not, label %for.cond.preheader, label %if.then
for.cond.preheader: ; preds = %entry
%cmp714 = icmp sgt i32 %0, 0
br i1 %cmp714, label %for.body, label %for.end
if.then: ; preds = %entry
%call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull %s)
br label %if.end
for.body: ; preds = %for.cond.preheader, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.cond.preheader ]
%arrayidx = getelementptr inbounds [120 x i8], ptr %s, i64 0, i64 %indvars.iv
%1 = load i8, ptr %arrayidx, align 1, !tbaa !9
%conv9 = sext i8 %1 to i32
%putchar = call i32 @putchar(i32 %conv9)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%2 = load i32, ptr %k, align 4, !tbaa !5
%3 = sext i32 %2 to i64
%cmp7 = icmp slt i64 %indvars.iv.next, %3
br i1 %cmp7, label %for.body, label %for.end, !llvm.loop !10
for.end: ; preds = %for.body, %for.cond.preheader
%call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
br label %if.end
if.end: ; preds = %for.end, %if.then
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5
call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %s) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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"}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.