Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include <stdio.h>
int main() {
int x, y, a[13]={0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1};
scanf("%d %d", &x, &y);
printf("%s\n", a[x]==a[y] ? "Yes": "No");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130489/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130489/source.c"
target datalayout = "e-m:e-p270: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.a = private unnamed_addr constant [13 x i32] [i32 0, i32 1, i32 3, i32 1, i32 2, i32 1, i32 2, i32 1, i32 1, i32 2, i32 1, i32 2, i32 1], align 16
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
@.str.3 = private unnamed_addr constant [3 x i8] c"No\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%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
%idxprom = sext i32 %0 to i64
%arrayidx = getelementptr inbounds [13 x i32], ptr @__const.main.a, i64 0, i64 %idxprom
%1 = load i32, ptr %arrayidx, align 4, !tbaa !5
%2 = load i32, ptr %y, align 4, !tbaa !5
%idxprom1 = sext i32 %2 to i64
%arrayidx2 = getelementptr inbounds [13 x i32], ptr @__const.main.a, i64 0, i64 %idxprom1
%3 = load i32, ptr %arrayidx2, align 4, !tbaa !5
%cmp = icmp eq i32 %1, %3
%cond = select i1 %cmp, ptr @.str.2, ptr @.str.3
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %cond)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %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 A,B;
scanf("%d %d",&A,&B);
if((A==2)&&(B==2)){
printf("Yes");
}else if(((A==4)||(A==6)||(A==9)||(A==11))&&((B==4)||(B==6)||(B==9)||(B==11))){
printf("Yes");
}else if(((A==1)||(A==3)||(A==5)||(A==7)||(A==8)||(A==10)||(A==12))&&((B==1)||(B==3)||(B==5)||(B==7)||(B==8)||(B==10)||(B==12))){
printf("Yes\n");
}else{
printf("No\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130539/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130539/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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.4 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%A = alloca i32, align 4
%B = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %A) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %B) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B)
%0 = load i32, ptr %A, align 4
%cmp = icmp eq i32 %0, 2
%1 = load i32, ptr %B, align 4
%cmp1 = icmp eq i32 %1, 2
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %if.then, label %if.else
if.then: ; preds = %entry
%call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @str.4)
br label %if.end52
if.else: ; preds = %entry
switch i32 %0, label %if.else49 [
i32 11, label %land.lhs.true9
i32 9, label %land.lhs.true9
i32 6, label %land.lhs.true9
i32 4, label %land.lhs.true9
i32 12, label %land.lhs.true33
i32 10, label %land.lhs.true33
i32 8, label %land.lhs.true33
i32 7, label %land.lhs.true33
i32 5, label %land.lhs.true33
i32 3, label %land.lhs.true33
i32 1, label %land.lhs.true33
]
land.lhs.true9: ; preds = %if.else, %if.else, %if.else, %if.else
switch i32 %1, label %if.else19 [
i32 11, label %if.then17
i32 9, label %if.then17
i32 6, label %if.then17
i32 4, label %if.then17
]
if.then17: ; preds = %land.lhs.true9, %land.lhs.true9, %land.lhs.true9, %land.lhs.true9
%call18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @str.4)
br label %if.end52
if.else19: ; preds = %land.lhs.true9
switch i32 %0, label %if.else49 [
i32 5, label %land.lhs.true33
i32 10, label %land.lhs.true33
i32 8, label %land.lhs.true33
i32 7, label %land.lhs.true33
]
land.lhs.true33: ; preds = %if.else19, %if.else, %if.else, %if.else, %if.else, %if.else, %if.else, %if.else, %if.else19, %if.else19, %if.else19
switch i32 %1, label %if.else49 [
i32 12, label %if.then47
i32 10, label %if.then47
i32 8, label %if.then47
i32 7, label %if.then47
i32 5, label %if.then47
i32 3, label %if.then47
i32 1, label %if.then47
]
if.then47: ; preds = %land.lhs.true33, %land.lhs.true33, %land.lhs.true33, %land.lhs.true33, %land.lhs.true33, %land.lhs.true33, %land.lhs.true33
%puts71 = call i32 @puts(ptr nonnull dereferenceable(1) @str.4)
br label %if.end52
if.else49: ; preds = %if.else, %land.lhs.true33, %if.else19
%puts = call i32 @puts(ptr nonnull dereferenceable(1) @str)
br label %if.end52
if.end52: ; preds = %if.then17, %if.else49, %if.then47, %if.then
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %B) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %A) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
|
#include <stdio.h>
int x,y ;
int main(void){
scanf ("%d%d",&x,&y) ;
if ( x==1 || x==3 || x==5 || x==7 || x==8 || x==10 || x==12 ){
if ( y==1 || y==3 || y==5 || y==7 || y==8 || y==10 || y==12 ) {
printf ("Yes\n") ;
} else {
printf ("No\n") ;
}
} else if ( x==4 || x==6 || x==9 || x==11 ){
if ( y==4 || y==6 || y==9 || y==11 ){
printf ("Yes\n") ;
} else {
printf ("No\n") ;
}
} else if ( x==2 ){
if ( y==2 ){
printf ("Yes\n") ;
} else {
printf ("No\n") ;
}
} else {
}
return 0 ;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130582/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130582/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
@x = dso_local global i32 0, align 4
@y = dso_local global i32 0, align 4
@str.6 = private unnamed_addr constant [3 x i8] c"No\00", align 1
@str.7 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
@reltable.main = private unnamed_addr constant [12 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @str.7 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.6 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.7 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.6 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.7 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.6 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.7 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.7 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.6 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.7 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.6 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.7 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32)], align 4
@reltable.main.9 = private unnamed_addr constant [8 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @str.7 to i64), i64 ptrtoint (ptr @reltable.main.9 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.6 to i64), i64 ptrtoint (ptr @reltable.main.9 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.7 to i64), i64 ptrtoint (ptr @reltable.main.9 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.6 to i64), i64 ptrtoint (ptr @reltable.main.9 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.6 to i64), i64 ptrtoint (ptr @reltable.main.9 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.7 to i64), i64 ptrtoint (ptr @reltable.main.9 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.6 to i64), i64 ptrtoint (ptr @reltable.main.9 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.7 to i64), i64 ptrtoint (ptr @reltable.main.9 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 @x, ptr noundef nonnull @y)
%0 = load i32, ptr @x, align 4
switch i32 %0, label %if.end61 [
i32 12, label %if.then
i32 10, label %if.then
i32 8, label %if.then
i32 7, label %if.then
i32 5, label %if.then
i32 3, label %if.then
i32 1, label %if.then
i32 11, label %if.then36
i32 9, label %if.then36
i32 6, label %if.then36
i32 4, label %if.then36
i32 2, label %if.then51
]
if.then: ; preds = %entry, %entry, %entry, %entry, %entry, %entry, %entry
%1 = load i32, ptr @y, align 4
%switch.tableidx = add i32 %1, -1
%2 = icmp ult i32 %switch.tableidx, 12
br i1 %2, label %switch.lookup, label %if.end61.sink.split
if.then36: ; preds = %entry, %entry, %entry, %entry
%3 = load i32, ptr @y, align 4
%switch.tableidx85 = add i32 %3, -4
%4 = icmp ult i32 %switch.tableidx85, 8
br i1 %4, label %switch.lookup84, label %if.end61.sink.split
if.then51: ; preds = %entry
%5 = load i32, ptr @y, align 4, !tbaa !5
%cmp52 = icmp eq i32 %5, 2
%str.3.str = select i1 %cmp52, ptr @str.7, ptr @str.6
br label %if.end61.sink.split
switch.lookup: ; preds = %if.then
%6 = sext i32 %switch.tableidx to i64
%reltable.shift = shl i64 %6, 2
%reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift)
br label %if.end61.sink.split
switch.lookup84: ; preds = %if.then36
%7 = sext i32 %switch.tableidx85 to i64
%reltable.shift88 = shl i64 %7, 2
%reltable.intrinsic89 = call ptr @llvm.load.relative.i64(ptr @reltable.main.9, i64 %reltable.shift88)
br label %if.end61.sink.split
if.end61.sink.split: ; preds = %if.then36, %switch.lookup84, %if.then, %switch.lookup, %if.then51
%str.4.sink = phi ptr [ %str.3.str, %if.then51 ], [ %reltable.intrinsic, %switch.lookup ], [ @str.6, %if.then ], [ %reltable.intrinsic89, %switch.lookup84 ], [ @str.6, %if.then36 ]
%puts80 = tail call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
br label %if.end61
if.end61: ; preds = %if.end61.sink.split, %entry
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"}
|
#include <stdio.h>
int main(void){
int g[13] = {0, 0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0};
int x, y;
scanf("%d%d", &x, &y);
if(g[x] == g[y]){
printf("Yes");
}
else{
printf("No");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130625/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130625/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:
%g = alloca [13 x i32], align 16
%x = alloca i32, align 4
%y = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %g) #4
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(52) %g, i8 0, i64 52, i1 false)
%0 = getelementptr inbounds [13 x i32], ptr %g, i64 0, i64 2
store i32 2, ptr %0, align 8
%1 = getelementptr inbounds [13 x i32], ptr %g, i64 0, i64 4
store i32 1, ptr %1, align 16
%2 = getelementptr inbounds [13 x i32], ptr %g, i64 0, i64 6
store i32 1, ptr %2, align 8
%3 = getelementptr inbounds [13 x i32], ptr %g, i64 0, i64 9
store i32 1, ptr %3, align 4
%4 = getelementptr inbounds [13 x i32], ptr %g, i64 0, i64 11
store i32 1, ptr %4, 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)
%5 = load i32, ptr %x, align 4, !tbaa !5
%idxprom = sext i32 %5 to i64
%arrayidx = getelementptr inbounds [13 x i32], ptr %g, i64 0, i64 %idxprom
%6 = load i32, ptr %arrayidx, align 4, !tbaa !5
%7 = load i32, ptr %y, align 4, !tbaa !5
%idxprom1 = sext i32 %7 to i64
%arrayidx2 = getelementptr inbounds [13 x i32], ptr %g, i64 0, i64 %idxprom1
%8 = load i32, ptr %arrayidx2, align 4, !tbaa !5
%cmp = icmp eq i32 %6, %8
%.str.1..str.2 = select i1 %cmp, ptr @.str.1, ptr @.str.2
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1..str.2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4
call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %g) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
const int32_t group1[] = {1, 3, 5, 7, 8, 10, 12};
const int32_t group2[] = {4, 6, 9, 11};
const int32_t group3[] = {2};
int32_t in_group(int32_t x)
{
for (int32_t i = 0; i < ARRAY_SIZE(group1); i++) {
if (group1[i] == x) return 1;
}
for (int32_t i = 0; i < ARRAY_SIZE(group2); i++) {
if (group2[i] == x) return 2;
}
for (int32_t i = 0; i < ARRAY_SIZE(group3); i++) {
if (group3[i] == x) return 3;
}
}
int32_t main(void)
{
int32_t x, y;
(void)scanf("%d %d", &x, &y);
if (in_group(x) == in_group(y)) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130669/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130669/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@group1 = dso_local local_unnamed_addr constant [7 x i32] [i32 1, i32 3, i32 5, i32 7, i32 8, i32 10, i32 12], align 16
@group2 = dso_local local_unnamed_addr constant [4 x i32] [i32 4, i32 6, i32 9, i32 11], align 16
@group3 = dso_local local_unnamed_addr constant [1 x i32] [i32 2], align 4
@.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
@switch.table.main.4 = private unnamed_addr constant [12 x i32] [i32 1, i32 1, i32 1, i32 2, i32 1, i32 2, i32 1, i32 1, i32 2, i32 1, i32 2, i32 1], align 4
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
define dso_local i32 @in_group(i32 noundef %x) local_unnamed_addr #0 {
entry:
%switch.tableidx = add i32 %x, -1
%0 = icmp ult i32 %switch.tableidx, 12
br i1 %0, label %switch.hole_check, label %for.cond5.3
for.cond5.3: ; preds = %switch.hole_check, %entry
%cmp31 = icmp eq i32 %x, 2
%spec.select = select i1 %cmp31, i32 3, i32 1
br label %for.end39
switch.hole_check: ; preds = %entry
%switch.maskindex = trunc i32 %switch.tableidx to i16
%switch.shifted = lshr i16 4093, %switch.maskindex
%1 = and i16 %switch.shifted, 1
%switch.lobit.not = icmp eq i16 %1, 0
br i1 %switch.lobit.not, label %for.cond5.3, label %switch.lookup
switch.lookup: ; preds = %switch.hole_check
%2 = sext i32 %switch.tableidx to i64
%switch.gep = getelementptr inbounds [12 x i32], ptr @switch.table.main.4, i64 0, i64 %2
%switch.load = load i32, ptr %switch.gep, align 4
br label %for.end39
for.end39: ; preds = %switch.lookup, %for.cond5.3
%retval.3 = phi i32 [ %spec.select, %for.cond5.3 ], [ %switch.load, %switch.lookup ]
ret i32 %retval.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 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:
%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
%switch.tableidx = add i32 %0, -1
%1 = icmp ult i32 %switch.tableidx, 12
br i1 %1, label %switch.hole_check, label %for.cond5.3.i
for.cond5.3.i: ; preds = %switch.hole_check, %entry
%cmp31.i = icmp eq i32 %0, 2
%spec.select.i = select i1 %cmp31.i, i32 3, i32 1
br label %in_group.exit
switch.hole_check: ; preds = %entry
%switch.maskindex = trunc i32 %switch.tableidx to i16
%switch.shifted = lshr i16 4093, %switch.maskindex
%2 = and i16 %switch.shifted, 1
%switch.lobit.not = icmp eq i16 %2, 0
br i1 %switch.lobit.not, label %for.cond5.3.i, label %switch.lookup
switch.lookup: ; preds = %switch.hole_check
%3 = sext i32 %switch.tableidx to i64
%switch.gep = getelementptr inbounds [12 x i32], ptr @switch.table.main.4, i64 0, i64 %3
%switch.load = load i32, ptr %switch.gep, align 4
br label %in_group.exit
in_group.exit: ; preds = %switch.lookup, %for.cond5.3.i
%retval.3.i = phi i32 [ %spec.select.i, %for.cond5.3.i ], [ %switch.load, %switch.lookup ]
%4 = load i32, ptr %y, align 4, !tbaa !5
%switch.tableidx16 = add i32 %4, -1
%5 = icmp ult i32 %switch.tableidx16, 12
br i1 %5, label %switch.hole_check17, label %for.cond5.3.i11
for.cond5.3.i11: ; preds = %switch.hole_check17, %in_group.exit
%cmp31.i12 = icmp eq i32 %4, 2
%spec.select.i13 = select i1 %cmp31.i12, i32 3, i32 1
br label %in_group.exit14
switch.hole_check17: ; preds = %in_group.exit
%switch.maskindex19 = trunc i32 %switch.tableidx16 to i16
%switch.shifted20 = lshr i16 4093, %switch.maskindex19
%6 = and i16 %switch.shifted20, 1
%switch.lobit21.not = icmp eq i16 %6, 0
br i1 %switch.lobit21.not, label %for.cond5.3.i11, label %switch.lookup18
switch.lookup18: ; preds = %switch.hole_check17
%7 = sext i32 %switch.tableidx16 to i64
%switch.gep22 = getelementptr inbounds [12 x i32], ptr @switch.table.main.4, i64 0, i64 %7
%switch.load23 = load i32, ptr %switch.gep22, align 4
br label %in_group.exit14
in_group.exit14: ; preds = %switch.lookup18, %for.cond5.3.i11
%retval.3.i7 = phi i32 [ %spec.select.i13, %for.cond5.3.i11 ], [ %switch.load23, %switch.lookup18 ]
%cmp = icmp eq i32 %retval.3.i, %retval.3.i7
%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 %y) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #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 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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"}
|
#include <stdio.h>
int main(void)
{
int x, y;
int g1, g2;
scanf("%d %d", &x, &y);
switch ( x ) {
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
g1 = 0;
break;
case 4:
case 6:
case 9:
case 11:
g1 = 1;
break;
case 2:
g1 = 2;
break;
}
switch ( y ) {
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
g2 = 0;
break;
case 4:
case 6:
case 9:
case 11:
g2 = 1;
break;
case 2:
g2 = 2;
break;
}
if ( g1 == g2 ) {
puts("Yes");
} else {
puts("No");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130711/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130711/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
@switch.table.main.3 = private unnamed_addr constant [10 x i32] [i32 2, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1], align 4
; 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
%switch.tableidx = add i32 %0, -2
%1 = icmp ult i32 %switch.tableidx, 10
br i1 %1, label %switch.lookup, label %sw.epilog
switch.lookup: ; preds = %entry
%2 = sext i32 %switch.tableidx to i64
%switch.gep = getelementptr inbounds [10 x i32], ptr @switch.table.main.3, i64 0, i64 %2
%switch.load = load i32, ptr %switch.gep, align 4
br label %sw.epilog
sw.epilog: ; preds = %switch.lookup, %entry
%g1.0 = phi i32 [ 0, %entry ], [ %switch.load, %switch.lookup ]
%3 = load i32, ptr %y, align 4, !tbaa !5
%switch.tableidx10 = add i32 %3, -2
%4 = icmp ult i32 %switch.tableidx10, 10
br i1 %4, label %switch.lookup9, label %sw.epilog6
switch.lookup9: ; preds = %sw.epilog
%5 = sext i32 %switch.tableidx10 to i64
%switch.gep11 = getelementptr inbounds [10 x i32], ptr @switch.table.main.3, i64 0, i64 %5
%switch.load12 = load i32, ptr %switch.gep11, align 4
br label %sw.epilog6
sw.epilog6: ; preds = %switch.lookup9, %sw.epilog
%g2.0 = phi i32 [ 0, %sw.epilog ], [ %switch.load12, %switch.lookup9 ]
%cmp = icmp eq i32 %g1.0, %g2.0
%.str.1..str.2 = select i1 %cmp, ptr @.str.1, ptr @.str.2
%call8 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.1..str.2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
#define INPUT_NUMBER 3
int main(void){
int a,b;
double fb;
scanf("%d",&a);
scanf("%d",&b);
fb=(double)b;
printf("%d %d %f\n",a/b,a%b,a/fb);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130755/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130755/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b)
%0 = load i32, ptr %b, align 4, !tbaa !5
%conv = sitofp i32 %0 to double
%1 = load i32, ptr %a, align 4, !tbaa !5
%div = sdiv i32 %1, %0
%rem = srem i32 %1, %0
%conv2 = sitofp i32 %1 to double
%div3 = fdiv double %conv2, %conv
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main()
{
int a,b;
double c;
scanf("%d %d",&a,&b);
c=1.0*a/b;
printf("%d %d %.5lf\n",a/b,a%b,c);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130799/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130799/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [13 x i8] c"%d %d %.5lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%conv = sitofp i32 %0 to double
%1 = load i32, ptr %b, align 4, !tbaa !5
%conv1 = sitofp i32 %1 to double
%div = fdiv double %conv, %conv1
%div2 = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div2, i32 noundef %rem, double noundef %div)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void) {
long int a,b;
scanf("%ld%ld", &a, &b);
printf("%ld %ld %lf\n", (int)(a/b), a%b, (double)a/b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130841/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130841/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%ld%ld\00", align 1
@.str.1 = private unnamed_addr constant [13 x i8] c"%ld %ld %lf\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
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 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i64, ptr %a, align 8, !tbaa !5
%1 = load i64, ptr %b, align 8, !tbaa !5
%div = sdiv i64 %0, %1
%conv = trunc i64 %div to i32
%rem = srem i64 %0, %1
%conv1 = sitofp i64 %0 to double
%conv2 = sitofp i64 %1 to double
%div3 = fdiv double %conv1, %conv2
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv, i64 noundef %rem, double noundef %div3)
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", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void) {
int a, b, d, r;
double da, db, f;
scanf("%d %d", &a, &b);
da = a; db = b;
d = a/b;
r = a%b;
f = da/db;
printf("%d %d %f", d, r, f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130885/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130885/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [9 x i8] c"%d %d %f\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%conv = sitofp i32 %0 to double
%1 = load i32, ptr %b, align 4, !tbaa !5
%conv1 = sitofp i32 %1 to double
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int
main(int argc, char *argv[])
{
int a, b;
int d, r;
double f;
scanf("%d %d", &a, &b);
d = a / b;
r = a % b;
f = (double)a / (double)b;
printf("%d %d %f\n", d, r, f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130928/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130928/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void) {
int a, b;
scanf("%d %d", &a, &b);
printf("%d %d %f\n", a / b, a % b, (double)a / (double)b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130971/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130971/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int a,b,d,r;
double f;
scanf("%d %d",&a,&b);
d = (int)(a/b);
r = a%b;
f = (double)(a)/(double)(b);
printf("%d %d %.5f\n",d,r,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131013/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131013/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [12 x i8] c"%d %d %.5f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void)
{
int a,b;
scanf("%d %d ",&a,&b);
printf("%d %d %f\n",a/b,a%b,(double)a/b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131064/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131064/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 \00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void)
{
int a,b,d,r;
double f;
scanf("%d %d",&a,&b);
d=a/b;
r=a%b;
f=(double)a/(double)b;
printf("%d %d %lf",d,r,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131114/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131114/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [10 x i8] c"%d %d %lf\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void)
{
int a,b,d,r;
double f;
scanf("%d",&a);
scanf("%d",&b);
d=a/b;
r=a%b;
f=(double)a/(double)b;
printf("%d %d %lf\n",d,r,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131158/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131158/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv2 = sitofp i32 %1 to double
%div3 = fdiv double %conv, %conv2
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void) {
int a,b;
int d,r;
double f;
scanf("%d %d", &a, &b);
d = a / b;
r = a % b;
f = (double)a / b;
printf("%d %d %lf", d, r, f);
return (0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131200/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131200/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [10 x i8] c"%d %d %lf\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void)
{
int a,b,d,r;
double f;
scanf("%d %d",&a,&b);
d=a/b;
r=a%b;
f=1.000000*a/b;
printf("%d %d %.6lf\n",d,r,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131244/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131244/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [13 x i8] c"%d %d %.6lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int a,b,d,r;
double f;
scanf("%d %d",&a,&b);
d = a/b;
r = a%b;
f = (double)a/b;
printf("%d %d %lf",d,r,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131288/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131288/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [10 x i8] c"%d %d %lf\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int a,b,d,r;
double f;
scanf("%d %d",&a,&b);
d = a/b;
r = a%b;
f = (double)a/b;
printf("%d %d %lf",d,r,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131330/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131330/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [10 x i8] c"%d %d %lf\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int a,b,d,r;
double f;
scanf("%d",&a);
scanf("%d",&b);
d=a/b;
r=a-(d*b);
f=(double)a/b;
printf("%d %d ",d,r);
printf("%lf",f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131374/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131374/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 \00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"%lf\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%mul = mul nsw i32 %div, %1
%sub.recomposed = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv2 = sitofp i32 %1 to double
%div3 = fdiv double %conv, %conv2
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %sub.recomposed)
%call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %div3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int a,b;
double c;
scanf("%d%d",&a,&b);
c = (double)a/b;
printf("%d %d %f\n",a/b,a%b,c);
return 0 ;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131424/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131424/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%conv = sitofp i32 %0 to double
%1 = load i32, ptr %b, align 4, !tbaa !5
%conv1 = sitofp i32 %1 to double
%div = fdiv double %conv, %conv1
%div2 = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div2, i32 noundef %rem, double noundef %div)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void)
{
int a,b,d,r;
double f;
scanf("%d %d",&a,&b);
d=a/b;
r=a%b;
f=(double)a/b;
printf("%d %d %.5lf",d,r,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131497/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131497/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [12 x i8] c"%d %d %.5lf\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
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"}
|
//Bismillahir Rahmanir Rahim
#include<stdio.h>
int main()
{
int x,t,temp,g,rem;
scanf("%d",&t);
while(t--)
{
scanf("%d",&x);
g=0;
temp=x;
if(temp%7==0)
g=1;
else if(temp%3==0)
g=1;
else
{
temp=temp-7;
while(temp>0)
{
if(temp%3==0)
{
g=1;
break;
}
else
temp=temp-7;
}
}
if(g==1)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13154/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13154/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@str = private unnamed_addr constant [3 x i8] c"NO\00", align 1
@str.3 = private unnamed_addr constant [4 x i8] c"YES\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%x = alloca i32, align 4
%t = 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 %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
%dec30 = add nsw i32 %0, -1
store i32 %dec30, ptr %t, align 4, !tbaa !5
%tobool.not31 = icmp eq i32 %0, 0
br i1 %tobool.not31, label %while.end23, label %while.body
while.body: ; preds = %entry, %if.end22
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x)
%1 = load i32, ptr %x, align 4, !tbaa !5
%rem2 = srem i32 %1, 7
%cmp = icmp eq i32 %rem2, 0
%rem3 = srem i32 %1, 3
%cmp4 = icmp eq i32 %rem3, 0
%or.cond = or i1 %cmp, %cmp4
br i1 %or.cond, label %if.end22, label %while.cond7
while.cond7: ; preds = %while.body, %while.body9
%temp.0.in = phi i32 [ %temp.0, %while.body9 ], [ %1, %while.body ]
%cmp8 = icmp sgt i32 %temp.0.in, 7
br i1 %cmp8, label %while.body9, label %if.end22
while.body9: ; preds = %while.cond7
%temp.0 = add nsw i32 %temp.0.in, -7
%rem10 = urem i32 %temp.0, 3
%cmp11 = icmp eq i32 %rem10, 0
br i1 %cmp11, label %if.end22, label %while.cond7, !llvm.loop !9
if.end22: ; preds = %while.cond7, %while.body9, %while.body
%str.sink = phi ptr [ @str.3, %while.body ], [ @str.3, %while.body9 ], [ @str, %while.cond7 ]
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink)
%2 = load i32, ptr %t, align 4, !tbaa !5
%dec = add nsw i32 %2, -1
store i32 %dec, ptr %t, align 4, !tbaa !5
%tobool.not = icmp eq i32 %2, 0
br i1 %tobool.not, label %while.end23, label %while.body, !llvm.loop !11
while.end23: ; preds = %if.end22, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #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"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
int main(){
int a, b;
scanf("%d %d", &a, &b);
printf("%d %d %f\n", a / b, a % b, (double)a / b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131598/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131598/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void) {
int a = 1;
int b = 1;
scanf("%d",&a);
scanf("%d",&b);
printf("%d %d %lf", a/b , a%b, (double)a/b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131648/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131648/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %lf\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
store i32 1, ptr %a, align 4, !tbaa !5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
store i32 1, ptr %b, align 4, !tbaa !5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv2 = sitofp i32 %1 to double
%div3 = fdiv double %conv, %conv2
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(){
int n,a,b,x;
scanf("%d",&n);
while(n--){
scanf("%d",&x);
if(x%3==0||x%3==1&&x/3>=2||x%3==2&&x/3>=4)
printf("YES\n");
else
printf("NO\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13172/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13172/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@str = private unnamed_addr constant [3 x i8] c"NO\00", align 1
@str.3 = private unnamed_addr constant [4 x i8] c"YES\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
%x = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%dec17 = add nsw i32 %0, -1
store i32 %dec17, ptr %n, align 4, !tbaa !5
%tobool.not18 = icmp eq i32 %0, 0
br i1 %tobool.not18, label %while.end, label %while.body
while.body: ; preds = %entry, %if.end
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x)
%1 = load i32, ptr %x, align 4, !tbaa !5
%rem = srem i32 %1, 3
switch i32 %rem, label %lor.lhs.false5 [
i32 0, label %if.end
i32 1, label %land.lhs.true
]
land.lhs.true: ; preds = %while.body
%cmp4 = icmp sgt i32 %1, 5
br i1 %cmp4, label %if.end, label %if.else
lor.lhs.false5: ; preds = %while.body
%cmp7 = icmp eq i32 %rem, 2
%cmp10 = icmp sgt i32 %1, 11
%or.cond = and i1 %cmp10, %cmp7
br i1 %or.cond, label %if.end, label %if.else
if.else: ; preds = %land.lhs.true, %lor.lhs.false5
br label %if.end
if.end: ; preds = %land.lhs.true, %while.body, %lor.lhs.false5, %if.else
%str.sink = phi ptr [ @str, %if.else ], [ @str.3, %lor.lhs.false5 ], [ @str.3, %while.body ], [ @str.3, %land.lhs.true ]
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink)
%2 = load i32, ptr %n, align 4, !tbaa !5
%dec = add nsw i32 %2, -1
store i32 %dec, ptr %n, align 4, !tbaa !5
%tobool.not = icmp eq i32 %2, 0
br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !9
while.end: ; preds = %if.end, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
|
#include<stdio.h>
int main(void)
{
int a,b,d,r;
double f;
scanf("%d %d",&a,&b);
(((a>=1)&&(a<=1000000000))&&((b>=1)&&(b<=1000000000)));
d = a / b;
r = a % b;
f = (double)a / (double)b;
printf("%d %d %f\n",d,r,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131763/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131763/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv6 = sitofp i32 %1 to double
%div7 = fdiv double %conv, %conv6
%call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div7)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int a,b,d=0,r=0;
double f=0;
scanf("%d %d",&a,&b);
d=a/b;
r=a%b;
f=(double)a/b;
printf("%d %d %f\n",d,r,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131806/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131806/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int chunk(int x){
if(x % 3 == 0|| x % 7 == 0)
return 1;
if(x > 7)
return chunk(x - 7);
else
return 0;
}
int main(){
int t;
scanf("%d",&t);
while(t--){
int x;
scanf("%d",&x);
int c = chunk(x);
if(c == 1)
printf("YES\n");
else
printf("NO\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13185/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13185/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@str = private unnamed_addr constant [3 x i8] c"NO\00", align 1
@str.3 = private unnamed_addr constant [4 x i8] c"YES\00", align 1
; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable
define dso_local i32 @chunk(i32 noundef %x) local_unnamed_addr #0 {
entry:
%rem8 = srem i32 %x, 3
%cmp9 = icmp eq i32 %rem8, 0
%rem110 = srem i32 %x, 7
%cmp211 = icmp eq i32 %rem110, 0
%or.cond12 = or i1 %cmp9, %cmp211
br i1 %or.cond12, label %return, label %if.end
tailrecurse: ; preds = %if.end
%sub = add nsw i32 %x.tr13, -7
%rem15 = urem i32 %sub, 3
%cmp = icmp eq i32 %rem15, 0
%rem116 = urem i32 %sub, 7
%cmp2 = icmp eq i32 %rem116, 0
%or.cond = or i1 %cmp, %cmp2
br i1 %or.cond, label %return, label %if.end
if.end: ; preds = %entry, %tailrecurse
%x.tr13 = phi i32 [ %sub, %tailrecurse ], [ %x, %entry ]
%cmp3 = icmp sgt i32 %x.tr13, 7
br i1 %cmp3, label %tailrecurse, label %return
return: ; preds = %tailrecurse, %if.end, %entry
%retval.0 = phi i32 [ 1, %entry ], [ 0, %if.end ], [ 1, %tailrecurse ]
ret i32 %retval.0
}
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #1 {
entry:
%t = alloca i32, align 4
%x = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t)
%0 = load i32, ptr %t, align 4, !tbaa !5
%dec8 = add nsw i32 %0, -1
store i32 %dec8, ptr %t, align 4, !tbaa !5
%tobool.not9 = icmp eq i32 %0, 0
br i1 %tobool.not9, label %while.end, label %while.body
while.body: ; preds = %entry, %if.end
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #5
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x)
%1 = load i32, ptr %x, align 4, !tbaa !5
%rem8.i = srem i32 %1, 3
%cmp9.i = icmp eq i32 %rem8.i, 0
%rem110.i = srem i32 %1, 7
%cmp211.i = icmp eq i32 %rem110.i, 0
%or.cond12.i = or i1 %cmp9.i, %cmp211.i
br i1 %or.cond12.i, label %if.end, label %if.end.i
tailrecurse.i: ; preds = %if.end.i
%sub.i = add nsw i32 %x.tr13.i, -7
%rem15.i = urem i32 %sub.i, 3
%cmp.i = icmp eq i32 %rem15.i, 0
%rem116.i = urem i32 %sub.i, 7
%cmp2.i = icmp eq i32 %rem116.i, 0
%or.cond.i = or i1 %cmp.i, %cmp2.i
br i1 %or.cond.i, label %if.end, label %if.end.i
if.end.i: ; preds = %while.body, %tailrecurse.i
%x.tr13.i = phi i32 [ %sub.i, %tailrecurse.i ], [ %1, %while.body ]
%cmp3.i = icmp sgt i32 %x.tr13.i, 7
br i1 %cmp3.i, label %tailrecurse.i, label %if.end
if.end: ; preds = %if.end.i, %tailrecurse.i, %while.body
%str.sink = phi ptr [ @str.3, %while.body ], [ @str.3, %tailrecurse.i ], [ @str, %if.end.i ]
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #5
%2 = load i32, ptr %t, align 4, !tbaa !5
%dec = add nsw i32 %2, -1
store i32 %dec, ptr %t, align 4, !tbaa !5
%tobool.not = icmp eq i32 %2, 0
br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !9
while.end: ; preds = %if.end, %entry
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: 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 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4
attributes #0 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
|
#include<stdio.h>
int main()
{
int flag,p,n,a,b,x;
scanf("%d",&n);
for(p=0;p<n;p++)
{
scanf("%d",&x);
flag=0;
for(a=0;a<=33;a++)
{
for(b=0;b<=14;b++)
{
if((3*a+7*b) == x)
{
flag=1;
break;}
}
if(flag==1)
break;}
if(flag==1)
printf("YES\n");
else printf("NO\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13190/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13190/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@str = private unnamed_addr constant [3 x i8] c"NO\00", align 1
@str.3 = private unnamed_addr constant [4 x i8] c"YES\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
%x = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp33 = icmp sgt i32 %0, 0
br i1 %cmp33, label %for.body, label %for.end23
for.body: ; preds = %entry, %for.body
%p.034 = phi i32 [ %inc22, %for.body ], [ 0, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x)
%1 = load i32, ptr %x, align 4, !tbaa !5
%2 = mul i32 %1, -1227133513
%3 = icmp ult i32 %2, 15
%indvars.iv.next = add i32 %2, -613566757
%4 = icmp ult i32 %indvars.iv.next, 15
%or.cond = or i1 %3, %4
%indvars.iv.next.1 = add i32 %2, -1227133514
%5 = icmp ult i32 %indvars.iv.next.1, 15
%or.cond35 = or i1 %or.cond, %5
%indvars.iv.next.2 = add i32 %2, -1840700271
%6 = icmp ult i32 %indvars.iv.next.2, 15
%or.cond36 = or i1 %or.cond35, %6
%indvars.iv.next.3 = add i32 %2, 1840700268
%7 = icmp ult i32 %indvars.iv.next.3, 15
%or.cond37 = or i1 %or.cond36, %7
%indvars.iv.next.4 = add i32 %2, 1227133511
%8 = icmp ult i32 %indvars.iv.next.4, 15
%or.cond38 = or i1 %or.cond37, %8
%indvars.iv.next.5 = add i32 %2, 613566754
%9 = icmp ult i32 %indvars.iv.next.5, 15
%or.cond39 = or i1 %or.cond38, %9
%indvars.iv.next.6 = add i32 %2, -3
%10 = icmp ult i32 %indvars.iv.next.6, 15
%or.cond40 = or i1 %or.cond39, %10
%indvars.iv.next.7 = add i32 %2, -613566760
%11 = icmp ult i32 %indvars.iv.next.7, 15
%or.cond41 = or i1 %or.cond40, %11
%indvars.iv.next.8 = add i32 %2, -1227133517
%12 = icmp ult i32 %indvars.iv.next.8, 15
%or.cond42 = or i1 %or.cond41, %12
%indvars.iv.next.9 = add i32 %2, -1840700274
%13 = icmp ult i32 %indvars.iv.next.9, 15
%or.cond43 = or i1 %or.cond42, %13
%indvars.iv.next.10 = add i32 %2, 1840700265
%14 = icmp ult i32 %indvars.iv.next.10, 15
%or.cond44 = select i1 %or.cond43, i1 true, i1 %14
%indvars.iv.next.11 = add i32 %2, 1227133508
%15 = icmp ult i32 %indvars.iv.next.11, 15
%or.cond45 = select i1 %or.cond44, i1 true, i1 %15
%indvars.iv.next.12 = add i32 %2, 613566751
%16 = icmp ult i32 %indvars.iv.next.12, 15
%or.cond46 = select i1 %or.cond45, i1 true, i1 %16
%indvars.iv.next.13 = add i32 %2, -6
%17 = icmp ult i32 %indvars.iv.next.13, 15
%or.cond47 = select i1 %or.cond46, i1 true, i1 %17
%indvars.iv.next.14 = add i32 %2, -613566763
%18 = icmp ult i32 %indvars.iv.next.14, 15
%or.cond48 = select i1 %or.cond47, i1 true, i1 %18
%indvars.iv.next.15 = add i32 %2, -1227133520
%19 = icmp ult i32 %indvars.iv.next.15, 15
%or.cond49 = select i1 %or.cond48, i1 true, i1 %19
%indvars.iv.next.16 = add i32 %2, -1840700277
%20 = icmp ult i32 %indvars.iv.next.16, 15
%or.cond50 = select i1 %or.cond49, i1 true, i1 %20
%indvars.iv.next.17 = add i32 %2, 1840700262
%21 = icmp ult i32 %indvars.iv.next.17, 15
%or.cond51 = select i1 %or.cond50, i1 true, i1 %21
%indvars.iv.next.18 = add i32 %2, 1227133505
%22 = icmp ult i32 %indvars.iv.next.18, 15
%or.cond52 = select i1 %or.cond51, i1 true, i1 %22
%indvars.iv.next.19 = add i32 %2, 613566748
%23 = icmp ult i32 %indvars.iv.next.19, 15
%or.cond53 = select i1 %or.cond52, i1 true, i1 %23
%indvars.iv.next.20 = add i32 %2, -9
%24 = icmp ult i32 %indvars.iv.next.20, 15
%or.cond54 = select i1 %or.cond53, i1 true, i1 %24
%indvars.iv.next.21 = add i32 %2, -613566766
%25 = icmp ult i32 %indvars.iv.next.21, 15
%or.cond55 = select i1 %or.cond54, i1 true, i1 %25
%indvars.iv.next.22 = add i32 %2, -1227133523
%26 = icmp ult i32 %indvars.iv.next.22, 15
%or.cond56 = select i1 %or.cond55, i1 true, i1 %26
%indvars.iv.next.23 = add i32 %2, -1840700280
%27 = icmp ult i32 %indvars.iv.next.23, 15
%or.cond57 = select i1 %or.cond56, i1 true, i1 %27
%indvars.iv.next.24 = add i32 %2, 1840700259
%28 = icmp ult i32 %indvars.iv.next.24, 15
%or.cond58 = select i1 %or.cond57, i1 true, i1 %28
%indvars.iv.next.25 = add i32 %2, 1227133502
%29 = icmp ult i32 %indvars.iv.next.25, 15
%or.cond59 = select i1 %or.cond58, i1 true, i1 %29
%indvars.iv.next.26 = add i32 %2, 613566745
%30 = icmp ult i32 %indvars.iv.next.26, 15
%or.cond60 = select i1 %or.cond59, i1 true, i1 %30
%indvars.iv.next.27 = add i32 %2, -12
%31 = icmp ult i32 %indvars.iv.next.27, 15
%or.cond61 = select i1 %or.cond60, i1 true, i1 %31
%indvars.iv.next.28 = add i32 %2, -613566769
%32 = icmp ult i32 %indvars.iv.next.28, 15
%or.cond62 = select i1 %or.cond61, i1 true, i1 %32
%indvars.iv.next.29 = add i32 %2, -1227133526
%33 = icmp ult i32 %indvars.iv.next.29, 15
%or.cond63 = select i1 %or.cond62, i1 true, i1 %33
%indvars.iv.next.30 = add i32 %2, -1840700283
%34 = icmp ult i32 %indvars.iv.next.30, 15
%or.cond64 = select i1 %or.cond63, i1 true, i1 %34
%indvars.iv.next.31 = add i32 %2, 1840700256
%35 = icmp ult i32 %indvars.iv.next.31, 15
%or.cond65 = select i1 %or.cond64, i1 true, i1 %35
%indvars.iv.next.32 = add i32 %2, 1227133499
%36 = icmp ult i32 %indvars.iv.next.32, 15
%or.cond66 = select i1 %or.cond65, i1 true, i1 %36
%str.3.sink = select i1 %or.cond66, ptr @str.3, ptr @str
%puts30 = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.sink)
%inc22 = add nuw nsw i32 %p.034, 1
%37 = load i32, ptr %n, align 4, !tbaa !5
%cmp = icmp slt i32 %inc22, %37
br i1 %cmp, label %for.body, label %for.end23, !llvm.loop !9
for.end23: ; preds = %for.body, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
|
#include<stdio.h>
int main(void){
int a,b,d,r=0;
double f=0;
scanf("%d %d",&a,&b);
d=a/b;
r=a%b;
f=(double)a/b;
printf("%d %d %lf\n",d,r,f);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131943/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131943/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void){
int a,b,d,r;
double f;
scanf("%d",&a);
scanf("%d",&b);
d=a/b;
r=a%b;
f=(double)a/(double)b;
printf("%d %d %f\n",d,r,f);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131987/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131987/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv2 = sitofp i32 %1 to double
%div3 = fdiv double %conv, %conv2
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main() {
//変数の宣言
int a, b;
int d, r;
double f;
//入力
scanf("%d %d", &a, &b);
//処理
d = a / b;
r = a % b;
f = 1.0 * a / b;
//出力
printf("%d %d %f\n", d, r, f);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132029/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132029/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void){
int d, r;
double a, b, f;
scanf("%lf %lf\n", &a, &b);
d = a / b;
r = (int)a % (int)b;
f = a / b;
printf("%d %d %f\n", d, r, f);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132072/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132072/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%lf %lf\0A\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca double, align 8
%b = alloca double, 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 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load double, ptr %a, align 8, !tbaa !5
%1 = load double, ptr %b, align 8, !tbaa !5
%div = fdiv double %0, %1
%conv = fptosi double %div to i32
%conv1 = fptosi double %0 to i32
%conv2 = fptosi double %1 to i32
%rem = srem i32 %conv1, %conv2
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv, i32 noundef %rem, double noundef %div)
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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a, b;
scanf("%d%d", &a, &b);
printf("%d %d %lf\n", a/b, a%b, (double)a/b);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132115/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132115/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void){
double a,b;
int calc;
scanf("%lf %lf", &a, &b);
calc = a/b;
printf("%d %.0lf %.5lf", calc, a-(calc*b), (double)a/b);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132159/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132159/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [8 x i8] c"%lf %lf\00", align 1
@.str.1 = private unnamed_addr constant [15 x i8] c"%d %.0lf %.5lf\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca double, align 8
%b = alloca double, align 8
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load double, ptr %a, align 8, !tbaa !5
%1 = load double, ptr %b, align 8, !tbaa !5
%div = fdiv double %0, %1
%conv = fptosi double %div to i32
%conv1 = sitofp i32 %conv to double
%neg = fneg double %conv1
%2 = call double @llvm.fmuladd.f64(double %neg, double %1, double %0)
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv, double noundef %2, double noundef %div)
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(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 speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>//2つの整数 a と b を読み込んで、以下の値を計算するプログラム
#include<math.h>
int main(void){
double x,y;
scanf("%lf %lf",&x,&y);
printf("%d %d %f",(int)(x/y),(int)fmod(x,y),x/y);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132209/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132209/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [8 x i8] c"%lf %lf\00", align 1
@.str.1 = private unnamed_addr constant [9 x i8] c"%d %d %f\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%x = alloca double, align 8
%y = alloca double, align 8
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 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y)
%0 = load double, ptr %x, align 8, !tbaa !5
%1 = load double, ptr %y, align 8, !tbaa !5
%div = fdiv double %0, %1
%conv = fptosi double %div to i32
%call1 = call double @fmod(double noundef %0, double noundef %1) #4
%conv2 = fptosi double %call1 to i32
%2 = load double, ptr %x, align 8, !tbaa !5
%3 = load double, ptr %y, align 8, !tbaa !5
%div3 = fdiv double %2, %3
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv, i32 noundef %conv2, double noundef %div3)
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %y) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %x) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @fmod(double noundef, double noundef) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void)
{
int a,b;
scanf("%d %d\n",&a,&b);
printf("%d %d %lf\n",a/b,a%b,(double)a/b);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132252/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132252/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(int argc, const char * argv[]) {
int a,b;
double f;
scanf("%d %d",&a,&b);
f = a*1.0/b;
printf("%d %d %lf\n",a/b,a%b,f);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132296/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132296/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%conv = sitofp i32 %0 to double
%1 = load i32, ptr %b, align 4, !tbaa !5
%conv1 = sitofp i32 %1 to double
%div = fdiv double %conv, %conv1
%div2 = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div2, i32 noundef %rem, double noundef %div)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int a,b,d,r;
double f;
scanf("%d %d",&a,&b);
d=a/b;
r=a%b;
f=(double)a/(double)b;
printf("%d %d %5f\n",d,r,f);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132339/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132339/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %5f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
#include<stdlib.h>
int main(){
/*
int n;
for(n =1;;n++){
if(x==0 && y==0) break;
}
*/
int a,b;
scanf("%d",&a);
scanf("%d",&b);
printf("%d %d %lf\n", a/b,a%b,(double)a/b);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132382/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132382/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv2 = sitofp i32 %1 to double
%div3 = fdiv double %conv, %conv2
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int a, b;
scanf("%d %d", &a, &b);
printf("%d %d %lf\n", a/b, a%b, (double)a/(double)b);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132425/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132425/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a/b);
printf(" %d",a%b);
printf(" %.5f\n",(double)a/b);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132469/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132469/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c" %d\00", align 1
@.str.3 = private unnamed_addr constant [7 x i8] c" %.5f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div)
%2 = load i32, ptr %a, align 4, !tbaa !5
%3 = load i32, ptr %b, align 4, !tbaa !5
%rem = srem i32 %2, %3
%call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %rem)
%4 = load i32, ptr %a, align 4, !tbaa !5
%conv = sitofp i32 %4 to double
%5 = load i32, ptr %b, align 4, !tbaa !5
%conv3 = sitofp i32 %5 to double
%div4 = fdiv double %conv, %conv3
%call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, double noundef %div4)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
#include <math.h>
int main(){
int a, b, d, r;
double f;
scanf("%d %d", &a, &b);
d = a / b;
r = a % b;
f = ((double) a) / b;
printf("%d %d %f\n",d, r, f);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132511/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132511/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
double a,b;
int c,d;
scanf("%lf %lf",&a,&b);
c=a;
d=b;
printf("%d ",c/d);
printf("%d ",c%d);
printf("%lf\n",a/b);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132555/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132555/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [8 x i8] c"%lf %lf\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"%d \00", align 1
@.str.2 = private unnamed_addr constant [5 x i8] c"%lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca double, align 8
%b = alloca double, 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 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load double, ptr %a, align 8, !tbaa !5
%conv = fptosi double %0 to i32
%1 = load double, ptr %b, align 8, !tbaa !5
%conv1 = fptosi double %1 to i32
%div = sdiv i32 %conv, %conv1
%call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div)
%rem = srem i32 %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %rem)
%2 = load double, ptr %a, align 8, !tbaa !5
%3 = load double, ptr %b, align 8, !tbaa !5
%div4 = fdiv double %2, %3
%call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %div4)
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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(){
int a, b, d, r;
long double f;
scanf("%d %d", &a, &b);
d = a / b;
r = a % b;
f = (long double)a / (long double)b;
printf("%d %d %Lf\n", d, r, f);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132599/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132599/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %Lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to x86_fp80
%conv1 = sitofp i32 %1 to x86_fp80
%div2 = fdiv x86_fp80 %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, x86_fp80 noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void)
{
int a,b,c,d;
double e;
scanf("%d %d",&a, &b);
c = a/b;
d = a%b;
e = (double)a/(double)b;
printf("%d %d %lf\n",c, d, e);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132649/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132649/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void) {
int a, b;
int i, div_num = 0;
scanf("%d %d", &a, &b);
if(a < 1 || a > 1000000000 || b < 1 || b > 1000000000) {
printf("illegal inupt\n");
return 1;
}
printf("%d %d %.5lf\n", a/b, a%b, (double)a/b);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132692/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132692/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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.2 = private unnamed_addr constant [13 x i8] c"%d %d %.5lf\0A\00", align 1
@str = private unnamed_addr constant [14 x i8] c"illegal inupt\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4
%1 = add i32 %0, -1000000001
%or.cond = icmp ult i32 %1, -1000000000
%2 = load i32, ptr %b, align 4
%cmp3 = icmp slt i32 %2, 1
%or.cond13 = select i1 %or.cond, i1 true, i1 %cmp3
%cmp5 = icmp sgt i32 %2, 1000000000
%or.cond14 = select i1 %or.cond13, i1 true, i1 %cmp5
br i1 %or.cond14, label %if.then, label %if.end
if.then: ; preds = %entry
%puts = call i32 @puts(ptr nonnull dereferenceable(1) @str)
br label %cleanup
if.end: ; preds = %entry
%div = udiv i32 %0, %2
%rem = urem i32 %0, %2
%conv = sitofp i32 %0 to double
%conv7 = sitofp i32 %2 to double
%div8 = fdiv double %conv, %conv7
%call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %div, i32 noundef %rem, double noundef %div8)
br label %cleanup
cleanup: ; preds = %if.end, %if.then
%retval.0 = phi i32 [ 1, %if.then ], [ 0, %if.end ]
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 %retval.0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
|
#include <stdio.h>
#define min(a, b) ((a) < (b) ? (a) : (b))
const long long INF = (int)1e15;
int main(void)
{
int n, m;
int d[1024];
int c[1024];
long long dp[1024];
int i, j;
scanf("%d %d", &n, &m);
for (i = 0; i < n; i++) scanf("%d", d + i);
for (i = 0; i < m; i++) scanf("%d", c + i);
dp[0] = 0;
for (i = 1; i <= n; i++) dp[i] = INF;
for (i = 0; i < m; i++){
for (j = n; j > 0; j--){
dp[j] = min(dp[j], dp[j - 1] + d[j - 1] * c[i]);
}
}
printf("%lld\n", dp[n]);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132742/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132742/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@INF = dso_local local_unnamed_addr constant i64 2147483647, align 8
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.2 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
%m = alloca i32, align 4
%d = alloca [1024 x i32], align 16
%c = alloca [1024 x i32], align 16
%dp = alloca [1024 x i64], 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 4096, ptr nonnull %d) #4
call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %c) #4
call void @llvm.lifetime.start.p0(i64 8192, ptr nonnull %dp) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp80 = icmp sgt i32 %0, 0
br i1 %cmp80, label %for.body, label %for.cond2.preheader
for.cond2.preheader: ; preds = %for.body, %entry
%1 = phi i32 [ %0, %entry ], [ %3, %for.body ]
%2 = load i32, ptr %m, align 4, !tbaa !5
%cmp382 = icmp sgt i32 %2, 0
br i1 %cmp382, label %for.body4, label %for.end11
for.body: ; preds = %entry, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
%add.ptr = getelementptr inbounds i32, ptr %d, i64 %indvars.iv
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %add.ptr)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%3 = load i32, ptr %n, align 4, !tbaa !5
%4 = sext i32 %3 to i64
%cmp = icmp slt i64 %indvars.iv.next, %4
br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !9
for.body4: ; preds = %for.cond2.preheader, %for.body4
%indvars.iv93 = phi i64 [ %indvars.iv.next94, %for.body4 ], [ 0, %for.cond2.preheader ]
%add.ptr7 = getelementptr inbounds i32, ptr %c, i64 %indvars.iv93
%call8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %add.ptr7)
%indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
%5 = load i32, ptr %m, align 4, !tbaa !5
%6 = sext i32 %5 to i64
%cmp3 = icmp slt i64 %indvars.iv.next94, %6
br i1 %cmp3, label %for.body4, label %for.end11.loopexit, !llvm.loop !11
for.end11.loopexit: ; preds = %for.body4
%.pre = load i32, ptr %n, align 4, !tbaa !5
br label %for.end11
for.end11: ; preds = %for.end11.loopexit, %for.cond2.preheader
%7 = phi i32 [ %1, %for.cond2.preheader ], [ %.pre, %for.end11.loopexit ]
%.lcssa79 = phi i32 [ %2, %for.cond2.preheader ], [ %5, %for.end11.loopexit ]
store i64 0, ptr %dp, align 16, !tbaa !12
%cmp13.not84 = icmp slt i32 %7, 1
br i1 %cmp13.not84, label %for.cond19.preheader, label %for.body14.preheader
for.body14.preheader: ; preds = %for.end11
%8 = add nuw i32 %7, 1
%wide.trip.count = zext i32 %8 to i64
%9 = add nsw i64 %wide.trip.count, -1
%min.iters.check = icmp ult i32 %7, 4
br i1 %min.iters.check, label %for.body14.preheader110, label %vector.ph
vector.ph: ; preds = %for.body14.preheader
%n.vec = and i64 %9, -4
%ind.end = or i64 %n.vec, 1
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%offset.idx = or i64 %index, 1
%10 = getelementptr inbounds [1024 x i64], ptr %dp, i64 0, i64 %offset.idx
store <2 x i64> <i64 2147483647, i64 2147483647>, ptr %10, align 8, !tbaa !12
%11 = getelementptr inbounds i64, ptr %10, i64 2
store <2 x i64> <i64 2147483647, i64 2147483647>, ptr %11, align 8, !tbaa !12
%index.next = add nuw i64 %index, 4
%12 = icmp eq i64 %index.next, %n.vec
br i1 %12, label %middle.block, label %vector.body, !llvm.loop !14
middle.block: ; preds = %vector.body
%cmp.n = icmp eq i64 %9, %n.vec
br i1 %cmp.n, label %for.cond19.preheader, label %for.body14.preheader110
for.body14.preheader110: ; preds = %for.body14.preheader, %middle.block
%indvars.iv96.ph = phi i64 [ 1, %for.body14.preheader ], [ %ind.end, %middle.block ]
br label %for.body14
for.cond19.preheader: ; preds = %for.body14, %middle.block, %for.end11
%cmp2089 = icmp sgt i32 %.lcssa79, 0
%cmp2387 = icmp sgt i32 %7, 0
%or.cond = and i1 %cmp2089, %cmp2387
br i1 %or.cond, label %for.cond22.preheader.us.preheader, label %for.end55
for.cond22.preheader.us.preheader: ; preds = %for.cond19.preheader
%13 = zext i32 %7 to i64
%wide.trip.count106 = zext i32 %.lcssa79 to i64
%xtraiter = and i64 %13, 1
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
%arrayidx26.us.prol = getelementptr inbounds [1024 x i64], ptr %dp, i64 0, i64 %13
%indvars.iv.next100.prol = add nsw i64 %13, -1
%idxprom27.us.prol = and i64 %indvars.iv.next100.prol, 4294967295
%arrayidx28.us.prol = getelementptr inbounds [1024 x i64], ptr %dp, i64 0, i64 %idxprom27.us.prol
%arrayidx31.us.prol = getelementptr inbounds [1024 x i32], ptr %d, i64 0, i64 %idxprom27.us.prol
%14 = icmp eq i32 %7, 1
br label %for.cond22.preheader.us
for.cond22.preheader.us: ; preds = %for.cond22.preheader.us.preheader, %for.cond22.for.inc53_crit_edge.us
%indvars.iv102 = phi i64 [ 0, %for.cond22.preheader.us.preheader ], [ %indvars.iv.next103, %for.cond22.for.inc53_crit_edge.us ]
%arrayidx33.us = getelementptr inbounds [1024 x i32], ptr %c, i64 0, i64 %indvars.iv102
%15 = load i32, ptr %arrayidx33.us, align 4, !tbaa !5
br i1 %lcmp.mod.not, label %for.body24.us.prol.loopexit, label %for.body24.us.prol
for.body24.us.prol: ; preds = %for.cond22.preheader.us
%16 = load i64, ptr %arrayidx26.us.prol, align 8, !tbaa !12
%17 = load i64, ptr %arrayidx28.us.prol, align 8, !tbaa !12
%18 = load i32, ptr %arrayidx31.us.prol, align 4, !tbaa !5
%mul.us.prol = mul nsw i32 %15, %18
%conv.us.prol = sext i32 %mul.us.prol to i64
%add.us.prol = add nsw i64 %17, %conv.us.prol
%.add.us.prol = call i64 @llvm.smin.i64(i64 %16, i64 %add.us.prol)
store i64 %.add.us.prol, ptr %arrayidx26.us.prol, align 8, !tbaa !12
br label %for.body24.us.prol.loopexit
for.body24.us.prol.loopexit: ; preds = %for.body24.us.prol, %for.cond22.preheader.us
%indvars.iv99.unr = phi i64 [ %13, %for.cond22.preheader.us ], [ %indvars.iv.next100.prol, %for.body24.us.prol ]
br i1 %14, label %for.cond22.for.inc53_crit_edge.us, label %for.body24.us
for.body24.us: ; preds = %for.body24.us.prol.loopexit, %for.body24.us
%indvars.iv99 = phi i64 [ %indvars.iv.next100.1, %for.body24.us ], [ %indvars.iv99.unr, %for.body24.us.prol.loopexit ]
%arrayidx26.us = getelementptr inbounds [1024 x i64], ptr %dp, i64 0, i64 %indvars.iv99
%19 = load i64, ptr %arrayidx26.us, align 8, !tbaa !12
%indvars.iv.next100 = add nsw i64 %indvars.iv99, -1
%idxprom27.us = and i64 %indvars.iv.next100, 4294967295
%arrayidx28.us = getelementptr inbounds [1024 x i64], ptr %dp, i64 0, i64 %idxprom27.us
%20 = load i64, ptr %arrayidx28.us, align 8, !tbaa !12
%arrayidx31.us = getelementptr inbounds [1024 x i32], ptr %d, i64 0, i64 %idxprom27.us
%21 = load i32, ptr %arrayidx31.us, align 4, !tbaa !5
%mul.us = mul nsw i32 %15, %21
%conv.us = sext i32 %mul.us to i64
%add.us = add nsw i64 %20, %conv.us
%.add.us = call i64 @llvm.smin.i64(i64 %19, i64 %add.us)
store i64 %.add.us, ptr %arrayidx26.us, align 8, !tbaa !12
%arrayidx26.us.1 = getelementptr inbounds [1024 x i64], ptr %dp, i64 0, i64 %indvars.iv.next100
%22 = load i64, ptr %arrayidx26.us.1, align 8, !tbaa !12
%indvars.iv.next100.1 = add nsw i64 %indvars.iv99, -2
%idxprom27.us.1 = and i64 %indvars.iv.next100.1, 4294967295
%arrayidx28.us.1 = getelementptr inbounds [1024 x i64], ptr %dp, i64 0, i64 %idxprom27.us.1
%23 = load i64, ptr %arrayidx28.us.1, align 8, !tbaa !12
%arrayidx31.us.1 = getelementptr inbounds [1024 x i32], ptr %d, i64 0, i64 %idxprom27.us.1
%24 = load i32, ptr %arrayidx31.us.1, align 4, !tbaa !5
%mul.us.1 = mul nsw i32 %15, %24
%conv.us.1 = sext i32 %mul.us.1 to i64
%add.us.1 = add nsw i64 %23, %conv.us.1
%.add.us.1 = call i64 @llvm.smin.i64(i64 %22, i64 %add.us.1)
store i64 %.add.us.1, ptr %arrayidx26.us.1, align 8, !tbaa !12
%cmp23.us.1 = icmp sgt i64 %indvars.iv99, 2
br i1 %cmp23.us.1, label %for.body24.us, label %for.cond22.for.inc53_crit_edge.us, !llvm.loop !17
for.cond22.for.inc53_crit_edge.us: ; preds = %for.body24.us, %for.body24.us.prol.loopexit
%indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
%exitcond107.not = icmp eq i64 %indvars.iv.next103, %wide.trip.count106
br i1 %exitcond107.not, label %for.end55, label %for.cond22.preheader.us, !llvm.loop !18
for.body14: ; preds = %for.body14.preheader110, %for.body14
%indvars.iv96 = phi i64 [ %indvars.iv.next97, %for.body14 ], [ %indvars.iv96.ph, %for.body14.preheader110 ]
%arrayidx15 = getelementptr inbounds [1024 x i64], ptr %dp, i64 0, i64 %indvars.iv96
store i64 2147483647, ptr %arrayidx15, align 8, !tbaa !12
%indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
%exitcond.not = icmp eq i64 %indvars.iv.next97, %wide.trip.count
br i1 %exitcond.not, label %for.cond19.preheader, label %for.body14, !llvm.loop !19
for.end55: ; preds = %for.cond22.for.inc53_crit_edge.us, %for.cond19.preheader
%idxprom56 = sext i32 %7 to i64
%arrayidx57 = getelementptr inbounds [1024 x i64], ptr %dp, i64 0, i64 %idxprom56
%25 = load i64, ptr %arrayidx57, align 8, !tbaa !12
%call58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %25)
call void @llvm.lifetime.end.p0(i64 8192, ptr nonnull %dp) #4
call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %c) #4
call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %d) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !10, !15, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !16, !15}
|
#include <stdio.h>
#define RIGHT 0
#define DOWN 1
#define LEFT 2
#define UP 3
int main(void){
char xy[9][6];
int i, dir = RIGHT, px = 0, py = 0;
for(i = 0; i < 9; i++){
scanf("%s", xy[i]);
}
do{
switch(dir){
case RIGHT:
if(py > 0 && xy[py*2-1][px] == '1'){
dir = UP;
}else if(px < 4 && xy[py*2][px] == '1'){
dir = RIGHT;
}else if(py < 4 && xy[py*2+1][px] == '1'){
dir = DOWN;
}else{
dir = LEFT;
}
break;
case DOWN:
if(px < 4 && xy[py*2][px] == '1'){
dir = RIGHT;
}else if(py < 4 && xy[py*2+1][px] == '1'){
dir = DOWN;
}else if(px > 0 && xy[py*2][px-1] == '1'){
dir = LEFT;
}else{
dir = UP;
}
break;
case LEFT:
if(py < 4 && xy[py*2+1][px] == '1'){
dir = DOWN;
}else if(px > 0 && xy[py*2][px-1] == '1'){
dir = LEFT;
}else if(py > 0 && xy[py*2-1][px] == '1'){
dir = UP;
}else{
dir = RIGHT;
}
break;
case UP:
if(px > 0 && xy[py*2][px-1] == '1'){
dir = LEFT;
}else if(py > 0 && xy[py*2-1][px] == '1'){
dir = UP;
}else if(px < 4 && xy[py*2][px] == '1'){
dir = RIGHT;
}else{
dir = DOWN;
}
break;
}
switch(dir){
case RIGHT:
px++;
printf("R");
break;
case DOWN:
py++;
printf("D");
break;
case LEFT:
px--;
printf("L");
break;
case UP:
py--;
printf("U");
break;
}
}while(!(px == 0 && py == 0));
printf("\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132786/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132786/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:
%xy = alloca [9 x [6 x i8]], align 16
call void @llvm.lifetime.start.p0(i64 54, ptr nonnull %xy) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %xy)
%arrayidx.1 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 1
%call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.1)
%arrayidx.2 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 2
%call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.2)
%arrayidx.3 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 3
%call.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.3)
%arrayidx.4 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 4
%call.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.4)
%arrayidx.5 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 5
%call.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.5)
%arrayidx.6 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 6
%call.6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.6)
%arrayidx.7 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 7
%call.7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.7)
%arrayidx.8 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 8
%call.8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.8)
br label %do.body
do.body: ; preds = %entry, %do.cond
%dir.0 = phi i32 [ %dir.1238, %do.cond ], [ 0, %entry ]
%px.0 = phi i32 [ %px.1, %do.cond ], [ 0, %entry ]
%py.0 = phi i32 [ %py.1, %do.cond ], [ 0, %entry ]
switch i32 %dir.0, label %do.cond [
i32 0, label %sw.bb
i32 1, label %sw.bb36
i32 2, label %sw.bb81
i32 3, label %sw.bb127
]
sw.bb: ; preds = %do.body
%cmp1 = icmp sgt i32 %py.0, 0
br i1 %cmp1, label %land.lhs.true, label %if.else
land.lhs.true: ; preds = %sw.bb
%mul = shl nuw nsw i32 %py.0, 1
%sub = add nsw i32 %mul, -1
%idxprom2 = sext i32 %sub to i64
%idxprom4 = sext i32 %px.0 to i64
%arrayidx5 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 %idxprom2, i64 %idxprom4
%0 = load i8, ptr %arrayidx5, align 1, !tbaa !5
%cmp6 = icmp eq i8 %0, 49
br i1 %cmp6, label %sw.bb180, label %if.else
if.else: ; preds = %land.lhs.true, %sw.bb
%cmp8 = icmp slt i32 %px.0, 4
br i1 %cmp8, label %land.lhs.true10, label %if.else20
land.lhs.true10: ; preds = %if.else
%mul11 = shl nsw i32 %py.0, 1
%idxprom12 = sext i32 %mul11 to i64
%idxprom14 = sext i32 %px.0 to i64
%arrayidx15 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 %idxprom12, i64 %idxprom14
%1 = load i8, ptr %arrayidx15, align 1, !tbaa !5
%cmp17 = icmp eq i8 %1, 49
br i1 %cmp17, label %sw.bb172, label %if.else20
if.else20: ; preds = %land.lhs.true10, %if.else
%cmp21 = icmp slt i32 %py.0, 4
br i1 %cmp21, label %land.lhs.true23, label %sw.bb178
land.lhs.true23: ; preds = %if.else20
%mul24 = shl nsw i32 %py.0, 1
%add = or i32 %mul24, 1
%idxprom25 = sext i32 %add to i64
%idxprom27 = sext i32 %px.0 to i64
%arrayidx28 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 %idxprom25, i64 %idxprom27
%2 = load i8, ptr %arrayidx28, align 1, !tbaa !5
%cmp30 = icmp eq i8 %2, 49
br i1 %cmp30, label %sw.bb175, label %sw.bb178
sw.bb36: ; preds = %do.body
%cmp37 = icmp slt i32 %px.0, 4
br i1 %cmp37, label %land.lhs.true39, label %if.else49
land.lhs.true39: ; preds = %sw.bb36
%mul40 = shl nsw i32 %py.0, 1
%idxprom41 = sext i32 %mul40 to i64
%idxprom43 = sext i32 %px.0 to i64
%arrayidx44 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 %idxprom41, i64 %idxprom43
%3 = load i8, ptr %arrayidx44, align 1, !tbaa !5
%cmp46 = icmp eq i8 %3, 49
br i1 %cmp46, label %sw.bb172, label %if.else49
if.else49: ; preds = %land.lhs.true39, %sw.bb36
%cmp50 = icmp slt i32 %py.0, 4
br i1 %cmp50, label %land.lhs.true52, label %if.else63
land.lhs.true52: ; preds = %if.else49
%mul53 = shl nsw i32 %py.0, 1
%add54 = or i32 %mul53, 1
%idxprom55 = sext i32 %add54 to i64
%idxprom57 = sext i32 %px.0 to i64
%arrayidx58 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 %idxprom55, i64 %idxprom57
%4 = load i8, ptr %arrayidx58, align 1, !tbaa !5
%cmp60 = icmp eq i8 %4, 49
br i1 %cmp60, label %sw.bb175, label %if.else63
if.else63: ; preds = %land.lhs.true52, %if.else49
%cmp64 = icmp sgt i32 %px.0, 0
br i1 %cmp64, label %land.lhs.true66, label %sw.bb180
land.lhs.true66: ; preds = %if.else63
%mul67 = shl nsw i32 %py.0, 1
%idxprom68 = sext i32 %mul67 to i64
%sub70 = add nsw i32 %px.0, -1
%idxprom71 = zext i32 %sub70 to i64
%arrayidx72 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 %idxprom68, i64 %idxprom71
%5 = load i8, ptr %arrayidx72, align 1, !tbaa !5
%cmp74 = icmp eq i8 %5, 49
br i1 %cmp74, label %sw.bb178, label %sw.bb180
sw.bb81: ; preds = %do.body
%cmp82 = icmp slt i32 %py.0, 4
br i1 %cmp82, label %land.lhs.true84, label %if.else95
land.lhs.true84: ; preds = %sw.bb81
%mul85 = shl nsw i32 %py.0, 1
%add86 = or i32 %mul85, 1
%idxprom87 = sext i32 %add86 to i64
%idxprom89 = sext i32 %px.0 to i64
%arrayidx90 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 %idxprom87, i64 %idxprom89
%6 = load i8, ptr %arrayidx90, align 1, !tbaa !5
%cmp92 = icmp eq i8 %6, 49
br i1 %cmp92, label %sw.bb175, label %if.else95
if.else95: ; preds = %land.lhs.true84, %sw.bb81
%cmp96 = icmp sgt i32 %px.0, 0
br i1 %cmp96, label %land.lhs.true98, label %if.else109
land.lhs.true98: ; preds = %if.else95
%mul99 = shl nsw i32 %py.0, 1
%idxprom100 = sext i32 %mul99 to i64
%sub102 = add nsw i32 %px.0, -1
%idxprom103 = zext i32 %sub102 to i64
%arrayidx104 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 %idxprom100, i64 %idxprom103
%7 = load i8, ptr %arrayidx104, align 1, !tbaa !5
%cmp106 = icmp eq i8 %7, 49
br i1 %cmp106, label %sw.bb178, label %if.else109
if.else109: ; preds = %land.lhs.true98, %if.else95
%cmp110 = icmp sgt i32 %py.0, 0
br i1 %cmp110, label %land.lhs.true112, label %sw.bb172
land.lhs.true112: ; preds = %if.else109
%mul113 = shl nuw nsw i32 %py.0, 1
%sub114 = add nsw i32 %mul113, -1
%idxprom115 = sext i32 %sub114 to i64
%idxprom117 = sext i32 %px.0 to i64
%arrayidx118 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 %idxprom115, i64 %idxprom117
%8 = load i8, ptr %arrayidx118, align 1, !tbaa !5
%cmp120 = icmp eq i8 %8, 49
br i1 %cmp120, label %sw.bb180, label %sw.bb172
sw.bb127: ; preds = %do.body
%cmp128 = icmp sgt i32 %px.0, 0
br i1 %cmp128, label %land.lhs.true130, label %if.else141
land.lhs.true130: ; preds = %sw.bb127
%mul131 = shl nsw i32 %py.0, 1
%idxprom132 = sext i32 %mul131 to i64
%sub134 = add nsw i32 %px.0, -1
%idxprom135 = zext i32 %sub134 to i64
%arrayidx136 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 %idxprom132, i64 %idxprom135
%9 = load i8, ptr %arrayidx136, align 1, !tbaa !5
%cmp138 = icmp eq i8 %9, 49
br i1 %cmp138, label %sw.bb178, label %if.else141
if.else141: ; preds = %land.lhs.true130, %sw.bb127
%cmp142 = icmp sgt i32 %py.0, 0
br i1 %cmp142, label %land.lhs.true144, label %if.else155
land.lhs.true144: ; preds = %if.else141
%mul145 = shl nuw nsw i32 %py.0, 1
%sub146 = add nsw i32 %mul145, -1
%idxprom147 = sext i32 %sub146 to i64
%idxprom149 = sext i32 %px.0 to i64
%arrayidx150 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 %idxprom147, i64 %idxprom149
%10 = load i8, ptr %arrayidx150, align 1, !tbaa !5
%cmp152 = icmp eq i8 %10, 49
br i1 %cmp152, label %sw.bb180, label %if.else155
if.else155: ; preds = %land.lhs.true144, %if.else141
%cmp156 = icmp slt i32 %px.0, 4
br i1 %cmp156, label %land.lhs.true158, label %sw.bb175
land.lhs.true158: ; preds = %if.else155
%mul159 = shl nsw i32 %py.0, 1
%idxprom160 = sext i32 %mul159 to i64
%idxprom162 = sext i32 %px.0 to i64
%arrayidx163 = getelementptr inbounds [9 x [6 x i8]], ptr %xy, i64 0, i64 %idxprom160, i64 %idxprom162
%11 = load i8, ptr %arrayidx163, align 1, !tbaa !5
%cmp165 = icmp eq i8 %11, 49
br i1 %cmp165, label %sw.bb172, label %sw.bb175
sw.bb172: ; preds = %if.else109, %land.lhs.true112, %land.lhs.true158, %land.lhs.true39, %land.lhs.true10
%inc173 = add nsw i32 %px.0, 1
br label %do.cond.sink.split
sw.bb175: ; preds = %if.else155, %land.lhs.true158, %land.lhs.true84, %land.lhs.true52, %land.lhs.true23
%inc176 = add nsw i32 %py.0, 1
br label %do.cond.sink.split
sw.bb178: ; preds = %if.else20, %land.lhs.true23, %land.lhs.true130, %land.lhs.true98, %land.lhs.true66
%dec = add nsw i32 %px.0, -1
br label %do.cond.sink.split
sw.bb180: ; preds = %if.else63, %land.lhs.true66, %land.lhs.true144, %land.lhs.true112, %land.lhs.true
%dec181 = add nsw i32 %py.0, -1
br label %do.cond.sink.split
do.cond.sink.split: ; preds = %sw.bb180, %sw.bb178, %sw.bb175, %sw.bb172
%.sink = phi i32 [ 82, %sw.bb172 ], [ 68, %sw.bb175 ], [ 76, %sw.bb178 ], [ 85, %sw.bb180 ]
%dir.1238.ph = phi i32 [ 0, %sw.bb172 ], [ 1, %sw.bb175 ], [ 2, %sw.bb178 ], [ 3, %sw.bb180 ]
%px.1.ph = phi i32 [ %inc173, %sw.bb172 ], [ %px.0, %sw.bb175 ], [ %dec, %sw.bb178 ], [ %px.0, %sw.bb180 ]
%py.1.ph = phi i32 [ %py.0, %sw.bb172 ], [ %inc176, %sw.bb175 ], [ %py.0, %sw.bb178 ], [ %dec181, %sw.bb180 ]
%putchar234 = call i32 @putchar(i32 %.sink)
br label %do.cond
do.cond: ; preds = %do.cond.sink.split, %do.body
%dir.1238 = phi i32 [ %dir.0, %do.body ], [ %dir.1238.ph, %do.cond.sink.split ]
%px.1 = phi i32 [ %px.0, %do.body ], [ %px.1.ph, %do.cond.sink.split ]
%py.1 = phi i32 [ %py.0, %do.body ], [ %py.1.ph, %do.cond.sink.split ]
%cmp184 = icmp ne i32 %px.1, 0
%cmp186 = icmp ne i32 %py.1, 0
%.not = select i1 %cmp184, i1 true, i1 %cmp186
br i1 %.not, label %do.body, label %do.end, !llvm.loop !8
do.end: ; preds = %do.cond
%putchar235 = call i32 @putchar(i32 10)
call void @llvm.lifetime.end.p0(i64 54, ptr nonnull %xy) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
|
#include <stdio.h>
#include <string.h>
int main(void)
{
int wall[5][5][4];
int i, j;
int x, y, d;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
memset(wall, 0, sizeof(wall));
for (i = 0; i < 5; i++){
char s[8];
scanf("%s", s);
for (j = 0; j < 4; j++)
wall[i][j][0] = wall[i][j + 1][2] = (s[j] == '1');
if (i == 4)
break;
scanf("%s", s);
for (j = 0; j < 5; j++)
wall[i][j][1] = wall[i + 1][j][3] = (s[j] == '1');
}
x = y = d = 0;
do {
putchar("RDLU"[d]);
x += dx[d];
y += dy[d];
if (wall[y][x][d + 3 & 3])
d = d + 3 & 3;
else if (!wall[y][x][d])
if (wall[y][x][d + 1 & 3])
d = d + 1 & 3;
else
d = d + 2 & 3;
} while (x + y + d);
puts("");
return (0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132829/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132829/source.c"
target datalayout = "e-m:e-p270: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.dx = private unnamed_addr constant [4 x i32] [i32 1, i32 0, i32 -1, i32 0], align 16
@__const.main.dy = private unnamed_addr constant [4 x i32] [i32 0, i32 1, i32 0, i32 -1], align 16
@.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1
@.str.1 = private unnamed_addr constant [5 x i8] c"RDLU\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:
%wall = alloca [5 x [5 x [4 x i32]]], align 16
%s = alloca [8 x i8], align 4
call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %wall) #4
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) %wall, i8 0, i64 400, i1 false)
%arrayidx26.4 = getelementptr inbounds [8 x i8], ptr %s, i64 0, i64 4
br label %for.body
for.body: ; preds = %if.end, %entry
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %if.end ]
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %s) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s)
%arrayidx11 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv, i64 1, i64 2
%arrayidx15 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv, i64 0
%arrayidx11.1 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv, i64 2, i64 2
%arrayidx15.1 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv, i64 1
%arrayidx11.2 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv, i64 3, i64 2
%arrayidx15.2 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv, i64 2
%0 = load <4 x i8>, ptr %s, align 4, !tbaa !5
%1 = icmp eq <4 x i8> %0, <i8 49, i8 49, i8 49, i8 49>
%2 = extractelement <4 x i1> %1, i64 0
%conv6 = zext i1 %2 to i32
store i32 %conv6, ptr %arrayidx11, align 8, !tbaa !8
store i32 %conv6, ptr %arrayidx15, align 16, !tbaa !8
%3 = extractelement <4 x i1> %1, i64 1
%conv6.1 = zext i1 %3 to i32
store i32 %conv6.1, ptr %arrayidx11.1, align 8, !tbaa !8
store i32 %conv6.1, ptr %arrayidx15.1, align 16, !tbaa !8
%4 = extractelement <4 x i1> %1, i64 2
%conv6.2 = zext i1 %4 to i32
store i32 %conv6.2, ptr %arrayidx11.2, align 8, !tbaa !8
store i32 %conv6.2, ptr %arrayidx15.2, align 16, !tbaa !8
%5 = extractelement <4 x i1> %1, i64 3
%conv6.3 = zext i1 %5 to i32
%arrayidx11.3 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv, i64 4, i64 2
store i32 %conv6.3, ptr %arrayidx11.3, align 8, !tbaa !8
%arrayidx15.3 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv, i64 3
store i32 %conv6.3, ptr %arrayidx15.3, align 16, !tbaa !8
%cmp17 = icmp eq i64 %indvars.iv, 4
br i1 %cmp17, label %for.end46, label %if.end
if.end: ; preds = %for.body
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%arrayidx35 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv.next, i64 0, i64 3
%arrayidx40 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv, i64 0, i64 1
%arrayidx35.1 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv.next, i64 1, i64 3
%arrayidx40.1 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv, i64 1, i64 1
%arrayidx35.2 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv.next, i64 2, i64 3
%arrayidx40.2 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv, i64 2, i64 1
%6 = load <4 x i8>, ptr %s, align 4, !tbaa !5
%7 = icmp eq <4 x i8> %6, <i8 49, i8 49, i8 49, i8 49>
%8 = extractelement <4 x i1> %7, i64 0
%conv29 = zext i1 %8 to i32
store i32 %conv29, ptr %arrayidx35, align 4, !tbaa !8
store i32 %conv29, ptr %arrayidx40, align 4, !tbaa !8
%9 = extractelement <4 x i1> %7, i64 1
%conv29.1 = zext i1 %9 to i32
store i32 %conv29.1, ptr %arrayidx35.1, align 4, !tbaa !8
store i32 %conv29.1, ptr %arrayidx40.1, align 4, !tbaa !8
%10 = extractelement <4 x i1> %7, i64 2
%conv29.2 = zext i1 %10 to i32
store i32 %conv29.2, ptr %arrayidx35.2, align 4, !tbaa !8
store i32 %conv29.2, ptr %arrayidx40.2, align 4, !tbaa !8
%11 = extractelement <4 x i1> %7, i64 3
%conv29.3 = zext i1 %11 to i32
%arrayidx35.3 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv.next, i64 3, i64 3
store i32 %conv29.3, ptr %arrayidx35.3, align 4, !tbaa !8
%arrayidx40.3 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv, i64 3, i64 1
store i32 %conv29.3, ptr %arrayidx40.3, align 4, !tbaa !8
%12 = load i8, ptr %arrayidx26.4, align 4, !tbaa !5
%cmp28.4 = icmp eq i8 %12, 49
%conv29.4 = zext i1 %cmp28.4 to i32
%arrayidx35.4 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv.next, i64 4, i64 3
store i32 %conv29.4, ptr %arrayidx35.4, align 4, !tbaa !8
%arrayidx40.4 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %indvars.iv, i64 4, i64 1
store i32 %conv29.4, ptr %arrayidx40.4, align 4, !tbaa !8
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %s) #4
br label %for.body
for.end46: ; preds = %for.body
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %s) #4
br label %do.body
do.body: ; preds = %do.cond, %for.end46
%x.0 = phi i32 [ 0, %for.end46 ], [ %add53, %do.cond ]
%y.0 = phi i32 [ 0, %for.end46 ], [ %add56, %do.cond ]
%d.0 = phi i32 [ 0, %for.end46 ], [ %d.1, %do.cond ]
%idxprom47 = zext i32 %d.0 to i64
%arrayidx48 = getelementptr inbounds [5 x i8], ptr @.str.1, i64 0, i64 %idxprom47
%13 = load i8, ptr %arrayidx48, align 1, !tbaa !5
%conv49 = sext i8 %13 to i32
%14 = load ptr, ptr @stdout, align 8, !tbaa !10
%call.i = call noundef i32 @putc(i32 noundef %conv49, ptr noundef %14)
%arrayidx52 = getelementptr inbounds [4 x i32], ptr @__const.main.dx, i64 0, i64 %idxprom47
%15 = load i32, ptr %arrayidx52, align 4, !tbaa !8
%add53 = add nsw i32 %15, %x.0
%arrayidx55 = getelementptr inbounds [4 x i32], ptr @__const.main.dy, i64 0, i64 %idxprom47
%16 = load i32, ptr %arrayidx55, align 4, !tbaa !8
%add56 = add nsw i32 %16, %y.0
%idxprom57 = sext i32 %add56 to i64
%idxprom59 = sext i32 %add53 to i64
%add61 = add nuw nsw i32 %d.0, 3
%and = and i32 %add61, 3
%idxprom62 = zext i32 %and to i64
%arrayidx63 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %idxprom57, i64 %idxprom59, i64 %idxprom62
%17 = load i32, ptr %arrayidx63, align 4, !tbaa !8
%tobool.not = icmp eq i32 %17, 0
br i1 %tobool.not, label %if.else, label %do.cond
if.else: ; preds = %do.body
%arrayidx72 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %idxprom57, i64 %idxprom59, i64 %idxprom47
%18 = load i32, ptr %arrayidx72, align 4, !tbaa !8
%tobool73.not = icmp eq i32 %18, 0
br i1 %tobool73.not, label %if.then74, label %do.cond
if.then74: ; preds = %if.else
%add79 = add nuw nsw i32 %d.0, 1
%and80 = and i32 %add79, 3
%idxprom81 = zext i32 %and80 to i64
%arrayidx82 = getelementptr inbounds [5 x [5 x [4 x i32]]], ptr %wall, i64 0, i64 %idxprom57, i64 %idxprom59, i64 %idxprom81
%19 = load i32, ptr %arrayidx82, align 4, !tbaa !8
%tobool83.not = icmp eq i32 %19, 0
br i1 %tobool83.not, label %if.else87, label %do.cond
if.else87: ; preds = %if.then74
%add88 = add nuw nsw i32 %d.0, 2
%and89 = and i32 %add88, 3
br label %do.cond
do.cond: ; preds = %if.then74, %do.body, %if.else87, %if.else
%d.1 = phi i32 [ %d.0, %if.else ], [ %and89, %if.else87 ], [ %and, %do.body ], [ %and80, %if.then74 ]
%add93 = add nsw i32 %add56, %add53
%add94 = sub nsw i32 0, %d.1
%tobool95.not = icmp eq i32 %add93, %add94
br i1 %tobool95.not, label %do.end, label %do.body, !llvm.loop !12
do.end: ; preds = %do.cond
%20 = load ptr, ptr @stdout, align 8, !tbaa !10
%call.i137 = call noundef i32 @putc(i32 noundef 10, ptr noundef %20)
call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %wall) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putc(i32 noundef, ptr nocapture 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 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef __linux__
#define LLD "%lld"
#else
#define LLD "%I64d"
#endif
int
main()
{
int i, j;
int z;
int up, uz = 0;
scanf ("%d", &z);
up = z * 5;
for (i = 5; i <= up; i *= 5) {
uz += up/i;
}
while (uz > z) {
up -= 5;
uz = 0;
for (i = 5; i <= up; i *= 5) {
uz += up/i;
}
}
if (uz == z) {
puts("5");
for (i = 0; i < 5; i++, up++) {
printf ("%d ", up);
}
puts("");
} else {
puts("0");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13288/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13288/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [2 x i8] c"5\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"%d \00", align 1
@.str.4 = 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:
%z = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %z) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %z)
%0 = load i32, ptr %z, align 4, !tbaa !5
%mul = mul nsw i32 %0, 5
%cmp.not38 = icmp slt i32 %0, 1
br i1 %cmp.not38, label %while.cond.preheader, label %for.body
while.cond.preheader: ; preds = %for.body, %entry
%uz.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.body ]
%cmp245 = icmp sgt i32 %uz.0.lcssa, %0
br i1 %cmp245, label %while.body, label %while.end
for.body: ; preds = %entry, %for.body
%uz.040 = phi i32 [ %add, %for.body ], [ 0, %entry ]
%i.039 = phi i32 [ %mul1, %for.body ], [ 5, %entry ]
%div = sdiv i32 %mul, %i.039
%add = add nsw i32 %div, %uz.040
%mul1 = mul nuw nsw i32 %i.039, 5
%cmp.not = icmp sgt i32 %mul1, %mul
br i1 %cmp.not, label %while.cond.preheader, label %for.body, !llvm.loop !9
while.cond.loopexit: ; preds = %for.body5, %while.body
%uz.2.lcssa = phi i32 [ 0, %while.body ], [ %add7, %for.body5 ]
%cmp2 = icmp sgt i32 %uz.2.lcssa, %0
br i1 %cmp2, label %while.body, label %while.end, !llvm.loop !11
while.body: ; preds = %while.cond.preheader, %while.cond.loopexit
%up.046 = phi i32 [ %sub, %while.cond.loopexit ], [ %mul, %while.cond.preheader ]
%sub = add nsw i32 %up.046, -5
%cmp4.not41 = icmp slt i32 %up.046, 10
br i1 %cmp4.not41, label %while.cond.loopexit, label %for.body5
for.body5: ; preds = %while.body, %for.body5
%uz.243 = phi i32 [ %add7, %for.body5 ], [ 0, %while.body ]
%i.142 = phi i32 [ %mul9, %for.body5 ], [ 5, %while.body ]
%div6 = sdiv i32 %sub, %i.142
%add7 = add nsw i32 %div6, %uz.243
%mul9 = mul nuw nsw i32 %i.142, 5
%cmp4.not = icmp sgt i32 %mul9, %sub
br i1 %cmp4.not, label %while.cond.loopexit, label %for.body5, !llvm.loop !12
while.end: ; preds = %while.cond.loopexit, %while.cond.preheader
%up.0.lcssa = phi i32 [ %mul, %while.cond.preheader ], [ %sub, %while.cond.loopexit ]
%uz.1.lcssa = phi i32 [ %uz.0.lcssa, %while.cond.preheader ], [ %uz.2.lcssa, %while.cond.loopexit ]
%cmp11 = icmp eq i32 %uz.1.lcssa, %0
br i1 %cmp11, label %if.then, label %if.else
if.then: ; preds = %while.end
%call12 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
%call16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %up.0.lcssa)
%inc18 = add nsw i32 %up.0.lcssa, 1
%call16.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %inc18)
%inc18.1 = add nsw i32 %up.0.lcssa, 2
%call16.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %inc18.1)
%inc18.2 = add nsw i32 %up.0.lcssa, 3
%call16.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %inc18.2)
%inc18.3 = add nsw i32 %up.0.lcssa, 4
%call16.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %inc18.3)
%putchar = call i32 @putchar(i32 10)
br label %if.end
if.else: ; preds = %while.end
%call21 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
br label %if.end
if.end: ; preds = %if.else, %if.then
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %z) #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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include<stdio.h>
int main()
{
int i,a,b,c;
scanf("%d%d%d",&a,&b,&c);
for(i=0;a*i<=c;i++)
{
if(((c-a*i)%b)==0)
{
printf("Yes");
return 0;
}
}
printf("No");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13293/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13293/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
@.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
%c = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %c, align 4, !tbaa !5
%cmp.not10 = icmp slt i32 %1, 0
br i1 %cmp.not10, label %cleanup, label %for.body.lr.ph
for.body.lr.ph: ; preds = %entry
%2 = load i32, ptr %b, align 4, !tbaa !5
br label %for.body
for.cond: ; preds = %for.body
%inc = add nuw nsw i32 %i.011, 1
%mul = mul nsw i32 %0, %inc
%cmp.not = icmp sgt i32 %mul, %1
br i1 %cmp.not, label %cleanup, label %for.body, !llvm.loop !9
for.body: ; preds = %for.body.lr.ph, %for.cond
%mul12 = phi i32 [ 0, %for.body.lr.ph ], [ %mul, %for.cond ]
%i.011 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.cond ]
%sub = sub nsw i32 %1, %mul12
%rem = srem i32 %sub, %2
%cmp2 = icmp eq i32 %rem, 0
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 %c) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
|
/* ex7_3
cy_an */
#include <stdio.h>
#include <stdlib.h>
int main(void){
// 変数の宣言
char **matrix;
int num_r, num_c, i, j, r_flag, c_flag, printflag;
// numの入力
scanf("%d %d", &num_r, &num_c);
// 二次元配列領域の動的確保
matrix = (char**)calloc(num_r, sizeof(char*));
if(matrix == NULL){
fprintf(stderr, "memory allocation error.\n");
exit(1);
}
for(i=0; i<num_r; i++){
matrix[i] = (char*)calloc(num_c, sizeof(char));
if(matrix[i] == NULL){
fprintf(stderr, "memory allocation error.\n");
exit(1);
}
}
// raw,colの入力
for(i=0; i<num_r; i++){
for(j=0; j<num_c; j++){
scanf(" %c", &matrix[i][j]);
}
}
// 行の削除
for(i=0; i<num_r; i++){
r_flag = 1;
for(j=0; j<num_c; j++){
if(matrix[i][j] == '#'){
r_flag = 0;
break;
}
}
// 全て'.'のとき
if(r_flag){
for(j=0; j<num_c; j++){
matrix[i][j] = '-';
}
}
}
// 列の削除
for(j=0; j<num_c; j++){
c_flag = 1;
for(i=0; i<num_r; i++){
if(matrix[i][j] == '#'){
c_flag = 0;
break;
}
}
// 全て'.'のとき
if(c_flag){
for(i=0; i<num_r; i++){
matrix[i][j] = '-';
}
}
}
// matrixの出力
for(i=0; i<num_r; i++){
printflag = 0;
for(j=0; j<num_c; j++){
if(matrix[i][j] != '-'){
printf("%c", matrix[i][j]);
printflag = 1;
}
}
if(printflag){
printf("\n");
}
}
// メモリの解法
for(i=0; i<num_r; i++){
free(matrix[i]);
}
free(matrix);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132973/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132973/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = private unnamed_addr constant [26 x i8] c"memory allocation error.\0A\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c" %c\00", align 1
; Function Attrs: nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%num_r = alloca i32, align 4
%num_c = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num_r) #7
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num_c) #7
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %num_r, ptr noundef nonnull %num_c)
%0 = load i32, ptr %num_r, align 4, !tbaa !5
%conv = sext i32 %0 to i64
%call1 = call noalias ptr @calloc(i64 noundef %conv, i64 noundef 8) #8
%cmp = icmp eq ptr %call1, null
br i1 %cmp, label %if.then, label %for.cond.preheader
for.cond.preheader: ; preds = %entry
%cmp4202 = icmp sgt i32 %0, 0
%.pre272.pre.pre = load i32, ptr %num_c, align 4, !tbaa !5
br i1 %cmp4202, label %for.body.lr.ph, label %for.cond70.preheader
for.body.lr.ph: ; preds = %for.cond.preheader
%conv6 = sext i32 %.pre272.pre.pre to i64
%wide.trip.count = zext i32 %0 to i64
br label %for.body
if.then: ; preds = %entry
%1 = load ptr, ptr @stderr, align 8, !tbaa !9
%2 = call i64 @fwrite(ptr nonnull @.str.1, i64 25, i64 1, ptr %1) #9
call void @exit(i32 noundef 1) #10
unreachable
for.cond: ; preds = %for.body
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
br i1 %exitcond.not, label %for.cond15.preheader, label %for.body, !llvm.loop !11
for.cond15.preheader: ; preds = %for.cond
br i1 %cmp4202, label %for.cond19.preheader.lr.ph, label %for.cond70.preheader
for.cond19.preheader.lr.ph: ; preds = %for.cond15.preheader
%3 = icmp sgt i32 %.pre272.pre.pre, 0
br i1 %3, label %for.cond19.preheader, label %for.cond38.preheader.preheader
for.body: ; preds = %for.body.lr.ph, %for.cond
%indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.cond ]
%call7 = call noalias ptr @calloc(i64 noundef %conv6, i64 noundef 1) #8
%arrayidx = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv
store ptr %call7, ptr %arrayidx, align 8, !tbaa !9
%cmp10 = icmp eq ptr %call7, null
br i1 %cmp10, label %if.then12, label %for.cond
if.then12: ; preds = %for.body
%4 = load ptr, ptr @stderr, align 8, !tbaa !9
%5 = call i64 @fwrite(ptr nonnull @.str.1, i64 25, i64 1, ptr %4) #9
call void @exit(i32 noundef 1) #10
unreachable
for.cond19.preheader: ; preds = %for.cond19.preheader.lr.ph, %for.inc31
%6 = phi i32 [ %11, %for.inc31 ], [ %0, %for.cond19.preheader.lr.ph ]
%7 = phi i32 [ %12, %for.inc31 ], [ %.pre272.pre.pre, %for.cond19.preheader.lr.ph ]
%indvars.iv236 = phi i64 [ %indvars.iv.next237, %for.inc31 ], [ 0, %for.cond19.preheader.lr.ph ]
%cmp20204 = icmp sgt i32 %7, 0
br i1 %cmp20204, label %for.body22.lr.ph, label %for.inc31
for.body22.lr.ph: ; preds = %for.cond19.preheader
%arrayidx24 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv236
%8 = load ptr, ptr %arrayidx24, align 8, !tbaa !9
br label %for.body22
for.cond34.preheader: ; preds = %for.inc31
%cmp35212 = icmp sgt i32 %11, 0
br i1 %cmp35212, label %for.cond38.preheader.preheader, label %for.cond70.preheader
for.cond38.preheader.preheader: ; preds = %for.cond19.preheader.lr.ph, %for.cond34.preheader
%.ph = phi i32 [ %0, %for.cond19.preheader.lr.ph ], [ %11, %for.cond34.preheader ]
%.ph310 = phi i32 [ %.pre272.pre.pre, %for.cond19.preheader.lr.ph ], [ %12, %for.cond34.preheader ]
br label %for.cond38.preheader
for.body22: ; preds = %for.body22.lr.ph, %for.body22
%indvars.iv233 = phi i64 [ 0, %for.body22.lr.ph ], [ %indvars.iv.next234, %for.body22 ]
%arrayidx26 = getelementptr inbounds i8, ptr %8, i64 %indvars.iv233
%call27 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef %arrayidx26)
%indvars.iv.next234 = add nuw nsw i64 %indvars.iv233, 1
%9 = load i32, ptr %num_c, align 4, !tbaa !5
%10 = sext i32 %9 to i64
%cmp20 = icmp slt i64 %indvars.iv.next234, %10
br i1 %cmp20, label %for.body22, label %for.inc31.loopexit, !llvm.loop !13
for.inc31.loopexit: ; preds = %for.body22
%.pre = load i32, ptr %num_r, align 4, !tbaa !5
br label %for.inc31
for.inc31: ; preds = %for.inc31.loopexit, %for.cond19.preheader
%11 = phi i32 [ %.pre, %for.inc31.loopexit ], [ %6, %for.cond19.preheader ]
%12 = phi i32 [ %9, %for.inc31.loopexit ], [ %7, %for.cond19.preheader ]
%indvars.iv.next237 = add nuw nsw i64 %indvars.iv236, 1
%13 = sext i32 %11 to i64
%cmp16 = icmp slt i64 %indvars.iv.next237, %13
br i1 %cmp16, label %for.cond19.preheader, label %for.cond34.preheader, !llvm.loop !14
for.cond38.preheader: ; preds = %for.cond38.preheader.preheader, %for.inc67
%14 = phi i32 [ %24, %for.inc67 ], [ %.ph, %for.cond38.preheader.preheader ]
%15 = phi i32 [ %25, %for.inc67 ], [ %.ph310, %for.cond38.preheader.preheader ]
%16 = phi i32 [ %26, %for.inc67 ], [ %.ph310, %for.cond38.preheader.preheader ]
%indvars.iv247 = phi i64 [ %indvars.iv.next248, %for.inc67 ], [ 0, %for.cond38.preheader.preheader ]
%cmp39208 = icmp sgt i32 %16, 0
br i1 %cmp39208, label %for.body41.lr.ph, label %for.cond55.preheader
for.body41.lr.ph: ; preds = %for.cond38.preheader
%arrayidx43 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv247
%17 = load ptr, ptr %arrayidx43, align 8, !tbaa !9
%wide.trip.count242 = zext i32 %16 to i64
br label %for.body41
for.cond70.preheader: ; preds = %for.inc67, %for.cond.preheader, %for.cond15.preheader, %for.cond34.preheader
%18 = phi i32 [ %11, %for.cond34.preheader ], [ %0, %for.cond15.preheader ], [ %0, %for.cond.preheader ], [ %24, %for.inc67 ]
%19 = phi i32 [ %12, %for.cond34.preheader ], [ %.pre272.pre.pre, %for.cond15.preheader ], [ %.pre272.pre.pre, %for.cond.preheader ], [ %25, %for.inc67 ]
%cmp71219 = icmp sgt i32 %19, 0
br i1 %cmp71219, label %for.cond74.preheader, label %for.cond107.preheader
for.cond38: ; preds = %for.body41
%indvars.iv.next240 = add nuw nsw i64 %indvars.iv239, 1
%exitcond243.not = icmp eq i64 %indvars.iv.next240, %wide.trip.count242
br i1 %exitcond243.not, label %for.cond55.preheader, label %for.body41, !llvm.loop !16
for.cond55.preheader: ; preds = %for.cond38, %for.cond38.preheader
%cmp56210 = icmp sgt i32 %15, 0
br i1 %cmp56210, label %for.body58.lr.ph, label %for.inc67
for.body58.lr.ph: ; preds = %for.cond55.preheader
%arrayidx60 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv247
%20 = load ptr, ptr %arrayidx60, align 8, !tbaa !9
br label %for.body58
for.body41: ; preds = %for.body41.lr.ph, %for.cond38
%indvars.iv239 = phi i64 [ 0, %for.body41.lr.ph ], [ %indvars.iv.next240, %for.cond38 ]
%arrayidx45 = getelementptr inbounds i8, ptr %17, i64 %indvars.iv239
%21 = load i8, ptr %arrayidx45, align 1, !tbaa !17
%cmp47 = icmp eq i8 %21, 35
br i1 %cmp47, label %for.inc67, label %for.cond38
for.body58: ; preds = %for.body58.lr.ph, %for.body58
%indvars.iv244 = phi i64 [ 0, %for.body58.lr.ph ], [ %indvars.iv.next245, %for.body58 ]
%arrayidx62 = getelementptr inbounds i8, ptr %20, i64 %indvars.iv244
store i8 45, ptr %arrayidx62, align 1, !tbaa !17
%indvars.iv.next245 = add nuw nsw i64 %indvars.iv244, 1
%22 = load i32, ptr %num_c, align 4, !tbaa !5
%23 = sext i32 %22 to i64
%cmp56 = icmp slt i64 %indvars.iv.next245, %23
br i1 %cmp56, label %for.body58, label %for.inc67.loopexit, !llvm.loop !18
for.inc67.loopexit: ; preds = %for.body58
%.pre271 = load i32, ptr %num_r, align 4, !tbaa !5
br label %for.inc67
for.inc67: ; preds = %for.body41, %for.inc67.loopexit, %for.cond55.preheader
%24 = phi i32 [ %.pre271, %for.inc67.loopexit ], [ %14, %for.cond55.preheader ], [ %14, %for.body41 ]
%25 = phi i32 [ %22, %for.inc67.loopexit ], [ %15, %for.cond55.preheader ], [ %15, %for.body41 ]
%26 = phi i32 [ %22, %for.inc67.loopexit ], [ %15, %for.cond55.preheader ], [ %16, %for.body41 ]
%indvars.iv.next248 = add nuw nsw i64 %indvars.iv247, 1
%27 = sext i32 %24 to i64
%cmp35 = icmp slt i64 %indvars.iv.next248, %27
br i1 %cmp35, label %for.cond38.preheader, label %for.cond70.preheader, !llvm.loop !19
for.cond74.preheader: ; preds = %for.cond70.preheader, %for.inc104
%28 = phi i32 [ %37, %for.inc104 ], [ %19, %for.cond70.preheader ]
%29 = phi i32 [ %38, %for.inc104 ], [ %18, %for.cond70.preheader ]
%30 = phi i32 [ %39, %for.inc104 ], [ %18, %for.cond70.preheader ]
%indvars.iv258 = phi i64 [ %indvars.iv.next259, %for.inc104 ], [ 0, %for.cond70.preheader ]
%cmp75215 = icmp sgt i32 %30, 0
br i1 %cmp75215, label %for.body77.lr.ph, label %for.cond92.preheader
for.body77.lr.ph: ; preds = %for.cond74.preheader
%wide.trip.count253 = zext i32 %30 to i64
br label %for.body77
for.cond107.preheader: ; preds = %for.inc104, %for.cond70.preheader
%31 = phi i32 [ %18, %for.cond70.preheader ], [ %38, %for.inc104 ]
%cmp108225 = icmp sgt i32 %31, 0
br i1 %cmp108225, label %for.cond111.preheader, label %for.end148
for.cond74: ; preds = %for.body77
%indvars.iv.next251 = add nuw nsw i64 %indvars.iv250, 1
%exitcond254.not = icmp eq i64 %indvars.iv.next251, %wide.trip.count253
br i1 %exitcond254.not, label %for.cond92.preheader, label %for.body77, !llvm.loop !20
for.cond92.preheader: ; preds = %for.cond74, %for.cond74.preheader
%cmp93217 = icmp sgt i32 %29, 0
br i1 %cmp93217, label %for.body95, label %for.inc104
for.body77: ; preds = %for.body77.lr.ph, %for.cond74
%indvars.iv250 = phi i64 [ 0, %for.body77.lr.ph ], [ %indvars.iv.next251, %for.cond74 ]
%arrayidx79 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv250
%32 = load ptr, ptr %arrayidx79, align 8, !tbaa !9
%arrayidx81 = getelementptr inbounds i8, ptr %32, i64 %indvars.iv258
%33 = load i8, ptr %arrayidx81, align 1, !tbaa !17
%cmp83 = icmp eq i8 %33, 35
br i1 %cmp83, label %for.inc104, label %for.cond74
for.body95: ; preds = %for.cond92.preheader, %for.body95
%indvars.iv255 = phi i64 [ %indvars.iv.next256, %for.body95 ], [ 0, %for.cond92.preheader ]
%arrayidx97 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv255
%34 = load ptr, ptr %arrayidx97, align 8, !tbaa !9
%arrayidx99 = getelementptr inbounds i8, ptr %34, i64 %indvars.iv258
store i8 45, ptr %arrayidx99, align 1, !tbaa !17
%indvars.iv.next256 = add nuw nsw i64 %indvars.iv255, 1
%35 = load i32, ptr %num_r, align 4, !tbaa !5
%36 = sext i32 %35 to i64
%cmp93 = icmp slt i64 %indvars.iv.next256, %36
br i1 %cmp93, label %for.body95, label %for.inc104.loopexit, !llvm.loop !21
for.inc104.loopexit: ; preds = %for.body95
%.pre273 = load i32, ptr %num_c, align 4, !tbaa !5
br label %for.inc104
for.inc104: ; preds = %for.body77, %for.inc104.loopexit, %for.cond92.preheader
%37 = phi i32 [ %.pre273, %for.inc104.loopexit ], [ %28, %for.cond92.preheader ], [ %28, %for.body77 ]
%38 = phi i32 [ %35, %for.inc104.loopexit ], [ %29, %for.cond92.preheader ], [ %29, %for.body77 ]
%39 = phi i32 [ %35, %for.inc104.loopexit ], [ %29, %for.cond92.preheader ], [ %30, %for.body77 ]
%indvars.iv.next259 = add nuw nsw i64 %indvars.iv258, 1
%40 = sext i32 %37 to i64
%cmp71 = icmp slt i64 %indvars.iv.next259, %40
br i1 %cmp71, label %for.cond74.preheader, label %for.cond107.preheader, !llvm.loop !22
for.cond111.preheader: ; preds = %for.cond107.preheader, %for.inc137
%indvars.iv264 = phi i64 [ %indvars.iv.next265, %for.inc137 ], [ 0, %for.cond107.preheader ]
%41 = load i32, ptr %num_c, align 4, !tbaa !5
%cmp112222 = icmp sgt i32 %41, 0
br i1 %cmp112222, label %for.body114.lr.ph, label %for.inc137
for.body114.lr.ph: ; preds = %for.cond111.preheader
%arrayidx116 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv264
%42 = load ptr, ptr %arrayidx116, align 8, !tbaa !9
br label %for.body114
for.cond140.preheader: ; preds = %for.inc137
%43 = icmp sgt i32 %48, 0
br i1 %43, label %for.body143, label %for.end148
for.body114: ; preds = %for.body114.lr.ph, %for.inc130
%44 = phi i32 [ %41, %for.body114.lr.ph ], [ %46, %for.inc130 ]
%indvars.iv261 = phi i64 [ 0, %for.body114.lr.ph ], [ %indvars.iv.next262, %for.inc130 ]
%printflag.0224 = phi i32 [ 0, %for.body114.lr.ph ], [ %printflag.1, %for.inc130 ]
%arrayidx118 = getelementptr inbounds i8, ptr %42, i64 %indvars.iv261
%45 = load i8, ptr %arrayidx118, align 1, !tbaa !17
%cmp120.not = icmp eq i8 %45, 45
br i1 %cmp120.not, label %for.inc130, label %if.then122
if.then122: ; preds = %for.body114
%conv119 = sext i8 %45 to i32
%putchar199 = call i32 @putchar(i32 %conv119)
%.pre274 = load i32, ptr %num_c, align 4, !tbaa !5
br label %for.inc130
for.inc130: ; preds = %for.body114, %if.then122
%46 = phi i32 [ %.pre274, %if.then122 ], [ %44, %for.body114 ]
%printflag.1 = phi i32 [ 1, %if.then122 ], [ %printflag.0224, %for.body114 ]
%indvars.iv.next262 = add nuw nsw i64 %indvars.iv261, 1
%47 = sext i32 %46 to i64
%cmp112 = icmp slt i64 %indvars.iv.next262, %47
br i1 %cmp112, label %for.body114, label %for.end132, !llvm.loop !23
for.end132: ; preds = %for.inc130
%tobool133.not = icmp eq i32 %printflag.1, 0
br i1 %tobool133.not, label %for.inc137, label %if.then134
if.then134: ; preds = %for.end132
%putchar = call i32 @putchar(i32 10)
br label %for.inc137
for.inc137: ; preds = %for.cond111.preheader, %for.end132, %if.then134
%indvars.iv.next265 = add nuw nsw i64 %indvars.iv264, 1
%48 = load i32, ptr %num_r, align 4, !tbaa !5
%49 = sext i32 %48 to i64
%cmp108 = icmp slt i64 %indvars.iv.next265, %49
br i1 %cmp108, label %for.cond111.preheader, label %for.cond140.preheader, !llvm.loop !24
for.body143: ; preds = %for.cond140.preheader, %for.body143
%indvars.iv267 = phi i64 [ %indvars.iv.next268, %for.body143 ], [ 0, %for.cond140.preheader ]
%arrayidx145 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv267
%50 = load ptr, ptr %arrayidx145, align 8, !tbaa !9
call void @free(ptr noundef %50) #7
%indvars.iv.next268 = add nuw nsw i64 %indvars.iv267, 1
%51 = load i32, ptr %num_r, align 4, !tbaa !5
%52 = sext i32 %51 to i64
%cmp141 = icmp slt i64 %indvars.iv.next268, %52
br i1 %cmp141, label %for.body143, label %for.end148, !llvm.loop !25
for.end148: ; preds = %for.body143, %for.cond107.preheader, %for.cond140.preheader
call void @free(ptr noundef %call1) #7
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num_c) #7
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num_r) #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,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #3
; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4
; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5
; Function Attrs: mustprogress 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 #6
; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #6
attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nofree nounwind }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0,1) }
attributes #9 = { cold }
attributes #10 = { noreturn nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12, !15}
!15 = !{!"llvm.loop.unswitch.partial.disable"}
!16 = distinct !{!16, !12}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
|
/* ex7_3
B30095 */
#include <stdio.h>
#include <stdlib.h>
void print_compressed(char ** grid, int rows, int cols);
int main(void){
int rows, cols, isRowEmpty, isColEmpty, i, j;
char ** grid;
scanf("%d %d", &rows, &cols);
// memory allocation
grid = (char **)malloc(rows * sizeof(char *));
for(i = 0; i < rows; i++){
grid[i] = (char *)malloc(cols * sizeof(char));
}
// input grid
for(i = 0; i < rows; i++){
for(j = 0; j < cols; j++){
scanf(" %c", &(grid[i][j]));
}
}
print_compressed(grid, rows, cols);
// memory deallocation
for(i = 0; i < rows; i++){
free(grid[i]);
}
free(grid);
return 0;
}
void print_compressed(char ** grid, int rows, int cols){
int isRowEmpty, isColEmpty, i, j;
// substitue empty rows with whitespaces
for(i = 0; i < rows; i ++){
isRowEmpty = 1;
// check if the row is empty
for(j = 0; j < cols; j++){
if(grid[i][j] == '#') {
isRowEmpty = 0;
}
}
// fill in empty rows with whitespaces
if(isRowEmpty){
for(j = 0; j < cols; j++){
grid[i][j] = ' ';
}
}
}
// substitue empty columns with whitespaces
for(j = 0; j < cols; j ++){
isColEmpty = 1;
// check if the column is empty
for(i = 0; i < rows; i++){
if(grid[i][j] == '#') {
isColEmpty = 0;
}
}
// fill in empty columns with whitespaces
if(isColEmpty){
for(i = 0; i < rows; i++){
grid[i][j] = ' ';
}
}
}
// print compressed result
for(i = 0; i < rows; i++){
isRowEmpty = 1;
for(j = 0; j < cols; j++){
if(grid[i][j] == '#') isRowEmpty = 0;
if(grid[i][j] != ' ') printf("%c", grid[i][j]);
}
if(!isRowEmpty) printf("\n"); // new line should not be printed when the row is empty
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133015/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133015/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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" %c\00", align 1
; Function Attrs: nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%rows = alloca i32, align 4
%cols = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %rows) #7
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %cols) #7
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %rows, ptr noundef nonnull %cols)
%0 = load i32, ptr %rows, align 4, !tbaa !5
%conv = sext i32 %0 to i64
%mul = shl nsw i64 %conv, 3
%call1 = call noalias ptr @malloc(i64 noundef %mul) #8
%cmp48 = icmp sgt i32 %0, 0
%.pre68.pre = load i32, ptr %cols, align 4, !tbaa !5
br i1 %cmp48, label %for.body.lr.ph, label %for.end24
for.body.lr.ph: ; preds = %entry
%conv3 = sext i32 %.pre68.pre to i64
%wide.trip.count = zext i32 %0 to i64
br label %for.body
for.cond6.preheader: ; preds = %for.body
%1 = icmp sgt i32 %.pre68.pre, 0
%or.cond = select i1 %cmp48, i1 %1, i1 false
br i1 %or.cond, label %for.cond10.preheader, label %for.end24
for.body: ; preds = %for.body.lr.ph, %for.body
%indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.body ]
%call5 = call noalias ptr @malloc(i64 noundef %conv3) #8
%arrayidx = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv
store ptr %call5, ptr %arrayidx, 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.cond6.preheader, label %for.body, !llvm.loop !11
for.cond10.preheader: ; preds = %for.cond6.preheader, %for.inc22
%2 = phi i32 [ %7, %for.inc22 ], [ %0, %for.cond6.preheader ]
%3 = phi i32 [ %8, %for.inc22 ], [ %.pre68.pre, %for.cond6.preheader ]
%indvars.iv62 = phi i64 [ %indvars.iv.next63, %for.inc22 ], [ 0, %for.cond6.preheader ]
%cmp1150 = icmp sgt i32 %3, 0
br i1 %cmp1150, label %for.body13.lr.ph, label %for.inc22
for.body13.lr.ph: ; preds = %for.cond10.preheader
%arrayidx15 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv62
%4 = load ptr, ptr %arrayidx15, align 8, !tbaa !9
br label %for.body13
for.body13: ; preds = %for.body13.lr.ph, %for.body13
%indvars.iv59 = phi i64 [ 0, %for.body13.lr.ph ], [ %indvars.iv.next60, %for.body13 ]
%arrayidx17 = getelementptr inbounds i8, ptr %4, i64 %indvars.iv59
%call18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef %arrayidx17)
%indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
%5 = load i32, ptr %cols, align 4, !tbaa !5
%6 = sext i32 %5 to i64
%cmp11 = icmp slt i64 %indvars.iv.next60, %6
br i1 %cmp11, label %for.body13, label %for.inc22.loopexit, !llvm.loop !13
for.inc22.loopexit: ; preds = %for.body13
%.pre = load i32, ptr %rows, align 4, !tbaa !5
br label %for.inc22
for.inc22: ; preds = %for.inc22.loopexit, %for.cond10.preheader
%7 = phi i32 [ %.pre, %for.inc22.loopexit ], [ %2, %for.cond10.preheader ]
%8 = phi i32 [ %5, %for.inc22.loopexit ], [ %3, %for.cond10.preheader ]
%indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
%9 = sext i32 %7 to i64
%cmp7 = icmp slt i64 %indvars.iv.next63, %9
br i1 %cmp7, label %for.cond10.preheader, label %for.end24, !llvm.loop !14
for.end24: ; preds = %for.inc22, %entry, %for.cond6.preheader
%10 = phi i32 [ %.pre68.pre, %for.cond6.preheader ], [ %.pre68.pre, %entry ], [ %8, %for.inc22 ]
%.lcssa = phi i32 [ %0, %for.cond6.preheader ], [ %0, %entry ], [ %7, %for.inc22 ]
call void @print_compressed(ptr noundef %call1, i32 noundef %.lcssa, i32 noundef %10)
%11 = load i32, ptr %rows, align 4, !tbaa !5
%cmp2654 = icmp sgt i32 %11, 0
br i1 %cmp2654, label %for.body28, label %for.end33
for.body28: ; preds = %for.end24, %for.body28
%indvars.iv65 = phi i64 [ %indvars.iv.next66, %for.body28 ], [ 0, %for.end24 ]
%arrayidx30 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv65
%12 = load ptr, ptr %arrayidx30, align 8, !tbaa !9
call void @free(ptr noundef %12) #7
%indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
%13 = load i32, ptr %rows, align 4, !tbaa !5
%14 = sext i32 %13 to i64
%cmp26 = icmp slt i64 %indvars.iv.next66, %14
br i1 %cmp26, label %for.body28, label %for.end33, !llvm.loop !16
for.end33: ; preds = %for.body28, %for.end24
call void @free(ptr noundef %call1) #7
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %cols) #7
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %rows) #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 nounwind uwtable
define dso_local void @print_compressed(ptr nocapture noundef readonly %grid, i32 noundef %rows, i32 noundef %cols) local_unnamed_addr #4 {
entry:
%cmp151 = icmp sgt i32 %rows, 0
%cmp2146 = icmp sgt i32 %cols, 0
%or.cond = and i1 %cmp151, %cmp2146
br i1 %or.cond, label %for.cond1.preheader.us.us.preheader, label %for.end101
for.cond1.preheader.us.us.preheader: ; preds = %entry
%wide.trip.count211 = zext i32 %rows to i64
%wide.trip.count = zext i32 %cols to i64
%min.iters.check = icmp ult i32 %cols, 8
%n.vec = and i64 %wide.trip.count, 4294967288
%cmp.n = icmp eq i64 %n.vec, %wide.trip.count
%xtraiter = and i64 %wide.trip.count, 3
%0 = icmp ult i32 %cols, 4
%unroll_iter = and i64 %wide.trip.count, 4294967292
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br label %for.cond1.preheader.us.us
for.cond1.preheader.us.us: ; preds = %for.cond1.preheader.us.us.preheader, %for.inc21.us.us
%indvars.iv208 = phi i64 [ 0, %for.cond1.preheader.us.us.preheader ], [ %indvars.iv.next209, %for.inc21.us.us ]
%arrayidx.us.us = getelementptr inbounds ptr, ptr %grid, i64 %indvars.iv208
%1 = load ptr, ptr %arrayidx.us.us, align 8, !tbaa !9
br i1 %min.iters.check, label %for.body3.us.us.preheader, label %vector.body
vector.body: ; preds = %for.cond1.preheader.us.us, %vector.body
%index = phi i64 [ %index.next, %vector.body ], [ 0, %for.cond1.preheader.us.us ]
%vec.phi = phi <4 x i32> [ %6, %vector.body ], [ <i32 1, i32 1, i32 1, i32 1>, %for.cond1.preheader.us.us ]
%vec.phi252 = phi <4 x i32> [ %7, %vector.body ], [ <i32 1, i32 1, i32 1, i32 1>, %for.cond1.preheader.us.us ]
%2 = getelementptr inbounds i8, ptr %1, i64 %index
%wide.load = load <4 x i8>, ptr %2, align 1, !tbaa !17
%3 = getelementptr inbounds i8, ptr %2, i64 4
%wide.load253 = load <4 x i8>, ptr %3, align 1, !tbaa !17
%4 = icmp eq <4 x i8> %wide.load, <i8 35, i8 35, i8 35, i8 35>
%5 = icmp eq <4 x i8> %wide.load253, <i8 35, i8 35, i8 35, i8 35>
%6 = select <4 x i1> %4, <4 x i32> zeroinitializer, <4 x i32> %vec.phi
%7 = select <4 x i1> %5, <4 x i32> zeroinitializer, <4 x i32> %vec.phi252
%index.next = add nuw i64 %index, 8
%8 = icmp eq i64 %index.next, %n.vec
br i1 %8, label %middle.block, label %vector.body, !llvm.loop !18
middle.block: ; preds = %vector.body
%rdx.select.cmp.not = icmp ne <4 x i32> %6, <i32 1, i32 1, i32 1, i32 1>
%rdx.select.cmp254256 = icmp ne <4 x i32> %7, <i32 1, i32 1, i32 1, i32 1>
%rdx.select.cmp254 = select <4 x i1> %rdx.select.cmp.not, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i1> %rdx.select.cmp254256
%9 = bitcast <4 x i1> %rdx.select.cmp254 to i4
%.not = icmp eq i4 %9, 0
%rdx.select255 = zext i1 %.not to i32
br i1 %cmp.n, label %for.cond1.for.end_crit_edge.us.us, label %for.body3.us.us.preheader
for.body3.us.us.preheader: ; preds = %for.cond1.preheader.us.us, %middle.block
%indvars.iv.ph = phi i64 [ 0, %for.cond1.preheader.us.us ], [ %n.vec, %middle.block ]
%isRowEmpty.0147.us.us.ph = phi i32 [ 1, %for.cond1.preheader.us.us ], [ %rdx.select255, %middle.block ]
br label %for.body3.us.us
for.body12.us.us: ; preds = %for.body12.us.us.preheader, %for.body12.us.us
%indvars.iv203 = phi i64 [ %indvars.iv.next204.3, %for.body12.us.us ], [ 0, %for.body12.us.us.preheader ]
%niter = phi i64 [ %niter.next.3, %for.body12.us.us ], [ 0, %for.body12.us.us.preheader ]
%10 = load ptr, ptr %arrayidx.us.us, align 8, !tbaa !9
%arrayidx16.us.us = getelementptr inbounds i8, ptr %10, i64 %indvars.iv203
store i8 32, ptr %arrayidx16.us.us, align 1, !tbaa !17
%indvars.iv.next204 = or i64 %indvars.iv203, 1
%11 = load ptr, ptr %arrayidx.us.us, align 8, !tbaa !9
%arrayidx16.us.us.1 = getelementptr inbounds i8, ptr %11, i64 %indvars.iv.next204
store i8 32, ptr %arrayidx16.us.us.1, align 1, !tbaa !17
%indvars.iv.next204.1 = or i64 %indvars.iv203, 2
%12 = load ptr, ptr %arrayidx.us.us, align 8, !tbaa !9
%arrayidx16.us.us.2 = getelementptr inbounds i8, ptr %12, i64 %indvars.iv.next204.1
store i8 32, ptr %arrayidx16.us.us.2, align 1, !tbaa !17
%indvars.iv.next204.2 = or i64 %indvars.iv203, 3
%13 = load ptr, ptr %arrayidx.us.us, align 8, !tbaa !9
%arrayidx16.us.us.3 = getelementptr inbounds i8, ptr %13, i64 %indvars.iv.next204.2
store i8 32, ptr %arrayidx16.us.us.3, align 1, !tbaa !17
%indvars.iv.next204.3 = add nuw nsw i64 %indvars.iv203, 4
%niter.next.3 = add i64 %niter, 4
%niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
br i1 %niter.ncmp.3, label %for.inc21.us.us.loopexit.unr-lcssa, label %for.body12.us.us, !llvm.loop !21
for.inc21.us.us.loopexit.unr-lcssa: ; preds = %for.body12.us.us, %for.body12.us.us.preheader
%indvars.iv203.unr = phi i64 [ 0, %for.body12.us.us.preheader ], [ %indvars.iv.next204.3, %for.body12.us.us ]
br i1 %lcmp.mod.not, label %for.inc21.us.us, label %for.body12.us.us.epil
for.body12.us.us.epil: ; preds = %for.inc21.us.us.loopexit.unr-lcssa, %for.body12.us.us.epil
%indvars.iv203.epil = phi i64 [ %indvars.iv.next204.epil, %for.body12.us.us.epil ], [ %indvars.iv203.unr, %for.inc21.us.us.loopexit.unr-lcssa ]
%epil.iter = phi i64 [ %epil.iter.next, %for.body12.us.us.epil ], [ 0, %for.inc21.us.us.loopexit.unr-lcssa ]
%14 = load ptr, ptr %arrayidx.us.us, align 8, !tbaa !9
%arrayidx16.us.us.epil = getelementptr inbounds i8, ptr %14, i64 %indvars.iv203.epil
store i8 32, ptr %arrayidx16.us.us.epil, align 1, !tbaa !17
%indvars.iv.next204.epil = add nuw nsw i64 %indvars.iv203.epil, 1
%epil.iter.next = add i64 %epil.iter, 1
%epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
br i1 %epil.iter.cmp.not, label %for.inc21.us.us, label %for.body12.us.us.epil, !llvm.loop !22
for.inc21.us.us: ; preds = %for.inc21.us.us.loopexit.unr-lcssa, %for.body12.us.us.epil, %for.cond1.for.end_crit_edge.us.us
%indvars.iv.next209 = add nuw nsw i64 %indvars.iv208, 1
%exitcond212.not = icmp eq i64 %indvars.iv.next209, %wide.trip.count211
br i1 %exitcond212.not, label %for.cond24.preheader, label %for.cond1.preheader.us.us, !llvm.loop !24
for.body3.us.us: ; preds = %for.body3.us.us.preheader, %for.body3.us.us
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body3.us.us ], [ %indvars.iv.ph, %for.body3.us.us.preheader ]
%isRowEmpty.0147.us.us = phi i32 [ %spec.select.us.us, %for.body3.us.us ], [ %isRowEmpty.0147.us.us.ph, %for.body3.us.us.preheader ]
%arrayidx5.us.us = getelementptr inbounds i8, ptr %1, i64 %indvars.iv
%15 = load i8, ptr %arrayidx5.us.us, align 1, !tbaa !17
%cmp6.us.us = icmp eq i8 %15, 35
%spec.select.us.us = select i1 %cmp6.us.us, i32 0, i32 %isRowEmpty.0147.us.us
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
br i1 %exitcond.not, label %for.cond1.for.end_crit_edge.us.us, label %for.body3.us.us, !llvm.loop !25
for.cond1.for.end_crit_edge.us.us: ; preds = %for.body3.us.us, %middle.block
%spec.select.us.us.lcssa = phi i32 [ %rdx.select255, %middle.block ], [ %spec.select.us.us, %for.body3.us.us ]
%tobool.not.us.us = icmp eq i32 %spec.select.us.us.lcssa, 0
br i1 %tobool.not.us.us, label %for.inc21.us.us, label %for.body12.us.us.preheader
for.body12.us.us.preheader: ; preds = %for.cond1.for.end_crit_edge.us.us
br i1 %0, label %for.inc21.us.us.loopexit.unr-lcssa, label %for.body12.us.us
for.cond24.preheader: ; preds = %for.inc21.us.us
%cmp25174 = icmp sgt i32 %cols, 0
br i1 %cmp25174, label %for.cond28.preheader.lr.ph, label %for.cond61.preheader
for.cond28.preheader.lr.ph: ; preds = %for.cond24.preheader
%cmp47172 = icmp slt i32 %rows, 1
br i1 %cmp151, label %for.cond28.preheader.us.preheader, label %for.end101
for.cond28.preheader.us.preheader: ; preds = %for.cond28.preheader.lr.ph
%wide.trip.count226 = zext i32 %cols to i64
%xtraiter259 = and i64 %wide.trip.count211, 3
%16 = icmp ult i32 %rows, 4
%unroll_iter263 = and i64 %wide.trip.count211, 4294967292
%lcmp.mod261.not = icmp eq i64 %xtraiter259, 0
%xtraiter265 = and i64 %wide.trip.count211, 3
%17 = icmp ult i32 %rows, 4
%unroll_iter268 = and i64 %wide.trip.count211, 4294967292
%lcmp.mod267.not = icmp eq i64 %xtraiter265, 0
br label %for.cond28.preheader.us
for.cond28.preheader.us: ; preds = %for.cond28.preheader.us.preheader, %for.inc58.us
%indvars.iv223 = phi i64 [ 0, %for.cond28.preheader.us.preheader ], [ %indvars.iv.next224, %for.inc58.us ]
br i1 %16, label %for.cond28.for.end43_crit_edge.us.unr-lcssa, label %for.body31.us
for.body49.us: ; preds = %for.body49.us.preheader, %for.body49.us
%indvars.iv218 = phi i64 [ %indvars.iv.next219.3, %for.body49.us ], [ 0, %for.body49.us.preheader ]
%niter269 = phi i64 [ %niter269.next.3, %for.body49.us ], [ 0, %for.body49.us.preheader ]
%arrayidx51.us = getelementptr inbounds ptr, ptr %grid, i64 %indvars.iv218
%18 = load ptr, ptr %arrayidx51.us, align 8, !tbaa !9
%arrayidx53.us = getelementptr inbounds i8, ptr %18, i64 %indvars.iv223
store i8 32, ptr %arrayidx53.us, align 1, !tbaa !17
%indvars.iv.next219 = or i64 %indvars.iv218, 1
%arrayidx51.us.1 = getelementptr inbounds ptr, ptr %grid, i64 %indvars.iv.next219
%19 = load ptr, ptr %arrayidx51.us.1, align 8, !tbaa !9
%arrayidx53.us.1 = getelementptr inbounds i8, ptr %19, i64 %indvars.iv223
store i8 32, ptr %arrayidx53.us.1, align 1, !tbaa !17
%indvars.iv.next219.1 = or i64 %indvars.iv218, 2
%arrayidx51.us.2 = getelementptr inbounds ptr, ptr %grid, i64 %indvars.iv.next219.1
%20 = load ptr, ptr %arrayidx51.us.2, align 8, !tbaa !9
%arrayidx53.us.2 = getelementptr inbounds i8, ptr %20, i64 %indvars.iv223
store i8 32, ptr %arrayidx53.us.2, align 1, !tbaa !17
%indvars.iv.next219.2 = or i64 %indvars.iv218, 3
%arrayidx51.us.3 = getelementptr inbounds ptr, ptr %grid, i64 %indvars.iv.next219.2
%21 = load ptr, ptr %arrayidx51.us.3, align 8, !tbaa !9
%arrayidx53.us.3 = getelementptr inbounds i8, ptr %21, i64 %indvars.iv223
store i8 32, ptr %arrayidx53.us.3, align 1, !tbaa !17
%indvars.iv.next219.3 = add nuw nsw i64 %indvars.iv218, 4
%niter269.next.3 = add i64 %niter269, 4
%niter269.ncmp.3 = icmp eq i64 %niter269.next.3, %unroll_iter268
br i1 %niter269.ncmp.3, label %for.inc58.us.loopexit.unr-lcssa, label %for.body49.us, !llvm.loop !26
for.inc58.us.loopexit.unr-lcssa: ; preds = %for.body49.us, %for.body49.us.preheader
%indvars.iv218.unr = phi i64 [ 0, %for.body49.us.preheader ], [ %indvars.iv.next219.3, %for.body49.us ]
br i1 %lcmp.mod267.not, label %for.inc58.us, label %for.body49.us.epil
for.body49.us.epil: ; preds = %for.inc58.us.loopexit.unr-lcssa, %for.body49.us.epil
%indvars.iv218.epil = phi i64 [ %indvars.iv.next219.epil, %for.body49.us.epil ], [ %indvars.iv218.unr, %for.inc58.us.loopexit.unr-lcssa ]
%epil.iter266 = phi i64 [ %epil.iter266.next, %for.body49.us.epil ], [ 0, %for.inc58.us.loopexit.unr-lcssa ]
%arrayidx51.us.epil = getelementptr inbounds ptr, ptr %grid, i64 %indvars.iv218.epil
%22 = load ptr, ptr %arrayidx51.us.epil, align 8, !tbaa !9
%arrayidx53.us.epil = getelementptr inbounds i8, ptr %22, i64 %indvars.iv223
store i8 32, ptr %arrayidx53.us.epil, align 1, !tbaa !17
%indvars.iv.next219.epil = add nuw nsw i64 %indvars.iv218.epil, 1
%epil.iter266.next = add i64 %epil.iter266, 1
%epil.iter266.cmp.not = icmp eq i64 %epil.iter266.next, %xtraiter265
br i1 %epil.iter266.cmp.not, label %for.inc58.us, label %for.body49.us.epil, !llvm.loop !27
for.inc58.us: ; preds = %for.inc58.us.loopexit.unr-lcssa, %for.body49.us.epil, %for.cond28.for.end43_crit_edge.us
%indvars.iv.next224 = add nuw nsw i64 %indvars.iv223, 1
%exitcond227.not = icmp eq i64 %indvars.iv.next224, %wide.trip.count226
br i1 %exitcond227.not, label %for.cond61.preheader, label %for.cond28.preheader.us, !llvm.loop !28
for.body31.us: ; preds = %for.cond28.preheader.us, %for.body31.us
%indvars.iv213 = phi i64 [ %indvars.iv.next214.3, %for.body31.us ], [ 0, %for.cond28.preheader.us ]
%isColEmpty.0170.us = phi i32 [ %spec.select144.us.3, %for.body31.us ], [ 1, %for.cond28.preheader.us ]
%niter264 = phi i64 [ %niter264.next.3, %for.body31.us ], [ 0, %for.cond28.preheader.us ]
%arrayidx33.us = getelementptr inbounds ptr, ptr %grid, i64 %indvars.iv213
%23 = load ptr, ptr %arrayidx33.us, align 8, !tbaa !9
%arrayidx35.us = getelementptr inbounds i8, ptr %23, i64 %indvars.iv223
%24 = load i8, ptr %arrayidx35.us, align 1, !tbaa !17
%cmp37.us = icmp eq i8 %24, 35
%indvars.iv.next214 = or i64 %indvars.iv213, 1
%arrayidx33.us.1 = getelementptr inbounds ptr, ptr %grid, i64 %indvars.iv.next214
%25 = load ptr, ptr %arrayidx33.us.1, align 8, !tbaa !9
%arrayidx35.us.1 = getelementptr inbounds i8, ptr %25, i64 %indvars.iv223
%26 = load i8, ptr %arrayidx35.us.1, align 1, !tbaa !17
%cmp37.us.1 = icmp eq i8 %26, 35
%indvars.iv.next214.1 = or i64 %indvars.iv213, 2
%arrayidx33.us.2 = getelementptr inbounds ptr, ptr %grid, i64 %indvars.iv.next214.1
%27 = load ptr, ptr %arrayidx33.us.2, align 8, !tbaa !9
%arrayidx35.us.2 = getelementptr inbounds i8, ptr %27, i64 %indvars.iv223
%28 = load i8, ptr %arrayidx35.us.2, align 1, !tbaa !17
%cmp37.us.2 = icmp eq i8 %28, 35
%indvars.iv.next214.2 = or i64 %indvars.iv213, 3
%arrayidx33.us.3 = getelementptr inbounds ptr, ptr %grid, i64 %indvars.iv.next214.2
%29 = load ptr, ptr %arrayidx33.us.3, align 8, !tbaa !9
%arrayidx35.us.3 = getelementptr inbounds i8, ptr %29, i64 %indvars.iv223
%30 = load i8, ptr %arrayidx35.us.3, align 1, !tbaa !17
%cmp37.us.3 = icmp eq i8 %30, 35
%31 = select i1 %cmp37.us.3, i1 true, i1 %cmp37.us.2
%32 = select i1 %31, i1 true, i1 %cmp37.us.1
%33 = select i1 %32, i1 true, i1 %cmp37.us
%spec.select144.us.3 = select i1 %33, i32 0, i32 %isColEmpty.0170.us
%indvars.iv.next214.3 = add nuw nsw i64 %indvars.iv213, 4
%niter264.next.3 = add i64 %niter264, 4
%niter264.ncmp.3 = icmp eq i64 %niter264.next.3, %unroll_iter263
br i1 %niter264.ncmp.3, label %for.cond28.for.end43_crit_edge.us.unr-lcssa, label %for.body31.us, !llvm.loop !29
for.cond28.for.end43_crit_edge.us.unr-lcssa: ; preds = %for.body31.us, %for.cond28.preheader.us
%spec.select144.us.lcssa.ph = phi i32 [ undef, %for.cond28.preheader.us ], [ %spec.select144.us.3, %for.body31.us ]
%indvars.iv213.unr = phi i64 [ 0, %for.cond28.preheader.us ], [ %indvars.iv.next214.3, %for.body31.us ]
%isColEmpty.0170.us.unr = phi i32 [ 1, %for.cond28.preheader.us ], [ %spec.select144.us.3, %for.body31.us ]
br i1 %lcmp.mod261.not, label %for.cond28.for.end43_crit_edge.us, label %for.body31.us.epil
for.body31.us.epil: ; preds = %for.cond28.for.end43_crit_edge.us.unr-lcssa, %for.body31.us.epil
%indvars.iv213.epil = phi i64 [ %indvars.iv.next214.epil, %for.body31.us.epil ], [ %indvars.iv213.unr, %for.cond28.for.end43_crit_edge.us.unr-lcssa ]
%isColEmpty.0170.us.epil = phi i32 [ %spec.select144.us.epil, %for.body31.us.epil ], [ %isColEmpty.0170.us.unr, %for.cond28.for.end43_crit_edge.us.unr-lcssa ]
%epil.iter260 = phi i64 [ %epil.iter260.next, %for.body31.us.epil ], [ 0, %for.cond28.for.end43_crit_edge.us.unr-lcssa ]
%arrayidx33.us.epil = getelementptr inbounds ptr, ptr %grid, i64 %indvars.iv213.epil
%34 = load ptr, ptr %arrayidx33.us.epil, align 8, !tbaa !9
%arrayidx35.us.epil = getelementptr inbounds i8, ptr %34, i64 %indvars.iv223
%35 = load i8, ptr %arrayidx35.us.epil, align 1, !tbaa !17
%cmp37.us.epil = icmp eq i8 %35, 35
%spec.select144.us.epil = select i1 %cmp37.us.epil, i32 0, i32 %isColEmpty.0170.us.epil
%indvars.iv.next214.epil = add nuw nsw i64 %indvars.iv213.epil, 1
%epil.iter260.next = add i64 %epil.iter260, 1
%epil.iter260.cmp.not = icmp eq i64 %epil.iter260.next, %xtraiter259
br i1 %epil.iter260.cmp.not, label %for.cond28.for.end43_crit_edge.us, label %for.body31.us.epil, !llvm.loop !30
for.cond28.for.end43_crit_edge.us: ; preds = %for.body31.us.epil, %for.cond28.for.end43_crit_edge.us.unr-lcssa
%spec.select144.us.lcssa = phi i32 [ %spec.select144.us.lcssa.ph, %for.cond28.for.end43_crit_edge.us.unr-lcssa ], [ %spec.select144.us.epil, %for.body31.us.epil ]
%tobool44.not.us = icmp eq i32 %spec.select144.us.lcssa, 0
%brmerge = or i1 %tobool44.not.us, %cmp47172
br i1 %brmerge, label %for.inc58.us, label %for.body49.us.preheader
for.body49.us.preheader: ; preds = %for.cond28.for.end43_crit_edge.us
br i1 %17, label %for.inc58.us.loopexit.unr-lcssa, label %for.body49.us
for.cond61.preheader: ; preds = %for.inc58.us, %for.cond24.preheader
%brmerge251.not = and i1 %cmp25174, %cmp151
br i1 %brmerge251.not, label %for.cond65.preheader.us.preheader, label %for.end101
for.cond65.preheader.us.preheader: ; preds = %for.cond61.preheader
%wide.trip.count236 = zext i32 %rows to i64
%wide.trip.count231 = zext i32 %cols to i64
br label %for.cond65.preheader.us
for.cond65.preheader.us: ; preds = %for.cond65.preheader.us.preheader, %for.inc99.us
%indvars.iv233 = phi i64 [ 0, %for.cond65.preheader.us.preheader ], [ %indvars.iv.next234, %for.inc99.us ]
%arrayidx70.us = getelementptr inbounds ptr, ptr %grid, i64 %indvars.iv233
br label %for.body68.us
if.then96.us: ; preds = %for.cond65.for.end94_crit_edge.us
%putchar.us = tail call i32 @putchar(i32 10)
br label %for.inc99.us
for.inc99.us: ; preds = %if.then96.us, %for.cond65.for.end94_crit_edge.us
%indvars.iv.next234 = add nuw nsw i64 %indvars.iv233, 1
%exitcond237.not = icmp eq i64 %indvars.iv.next234, %wide.trip.count236
br i1 %exitcond237.not, label %for.end101, label %for.cond65.preheader.us, !llvm.loop !31
for.body68.us: ; preds = %for.cond65.preheader.us, %for.inc92.us
%indvars.iv228 = phi i64 [ 0, %for.cond65.preheader.us ], [ %indvars.iv.next229, %for.inc92.us ]
%isRowEmpty.2194.us = phi i32 [ 1, %for.cond65.preheader.us ], [ %spec.select145.us, %for.inc92.us ]
%36 = load ptr, ptr %arrayidx70.us, align 8, !tbaa !9
%arrayidx72.us = getelementptr inbounds i8, ptr %36, i64 %indvars.iv228
%37 = load i8, ptr %arrayidx72.us, align 1, !tbaa !17
%cmp74.us = icmp eq i8 %37, 35
%spec.select145.us = select i1 %cmp74.us, i32 0, i32 %isRowEmpty.2194.us
%cmp83.not.us = icmp eq i8 %37, 32
br i1 %cmp83.not.us, label %for.inc92.us, label %if.then85.us
if.then85.us: ; preds = %for.body68.us
%conv82.us = sext i8 %37 to i32
%putchar143.us = tail call i32 @putchar(i32 %conv82.us)
br label %for.inc92.us
for.inc92.us: ; preds = %if.then85.us, %for.body68.us
%indvars.iv.next229 = add nuw nsw i64 %indvars.iv228, 1
%exitcond232.not = icmp eq i64 %indvars.iv.next229, %wide.trip.count231
br i1 %exitcond232.not, label %for.cond65.for.end94_crit_edge.us, label %for.body68.us, !llvm.loop !32
for.cond65.for.end94_crit_edge.us: ; preds = %for.inc92.us
%tobool95.not.us = icmp eq i32 %spec.select145.us, 0
br i1 %tobool95.not.us, label %if.then96.us, label %for.inc99.us
for.end101: ; preds = %for.inc99.us, %for.cond61.preheader, %entry, %for.cond28.preheader.lr.ph
ret void
}
; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5
; Function Attrs: mustprogress 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 #6
attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nofree nounwind }
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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12, !15}
!15 = !{!"llvm.loop.unswitch.partial.disable"}
!16 = distinct !{!16, !12}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !12, !19, !20}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.unroll.disable"}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12, !20, !19}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !23}
!28 = distinct !{!28, !12}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !23}
!31 = distinct !{!31, !12}
!32 = distinct !{!32, !12}
|
/* ex 7_3
ruuu0048 */
#include <stdio.h>
#include <stdlib.h>
int main(void){
int height,wide; //高さと横幅の変数を宣言
char **table;
scanf("%d %d",&height,&wide); //高さと変数を宣言
//各行へのポインタ分のメモリ領域を確保
table =(char**)calloc(height,sizeof(char*));
//確保できなかったらプログラム終了
if(table == NULL){
exit(1);
}
//各行の要素分のメモリ領域を確保
for(int i = 0;i < height; i++){
table[i] = (char*)calloc(wide,sizeof(char));
//それぞれで確保できなかったらプログラム終了
if(table[i]==NULL){
exit(1);
}
}
for (int i = 0; i < height; i++)
{
for (int j = 0; j <wide; j++)
{
scanf(" %c",&table[i][j]); //白黒を入力
}
}
for (int i = 0; i < height; i++)
{
int count = 0; //数える変数を宣言
for (int j = 0; j <wide; j++)
{
if(table[i][j] == '#'){ //黒があったら
count ++; //カウントする
}
}
if (count == 0){ //i行目に一つも黒がなかったら
for(int j = 0; j <wide; j++)
{
table[i][j] ='!'; //i行目をすべて'!'にする
}
}
}
for (int j= 0; j < wide; j++) //iとjを入れ替えて同じことをする
{
int count = 0;
for (int i = 0; i <height; i++)
{
if(table[i][j] == '#'){
count ++;
}
}
if (count == 0){ //j列目に一つも黒がなかったら
for(int i = 0; i <height; i++)
{
table[i][j] ='!'; //i行目をすべて'!'にする
}
}
}
//出力
for (int i = 0; i < height; i++)
{
int count = 0; //数える変数を宣言
for (int j = 0; j <wide; j++)
{
if(table[i][j] != '!'){ //!じゃなかったら
printf("%c",table[i][j]); //出力
count ++; //数える
}
}
if(count > 0){ //一回でも出力してたら
printf("\n"); //改行を出力
}
}
//メモリ領域の開放
//各行の要素分の領域を開放
for(int i = 0; i < height; i++){
free(table[i]);
}
//各行への配列へのポインタの領域を開放
free(table);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133059/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133059/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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" %c\00", align 1
; Function Attrs: nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%height = alloca i32, align 4
%wide = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %height) #8
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %wide) #8
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %height, ptr noundef nonnull %wide)
%0 = load i32, ptr %height, align 4
%conv = sext i32 %0 to i64
%call1 = call noalias ptr @calloc(i64 noundef %conv, i64 noundef 8) #9
%cmp = icmp eq ptr %call1, null
br i1 %cmp, label %if.then, label %for.cond.preheader
for.cond.preheader: ; preds = %entry
%cmp3222 = icmp sgt i32 %0, 0
%.pre295.pre.pre = load i32, ptr %wide, align 4
br i1 %cmp3222, label %for.body.lr.ph, label %for.cond81.preheader
for.body.lr.ph: ; preds = %for.cond.preheader
%conv5 = sext i32 %.pre295.pre.pre to i64
%wide.trip.count = zext i32 %0 to i64
br label %for.body
if.then: ; preds = %entry
call void @exit(i32 noundef 1) #10
unreachable
for.cond: ; preds = %for.body
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
br i1 %exitcond.not, label %for.cond14.preheader, label %for.body, !llvm.loop !5
for.cond14.preheader: ; preds = %for.cond
br i1 %cmp3222, label %for.cond19.preheader.lr.ph, label %for.cond81.preheader
for.cond19.preheader.lr.ph: ; preds = %for.cond14.preheader
%1 = icmp sgt i32 %.pre295.pre.pre, 0
br i1 %1, label %for.cond19.preheader, label %for.cond42.preheader.preheader
for.body: ; preds = %for.body.lr.ph, %for.cond
%indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.cond ]
%call6 = call noalias ptr @calloc(i64 noundef %conv5, i64 noundef 1) #9
%arrayidx = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv
store ptr %call6, ptr %arrayidx, align 8, !tbaa !7
%cmp9 = icmp eq ptr %call6, null
br i1 %cmp9, label %if.then11, label %for.cond
if.then11: ; preds = %for.body
call void @exit(i32 noundef 1) #10
unreachable
for.cond19.preheader: ; preds = %for.cond19.preheader.lr.ph, %for.cond.cleanup22
%2 = phi i32 [ %5, %for.cond.cleanup22 ], [ %0, %for.cond19.preheader.lr.ph ]
%3 = phi i32 [ %6, %for.cond.cleanup22 ], [ %.pre295.pre.pre, %for.cond19.preheader.lr.ph ]
%indvars.iv259 = phi i64 [ %indvars.iv.next260, %for.cond.cleanup22 ], [ 0, %for.cond19.preheader.lr.ph ]
%cmp20224 = icmp sgt i32 %3, 0
br i1 %cmp20224, label %for.body23.lr.ph, label %for.cond.cleanup22
for.body23.lr.ph: ; preds = %for.cond19.preheader
%arrayidx25 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv259
%4 = load ptr, ptr %arrayidx25, align 8, !tbaa !7
br label %for.body23
for.cond36.preheader: ; preds = %for.cond.cleanup22
%cmp37233 = icmp sgt i32 %5, 0
br i1 %cmp37233, label %for.cond42.preheader.preheader, label %for.cond81.preheader
for.cond42.preheader.preheader: ; preds = %for.cond19.preheader.lr.ph, %for.cond36.preheader
%.ph = phi i32 [ %0, %for.cond19.preheader.lr.ph ], [ %5, %for.cond36.preheader ]
%.ph334 = phi i32 [ %.pre295.pre.pre, %for.cond19.preheader.lr.ph ], [ %6, %for.cond36.preheader ]
br label %for.cond42.preheader
for.cond.cleanup22.loopexit: ; preds = %for.body23
%.pre = load i32, ptr %height, align 4
br label %for.cond.cleanup22
for.cond.cleanup22: ; preds = %for.cond.cleanup22.loopexit, %for.cond19.preheader
%5 = phi i32 [ %.pre, %for.cond.cleanup22.loopexit ], [ %2, %for.cond19.preheader ]
%6 = phi i32 [ %8, %for.cond.cleanup22.loopexit ], [ %3, %for.cond19.preheader ]
%indvars.iv.next260 = add nuw nsw i64 %indvars.iv259, 1
%7 = sext i32 %5 to i64
%cmp15 = icmp slt i64 %indvars.iv.next260, %7
br i1 %cmp15, label %for.cond19.preheader, label %for.cond36.preheader, !llvm.loop !11
for.body23: ; preds = %for.body23.lr.ph, %for.body23
%indvars.iv256 = phi i64 [ 0, %for.body23.lr.ph ], [ %indvars.iv.next257, %for.body23 ]
%arrayidx27 = getelementptr inbounds i8, ptr %4, i64 %indvars.iv256
%call28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef %arrayidx27)
%indvars.iv.next257 = add nuw nsw i64 %indvars.iv256, 1
%8 = load i32, ptr %wide, align 4
%9 = sext i32 %8 to i64
%cmp20 = icmp slt i64 %indvars.iv.next257, %9
br i1 %cmp20, label %for.body23, label %for.cond.cleanup22.loopexit, !llvm.loop !13
for.cond42.preheader: ; preds = %for.cond42.preheader.preheader, %if.end76
%10 = phi i32 [ %29, %if.end76 ], [ %.ph, %for.cond42.preheader.preheader ]
%11 = phi i32 [ %30, %if.end76 ], [ %.ph334, %for.cond42.preheader.preheader ]
%indvars.iv270 = phi i64 [ %indvars.iv.next271, %if.end76 ], [ 0, %for.cond42.preheader.preheader ]
%cmp43228 = icmp sgt i32 %11, 0
br i1 %cmp43228, label %for.body46.lr.ph, label %if.end76
for.body46.lr.ph: ; preds = %for.cond42.preheader
%arrayidx48 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv270
%12 = load ptr, ptr %arrayidx48, align 8, !tbaa !7
%wide.trip.count265 = zext i32 %11 to i64
%min.iters.check = icmp ult i32 %11, 8
br i1 %min.iters.check, label %for.body46.preheader, label %vector.ph
vector.ph: ; preds = %for.body46.lr.ph
%n.vec = and i64 %wide.trip.count265, 4294967288
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %19, %vector.body ]
%vec.phi330 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %20, %vector.body ]
%13 = getelementptr inbounds i8, ptr %12, i64 %index
%wide.load = load <4 x i8>, ptr %13, align 1, !tbaa !14
%14 = getelementptr inbounds i8, ptr %13, i64 4
%wide.load331 = load <4 x i8>, ptr %14, align 1, !tbaa !14
%15 = icmp eq <4 x i8> %wide.load, <i8 35, i8 35, i8 35, i8 35>
%16 = icmp eq <4 x i8> %wide.load331, <i8 35, i8 35, i8 35, i8 35>
%17 = zext <4 x i1> %15 to <4 x i32>
%18 = zext <4 x i1> %16 to <4 x i32>
%19 = add <4 x i32> %vec.phi, %17
%20 = add <4 x i32> %vec.phi330, %18
%index.next = add nuw i64 %index, 8
%21 = icmp eq i64 %index.next, %n.vec
br i1 %21, label %middle.block, label %vector.body, !llvm.loop !15
middle.block: ; preds = %vector.body
%bin.rdx = add <4 x i32> %20, %19
%22 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
%cmp.n = icmp eq i64 %n.vec, %wide.trip.count265
br i1 %cmp.n, label %for.cond.cleanup45, label %for.body46.preheader
for.body46.preheader: ; preds = %for.body46.lr.ph, %middle.block
%indvars.iv262.ph = phi i64 [ 0, %for.body46.lr.ph ], [ %n.vec, %middle.block ]
%count.0229.ph = phi i32 [ 0, %for.body46.lr.ph ], [ %22, %middle.block ]
br label %for.body46
for.cond81.preheader: ; preds = %if.end76, %for.cond.preheader, %for.cond14.preheader, %for.cond36.preheader
%23 = phi i32 [ %5, %for.cond36.preheader ], [ %0, %for.cond14.preheader ], [ %0, %for.cond.preheader ], [ %29, %if.end76 ]
%24 = phi i32 [ %6, %for.cond36.preheader ], [ %.pre295.pre.pre, %for.cond14.preheader ], [ %.pre295.pre.pre, %for.cond.preheader ], [ %30, %if.end76 ]
%cmp82242 = icmp sgt i32 %24, 0
br i1 %cmp82242, label %for.cond88.preheader, label %for.cond127.preheader
for.cond.cleanup45: ; preds = %for.body46, %middle.block
%spec.select.lcssa = phi i32 [ %22, %middle.block ], [ %spec.select, %for.body46 ]
%cmp60 = icmp eq i32 %spec.select.lcssa, 0
%or.cond = and i1 %cmp60, %cmp43228
br i1 %or.cond, label %for.body68.lr.ph, label %if.end76
for.body68.lr.ph: ; preds = %for.cond.cleanup45
%arrayidx70 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv270
%25 = load ptr, ptr %arrayidx70, align 8, !tbaa !7
br label %for.body68
for.body46: ; preds = %for.body46.preheader, %for.body46
%indvars.iv262 = phi i64 [ %indvars.iv.next263, %for.body46 ], [ %indvars.iv262.ph, %for.body46.preheader ]
%count.0229 = phi i32 [ %spec.select, %for.body46 ], [ %count.0229.ph, %for.body46.preheader ]
%arrayidx50 = getelementptr inbounds i8, ptr %12, i64 %indvars.iv262
%26 = load i8, ptr %arrayidx50, align 1, !tbaa !14
%cmp52 = icmp eq i8 %26, 35
%inc55 = zext i1 %cmp52 to i32
%spec.select = add nuw nsw i32 %count.0229, %inc55
%indvars.iv.next263 = add nuw nsw i64 %indvars.iv262, 1
%exitcond266.not = icmp eq i64 %indvars.iv.next263, %wide.trip.count265
br i1 %exitcond266.not, label %for.cond.cleanup45, label %for.body46, !llvm.loop !18
for.body68: ; preds = %for.body68.lr.ph, %for.body68
%indvars.iv267 = phi i64 [ 0, %for.body68.lr.ph ], [ %indvars.iv.next268, %for.body68 ]
%arrayidx72 = getelementptr inbounds i8, ptr %25, i64 %indvars.iv267
store i8 33, ptr %arrayidx72, align 1, !tbaa !14
%indvars.iv.next268 = add nuw nsw i64 %indvars.iv267, 1
%27 = load i32, ptr %wide, align 4
%28 = sext i32 %27 to i64
%cmp65 = icmp slt i64 %indvars.iv.next268, %28
br i1 %cmp65, label %for.body68, label %if.end76.loopexit, !llvm.loop !19
if.end76.loopexit: ; preds = %for.body68
%.pre294 = load i32, ptr %height, align 4
br label %if.end76
if.end76: ; preds = %for.cond42.preheader, %if.end76.loopexit, %for.cond.cleanup45
%29 = phi i32 [ %.pre294, %if.end76.loopexit ], [ %10, %for.cond.cleanup45 ], [ %10, %for.cond42.preheader ]
%30 = phi i32 [ %27, %if.end76.loopexit ], [ %11, %for.cond.cleanup45 ], [ %11, %for.cond42.preheader ]
%indvars.iv.next271 = add nuw nsw i64 %indvars.iv270, 1
%31 = sext i32 %29 to i64
%cmp37 = icmp slt i64 %indvars.iv.next271, %31
br i1 %cmp37, label %for.cond42.preheader, label %for.cond81.preheader, !llvm.loop !20
for.cond88.preheader: ; preds = %for.cond81.preheader, %if.end122
%32 = phi i32 [ %49, %if.end122 ], [ %24, %for.cond81.preheader ]
%33 = phi i32 [ %50, %if.end122 ], [ %23, %for.cond81.preheader ]
%indvars.iv281 = phi i64 [ %indvars.iv.next282, %if.end122 ], [ 0, %for.cond81.preheader ]
%cmp89236 = icmp sgt i32 %33, 0
br i1 %cmp89236, label %for.body92.lr.ph, label %if.end122
for.body92.lr.ph: ; preds = %for.cond88.preheader
%wide.trip.count276 = zext i32 %33 to i64
%xtraiter = and i64 %wide.trip.count276, 3
%34 = icmp ult i32 %33, 4
br i1 %34, label %for.cond.cleanup91.unr-lcssa, label %for.body92.lr.ph.new
for.body92.lr.ph.new: ; preds = %for.body92.lr.ph
%unroll_iter = and i64 %wide.trip.count276, 4294967292
br label %for.body92
for.cond127.preheader: ; preds = %if.end122, %for.cond81.preheader
%35 = phi i32 [ %23, %for.cond81.preheader ], [ %50, %if.end122 ]
%cmp128249 = icmp sgt i32 %35, 0
br i1 %cmp128249, label %for.cond134.preheader, label %for.cond.cleanup170
for.cond.cleanup91.unr-lcssa: ; preds = %for.body92, %for.body92.lr.ph
%spec.select221.lcssa.ph = phi i32 [ undef, %for.body92.lr.ph ], [ %spec.select221.3, %for.body92 ]
%indvars.iv273.unr = phi i64 [ 0, %for.body92.lr.ph ], [ %indvars.iv.next274.3, %for.body92 ]
%count86.0237.unr = phi i32 [ 0, %for.body92.lr.ph ], [ %spec.select221.3, %for.body92 ]
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.cond.cleanup91, label %for.body92.epil
for.body92.epil: ; preds = %for.cond.cleanup91.unr-lcssa, %for.body92.epil
%indvars.iv273.epil = phi i64 [ %indvars.iv.next274.epil, %for.body92.epil ], [ %indvars.iv273.unr, %for.cond.cleanup91.unr-lcssa ]
%count86.0237.epil = phi i32 [ %spec.select221.epil, %for.body92.epil ], [ %count86.0237.unr, %for.cond.cleanup91.unr-lcssa ]
%epil.iter = phi i64 [ %epil.iter.next, %for.body92.epil ], [ 0, %for.cond.cleanup91.unr-lcssa ]
%arrayidx94.epil = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv273.epil
%36 = load ptr, ptr %arrayidx94.epil, align 8, !tbaa !7
%arrayidx96.epil = getelementptr inbounds i8, ptr %36, i64 %indvars.iv281
%37 = load i8, ptr %arrayidx96.epil, align 1, !tbaa !14
%cmp98.epil = icmp eq i8 %37, 35
%inc101.epil = zext i1 %cmp98.epil to i32
%spec.select221.epil = add nuw nsw i32 %count86.0237.epil, %inc101.epil
%indvars.iv.next274.epil = add nuw nsw i64 %indvars.iv273.epil, 1
%epil.iter.next = add i64 %epil.iter, 1
%epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
br i1 %epil.iter.cmp.not, label %for.cond.cleanup91, label %for.body92.epil, !llvm.loop !21
for.cond.cleanup91: ; preds = %for.body92.epil, %for.cond.cleanup91.unr-lcssa
%spec.select221.lcssa = phi i32 [ %spec.select221.lcssa.ph, %for.cond.cleanup91.unr-lcssa ], [ %spec.select221.epil, %for.body92.epil ]
%cmp106 = icmp eq i32 %spec.select221.lcssa, 0
%or.cond253 = and i1 %cmp106, %cmp89236
br i1 %or.cond253, label %for.body114, label %if.end122
for.body92: ; preds = %for.body92, %for.body92.lr.ph.new
%indvars.iv273 = phi i64 [ 0, %for.body92.lr.ph.new ], [ %indvars.iv.next274.3, %for.body92 ]
%count86.0237 = phi i32 [ 0, %for.body92.lr.ph.new ], [ %spec.select221.3, %for.body92 ]
%niter = phi i64 [ 0, %for.body92.lr.ph.new ], [ %niter.next.3, %for.body92 ]
%arrayidx94 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv273
%38 = load ptr, ptr %arrayidx94, align 8, !tbaa !7
%arrayidx96 = getelementptr inbounds i8, ptr %38, i64 %indvars.iv281
%39 = load i8, ptr %arrayidx96, align 1, !tbaa !14
%cmp98 = icmp eq i8 %39, 35
%inc101 = zext i1 %cmp98 to i32
%spec.select221 = add nuw nsw i32 %count86.0237, %inc101
%indvars.iv.next274 = or i64 %indvars.iv273, 1
%arrayidx94.1 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv.next274
%40 = load ptr, ptr %arrayidx94.1, align 8, !tbaa !7
%arrayidx96.1 = getelementptr inbounds i8, ptr %40, i64 %indvars.iv281
%41 = load i8, ptr %arrayidx96.1, align 1, !tbaa !14
%cmp98.1 = icmp eq i8 %41, 35
%inc101.1 = zext i1 %cmp98.1 to i32
%spec.select221.1 = add nuw nsw i32 %spec.select221, %inc101.1
%indvars.iv.next274.1 = or i64 %indvars.iv273, 2
%arrayidx94.2 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv.next274.1
%42 = load ptr, ptr %arrayidx94.2, align 8, !tbaa !7
%arrayidx96.2 = getelementptr inbounds i8, ptr %42, i64 %indvars.iv281
%43 = load i8, ptr %arrayidx96.2, align 1, !tbaa !14
%cmp98.2 = icmp eq i8 %43, 35
%inc101.2 = zext i1 %cmp98.2 to i32
%spec.select221.2 = add nuw nsw i32 %spec.select221.1, %inc101.2
%indvars.iv.next274.2 = or i64 %indvars.iv273, 3
%arrayidx94.3 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv.next274.2
%44 = load ptr, ptr %arrayidx94.3, align 8, !tbaa !7
%arrayidx96.3 = getelementptr inbounds i8, ptr %44, i64 %indvars.iv281
%45 = load i8, ptr %arrayidx96.3, align 1, !tbaa !14
%cmp98.3 = icmp eq i8 %45, 35
%inc101.3 = zext i1 %cmp98.3 to i32
%spec.select221.3 = add nuw nsw i32 %spec.select221.2, %inc101.3
%indvars.iv.next274.3 = add nuw nsw i64 %indvars.iv273, 4
%niter.next.3 = add i64 %niter, 4
%niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
br i1 %niter.ncmp.3, label %for.cond.cleanup91.unr-lcssa, label %for.body92, !llvm.loop !23
for.body114: ; preds = %for.cond.cleanup91, %for.body114
%indvars.iv278 = phi i64 [ %indvars.iv.next279, %for.body114 ], [ 0, %for.cond.cleanup91 ]
%arrayidx116 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv278
%46 = load ptr, ptr %arrayidx116, align 8, !tbaa !7
%arrayidx118 = getelementptr inbounds i8, ptr %46, i64 %indvars.iv281
store i8 33, ptr %arrayidx118, align 1, !tbaa !14
%indvars.iv.next279 = add nuw nsw i64 %indvars.iv278, 1
%47 = load i32, ptr %height, align 4
%48 = sext i32 %47 to i64
%cmp111 = icmp slt i64 %indvars.iv.next279, %48
br i1 %cmp111, label %for.body114, label %if.end122.loopexit, !llvm.loop !24
if.end122.loopexit: ; preds = %for.body114
%.pre296 = load i32, ptr %wide, align 4, !tbaa !25
br label %if.end122
if.end122: ; preds = %for.cond88.preheader, %if.end122.loopexit, %for.cond.cleanup91
%49 = phi i32 [ %.pre296, %if.end122.loopexit ], [ %32, %for.cond.cleanup91 ], [ %32, %for.cond88.preheader ]
%50 = phi i32 [ %47, %if.end122.loopexit ], [ %33, %for.cond.cleanup91 ], [ %33, %for.cond88.preheader ]
%indvars.iv.next282 = add nuw nsw i64 %indvars.iv281, 1
%51 = sext i32 %49 to i64
%cmp82 = icmp slt i64 %indvars.iv.next282, %51
br i1 %cmp82, label %for.cond88.preheader, label %for.cond127.preheader, !llvm.loop !27
for.cond134.preheader: ; preds = %for.cond127.preheader, %if.end162
%indvars.iv287 = phi i64 [ %indvars.iv.next288, %if.end162 ], [ 0, %for.cond127.preheader ]
%52 = load i32, ptr %wide, align 4, !tbaa !25
%cmp135245 = icmp sgt i32 %52, 0
br i1 %cmp135245, label %for.body138.lr.ph, label %if.end162
for.body138.lr.ph: ; preds = %for.cond134.preheader
%arrayidx140 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv287
%53 = load ptr, ptr %arrayidx140, align 8, !tbaa !7
br label %for.body138
for.cond167.preheader: ; preds = %if.end162
%54 = icmp sgt i32 %59, 0
br i1 %54, label %for.body171, label %for.cond.cleanup170
for.cond.cleanup137: ; preds = %for.inc155
%cmp158 = icmp sgt i32 %count132.1, 0
br i1 %cmp158, label %if.then160, label %if.end162
for.body138: ; preds = %for.body138.lr.ph, %for.inc155
%55 = phi i32 [ %52, %for.body138.lr.ph ], [ %57, %for.inc155 ]
%indvars.iv284 = phi i64 [ 0, %for.body138.lr.ph ], [ %indvars.iv.next285, %for.inc155 ]
%count132.0246 = phi i32 [ 0, %for.body138.lr.ph ], [ %count132.1, %for.inc155 ]
%arrayidx142 = getelementptr inbounds i8, ptr %53, i64 %indvars.iv284
%56 = load i8, ptr %arrayidx142, align 1, !tbaa !14
%cmp144.not = icmp eq i8 %56, 33
br i1 %cmp144.not, label %for.inc155, label %if.then146
if.then146: ; preds = %for.body138
%conv143 = sext i8 %56 to i32
%putchar220 = call i32 @putchar(i32 %conv143)
%inc153 = add nsw i32 %count132.0246, 1
%.pre297 = load i32, ptr %wide, align 4, !tbaa !25
br label %for.inc155
for.inc155: ; preds = %for.body138, %if.then146
%57 = phi i32 [ %.pre297, %if.then146 ], [ %55, %for.body138 ]
%count132.1 = phi i32 [ %inc153, %if.then146 ], [ %count132.0246, %for.body138 ]
%indvars.iv.next285 = add nuw nsw i64 %indvars.iv284, 1
%58 = sext i32 %57 to i64
%cmp135 = icmp slt i64 %indvars.iv.next285, %58
br i1 %cmp135, label %for.body138, label %for.cond.cleanup137, !llvm.loop !28
if.then160: ; preds = %for.cond.cleanup137
%putchar = call i32 @putchar(i32 10)
br label %if.end162
if.end162: ; preds = %for.cond134.preheader, %if.then160, %for.cond.cleanup137
%indvars.iv.next288 = add nuw nsw i64 %indvars.iv287, 1
%59 = load i32, ptr %height, align 4, !tbaa !25
%60 = sext i32 %59 to i64
%cmp128 = icmp slt i64 %indvars.iv.next288, %60
br i1 %cmp128, label %for.cond134.preheader, label %for.cond167.preheader, !llvm.loop !29
for.cond.cleanup170: ; preds = %for.body171, %for.cond127.preheader, %for.cond167.preheader
call void @free(ptr noundef %call1) #8
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %wide) #8
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %height) #8
ret i32 0
for.body171: ; preds = %for.cond167.preheader, %for.body171
%indvars.iv290 = phi i64 [ %indvars.iv.next291, %for.body171 ], [ 0, %for.cond167.preheader ]
%arrayidx173 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv290
%61 = load ptr, ptr %arrayidx173, align 8, !tbaa !7
call void @free(ptr noundef %61) #8
%indvars.iv.next291 = add nuw nsw i64 %indvars.iv290, 1
%62 = load i32, ptr %height, align 4, !tbaa !25
%63 = sext i32 %62 to i64
%cmp168 = icmp slt i64 %indvars.iv.next291, %63
br i1 %cmp168, label %for.body171, label %for.cond.cleanup170, !llvm.loop !30
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(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,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #3
; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #6
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #7
attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nofree nounwind }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0,1) }
attributes #10 = { noreturn nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = distinct !{!11, !6, !12}
!12 = !{!"llvm.loop.unswitch.partial.disable"}
!13 = distinct !{!13, !6}
!14 = !{!9, !9, i64 0}
!15 = distinct !{!15, !6, !16, !17}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !6, !17, !16}
!19 = distinct !{!19, !6}
!20 = distinct !{!20, !6}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.unroll.disable"}
!23 = distinct !{!23, !6}
!24 = distinct !{!24, !6}
!25 = !{!26, !26, i64 0}
!26 = !{!"int", !9, i64 0}
!27 = distinct !{!27, !6}
!28 = distinct !{!28, !6}
!29 = distinct !{!29, !6}
!30 = distinct !{!30, !6}
|
/* ex5_3
L40S38 */
#include<stdio.h>
#define LIMIT 100
int main(void){
int high,wide,i,j,black_exist_high[LIMIT],black_exist_wide[LIMIT];
//high,wide:マス目の縦,横の長さ
//black_exist_high:黒いマスがあった行番号を格納
//black_exist_wide:黒いマスがあった列番号を格納
char cells[LIMIT][LIMIT];
scanf("%d %d",&high,&wide);
for(i=0;i<LIMIT;i++){
black_exist_high[i]=0;
}//black_exist_highの初期化
for(j=0;j<LIMIT;j++){
black_exist_wide[j]=0;
}//black_exist_wideの初期化
for(i=0;i<high;i++){
for(j=0;j<wide;j++){
scanf(" %c",&cells[i][j]);
if(cells[i][j]=='#'){
black_exist_high[i]=1;
black_exist_wide[j]=1;
//黒いマスがあったらその行、列に印(1)をつける
}
}
}
for(i=0;i<high;i++){
if(black_exist_high[i]==1){
for(j=0;j<wide;j++){
if(black_exist_wide[j]==1){
printf("%c",cells[i][j]);
//行・列のどちらかに印があった要素だけ出力
}
}
printf("\n");
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133109/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133109/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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" %c\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%high = alloca i32, align 4
%wide = alloca i32, align 4
%black_exist_high = alloca [100 x i32], align 16
%black_exist_wide = alloca [100 x i32], align 16
%cells = alloca [100 x [100 x i8]], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %high) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %wide) #5
call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %black_exist_high) #5
call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %black_exist_wide) #5
call void @llvm.lifetime.start.p0(i64 10000, ptr nonnull %cells) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %high, ptr noundef nonnull %wide)
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) %black_exist_high, i8 0, i64 400, i1 false), !tbaa !5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) %black_exist_wide, i8 0, i64 400, i1 false), !tbaa !5
%0 = load i32, ptr %high, align 4, !tbaa !5
%cmp1096 = icmp sgt i32 %0, 0
br i1 %cmp1096, label %for.cond12.preheader.lr.ph, label %for.end68
for.cond12.preheader.lr.ph: ; preds = %entry
%1 = load i32, ptr %wide, align 4, !tbaa !5
%2 = icmp sgt i32 %1, 0
br i1 %2, label %for.cond12.preheader, label %for.body39.preheader
for.cond12.preheader: ; preds = %for.cond12.preheader.lr.ph, %for.inc33
%3 = phi i32 [ %8, %for.inc33 ], [ %0, %for.cond12.preheader.lr.ph ]
%4 = phi i32 [ %9, %for.inc33 ], [ %1, %for.cond12.preheader.lr.ph ]
%indvars.iv106 = phi i64 [ %indvars.iv.next107, %for.inc33 ], [ 0, %for.cond12.preheader.lr.ph ]
%cmp1394 = icmp sgt i32 %4, 0
br i1 %cmp1394, label %for.body14.lr.ph, label %for.inc33
for.body14.lr.ph: ; preds = %for.cond12.preheader
%arrayidx27 = getelementptr inbounds [100 x i32], ptr %black_exist_high, i64 0, i64 %indvars.iv106
br label %for.body14
for.cond36.preheader: ; preds = %for.inc33
%cmp37100 = icmp sgt i32 %8, 0
br i1 %cmp37100, label %for.body39.preheader, label %for.end68
for.body39.preheader: ; preds = %for.cond12.preheader.lr.ph, %for.cond36.preheader
%.ph = phi i32 [ %0, %for.cond12.preheader.lr.ph ], [ %8, %for.cond36.preheader ]
br label %for.body39
for.body14: ; preds = %for.body14.lr.ph, %for.inc30
%indvars.iv = phi i64 [ 0, %for.body14.lr.ph ], [ %indvars.iv.next, %for.inc30 ]
%arrayidx18 = getelementptr inbounds [100 x [100 x i8]], ptr %cells, i64 0, i64 %indvars.iv106, i64 %indvars.iv
%call19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx18)
%5 = load i8, ptr %arrayidx18, align 1, !tbaa !9
%cmp24 = icmp eq i8 %5, 35
br i1 %cmp24, label %if.then, label %for.inc30
if.then: ; preds = %for.body14
store i32 1, ptr %arrayidx27, align 4, !tbaa !5
%arrayidx29 = getelementptr inbounds [100 x i32], ptr %black_exist_wide, i64 0, i64 %indvars.iv
store i32 1, ptr %arrayidx29, align 4, !tbaa !5
br label %for.inc30
for.inc30: ; preds = %for.body14, %if.then
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%6 = load i32, ptr %wide, align 4, !tbaa !5
%7 = sext i32 %6 to i64
%cmp13 = icmp slt i64 %indvars.iv.next, %7
br i1 %cmp13, label %for.body14, label %for.inc33.loopexit, !llvm.loop !10
for.inc33.loopexit: ; preds = %for.inc30
%.pre = load i32, ptr %high, align 4, !tbaa !5
br label %for.inc33
for.inc33: ; preds = %for.inc33.loopexit, %for.cond12.preheader
%8 = phi i32 [ %.pre, %for.inc33.loopexit ], [ %3, %for.cond12.preheader ]
%9 = phi i32 [ %6, %for.inc33.loopexit ], [ %4, %for.cond12.preheader ]
%indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
%10 = sext i32 %8 to i64
%cmp10 = icmp slt i64 %indvars.iv.next107, %10
br i1 %cmp10, label %for.cond12.preheader, label %for.cond36.preheader, !llvm.loop !12
for.body39: ; preds = %for.body39.preheader, %for.inc66
%11 = phi i32 [ %19, %for.inc66 ], [ %.ph, %for.body39.preheader ]
%indvars.iv112 = phi i64 [ %indvars.iv.next113, %for.inc66 ], [ 0, %for.body39.preheader ]
%arrayidx41 = getelementptr inbounds [100 x i32], ptr %black_exist_high, i64 0, i64 %indvars.iv112
%12 = load i32, ptr %arrayidx41, align 4, !tbaa !5
%cmp42 = icmp eq i32 %12, 1
br i1 %cmp42, label %for.cond45.preheader, label %for.inc66
for.cond45.preheader: ; preds = %for.body39
%13 = load i32, ptr %wide, align 4, !tbaa !5
%cmp4698 = icmp sgt i32 %13, 0
br i1 %cmp4698, label %for.body48, label %for.end63
for.body48: ; preds = %for.cond45.preheader, %for.inc61
%14 = phi i32 [ %17, %for.inc61 ], [ %13, %for.cond45.preheader ]
%indvars.iv109 = phi i64 [ %indvars.iv.next110, %for.inc61 ], [ 0, %for.cond45.preheader ]
%arrayidx50 = getelementptr inbounds [100 x i32], ptr %black_exist_wide, i64 0, i64 %indvars.iv109
%15 = load i32, ptr %arrayidx50, align 4, !tbaa !5
%cmp51 = icmp eq i32 %15, 1
br i1 %cmp51, label %if.then53, label %for.inc61
if.then53: ; preds = %for.body48
%arrayidx57 = getelementptr inbounds [100 x [100 x i8]], ptr %cells, i64 0, i64 %indvars.iv112, i64 %indvars.iv109
%16 = load i8, ptr %arrayidx57, align 1, !tbaa !9
%conv58 = sext i8 %16 to i32
%putchar91 = call i32 @putchar(i32 %conv58)
%.pre115 = load i32, ptr %wide, align 4, !tbaa !5
br label %for.inc61
for.inc61: ; preds = %for.body48, %if.then53
%17 = phi i32 [ %14, %for.body48 ], [ %.pre115, %if.then53 ]
%indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
%18 = sext i32 %17 to i64
%cmp46 = icmp slt i64 %indvars.iv.next110, %18
br i1 %cmp46, label %for.body48, label %for.end63, !llvm.loop !14
for.end63: ; preds = %for.inc61, %for.cond45.preheader
%putchar = call i32 @putchar(i32 10)
%.pre116 = load i32, ptr %high, align 4, !tbaa !5
br label %for.inc66
for.inc66: ; preds = %for.body39, %for.end63
%19 = phi i32 [ %11, %for.body39 ], [ %.pre116, %for.end63 ]
%indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1
%20 = sext i32 %19 to i64
%cmp37 = icmp slt i64 %indvars.iv.next113, %20
br i1 %cmp37, label %for.body39, label %for.end68, !llvm.loop !15
for.end68: ; preds = %for.inc66, %entry, %for.cond36.preheader
call void @llvm.lifetime.end.p0(i64 10000, ptr nonnull %cells) #5
call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %black_exist_wide) #5
call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %black_exist_high) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %wide) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %high) #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 @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, !13}
!13 = !{!"llvm.loop.unswitch.partial.disable"}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
|
/* ex5_3
riverstone*/
#include<stdio.h>
#include <stdbool.h>
#define LIM 100 //行数、列数の上限
int main(void){
int height, width, i, j;
//多次元配列の定義
//rowとcolは各行と各列に1つ以上の黒が存在するかを記録
char block[LIM][LIM];
int row[LIM]={}, col[LIM]={};
//入力の受け取り
scanf("%d %d", &height, &width);
//行列のマス(i,j)を読み取る
//各行と各列に1つ以上の黒が存在するかをrowとcolに記録
for(i = 0; i < height; i++){
for(j = 0; j < width; j++){
scanf(" %c", &block[i][j]);
if(block[i][j] == '#'){
//マス(i,j)が黒のとき,row[i],col[j]を1にする
row[i] = 1;
col[j] = 1;
}
}
}
//rowとcolを見て共に1であるようなマスの場合のみ出力
for(i = 0; i < height; i++){
if(row[i] == 1){
for(j = 0; j < width; j++){
if(col[j] == 1){
//row[i] = tureかつcol[j] = 0のときblock[i][j]を表示
printf("%c", block[i][j]);
}
}
//1行すべて処理が終わると改行する
printf("\n");
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133152/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133152/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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" %c\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%height = alloca i32, align 4
%width = alloca i32, align 4
%block = alloca [100 x [100 x i8]], align 16
%row = alloca [100 x i32], align 16
%col = alloca [100 x i32], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %height) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %width) #5
call void @llvm.lifetime.start.p0(i64 10000, ptr nonnull %block) #5
call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %row) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) %row, i8 0, i64 400, i1 false)
call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %col) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) %col, i8 0, i64 400, i1 false)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %height, ptr noundef nonnull %width)
%0 = load i32, ptr %height, align 4, !tbaa !5
%cmp72 = icmp sgt i32 %0, 0
br i1 %cmp72, label %for.cond1.preheader.lr.ph, label %for.end52
for.cond1.preheader.lr.ph: ; preds = %entry
%1 = load i32, ptr %width, align 4, !tbaa !5
%2 = icmp sgt i32 %1, 0
br i1 %2, label %for.cond1.preheader, label %for.body23.preheader
for.cond1.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.inc17
%3 = phi i32 [ %8, %for.inc17 ], [ %0, %for.cond1.preheader.lr.ph ]
%4 = phi i32 [ %9, %for.inc17 ], [ %1, %for.cond1.preheader.lr.ph ]
%indvars.iv80 = phi i64 [ %indvars.iv.next81, %for.inc17 ], [ 0, %for.cond1.preheader.lr.ph ]
%cmp270 = icmp sgt i32 %4, 0
br i1 %cmp270, label %for.body3.lr.ph, label %for.inc17
for.body3.lr.ph: ; preds = %for.cond1.preheader
%arrayidx14 = getelementptr inbounds [100 x i32], ptr %row, i64 0, i64 %indvars.iv80
br label %for.body3
for.cond20.preheader: ; preds = %for.inc17
%cmp2176 = icmp sgt i32 %8, 0
br i1 %cmp2176, label %for.body23.preheader, label %for.end52
for.body23.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.cond20.preheader
%.ph = phi i32 [ %0, %for.cond1.preheader.lr.ph ], [ %8, %for.cond20.preheader ]
br label %for.body23
for.body3: ; preds = %for.body3.lr.ph, %for.inc
%indvars.iv = phi i64 [ 0, %for.body3.lr.ph ], [ %indvars.iv.next, %for.inc ]
%arrayidx5 = getelementptr inbounds [100 x [100 x i8]], ptr %block, i64 0, i64 %indvars.iv80, i64 %indvars.iv
%call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx5)
%5 = load i8, ptr %arrayidx5, align 1, !tbaa !9
%cmp11 = icmp eq i8 %5, 35
br i1 %cmp11, label %if.then, label %for.inc
if.then: ; preds = %for.body3
store i32 1, ptr %arrayidx14, align 4, !tbaa !5
%arrayidx16 = getelementptr inbounds [100 x i32], ptr %col, i64 0, i64 %indvars.iv
store i32 1, ptr %arrayidx16, align 4, !tbaa !5
br label %for.inc
for.inc: ; preds = %for.body3, %if.then
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%6 = load i32, ptr %width, align 4, !tbaa !5
%7 = sext i32 %6 to i64
%cmp2 = icmp slt i64 %indvars.iv.next, %7
br i1 %cmp2, label %for.body3, label %for.inc17.loopexit, !llvm.loop !10
for.inc17.loopexit: ; preds = %for.inc
%.pre = load i32, ptr %height, align 4, !tbaa !5
br label %for.inc17
for.inc17: ; preds = %for.inc17.loopexit, %for.cond1.preheader
%8 = phi i32 [ %.pre, %for.inc17.loopexit ], [ %3, %for.cond1.preheader ]
%9 = phi i32 [ %6, %for.inc17.loopexit ], [ %4, %for.cond1.preheader ]
%indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
%10 = sext i32 %8 to i64
%cmp = icmp slt i64 %indvars.iv.next81, %10
br i1 %cmp, label %for.cond1.preheader, label %for.cond20.preheader, !llvm.loop !12
for.body23: ; preds = %for.body23.preheader, %for.inc50
%11 = phi i32 [ %19, %for.inc50 ], [ %.ph, %for.body23.preheader ]
%indvars.iv86 = phi i64 [ %indvars.iv.next87, %for.inc50 ], [ 0, %for.body23.preheader ]
%arrayidx25 = getelementptr inbounds [100 x i32], ptr %row, i64 0, i64 %indvars.iv86
%12 = load i32, ptr %arrayidx25, align 4, !tbaa !5
%cmp26 = icmp eq i32 %12, 1
br i1 %cmp26, label %for.cond29.preheader, label %for.inc50
for.cond29.preheader: ; preds = %for.body23
%13 = load i32, ptr %width, align 4, !tbaa !5
%cmp3074 = icmp sgt i32 %13, 0
br i1 %cmp3074, label %for.body32, label %for.end47
for.body32: ; preds = %for.cond29.preheader, %for.inc45
%14 = phi i32 [ %17, %for.inc45 ], [ %13, %for.cond29.preheader ]
%indvars.iv83 = phi i64 [ %indvars.iv.next84, %for.inc45 ], [ 0, %for.cond29.preheader ]
%arrayidx34 = getelementptr inbounds [100 x i32], ptr %col, i64 0, i64 %indvars.iv83
%15 = load i32, ptr %arrayidx34, align 4, !tbaa !5
%cmp35 = icmp eq i32 %15, 1
br i1 %cmp35, label %if.then37, label %for.inc45
if.then37: ; preds = %for.body32
%arrayidx41 = getelementptr inbounds [100 x [100 x i8]], ptr %block, i64 0, i64 %indvars.iv86, i64 %indvars.iv83
%16 = load i8, ptr %arrayidx41, align 1, !tbaa !9
%conv42 = sext i8 %16 to i32
%putchar69 = call i32 @putchar(i32 %conv42)
%.pre89 = load i32, ptr %width, align 4, !tbaa !5
br label %for.inc45
for.inc45: ; preds = %for.body32, %if.then37
%17 = phi i32 [ %14, %for.body32 ], [ %.pre89, %if.then37 ]
%indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
%18 = sext i32 %17 to i64
%cmp30 = icmp slt i64 %indvars.iv.next84, %18
br i1 %cmp30, label %for.body32, label %for.end47, !llvm.loop !14
for.end47: ; preds = %for.inc45, %for.cond29.preheader
%putchar = call i32 @putchar(i32 10)
%.pre90 = load i32, ptr %height, align 4, !tbaa !5
br label %for.inc50
for.inc50: ; preds = %for.body23, %for.end47
%19 = phi i32 [ %11, %for.body23 ], [ %.pre90, %for.end47 ]
%indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
%20 = sext i32 %19 to i64
%cmp21 = icmp slt i64 %indvars.iv.next87, %20
br i1 %cmp21, label %for.body23, label %for.end52, !llvm.loop !15
for.end52: ; preds = %for.inc50, %entry, %for.cond20.preheader
call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %col) #5
call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %row) #5
call void @llvm.lifetime.end.p0(i64 10000, ptr nonnull %block) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %width) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %height) #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: 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, !13}
!13 = !{!"llvm.loop.unswitch.partial.disable"}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
|
/* ex5_3
shu_t */
#include<stdio.h>
//1<=H,W<=100
#define SIZE 100
int main(void){
char square[SIZE][SIZE];//for input
char sub_square[SIZE][SIZE];//for judge black or white
int i,j;//roop variable
int new_line;//checking whether start a new line
int row,column;
//input row and column
scanf("%d %d",&row,&column);
for(i=0;i<row;i++){
for(j=0;j<column;j++){
//input square in array of square
scanf(" %c",&square[i][j]);
//formatting sub_square with 'b'
sub_square[i][j]='b';
}
}
//check the row consisted of only '.'
for(j=0;j<column;j++){
for(i=0;i<row;i++){
if(square[i][j]=='#'){//contain '#'
break;
}else if(i==row-1){//don't contain '#'
for(i=0;i<row;i++){
sub_square[i][j]='w';
}
}
}
}
//check the column consisted of only '.'
for(i=0;i<row;i++){
for(j=0;j<column;j++){
if(square[i][j]=='#'){//contain '#'
break;
}else if(j==column-1){//don't contain '#'
for(j=0;j<column;j++){
sub_square[i][j]='w';
}
}
}
}
//output the answer
for(i=0;i<row;i++){
for(j=0;j<column;j++){
if(sub_square[i][j]=='b'){
printf("%c",square[i][j]);
new_line = 1;//check whether start a new line
}
}
if(new_line == 1){//if c==0, keep
printf("\n");
new_line = 0;//formatting
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133196/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133196/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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" %c\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%square = alloca [100 x [100 x i8]], align 16
%sub_square = alloca [100 x [100 x i8]], align 16
%row = alloca i32, align 4
%column = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 10000, ptr nonnull %square) #5
call void @llvm.lifetime.start.p0(i64 10000, ptr nonnull %sub_square) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %row) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %column) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %row, ptr noundef nonnull %column)
%0 = load i32, ptr %row, align 4, !tbaa !5
%cmp162 = icmp sgt i32 %0, 0
%.pre216 = load i32, ptr %column, align 4, !tbaa !5
br i1 %cmp162, label %for.cond1.preheader.lr.ph, label %for.cond14.preheader
for.cond1.preheader.lr.ph: ; preds = %entry
%1 = icmp sgt i32 %.pre216, 0
br i1 %1, label %for.cond1.preheader, label %for.cond91.preheader.preheader
for.cond91.preheader.preheader: ; preds = %for.inc84.us, %for.cond51.preheader.lr.ph, %for.cond1.preheader.lr.ph
br label %for.cond91.preheader
for.cond1.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.inc11
%2 = phi i32 [ %10, %for.inc11 ], [ %0, %for.cond1.preheader.lr.ph ]
%3 = phi i32 [ %11, %for.inc11 ], [ %.pre216, %for.cond1.preheader.lr.ph ]
%indvars.iv191 = phi i64 [ %indvars.iv.next192, %for.inc11 ], [ 0, %for.cond1.preheader.lr.ph ]
%cmp2160 = icmp sgt i32 %3, 0
br i1 %cmp2160, label %for.body3, label %for.inc11
for.cond14.preheader: ; preds = %for.inc11, %entry
%4 = phi i32 [ %.pre216, %entry ], [ %11, %for.inc11 ]
%5 = phi i32 [ %0, %entry ], [ %10, %for.inc11 ]
%cmp15169 = icmp sgt i32 %4, 0
br i1 %cmp15169, label %for.cond17.preheader.lr.ph, label %for.cond47.preheader
for.cond17.preheader.lr.ph: ; preds = %for.cond14.preheader
%cmp18167 = icmp sgt i32 %5, 0
%sub = add nsw i32 %5, -1
br i1 %cmp18167, label %for.cond17.preheader.us.preheader, label %for.end120
for.cond17.preheader.us.preheader: ; preds = %for.cond17.preheader.lr.ph
%wide.trip.count200 = zext i32 %4 to i64
%wide.trip.count = zext i32 %5 to i64
%xtraiter = and i64 %wide.trip.count, 3
%6 = icmp ult i32 %5, 4
%unroll_iter = and i64 %wide.trip.count, 4294967292
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br label %for.cond17.preheader.us
for.cond17.preheader.us: ; preds = %for.cond17.preheader.us.preheader, %for.inc44.us
%indvars.iv197 = phi i64 [ 0, %for.cond17.preheader.us.preheader ], [ %indvars.iv.next198, %for.inc44.us ]
br label %for.body19.us.us
for.inc44.us: ; preds = %for.inc41.us.us, %for.body19.us.us
%indvars.iv.next198 = add nuw nsw i64 %indvars.iv197, 1
%exitcond201.not = icmp eq i64 %indvars.iv.next198, %wide.trip.count200
br i1 %exitcond201.not, label %for.cond47.preheader, label %for.cond17.preheader.us, !llvm.loop !9
for.body19.us.us: ; preds = %for.inc41.us.us, %for.cond17.preheader.us
%i.1168.us.us = phi i32 [ 0, %for.cond17.preheader.us ], [ %inc42.us.us, %for.inc41.us.us ]
%idxprom20.us.us = sext i32 %i.1168.us.us to i64
%arrayidx23.us.us = getelementptr inbounds [100 x [100 x i8]], ptr %square, i64 0, i64 %idxprom20.us.us, i64 %indvars.iv197
%7 = load i8, ptr %arrayidx23.us.us, align 1, !tbaa !11
%cmp24.us.us = icmp eq i8 %7, 35
br i1 %cmp24.us.us, label %for.inc44.us, label %if.else.us.us
if.else.us.us: ; preds = %for.body19.us.us
%cmp26.us.us = icmp eq i32 %i.1168.us.us, %sub
br i1 %cmp26.us.us, label %for.body32.us.us.preheader, label %for.inc41.us.us
for.body32.us.us.preheader: ; preds = %if.else.us.us
br i1 %6, label %for.inc41.us.us.loopexit.unr-lcssa, label %for.body32.us.us
for.inc41.us.us.loopexit.unr-lcssa: ; preds = %for.body32.us.us, %for.body32.us.us.preheader
%indvars.iv194.unr = phi i64 [ 0, %for.body32.us.us.preheader ], [ %indvars.iv.next195.3, %for.body32.us.us ]
br i1 %lcmp.mod.not, label %for.inc41.us.us, label %for.body32.us.us.epil
for.body32.us.us.epil: ; preds = %for.inc41.us.us.loopexit.unr-lcssa, %for.body32.us.us.epil
%indvars.iv194.epil = phi i64 [ %indvars.iv.next195.epil, %for.body32.us.us.epil ], [ %indvars.iv194.unr, %for.inc41.us.us.loopexit.unr-lcssa ]
%epil.iter = phi i64 [ %epil.iter.next, %for.body32.us.us.epil ], [ 0, %for.inc41.us.us.loopexit.unr-lcssa ]
%arrayidx36.us.us.epil = getelementptr inbounds [100 x [100 x i8]], ptr %sub_square, i64 0, i64 %indvars.iv194.epil, i64 %indvars.iv197
store i8 119, ptr %arrayidx36.us.us.epil, align 1, !tbaa !11
%indvars.iv.next195.epil = add nuw nsw i64 %indvars.iv194.epil, 1
%epil.iter.next = add i64 %epil.iter, 1
%epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
br i1 %epil.iter.cmp.not, label %for.inc41.us.us, label %for.body32.us.us.epil, !llvm.loop !12
for.inc41.us.us: ; preds = %for.inc41.us.us.loopexit.unr-lcssa, %for.body32.us.us.epil, %if.else.us.us
%i.3.us.us = phi i32 [ %i.1168.us.us, %if.else.us.us ], [ %5, %for.body32.us.us.epil ], [ %5, %for.inc41.us.us.loopexit.unr-lcssa ]
%inc42.us.us = add nsw i32 %i.3.us.us, 1
%cmp18.us.us = icmp slt i32 %inc42.us.us, %5
br i1 %cmp18.us.us, label %for.body19.us.us, label %for.inc44.us, !llvm.loop !14
for.body32.us.us: ; preds = %for.body32.us.us.preheader, %for.body32.us.us
%indvars.iv194 = phi i64 [ %indvars.iv.next195.3, %for.body32.us.us ], [ 0, %for.body32.us.us.preheader ]
%niter = phi i64 [ %niter.next.3, %for.body32.us.us ], [ 0, %for.body32.us.us.preheader ]
%arrayidx36.us.us = getelementptr inbounds [100 x [100 x i8]], ptr %sub_square, i64 0, i64 %indvars.iv194, i64 %indvars.iv197
store i8 119, ptr %arrayidx36.us.us, align 1, !tbaa !11
%indvars.iv.next195 = or i64 %indvars.iv194, 1
%arrayidx36.us.us.1 = getelementptr inbounds [100 x [100 x i8]], ptr %sub_square, i64 0, i64 %indvars.iv.next195, i64 %indvars.iv197
store i8 119, ptr %arrayidx36.us.us.1, align 1, !tbaa !11
%indvars.iv.next195.1 = or i64 %indvars.iv194, 2
%arrayidx36.us.us.2 = getelementptr inbounds [100 x [100 x i8]], ptr %sub_square, i64 0, i64 %indvars.iv.next195.1, i64 %indvars.iv197
store i8 119, ptr %arrayidx36.us.us.2, align 1, !tbaa !11
%indvars.iv.next195.2 = or i64 %indvars.iv194, 3
%arrayidx36.us.us.3 = getelementptr inbounds [100 x [100 x i8]], ptr %sub_square, i64 0, i64 %indvars.iv.next195.2, i64 %indvars.iv197
store i8 119, ptr %arrayidx36.us.us.3, align 1, !tbaa !11
%indvars.iv.next195.3 = add nuw nsw i64 %indvars.iv194, 4
%niter.next.3 = add i64 %niter, 4
%niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
br i1 %niter.ncmp.3, label %for.inc41.us.us.loopexit.unr-lcssa, label %for.body32.us.us, !llvm.loop !15
for.body3: ; preds = %for.cond1.preheader, %for.body3
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ 0, %for.cond1.preheader ]
%arrayidx5 = getelementptr inbounds [100 x [100 x i8]], ptr %square, i64 0, i64 %indvars.iv191, i64 %indvars.iv
%call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx5)
%arrayidx10 = getelementptr inbounds [100 x [100 x i8]], ptr %sub_square, i64 0, i64 %indvars.iv191, i64 %indvars.iv
store i8 98, ptr %arrayidx10, align 1, !tbaa !11
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%8 = load i32, ptr %column, align 4, !tbaa !5
%9 = sext i32 %8 to i64
%cmp2 = icmp slt i64 %indvars.iv.next, %9
br i1 %cmp2, label %for.body3, label %for.inc11.loopexit, !llvm.loop !16
for.inc11.loopexit: ; preds = %for.body3
%.pre = load i32, ptr %row, align 4, !tbaa !5
br label %for.inc11
for.inc11: ; preds = %for.inc11.loopexit, %for.cond1.preheader
%10 = phi i32 [ %.pre, %for.inc11.loopexit ], [ %2, %for.cond1.preheader ]
%11 = phi i32 [ %8, %for.inc11.loopexit ], [ %3, %for.cond1.preheader ]
%indvars.iv.next192 = add nuw nsw i64 %indvars.iv191, 1
%12 = sext i32 %10 to i64
%cmp = icmp slt i64 %indvars.iv.next192, %12
br i1 %cmp, label %for.cond1.preheader, label %for.cond14.preheader, !llvm.loop !17
for.cond47.preheader: ; preds = %for.inc44.us, %for.cond14.preheader
%cmp15169219 = phi i1 [ false, %for.cond14.preheader ], [ %cmp15169, %for.inc44.us ]
%cmp48178 = icmp sgt i32 %5, 0
br i1 %cmp48178, label %for.cond51.preheader.lr.ph, label %for.end120
for.cond51.preheader.lr.ph: ; preds = %for.cond47.preheader
%sub64 = add i32 %4, -1
br i1 %cmp15169219, label %for.cond51.preheader.us.preheader, label %for.cond91.preheader.preheader
for.cond51.preheader.us.preheader: ; preds = %for.cond51.preheader.lr.ph
%13 = zext i32 %4 to i64
%wide.trip.count208 = zext i32 %5 to i64
br label %for.cond51.preheader.us
for.cond51.preheader.us: ; preds = %for.cond51.preheader.us.preheader, %for.inc84.us
%indvar = phi i64 [ 0, %for.cond51.preheader.us.preheader ], [ %indvar.next, %for.inc84.us ]
%14 = mul nuw nsw i64 %indvar, 100
%scevgep = getelementptr i8, ptr %sub_square, i64 %14
br label %for.body54.us.us
for.inc84.us: ; preds = %for.inc81.us.us, %for.body54.us.us
%indvar.next = add nuw nsw i64 %indvar, 1
%exitcond209.not = icmp eq i64 %indvar.next, %wide.trip.count208
br i1 %exitcond209.not, label %for.cond91.preheader.preheader, label %for.cond51.preheader.us, !llvm.loop !19
for.body54.us.us: ; preds = %for.inc81.us.us, %for.cond51.preheader.us
%j.2177.us.us = phi i32 [ 0, %for.cond51.preheader.us ], [ %inc82.us.us, %for.inc81.us.us ]
%idxprom57.us.us = sext i32 %j.2177.us.us to i64
%arrayidx58.us.us = getelementptr inbounds [100 x [100 x i8]], ptr %square, i64 0, i64 %indvar, i64 %idxprom57.us.us
%15 = load i8, ptr %arrayidx58.us.us, align 1, !tbaa !11
%cmp60.us.us = icmp eq i8 %15, 35
br i1 %cmp60.us.us, label %for.inc84.us, label %if.else63.us.us
if.else63.us.us: ; preds = %for.body54.us.us
%cmp65.us.us = icmp eq i32 %j.2177.us.us, %sub64
br i1 %cmp65.us.us, label %for.body71.us.us.preheader, label %for.inc81.us.us
for.body71.us.us.preheader: ; preds = %if.else63.us.us
call void @llvm.memset.p0.i64(ptr align 4 %scevgep, i8 119, i64 %13, i1 false), !tbaa !11
br label %for.inc81.us.us
for.inc81.us.us: ; preds = %for.body71.us.us.preheader, %if.else63.us.us
%j.4.us.us = phi i32 [ %j.2177.us.us, %if.else63.us.us ], [ %4, %for.body71.us.us.preheader ]
%inc82.us.us = add nsw i32 %j.4.us.us, 1
%cmp52.us.us = icmp slt i32 %inc82.us.us, %4
br i1 %cmp52.us.us, label %for.body54.us.us, label %for.inc84.us, !llvm.loop !20
for.cond91.preheader: ; preds = %for.cond91.preheader.preheader, %for.inc118
%indvars.iv213 = phi i64 [ %indvars.iv.next214, %for.inc118 ], [ 0, %for.cond91.preheader.preheader ]
%new_line.0186 = phi i32 [ %new_line.3, %for.inc118 ], [ undef, %for.cond91.preheader.preheader ]
%16 = load i32, ptr %column, align 4, !tbaa !5
%cmp92180 = icmp sgt i32 %16, 0
br i1 %cmp92180, label %for.body94, label %for.inc118
for.body94: ; preds = %for.cond91.preheader, %for.inc110
%17 = phi i32 [ %20, %for.inc110 ], [ %16, %for.cond91.preheader ]
%indvars.iv210 = phi i64 [ %indvars.iv.next211, %for.inc110 ], [ 0, %for.cond91.preheader ]
%new_line.1182 = phi i32 [ %new_line.2, %for.inc110 ], [ %new_line.0186, %for.cond91.preheader ]
%arrayidx98 = getelementptr inbounds [100 x [100 x i8]], ptr %sub_square, i64 0, i64 %indvars.iv213, i64 %indvars.iv210
%18 = load i8, ptr %arrayidx98, align 1, !tbaa !11
%cmp100 = icmp eq i8 %18, 98
br i1 %cmp100, label %if.then102, label %for.inc110
if.then102: ; preds = %for.body94
%arrayidx106 = getelementptr inbounds [100 x [100 x i8]], ptr %square, i64 0, i64 %indvars.iv213, i64 %indvars.iv210
%19 = load i8, ptr %arrayidx106, align 1, !tbaa !11
%conv107 = sext i8 %19 to i32
%putchar158 = call i32 @putchar(i32 %conv107)
%.pre217 = load i32, ptr %column, align 4, !tbaa !5
br label %for.inc110
for.inc110: ; preds = %for.body94, %if.then102
%20 = phi i32 [ %.pre217, %if.then102 ], [ %17, %for.body94 ]
%new_line.2 = phi i32 [ 1, %if.then102 ], [ %new_line.1182, %for.body94 ]
%indvars.iv.next211 = add nuw nsw i64 %indvars.iv210, 1
%21 = sext i32 %20 to i64
%cmp92 = icmp slt i64 %indvars.iv.next211, %21
br i1 %cmp92, label %for.body94, label %for.end112, !llvm.loop !21
for.end112: ; preds = %for.inc110
%cmp113 = icmp eq i32 %new_line.2, 1
br i1 %cmp113, label %if.then115, label %for.inc118
if.then115: ; preds = %for.end112
%putchar = call i32 @putchar(i32 10)
br label %for.inc118
for.inc118: ; preds = %for.cond91.preheader, %for.end112, %if.then115
%new_line.3 = phi i32 [ 0, %if.then115 ], [ %new_line.2, %for.end112 ], [ %new_line.0186, %for.cond91.preheader ]
%indvars.iv.next214 = add nuw nsw i64 %indvars.iv213, 1
%22 = load i32, ptr %row, align 4, !tbaa !5
%23 = sext i32 %22 to i64
%cmp88 = icmp slt i64 %indvars.iv.next214, %23
br i1 %cmp88, label %for.cond91.preheader, label %for.end120, !llvm.loop !22
for.end120: ; preds = %for.inc118, %for.cond17.preheader.lr.ph, %for.cond47.preheader
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %column) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %row) #5
call void @llvm.lifetime.end.p0(i64 10000, ptr nonnull %sub_square) #5
call void @llvm.lifetime.end.p0(i64 10000, ptr nonnull %square) #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 @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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.unroll.disable"}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10, !18}
!18 = !{!"llvm.loop.unswitch.partial.disable"}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
|
//b.c B-Grid Compression
#include<stdio.h>
#include<stdbool.h>
typedef struct{
bool flag;
char buf[101];
int check[101];
}grid;
int main(void){
int h,w;
scanf("%d %d",&h,&w);
grid at[h];
for(int i=0;i<h;++i){
scanf("%s",at[i].buf);
}
for(int i=0;i<h;++i){
bool flag = false;
for(int j=0;j<w;++j){
if(at[i].buf[j]=='#'){
at[i].check[j] = 1;
flag = true;
}else{
at[i].check[j] = 0;
}
}
at[i].flag = flag;
}
bool hu[w];
for(int i=0;i<w;++i){
bool flag = false;
for(int j=0;j<h;++j){
if(at[j].check[i]==1){
flag = true;
}
}
hu[i] = flag;
}
for(int i=0;i<h;++i){
for(int j=0;j<w;++j){
if(at[i].flag == true && hu[j]==true){
printf("%c",at[i].buf[j]);
}
}
putchar('\n');
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133239/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133239/source.c"
target datalayout = "e-m:e-p270: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.grid = type { i8, [101 x i8], [101 x i32] }
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1
@stdout = external local_unnamed_addr global ptr, align 8
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%h = alloca i32, align 4
%w = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%0 = load i32, ptr %h, align 4, !tbaa !5
%1 = zext i32 %0 to i64
%2 = call ptr @llvm.stacksave.p0()
%vla = alloca %struct.grid, i64 %1, align 16
%3 = load i32, ptr %h, align 4, !tbaa !5
%cmp133 = icmp sgt i32 %3, 0
br i1 %cmp133, label %for.body, label %for.cond.cleanup5.thread
for.cond3.preheader: ; preds = %for.body
%cmp4139 = icmp sgt i32 %14, 0
%.pre = load i32, ptr %w, align 4, !tbaa !5
br i1 %cmp4139, label %for.cond7.preheader.lr.ph, label %for.cond.cleanup5
for.cond7.preheader.lr.ph: ; preds = %for.cond3.preheader
%cmp8135 = icmp sgt i32 %.pre, 0
%wide.trip.count166 = zext i32 %14 to i64
br i1 %cmp8135, label %for.cond7.preheader.us.preheader, label %for.cond7.preheader.preheader
for.cond7.preheader.preheader: ; preds = %for.cond7.preheader.lr.ph
%xtraiter = and i64 %wide.trip.count166, 3
%4 = icmp ult i32 %14, 4
br i1 %4, label %for.cond.cleanup5.loopexit214.unr-lcssa, label %for.cond7.preheader.preheader.new
for.cond7.preheader.preheader.new: ; preds = %for.cond7.preheader.preheader
%unroll_iter = and i64 %wide.trip.count166, 4294967292
br label %for.cond7.preheader
for.cond7.preheader.us.preheader: ; preds = %for.cond7.preheader.lr.ph
%wide.trip.count161 = zext i32 %.pre to i64
%xtraiter216 = and i64 %wide.trip.count161, 1
%5 = icmp eq i32 %.pre, 1
%unroll_iter220 = and i64 %wide.trip.count161, 4294967294
%lcmp.mod218.not = icmp eq i64 %xtraiter216, 0
br label %for.cond7.preheader.us
for.cond7.preheader.us: ; preds = %for.cond7.preheader.us.preheader, %for.cond7.for.cond.cleanup9_crit_edge.us
%indvars.iv163 = phi i64 [ 0, %for.cond7.preheader.us.preheader ], [ %indvars.iv.next164, %for.cond7.for.cond.cleanup9_crit_edge.us ]
br i1 %5, label %for.cond7.for.cond.cleanup9_crit_edge.us.unr-lcssa, label %for.body10.us
for.body10.us: ; preds = %for.cond7.preheader.us, %for.body10.us
%indvars.iv159 = phi i64 [ %indvars.iv.next160.1, %for.body10.us ], [ 0, %for.cond7.preheader.us ]
%flag.0136.us = phi i8 [ %spec.select206.1, %for.body10.us ], [ 0, %for.cond7.preheader.us ]
%niter221 = phi i64 [ %niter221.next.1, %for.body10.us ], [ 0, %for.cond7.preheader.us ]
%arrayidx15.us = getelementptr inbounds %struct.grid, ptr %vla, i64 %indvars.iv163, i32 1, i64 %indvars.iv159
%6 = load i8, ptr %arrayidx15.us, align 1, !tbaa !9
%cmp16.us = icmp eq i8 %6, 35
%spec.select = zext i1 %cmp16.us to i32
%7 = getelementptr inbounds %struct.grid, ptr %vla, i64 %indvars.iv163, i32 2, i64 %indvars.iv159
store i32 %spec.select, ptr %7, align 4
%indvars.iv.next160 = or i64 %indvars.iv159, 1
%arrayidx15.us.1 = getelementptr inbounds %struct.grid, ptr %vla, i64 %indvars.iv163, i32 1, i64 %indvars.iv.next160
%8 = load i8, ptr %arrayidx15.us.1, align 2, !tbaa !9
%cmp16.us.1 = icmp eq i8 %8, 35
%spec.select.1 = zext i1 %cmp16.us.1 to i32
%9 = select i1 %cmp16.us.1, i1 true, i1 %cmp16.us
%spec.select206.1 = select i1 %9, i8 1, i8 %flag.0136.us
%10 = getelementptr inbounds %struct.grid, ptr %vla, i64 %indvars.iv163, i32 2, i64 %indvars.iv.next160
store i32 %spec.select.1, ptr %10, align 4
%indvars.iv.next160.1 = add nuw nsw i64 %indvars.iv159, 2
%niter221.next.1 = add i64 %niter221, 2
%niter221.ncmp.1 = icmp eq i64 %niter221.next.1, %unroll_iter220
br i1 %niter221.ncmp.1, label %for.cond7.for.cond.cleanup9_crit_edge.us.unr-lcssa, label %for.body10.us, !llvm.loop !10
for.cond7.for.cond.cleanup9_crit_edge.us.unr-lcssa: ; preds = %for.body10.us, %for.cond7.preheader.us
%spec.select206.lcssa.ph = phi i8 [ undef, %for.cond7.preheader.us ], [ %spec.select206.1, %for.body10.us ]
%indvars.iv159.unr = phi i64 [ 0, %for.cond7.preheader.us ], [ %indvars.iv.next160.1, %for.body10.us ]
%flag.0136.us.unr = phi i8 [ 0, %for.cond7.preheader.us ], [ %spec.select206.1, %for.body10.us ]
br i1 %lcmp.mod218.not, label %for.cond7.for.cond.cleanup9_crit_edge.us, label %for.body10.us.epil
for.body10.us.epil: ; preds = %for.cond7.for.cond.cleanup9_crit_edge.us.unr-lcssa
%arrayidx15.us.epil = getelementptr inbounds %struct.grid, ptr %vla, i64 %indvars.iv163, i32 1, i64 %indvars.iv159.unr
%11 = load i8, ptr %arrayidx15.us.epil, align 1, !tbaa !9
%cmp16.us.epil = icmp eq i8 %11, 35
%spec.select.epil = zext i1 %cmp16.us.epil to i32
%spec.select206.epil = select i1 %cmp16.us.epil, i8 1, i8 %flag.0136.us.unr
%12 = getelementptr inbounds %struct.grid, ptr %vla, i64 %indvars.iv163, i32 2, i64 %indvars.iv159.unr
store i32 %spec.select.epil, ptr %12, align 4
br label %for.cond7.for.cond.cleanup9_crit_edge.us
for.cond7.for.cond.cleanup9_crit_edge.us: ; preds = %for.cond7.for.cond.cleanup9_crit_edge.us.unr-lcssa, %for.body10.us.epil
%spec.select206.lcssa = phi i8 [ %spec.select206.lcssa.ph, %for.cond7.for.cond.cleanup9_crit_edge.us.unr-lcssa ], [ %spec.select206.epil, %for.body10.us.epil ]
%13 = and i8 %spec.select206.lcssa, 1
%arrayidx31.us = getelementptr inbounds %struct.grid, ptr %vla, i64 %indvars.iv163
store i8 %13, ptr %arrayidx31.us, align 4, !tbaa !12
%indvars.iv.next164 = add nuw nsw i64 %indvars.iv163, 1
%exitcond167.not = icmp eq i64 %indvars.iv.next164, %wide.trip.count166
br i1 %exitcond167.not, label %for.cond.cleanup5, label %for.cond7.preheader.us, !llvm.loop !15
for.body: ; preds = %entry, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
%buf = getelementptr inbounds %struct.grid, ptr %vla, i64 %indvars.iv, i32 1
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %buf)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%14 = load i32, ptr %h, align 4, !tbaa !5
%15 = sext i32 %14 to i64
%cmp = icmp slt i64 %indvars.iv.next, %15
br i1 %cmp, label %for.body, label %for.cond3.preheader, !llvm.loop !16
for.cond7.preheader: ; preds = %for.cond7.preheader, %for.cond7.preheader.preheader.new
%indvars.iv156 = phi i64 [ 0, %for.cond7.preheader.preheader.new ], [ %indvars.iv.next157.3, %for.cond7.preheader ]
%niter = phi i64 [ 0, %for.cond7.preheader.preheader.new ], [ %niter.next.3, %for.cond7.preheader ]
%arrayidx31 = getelementptr inbounds %struct.grid, ptr %vla, i64 %indvars.iv156
store i8 0, ptr %arrayidx31, align 16, !tbaa !12
%indvars.iv.next157 = or i64 %indvars.iv156, 1
%arrayidx31.1 = getelementptr inbounds %struct.grid, ptr %vla, i64 %indvars.iv.next157
store i8 0, ptr %arrayidx31.1, align 4, !tbaa !12
%indvars.iv.next157.1 = or i64 %indvars.iv156, 2
%arrayidx31.2 = getelementptr inbounds %struct.grid, ptr %vla, i64 %indvars.iv.next157.1
store i8 0, ptr %arrayidx31.2, align 8, !tbaa !12
%indvars.iv.next157.2 = or i64 %indvars.iv156, 3
%arrayidx31.3 = getelementptr inbounds %struct.grid, ptr %vla, i64 %indvars.iv.next157.2
store i8 0, ptr %arrayidx31.3, align 4, !tbaa !12
%indvars.iv.next157.3 = add nuw nsw i64 %indvars.iv156, 4
%niter.next.3 = add i64 %niter, 4
%niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
br i1 %niter.ncmp.3, label %for.cond.cleanup5.loopexit214.unr-lcssa, label %for.cond7.preheader, !llvm.loop !15
for.cond.cleanup5.loopexit214.unr-lcssa: ; preds = %for.cond7.preheader, %for.cond7.preheader.preheader
%indvars.iv156.unr = phi i64 [ 0, %for.cond7.preheader.preheader ], [ %indvars.iv.next157.3, %for.cond7.preheader ]
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.cond.cleanup5, label %for.cond7.preheader.epil
for.cond7.preheader.epil: ; preds = %for.cond.cleanup5.loopexit214.unr-lcssa, %for.cond7.preheader.epil
%indvars.iv156.epil = phi i64 [ %indvars.iv.next157.epil, %for.cond7.preheader.epil ], [ %indvars.iv156.unr, %for.cond.cleanup5.loopexit214.unr-lcssa ]
%epil.iter = phi i64 [ %epil.iter.next, %for.cond7.preheader.epil ], [ 0, %for.cond.cleanup5.loopexit214.unr-lcssa ]
%arrayidx31.epil = getelementptr inbounds %struct.grid, ptr %vla, i64 %indvars.iv156.epil
store i8 0, ptr %arrayidx31.epil, align 4, !tbaa !12
%indvars.iv.next157.epil = add nuw nsw i64 %indvars.iv156.epil, 1
%epil.iter.next = add i64 %epil.iter, 1
%epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
br i1 %epil.iter.cmp.not, label %for.cond.cleanup5, label %for.cond7.preheader.epil, !llvm.loop !17
for.cond.cleanup5: ; preds = %for.cond.cleanup5.loopexit214.unr-lcssa, %for.cond7.preheader.epil, %for.cond7.for.cond.cleanup9_crit_edge.us, %for.cond3.preheader
%16 = zext i32 %.pre to i64
%vla36 = alloca i8, i64 %16, align 16
%cmp39145 = icmp sgt i32 %.pre, 0
br i1 %cmp39145, label %for.cond45.preheader.lr.ph, label %for.cond70.preheader
for.cond.cleanup5.thread: ; preds = %entry
%.pre188 = load i32, ptr %w, align 4, !tbaa !5
%17 = zext i32 %.pre188 to i64
%vla36193 = alloca i8, i64 %17, align 16
%cmp39145194 = icmp sgt i32 %.pre188, 0
br i1 %cmp39145194, label %for.cond45.preheader.preheader, label %for.cond.cleanup73
for.cond45.preheader.lr.ph: ; preds = %for.cond.cleanup5
br i1 %cmp4139, label %for.cond45.preheader.us.preheader, label %for.cond45.preheader.preheader
for.cond45.preheader.preheader: ; preds = %for.cond.cleanup5.thread, %for.cond45.preheader.lr.ph
%18 = phi i64 [ %16, %for.cond45.preheader.lr.ph ], [ %17, %for.cond.cleanup5.thread ]
%vla36198201 = phi ptr [ %vla36, %for.cond45.preheader.lr.ph ], [ %vla36193, %for.cond.cleanup5.thread ]
call void @llvm.memset.p0.i64(ptr nonnull align 16 %vla36198201, i8 0, i64 %18, i1 false), !tbaa !19
br label %for.cond.cleanup73
for.cond45.preheader.us.preheader: ; preds = %for.cond45.preheader.lr.ph
%wide.trip.count173 = zext i32 %14 to i64
%min.iters.check = icmp ult i32 %14, 8
%n.vec = and i64 %wide.trip.count173, 4294967288
%cmp.n = icmp eq i64 %n.vec, %wide.trip.count173
br label %for.cond45.preheader.us
for.cond45.preheader.us: ; preds = %for.cond45.preheader.us.preheader, %for.cond45.for.cond.cleanup48_crit_edge.us
%indvars.iv175 = phi i64 [ 0, %for.cond45.preheader.us.preheader ], [ %indvars.iv.next176, %for.cond45.for.cond.cleanup48_crit_edge.us ]
br i1 %min.iters.check, label %for.body49.us.preheader, label %vector.body
vector.body: ; preds = %for.cond45.preheader.us, %vector.body
%index = phi i64 [ %index.next, %vector.body ], [ 0, %for.cond45.preheader.us ]
%vec.phi = phi <4 x i8> [ %52, %vector.body ], [ zeroinitializer, %for.cond45.preheader.us ]
%vec.phi208 = phi <4 x i8> [ %53, %vector.body ], [ zeroinitializer, %for.cond45.preheader.us ]
%19 = or i64 %index, 1
%20 = or i64 %index, 2
%21 = or i64 %index, 3
%22 = or i64 %index, 4
%23 = or i64 %index, 5
%24 = or i64 %index, 6
%25 = or i64 %index, 7
%26 = getelementptr inbounds %struct.grid, ptr %vla, i64 %index, i32 2, i64 %indvars.iv175
%27 = getelementptr inbounds %struct.grid, ptr %vla, i64 %19, i32 2, i64 %indvars.iv175
%28 = getelementptr inbounds %struct.grid, ptr %vla, i64 %20, i32 2, i64 %indvars.iv175
%29 = getelementptr inbounds %struct.grid, ptr %vla, i64 %21, i32 2, i64 %indvars.iv175
%30 = getelementptr inbounds %struct.grid, ptr %vla, i64 %22, i32 2, i64 %indvars.iv175
%31 = getelementptr inbounds %struct.grid, ptr %vla, i64 %23, i32 2, i64 %indvars.iv175
%32 = getelementptr inbounds %struct.grid, ptr %vla, i64 %24, i32 2, i64 %indvars.iv175
%33 = getelementptr inbounds %struct.grid, ptr %vla, i64 %25, i32 2, i64 %indvars.iv175
%34 = load i32, ptr %26, align 4, !tbaa !5
%35 = load i32, ptr %27, align 4, !tbaa !5
%36 = load i32, ptr %28, align 4, !tbaa !5
%37 = load i32, ptr %29, align 4, !tbaa !5
%38 = insertelement <4 x i32> poison, i32 %34, i64 0
%39 = insertelement <4 x i32> %38, i32 %35, i64 1
%40 = insertelement <4 x i32> %39, i32 %36, i64 2
%41 = insertelement <4 x i32> %40, i32 %37, i64 3
%42 = load i32, ptr %30, align 4, !tbaa !5
%43 = load i32, ptr %31, align 4, !tbaa !5
%44 = load i32, ptr %32, align 4, !tbaa !5
%45 = load i32, ptr %33, align 4, !tbaa !5
%46 = insertelement <4 x i32> poison, i32 %42, i64 0
%47 = insertelement <4 x i32> %46, i32 %43, i64 1
%48 = insertelement <4 x i32> %47, i32 %44, i64 2
%49 = insertelement <4 x i32> %48, i32 %45, i64 3
%50 = icmp eq <4 x i32> %41, <i32 1, i32 1, i32 1, i32 1>
%51 = icmp eq <4 x i32> %49, <i32 1, i32 1, i32 1, i32 1>
%52 = select <4 x i1> %50, <4 x i8> <i8 1, i8 1, i8 1, i8 1>, <4 x i8> %vec.phi
%53 = select <4 x i1> %51, <4 x i8> <i8 1, i8 1, i8 1, i8 1>, <4 x i8> %vec.phi208
%index.next = add nuw i64 %index, 8
%54 = icmp eq i64 %index.next, %n.vec
br i1 %54, label %middle.block, label %vector.body, !llvm.loop !20
middle.block: ; preds = %vector.body
%rdx.select.cmp.not = icmp ne <4 x i8> %52, zeroinitializer
%rdx.select.cmp209211 = icmp ne <4 x i8> %53, zeroinitializer
%rdx.select.cmp209 = select <4 x i1> %rdx.select.cmp.not, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i1> %rdx.select.cmp209211
%55 = bitcast <4 x i1> %rdx.select.cmp209 to i4
%.not = icmp ne i4 %55, 0
%rdx.select210 = zext i1 %.not to i8
br i1 %cmp.n, label %for.cond45.for.cond.cleanup48_crit_edge.us, label %for.body49.us.preheader
for.body49.us.preheader: ; preds = %for.cond45.preheader.us, %middle.block
%indvars.iv171.ph = phi i64 [ 0, %for.cond45.preheader.us ], [ %n.vec, %middle.block ]
%flag43.0142.us.ph = phi i8 [ 0, %for.cond45.preheader.us ], [ %rdx.select210, %middle.block ]
br label %for.body49.us
for.body49.us: ; preds = %for.body49.us.preheader, %for.body49.us
%indvars.iv171 = phi i64 [ %indvars.iv.next172, %for.body49.us ], [ %indvars.iv171.ph, %for.body49.us.preheader ]
%flag43.0142.us = phi i8 [ %spec.select.us, %for.body49.us ], [ %flag43.0142.us.ph, %for.body49.us.preheader ]
%arrayidx54.us = getelementptr inbounds %struct.grid, ptr %vla, i64 %indvars.iv171, i32 2, i64 %indvars.iv175
%56 = load i32, ptr %arrayidx54.us, align 4, !tbaa !5
%cmp55.us = icmp eq i32 %56, 1
%spec.select.us = select i1 %cmp55.us, i8 1, i8 %flag43.0142.us
%indvars.iv.next172 = add nuw nsw i64 %indvars.iv171, 1
%exitcond174.not = icmp eq i64 %indvars.iv.next172, %wide.trip.count173
br i1 %exitcond174.not, label %for.cond45.for.cond.cleanup48_crit_edge.us, label %for.body49.us, !llvm.loop !23
for.cond45.for.cond.cleanup48_crit_edge.us: ; preds = %for.body49.us, %middle.block
%spec.select.us.lcssa = phi i8 [ %rdx.select210, %middle.block ], [ %spec.select.us, %for.body49.us ]
%57 = and i8 %spec.select.us.lcssa, 1
%arrayidx64.us = getelementptr inbounds i8, ptr %vla36, i64 %indvars.iv175
store i8 %57, ptr %arrayidx64.us, align 1, !tbaa !19
%indvars.iv.next176 = add nuw nsw i64 %indvars.iv175, 1
%exitcond179.not = icmp eq i64 %indvars.iv.next176, %16
br i1 %exitcond179.not, label %for.cond70.preheader, label %for.cond45.preheader.us, !llvm.loop !24
for.cond70.preheader: ; preds = %for.cond45.for.cond.cleanup48_crit_edge.us, %for.cond.cleanup5
br i1 %cmp4139, label %for.cond76.preheader, label %for.cond.cleanup73
for.cond76.preheader: ; preds = %for.cond70.preheader, %for.cond.cleanup79
%indvars.iv183 = phi i64 [ %indvars.iv.next184, %for.cond.cleanup79 ], [ 0, %for.cond70.preheader ]
%58 = load i32, ptr %w, align 4, !tbaa !5
%cmp77147 = icmp sgt i32 %58, 0
br i1 %cmp77147, label %for.body80.lr.ph, label %for.cond.cleanup79
for.body80.lr.ph: ; preds = %for.cond76.preheader
%arrayidx82 = getelementptr inbounds %struct.grid, ptr %vla, i64 %indvars.iv183
%59 = load i8, ptr %arrayidx82, align 4, !tbaa !12, !range !25, !noundef !26
%60 = icmp eq i8 %59, 0
br i1 %60, label %for.cond.cleanup79, label %for.body80
for.cond.cleanup73: ; preds = %for.cond.cleanup79, %for.cond45.preheader.preheader, %for.cond.cleanup5.thread, %for.cond70.preheader
call void @llvm.stackrestore.p0(ptr %2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #5
ret i32 0
for.cond.cleanup79: ; preds = %for.inc103, %for.body80.lr.ph, %for.cond76.preheader
%61 = load ptr, ptr @stdout, align 8, !tbaa !27
%call.i = call noundef i32 @putc(i32 noundef 10, ptr noundef %61)
%indvars.iv.next184 = add nuw nsw i64 %indvars.iv183, 1
%62 = load i32, ptr %h, align 4, !tbaa !5
%63 = sext i32 %62 to i64
%cmp71 = icmp slt i64 %indvars.iv.next184, %63
br i1 %cmp71, label %for.cond76.preheader, label %for.cond.cleanup73, !llvm.loop !29
for.body80thread-pre-split: ; preds = %for.inc103
%.pr = load i8, ptr %arrayidx82, align 4, !tbaa !12
br label %for.body80
for.body80: ; preds = %for.body80.lr.ph, %for.body80thread-pre-split
%64 = phi i8 [ %.pr, %for.body80thread-pre-split ], [ 1, %for.body80.lr.ph ]
%65 = phi i32 [ %69, %for.body80thread-pre-split ], [ %58, %for.body80.lr.ph ]
%indvars.iv180 = phi i64 [ %indvars.iv.next181, %for.body80thread-pre-split ], [ 0, %for.body80.lr.ph ]
%tobool84.not = icmp eq i8 %64, 0
br i1 %tobool84.not, label %for.inc103, label %land.lhs.true
land.lhs.true: ; preds = %for.body80
%arrayidx89 = getelementptr inbounds i8, ptr %vla36, i64 %indvars.iv180
%66 = load i8, ptr %arrayidx89, align 1, !tbaa !19, !range !25, !noundef !26
%tobool90.not = icmp eq i8 %66, 0
br i1 %tobool90.not, label %for.inc103, label %if.then94
if.then94: ; preds = %land.lhs.true
%arrayidx99 = getelementptr inbounds %struct.grid, ptr %vla, i64 %indvars.iv183, i32 1, i64 %indvars.iv180
%67 = load i8, ptr %arrayidx99, align 1, !tbaa !9
%conv100 = sext i8 %67 to i32
%68 = load ptr, ptr @stdout, align 8, !tbaa !27
%call.i132 = call noundef i32 @putc(i32 noundef %conv100, ptr noundef %68)
%.pre186 = load i32, ptr %w, align 4, !tbaa !5
br label %for.inc103
for.inc103: ; preds = %for.body80, %land.lhs.true, %if.then94
%69 = phi i32 [ %65, %for.body80 ], [ %65, %land.lhs.true ], [ %.pre186, %if.then94 ]
%indvars.iv.next181 = add nuw nsw i64 %indvars.iv180, 1
%70 = sext i32 %69 to i64
%cmp77 = icmp slt i64 %indvars.iv.next181, %70
br i1 %cmp77, label %for.body80thread-pre-split, label %for.cond.cleanup79, !llvm.loop !30
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3
; Function Attrs: nofree nounwind
declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !14, i64 0}
!13 = !{!"", !14, i64 0, !7, i64 1, !7, i64 104}
!14 = !{!"_Bool", !7, i64 0}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.unroll.disable"}
!19 = !{!14, !14, i64 0}
!20 = distinct !{!20, !11, !21, !22}
!21 = !{!"llvm.loop.isvectorized", i32 1}
!22 = !{!"llvm.loop.unroll.runtime.disable"}
!23 = distinct !{!23, !11, !22, !21}
!24 = distinct !{!24, !11}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!28, !28, i64 0}
!28 = !{!"any pointer", !7, i64 0}
!29 = distinct !{!29, !11}
!30 = distinct !{!30, !11, !31}
!31 = !{!"llvm.loop.unswitch.partial.disable"}
|
#include<stdio.h>
int main()
{
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
int flag=0;
int sum=0;
int i,j;
for(i=0;;i++)
{
//sum=a*i;
// printf("%d\n",sum);
for(j=0;;j++)
{
if(b*j>c){break;}
sum=a*i+b*j;
// printf("a*%d b*%d %d\n ",i,j,sum);
if(sum==c){
flag=1; break;
}
// sum1=sum;
sum=0;
}
if(a*i>c){break;}
// if(flag==1){break;}
sum=0;
}
if(flag==1){printf("Yes");}
else printf("No");
//main();
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13329/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13329/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
@.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
%c = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c)
%0 = load i32, ptr %b, align 4, !tbaa !5
%1 = load i32, ptr %c, align 4, !tbaa !5
%cmp32 = icmp slt i32 %1, 0
%2 = load i32, ptr %a, align 4
br i1 %cmp32, label %for.cond.us, label %for.cond
for.cond.us: ; preds = %entry, %for.cond.us
%i.0.us = phi i32 [ %inc12.us, %for.cond.us ], [ 0, %entry ]
%mul7.us = mul nsw i32 %2, %i.0.us
%cmp8.us = icmp sgt i32 %mul7.us, %1
%inc12.us = add nuw nsw i32 %i.0.us, 1
br i1 %cmp8.us, label %if.else, label %for.cond.us
for.cond: ; preds = %entry, %if.end10
%flag.0 = phi i32 [ %flag.127, %if.end10 ], [ 0, %entry ]
%i.0 = phi i32 [ %inc12, %if.end10 ], [ 0, %entry ]
%mul2 = mul nsw i32 %2, %i.0
br label %if.end
for.cond1: ; preds = %if.end
%inc = add nuw nsw i32 %j.033, 1
%mul = mul nsw i32 %0, %inc
%cmp = icmp sgt i32 %mul, %1
br i1 %cmp, label %for.cond1.for.end_crit_edge, label %if.end
if.end: ; preds = %for.cond, %for.cond1
%mul34 = phi i32 [ 0, %for.cond ], [ %mul, %for.cond1 ]
%j.033 = phi i32 [ 0, %for.cond ], [ %inc, %for.cond1 ]
%add = add nsw i32 %mul2, %mul34
%cmp4 = icmp eq i32 %add, %1
br i1 %cmp4, label %for.end.thread, label %for.cond1
for.cond1.for.end_crit_edge: ; preds = %for.cond1
%cmp8 = icmp sgt i32 %mul2, %1
br i1 %cmp8, label %for.end13, label %if.end10
for.end.thread: ; preds = %if.end
%cmp825 = icmp sgt i32 %mul2, %1
br i1 %cmp825, label %if.end18, label %if.end10
if.end10: ; preds = %for.end.thread, %for.cond1.for.end_crit_edge
%flag.127 = phi i32 [ 1, %for.end.thread ], [ %flag.0, %for.cond1.for.end_crit_edge ]
%inc12 = add nuw nsw i32 %i.0, 1
br label %for.cond
for.end13: ; preds = %for.cond1.for.end_crit_edge
%3 = icmp eq i32 %flag.0, 1
br i1 %3, label %if.end18, label %if.else
if.else: ; preds = %for.cond.us, %for.end13
br label %if.end18
if.end18: ; preds = %for.end.thread, %for.end13, %if.else
%.str.2.sink = phi ptr [ @.str.2, %if.else ], [ @.str.1, %for.end13 ], [ @.str.1, %for.end.thread ]
%call17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @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 <stdbool.h>
int main(){
int h,w;
scanf("%d %d",&h,&w);
char a[h][w];
bool b[h][w];
for(int i = 0; i < h; i++){
for(int j = 0; j < w; j++){
scanf("\n%c",&a[i][j]);
b[i][j] = true;
}
}
int count_a_r;
int count_b_r;
for(int j = 0; j < h; j++){
count_a_r = 0;
count_b_r = 0;
for(int k = 0; k < w; k++){
if(b[j][k] == true){
count_b_r++;
if(a[j][k] == '.'){
count_a_r++;
continue;
}else if(a[j][k] == '#'){
break;
}
}
}
if(count_a_r == count_b_r){
for(int l = 0; l < w; l++){
b[j][l] = false;
}
}
}
int W = w;
int count_a_c;
int count_b_c;
for(int j = 0; j < w; j++){
count_a_c = 0;
count_b_c = 0;
for(int k = 0; k < h; k++){
if(b[k][j] == true){
count_b_c++;
if(a[k][j] == '.'){
count_a_c++;
continue;
}else if(a[k][j] == '#'){
break;
}
}
}
if(count_a_c == count_b_c){
for(int l = 0; l < h; l++){
b[l][j] = false;
}
W--;
}
}
int count_w = 0;
for(int i = 0; i < h; i++){
count_w = 0;
for(int j = 0; j < w; j++){
if(b[i][j]){
printf("%c",a[i][j]);
count_w++;
}
if(count_w == W){
printf("\n");
break;
}
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133332/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133332/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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"\0A%c\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%h = alloca i32, align 4
%w = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #6
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #6
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%0 = load i32, ptr %h, align 4, !tbaa !5
%1 = zext i32 %0 to i64
%2 = load i32, ptr %w, align 4, !tbaa !5
%3 = zext i32 %2 to i64
%4 = call ptr @llvm.stacksave.p0()
%5 = mul nuw i64 %3, %1
%vla = alloca i8, i64 %5, align 16
%6 = load i32, ptr %h, align 4, !tbaa !5
%7 = zext i32 %6 to i64
%8 = load i32, ptr %w, align 4, !tbaa !5
%9 = zext i32 %8 to i64
%10 = mul nuw i64 %9, %7
%vla1 = alloca i8, i64 %10, align 16
%cmp236 = icmp sgt i32 %6, 0
br i1 %cmp236, label %for.cond2.preheader.lr.ph, label %for.cond.cleanup19
for.cond2.preheader.lr.ph: ; preds = %entry
%11 = icmp sgt i32 %8, 0
br i1 %11, label %for.cond2.preheader, label %for.cond.cleanup148
for.cond2.preheader: ; preds = %for.cond2.preheader.lr.ph, %for.cond.cleanup4
%12 = phi i32 [ %21, %for.cond.cleanup4 ], [ %6, %for.cond2.preheader.lr.ph ]
%13 = phi i32 [ %22, %for.cond.cleanup4 ], [ %8, %for.cond2.preheader.lr.ph ]
%indvars.iv297 = phi i64 [ %indvars.iv.next298, %for.cond.cleanup4 ], [ 0, %for.cond2.preheader.lr.ph ]
%cmp3234 = icmp sgt i32 %13, 0
br i1 %cmp3234, label %for.body5.lr.ph, label %for.cond.cleanup4
for.body5.lr.ph: ; preds = %for.cond2.preheader
%14 = mul nuw nsw i64 %indvars.iv297, %3
%arrayidx = getelementptr inbounds i8, ptr %vla, i64 %14
%15 = mul nuw nsw i64 %indvars.iv297, %9
%arrayidx10 = getelementptr inbounds i8, ptr %vla1, i64 %15
br label %for.body5
for.cond17.preheader: ; preds = %for.cond.cleanup4
%cmp18250 = icmp sgt i32 %21, 0
br i1 %cmp18250, label %for.cond21.preheader.lr.ph, label %for.cond.cleanup19
for.cond21.preheader.lr.ph: ; preds = %for.cond17.preheader
%cmp22238 = icmp sgt i32 %22, 0
%cmp58248 = icmp slt i32 %22, 1
br i1 %cmp22238, label %for.cond21.preheader.us.preheader, label %for.cond.cleanup148
for.cond21.preheader.us.preheader: ; preds = %for.cond21.preheader.lr.ph
%16 = zext i32 %22 to i64
%wide.trip.count307 = zext i32 %21 to i64
br label %for.cond21.preheader.us
for.cond21.preheader.us: ; preds = %for.cond21.preheader.us.preheader, %for.inc71.us
%indvar = phi i64 [ 0, %for.cond21.preheader.us.preheader ], [ %indvar.next, %for.inc71.us ]
%17 = mul nuw nsw i64 %indvar, %9
%scevgep = getelementptr i8, ptr %vla1, i64 %17
%18 = mul nuw nsw i64 %indvar, %3
%arrayidx33.us = getelementptr inbounds i8, ptr %vla, i64 %18
br label %for.body24.us
for.body24.us: ; preds = %for.cond21.preheader.us, %for.inc51.us
%indvars.iv300 = phi i64 [ 0, %for.cond21.preheader.us ], [ %indvars.iv.next301, %for.inc51.us ]
%count_b_r.0240.us = phi i32 [ 0, %for.cond21.preheader.us ], [ %count_b_r.1.us, %for.inc51.us ]
%count_a_r.0239.us = phi i32 [ 0, %for.cond21.preheader.us ], [ %count_a_r.1.us, %for.inc51.us ]
%arrayidx28.us = getelementptr inbounds i8, ptr %scevgep, i64 %indvars.iv300
%19 = load i8, ptr %arrayidx28.us, align 1, !tbaa !9, !range !11, !noundef !12
%tobool.not.us = icmp eq i8 %19, 0
br i1 %tobool.not.us, label %for.inc51.us, label %if.then.us
if.then.us: ; preds = %for.body24.us
%inc31.us = add nsw i32 %count_b_r.0240.us, 1
%arrayidx35.us = getelementptr inbounds i8, ptr %arrayidx33.us, i64 %indvars.iv300
%20 = load i8, ptr %arrayidx35.us, align 1, !tbaa !13
switch i8 %20, label %for.inc51.us [
i8 46, label %if.then39.us
i8 35, label %cleanup.us
]
cleanup.us: ; preds = %for.inc51.us, %if.then.us
%count_a_r.0.lcssa.us = phi i32 [ %count_a_r.0239.us, %if.then.us ], [ %count_a_r.1.us, %for.inc51.us ]
%count_b_r.2.us = phi i32 [ %inc31.us, %if.then.us ], [ %count_b_r.1.us, %for.inc51.us ]
%cmp54.us = icmp ne i32 %count_a_r.0.lcssa.us, %count_b_r.2.us
%brmerge = or i1 %cmp54.us, %cmp58248
br i1 %brmerge, label %for.inc71.us, label %for.body61.lr.ph.us
for.inc71.us: ; preds = %for.body61.lr.ph.us, %cleanup.us
%indvar.next = add nuw nsw i64 %indvar, 1
%exitcond308.not = icmp eq i64 %indvar.next, %wide.trip.count307
br i1 %exitcond308.not, label %for.cond.cleanup19, label %for.cond21.preheader.us, !llvm.loop !14
if.then39.us: ; preds = %if.then.us
%inc40.us = add nsw i32 %count_a_r.0239.us, 1
br label %for.inc51.us
for.inc51.us: ; preds = %if.then39.us, %if.then.us, %for.body24.us
%count_a_r.1.us = phi i32 [ %inc40.us, %if.then39.us ], [ %count_a_r.0239.us, %for.body24.us ], [ %count_a_r.0239.us, %if.then.us ]
%count_b_r.1.us = phi i32 [ %inc31.us, %if.then39.us ], [ %count_b_r.0240.us, %for.body24.us ], [ %inc31.us, %if.then.us ]
%indvars.iv.next301 = add nuw nsw i64 %indvars.iv300, 1
%exitcond.not = icmp eq i64 %indvars.iv.next301, %16
br i1 %exitcond.not, label %cleanup.us, label %for.body24.us, !llvm.loop !16
for.body61.lr.ph.us: ; preds = %cleanup.us
call void @llvm.memset.p0.i64(ptr align 1 %scevgep, i8 0, i64 %16, i1 false), !tbaa !9
br label %for.inc71.us
for.cond.cleanup4.loopexit: ; preds = %for.body5
%.pre = load i32, ptr %h, align 4, !tbaa !5
br label %for.cond.cleanup4
for.cond.cleanup4: ; preds = %for.cond.cleanup4.loopexit, %for.cond2.preheader
%21 = phi i32 [ %.pre, %for.cond.cleanup4.loopexit ], [ %12, %for.cond2.preheader ]
%22 = phi i32 [ %24, %for.cond.cleanup4.loopexit ], [ %13, %for.cond2.preheader ]
%indvars.iv.next298 = add nuw nsw i64 %indvars.iv297, 1
%23 = sext i32 %21 to i64
%cmp = icmp slt i64 %indvars.iv.next298, %23
br i1 %cmp, label %for.cond2.preheader, label %for.cond17.preheader, !llvm.loop !17
for.body5: ; preds = %for.body5.lr.ph, %for.body5
%indvars.iv = phi i64 [ 0, %for.body5.lr.ph ], [ %indvars.iv.next, %for.body5 ]
%arrayidx7 = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv
%call8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx7)
%arrayidx12 = getelementptr inbounds i8, ptr %arrayidx10, i64 %indvars.iv
store i8 1, ptr %arrayidx12, align 1, !tbaa !9
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%24 = load i32, ptr %w, align 4, !tbaa !5
%25 = sext i32 %24 to i64
%cmp3 = icmp slt i64 %indvars.iv.next, %25
br i1 %cmp3, label %for.body5, label %for.cond.cleanup4.loopexit, !llvm.loop !19
for.cond.cleanup19: ; preds = %for.inc71.us, %entry, %for.cond17.preheader
%cmp18250331 = phi i1 [ false, %for.cond17.preheader ], [ false, %entry ], [ true, %for.inc71.us ]
%26 = phi i32 [ %21, %for.cond17.preheader ], [ %6, %entry ], [ %21, %for.inc71.us ]
%27 = phi i32 [ %22, %for.cond17.preheader ], [ %8, %entry ], [ %22, %for.inc71.us ]
%cmp77282 = icmp sgt i32 %27, 0
br i1 %cmp77282, label %for.cond82.preheader.lr.ph, label %for.cond145.preheader
for.cond82.preheader.lr.ph: ; preds = %for.cond.cleanup19
%wide.trip.count322 = zext i32 %27 to i64
%wide.trip.count312 = zext i32 %26 to i64
%wide.trip.count317 = zext i32 %26 to i64
%min.iters.check = icmp ugt i32 %26, 7
%ident.check.not = icmp eq i32 %8, 1
%or.cond = select i1 %min.iters.check, i1 %ident.check.not, i1 false
%min.iters.check360 = icmp ult i32 %26, 32
%n.vec = and i64 %wide.trip.count312, 4294967264
%cmp.n = icmp eq i64 %n.vec, %wide.trip.count312
%n.vec.remaining = and i64 %wide.trip.count312, 24
%min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
%n.vec362 = and i64 %wide.trip.count312, 4294967288
%cmp.n363 = icmp eq i64 %n.vec362, %wide.trip.count312
%xtraiter = and i64 %wide.trip.count312, 3
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br label %for.cond82.preheader
for.cond82.preheader: ; preds = %for.cond82.preheader.lr.ph, %for.inc140
%indvars.iv319 = phi i64 [ 0, %for.cond82.preheader.lr.ph ], [ %indvars.iv.next320, %for.inc140 ]
%W.0283 = phi i32 [ %27, %for.cond82.preheader.lr.ph ], [ %W.1, %for.inc140 ]
br i1 %cmp18250331, label %for.body86.lr.ph, label %for.cond.cleanup129
for.body86.lr.ph: ; preds = %for.cond82.preheader
%invariant.gep = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv319
%invariant.gep276 = getelementptr inbounds i8, ptr %vla, i64 %indvars.iv319
br label %for.body86
for.cond145.preheader: ; preds = %for.inc140, %for.cond.cleanup19
%cmp77282343 = phi i1 [ false, %for.cond.cleanup19 ], [ %cmp77282, %for.inc140 ]
%W.0.lcssa = phi i32 [ %27, %for.cond.cleanup19 ], [ %W.1, %for.inc140 ]
%brmerge357.demorgan = and i1 %cmp18250331, %cmp77282343
br i1 %brmerge357.demorgan, label %for.cond151.preheader, label %for.cond.cleanup148
for.body86: ; preds = %for.body86.lr.ph, %for.inc118
%indvars.iv309 = phi i64 [ 0, %for.body86.lr.ph ], [ %indvars.iv.next310, %for.inc118 ]
%count_b_c.0270 = phi i32 [ 0, %for.body86.lr.ph ], [ %count_b_c.1, %for.inc118 ]
%count_a_c.0269 = phi i32 [ 0, %for.body86.lr.ph ], [ %count_a_c.1, %for.inc118 ]
%28 = mul nuw nsw i64 %indvars.iv309, %9
%gep = getelementptr inbounds i8, ptr %invariant.gep, i64 %28
%29 = load i8, ptr %gep, align 1, !tbaa !9, !range !11, !noundef !12
%tobool91.not = icmp eq i8 %29, 0
br i1 %tobool91.not, label %for.inc118, label %if.then95
if.then95: ; preds = %for.body86
%inc96 = add nsw i32 %count_b_c.0270, 1
%30 = mul nuw nsw i64 %indvars.iv309, %3
%gep277 = getelementptr inbounds i8, ptr %invariant.gep276, i64 %30
%31 = load i8, ptr %gep277, align 1, !tbaa !13
switch i8 %31, label %for.inc118 [
i8 46, label %if.then104
i8 35, label %cleanup120
]
if.then104: ; preds = %if.then95
%inc105 = add nsw i32 %count_a_c.0269, 1
br label %for.inc118
for.inc118: ; preds = %if.then95, %for.body86, %if.then104
%count_a_c.1 = phi i32 [ %inc105, %if.then104 ], [ %count_a_c.0269, %for.body86 ], [ %count_a_c.0269, %if.then95 ]
%count_b_c.1 = phi i32 [ %inc96, %if.then104 ], [ %count_b_c.0270, %for.body86 ], [ %inc96, %if.then95 ]
%indvars.iv.next310 = add nuw nsw i64 %indvars.iv309, 1
%exitcond313.not = icmp eq i64 %indvars.iv.next310, %wide.trip.count312
br i1 %exitcond313.not, label %cleanup120, label %for.body86, !llvm.loop !20
cleanup120: ; preds = %for.inc118, %if.then95
%count_a_c.0.lcssa = phi i32 [ %count_a_c.1, %for.inc118 ], [ %count_a_c.0269, %if.then95 ]
%count_b_c.2 = phi i32 [ %count_b_c.1, %for.inc118 ], [ %inc96, %if.then95 ]
%cmp122 = icmp eq i32 %count_a_c.0.lcssa, %count_b_c.2
br i1 %cmp122, label %for.cond126.preheader, label %for.inc140
for.cond126.preheader: ; preds = %cleanup120
br i1 %cmp18250331, label %iter.check, label %for.cond.cleanup129
iter.check: ; preds = %for.cond126.preheader
%invariant.gep280 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv319
br i1 %or.cond, label %vector.main.loop.iter.check, label %for.body130.preheader
vector.main.loop.iter.check: ; preds = %iter.check
br i1 %min.iters.check360, label %vec.epilog.ph, label %vector.body
vector.body: ; preds = %vector.main.loop.iter.check, %vector.body
%index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.main.loop.iter.check ]
%32 = mul nuw nsw i64 %index, %9
%33 = getelementptr inbounds i8, ptr %invariant.gep280, i64 %32
store <16 x i8> zeroinitializer, ptr %33, align 1, !tbaa !9
%34 = getelementptr inbounds i8, ptr %33, i64 16
store <16 x i8> zeroinitializer, ptr %34, align 1, !tbaa !9
%index.next = add nuw i64 %index, 32
%35 = icmp eq i64 %index.next, %n.vec
br i1 %35, label %middle.block, label %vector.body, !llvm.loop !21
middle.block: ; preds = %vector.body
br i1 %cmp.n, label %for.cond.cleanup129, label %vec.epilog.iter.check
vec.epilog.iter.check: ; preds = %middle.block
br i1 %min.epilog.iters.check, label %for.body130.preheader, label %vec.epilog.ph
vec.epilog.ph: ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
%vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
br label %vec.epilog.vector.body
vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph
%index364 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next365, %vec.epilog.vector.body ]
%36 = mul nuw nsw i64 %index364, %9
%37 = getelementptr inbounds i8, ptr %invariant.gep280, i64 %36
store <8 x i8> zeroinitializer, ptr %37, align 1, !tbaa !9
%index.next365 = add nuw i64 %index364, 8
%38 = icmp eq i64 %index.next365, %n.vec362
br i1 %38, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !24
vec.epilog.middle.block: ; preds = %vec.epilog.vector.body
br i1 %cmp.n363, label %for.cond.cleanup129, label %for.body130.preheader
for.body130.preheader: ; preds = %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block
%indvars.iv314.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec362, %vec.epilog.middle.block ]
%39 = xor i64 %indvars.iv314.ph, -1
%40 = add nsw i64 %39, %wide.trip.count312
br i1 %lcmp.mod.not, label %for.body130.prol.loopexit, label %for.body130.prol
for.body130.prol: ; preds = %for.body130.preheader, %for.body130.prol
%indvars.iv314.prol = phi i64 [ %indvars.iv.next315.prol, %for.body130.prol ], [ %indvars.iv314.ph, %for.body130.preheader ]
%prol.iter = phi i64 [ %prol.iter.next, %for.body130.prol ], [ 0, %for.body130.preheader ]
%41 = mul nuw nsw i64 %indvars.iv314.prol, %9
%gep281.prol = getelementptr inbounds i8, ptr %invariant.gep280, i64 %41
store i8 0, ptr %gep281.prol, align 1, !tbaa !9
%indvars.iv.next315.prol = add nuw nsw i64 %indvars.iv314.prol, 1
%prol.iter.next = add i64 %prol.iter, 1
%prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
br i1 %prol.iter.cmp.not, label %for.body130.prol.loopexit, label %for.body130.prol, !llvm.loop !25
for.body130.prol.loopexit: ; preds = %for.body130.prol, %for.body130.preheader
%indvars.iv314.unr = phi i64 [ %indvars.iv314.ph, %for.body130.preheader ], [ %indvars.iv.next315.prol, %for.body130.prol ]
%42 = icmp ult i64 %40, 3
br i1 %42, label %for.cond.cleanup129, label %for.body130
for.cond.cleanup129: ; preds = %for.body130.prol.loopexit, %for.body130, %middle.block, %vec.epilog.middle.block, %for.cond82.preheader, %for.cond126.preheader
%dec = add nsw i32 %W.0283, -1
br label %for.inc140
for.body130: ; preds = %for.body130.prol.loopexit, %for.body130
%indvars.iv314 = phi i64 [ %indvars.iv.next315.3, %for.body130 ], [ %indvars.iv314.unr, %for.body130.prol.loopexit ]
%43 = mul nuw nsw i64 %indvars.iv314, %9
%gep281 = getelementptr inbounds i8, ptr %invariant.gep280, i64 %43
store i8 0, ptr %gep281, align 1, !tbaa !9
%indvars.iv.next315 = add nuw nsw i64 %indvars.iv314, 1
%44 = mul nuw nsw i64 %indvars.iv.next315, %9
%gep281.1 = getelementptr inbounds i8, ptr %invariant.gep280, i64 %44
store i8 0, ptr %gep281.1, align 1, !tbaa !9
%indvars.iv.next315.1 = add nuw nsw i64 %indvars.iv314, 2
%45 = mul nuw nsw i64 %indvars.iv.next315.1, %9
%gep281.2 = getelementptr inbounds i8, ptr %invariant.gep280, i64 %45
store i8 0, ptr %gep281.2, align 1, !tbaa !9
%indvars.iv.next315.2 = add nuw nsw i64 %indvars.iv314, 3
%46 = mul nuw nsw i64 %indvars.iv.next315.2, %9
%gep281.3 = getelementptr inbounds i8, ptr %invariant.gep280, i64 %46
store i8 0, ptr %gep281.3, align 1, !tbaa !9
%indvars.iv.next315.3 = add nuw nsw i64 %indvars.iv314, 4
%exitcond318.not.3 = icmp eq i64 %indvars.iv.next315.3, %wide.trip.count317
br i1 %exitcond318.not.3, label %for.cond.cleanup129, label %for.body130, !llvm.loop !27
for.inc140: ; preds = %cleanup120, %for.cond.cleanup129
%W.1 = phi i32 [ %dec, %for.cond.cleanup129 ], [ %W.0283, %cleanup120 ]
%indvars.iv.next320 = add nuw nsw i64 %indvars.iv319, 1
%exitcond323.not = icmp eq i64 %indvars.iv.next320, %wide.trip.count322
br i1 %exitcond323.not, label %for.cond145.preheader, label %for.cond82.preheader, !llvm.loop !28
for.cond151.preheader: ; preds = %for.cond145.preheader, %cleanup177
%indvars.iv327 = phi i64 [ %indvars.iv.next328, %cleanup177 ], [ 0, %for.cond145.preheader ]
%47 = load i32, ptr %w, align 4, !tbaa !5
%cmp152287 = icmp sgt i32 %47, 0
br i1 %cmp152287, label %for.body155.lr.ph, label %cleanup177
for.body155.lr.ph: ; preds = %for.cond151.preheader
%48 = mul nuw nsw i64 %indvars.iv327, %9
%arrayidx157 = getelementptr inbounds i8, ptr %vla1, i64 %48
%49 = mul nuw nsw i64 %indvars.iv327, %3
%arrayidx163 = getelementptr inbounds i8, ptr %vla, i64 %49
br label %for.body155
for.cond.cleanup148: ; preds = %cleanup177, %for.cond145.preheader, %for.cond2.preheader.lr.ph, %for.cond21.preheader.lr.ph
call void @llvm.stackrestore.p0(ptr %4)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #6
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #6
ret i32 0
for.cond151: ; preds = %if.end169
%indvars.iv.next325 = add nuw nsw i64 %indvars.iv324, 1
%50 = load i32, ptr %w, align 4, !tbaa !5
%51 = sext i32 %50 to i64
%cmp152 = icmp slt i64 %indvars.iv.next325, %51
br i1 %cmp152, label %for.body155, label %cleanup177, !llvm.loop !29
for.body155: ; preds = %for.body155.lr.ph, %for.cond151
%indvars.iv324 = phi i64 [ 0, %for.body155.lr.ph ], [ %indvars.iv.next325, %for.cond151 ]
%count_w.0288 = phi i32 [ 0, %for.body155.lr.ph ], [ %count_w.1, %for.cond151 ]
%arrayidx159 = getelementptr inbounds i8, ptr %arrayidx157, i64 %indvars.iv324
%52 = load i8, ptr %arrayidx159, align 1, !tbaa !9, !range !11, !noundef !12
%tobool160.not = icmp eq i8 %52, 0
br i1 %tobool160.not, label %if.end169, label %if.then161
if.then161: ; preds = %for.body155
%arrayidx165 = getelementptr inbounds i8, ptr %arrayidx163, i64 %indvars.iv324
%53 = load i8, ptr %arrayidx165, align 1, !tbaa !13
%conv166 = sext i8 %53 to i32
%putchar = call i32 @putchar(i32 %conv166)
%inc168 = add nsw i32 %count_w.0288, 1
br label %if.end169
if.end169: ; preds = %if.then161, %for.body155
%count_w.1 = phi i32 [ %inc168, %if.then161 ], [ %count_w.0288, %for.body155 ]
%cmp170 = icmp eq i32 %count_w.1, %W.0.lcssa
br i1 %cmp170, label %if.then172, label %for.cond151
if.then172: ; preds = %if.end169
%putchar232 = call i32 @putchar(i32 10)
br label %cleanup177
cleanup177: ; preds = %for.cond151, %for.cond151.preheader, %if.then172
%indvars.iv.next328 = add nuw nsw i64 %indvars.iv327, 1
%54 = load i32, ptr %h, align 4, !tbaa !5
%55 = sext i32 %54 to i64
%cmp146 = icmp slt i64 %indvars.iv.next328, %55
br i1 %cmp146, label %for.cond151.preheader, label %for.cond.cleanup148, !llvm.loop !30
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #4 = { nofree nounwind }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !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 = !{!"_Bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15, !18}
!18 = !{!"llvm.loop.unswitch.partial.disable"}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}
!21 = distinct !{!21, !15, !22, !23}
!22 = !{!"llvm.loop.isvectorized", i32 1}
!23 = !{!"llvm.loop.unroll.runtime.disable"}
!24 = distinct !{!24, !15, !22, !23}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.unroll.disable"}
!27 = distinct !{!27, !15, !22}
!28 = distinct !{!28, !15}
!29 = distinct !{!29, !15}
!30 = distinct !{!30, !15, !18}
|
#include <stdio.h>
int main(int argc, char const *argv[]) {
char str[101];
int h, w;
int i, j;
char a[101][101] = {0};
int rm_w[101] = {0};
fgets(str, 100, stdin);
sscanf(str, "%d %d\n", &h, &w);
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
scanf("%c ", &a[i][j]);
}
}
for (j = 0; j < w; j++) {
for (i = 0; i < h; i++) {
if (a[i][j] == '#') {
break;
}
}
if (i == h) {
rm_w[j] = 1;
}
}
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
if (a[i][j] == '#') {
break;
}
}
if (j == w) {
continue;
}
for (j = 0; j < w; j++) {
if (rm_w[j] == 0) {
printf("%c", a[i][j]);
}
}
printf("\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133376/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133376/source.c"
target datalayout = "e-m:e-p270: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 [7 x i8] c"%d %d\0A\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"%c \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:
%str = alloca [101 x i8], align 16
%h = alloca i32, align 4
%w = alloca i32, align 4
%a = alloca [101 x [101 x i8]], align 16
%rm_w = alloca [101 x i32], align 16
call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %str) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #5
call void @llvm.lifetime.start.p0(i64 10201, ptr nonnull %a) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(10201) %a, i8 0, i64 10201, i1 false)
call void @llvm.lifetime.start.p0(i64 404, ptr nonnull %rm_w) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(404) %rm_w, i8 0, i64 404, i1 false)
%0 = load ptr, ptr @stdin, align 8, !tbaa !5
%call = call ptr @fgets(ptr noundef nonnull %str, i32 noundef 100, ptr noundef %0)
%call2 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %str, ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) #5
%1 = load i32, ptr %h, align 4, !tbaa !9
%cmp111 = icmp sgt i32 %1, 0
%.pre169 = load i32, ptr %w, align 4, !tbaa !9
br i1 %cmp111, label %for.cond3.preheader.lr.ph, label %for.cond12.preheader
for.cond3.preheader.lr.ph: ; preds = %entry
%2 = icmp sgt i32 %.pre169, 0
br i1 %2, label %for.cond3.preheader, label %for.cond40.preheader.preheader
for.cond3.preheader: ; preds = %for.cond3.preheader.lr.ph, %for.inc9
%3 = phi i32 [ %14, %for.inc9 ], [ %1, %for.cond3.preheader.lr.ph ]
%4 = phi i32 [ %15, %for.inc9 ], [ %.pre169, %for.cond3.preheader.lr.ph ]
%indvars.iv142 = phi i64 [ %indvars.iv.next143, %for.inc9 ], [ 0, %for.cond3.preheader.lr.ph ]
%cmp4109 = icmp sgt i32 %4, 0
br i1 %cmp4109, label %for.body5, label %for.inc9
for.cond12.preheader: ; preds = %for.inc9, %entry
%5 = phi i32 [ %.pre169, %entry ], [ %15, %for.inc9 ]
%6 = phi i32 [ %1, %entry ], [ %14, %for.inc9 ]
%cmp13117 = icmp sgt i32 %5, 0
br i1 %cmp13117, label %for.cond15.preheader.lr.ph, label %for.cond36.preheader
for.cond15.preheader.lr.ph: ; preds = %for.cond12.preheader
%cmp16113 = icmp sgt i32 %6, 0
br i1 %cmp16113, label %for.cond15.preheader.us.preheader, label %for.cond15.preheader.lr.ph.split
for.cond15.preheader.us.preheader: ; preds = %for.cond15.preheader.lr.ph
%wide.trip.count156 = zext i32 %5 to i64
%wide.trip.count151 = zext i32 %6 to i64
br label %for.cond15.preheader.us
for.cond15.preheader.us: ; preds = %for.cond15.preheader.us.preheader, %for.inc33.us
%indvars.iv153 = phi i64 [ 0, %for.cond15.preheader.us.preheader ], [ %indvars.iv.next154, %for.inc33.us ]
br label %for.body17.us
for.body17.us: ; preds = %for.cond15.preheader.us, %for.inc24.us
%indvars.iv148 = phi i64 [ 0, %for.cond15.preheader.us ], [ %indvars.iv.next149, %for.inc24.us ]
%arrayidx21.us = getelementptr inbounds [101 x [101 x i8]], ptr %a, i64 0, i64 %indvars.iv148, i64 %indvars.iv153
%7 = load i8, ptr %arrayidx21.us, align 1, !tbaa !11
%cmp22.us = icmp eq i8 %7, 35
br i1 %cmp22.us, label %for.end26.us, label %for.inc24.us
for.inc24.us: ; preds = %for.body17.us
%indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1
%exitcond152.not = icmp eq i64 %indvars.iv.next149, %wide.trip.count151
br i1 %exitcond152.not, label %if.then29.us, label %for.body17.us, !llvm.loop !12
for.end26.us: ; preds = %for.body17.us
%8 = trunc i64 %indvars.iv148 to i32
%cmp27.us = icmp eq i32 %6, %8
br i1 %cmp27.us, label %if.then29.us, label %for.inc33.us
if.then29.us: ; preds = %for.inc24.us, %for.end26.us
%arrayidx31.us = getelementptr inbounds [101 x i32], ptr %rm_w, i64 0, i64 %indvars.iv153
store i32 1, ptr %arrayidx31.us, align 4, !tbaa !9
br label %for.inc33.us
for.inc33.us: ; preds = %if.then29.us, %for.end26.us
%indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1
%exitcond157.not = icmp eq i64 %indvars.iv.next154, %wide.trip.count156
br i1 %exitcond157.not, label %for.cond36.preheader, label %for.cond15.preheader.us, !llvm.loop !14
for.cond15.preheader.lr.ph.split: ; preds = %for.cond15.preheader.lr.ph
%cmp27 = icmp eq i32 %6, 0
br i1 %cmp27, label %for.cond15.preheader.us119.preheader, label %for.end82
for.cond15.preheader.us119.preheader: ; preds = %for.cond15.preheader.lr.ph.split
%wide.trip.count = zext i32 %5 to i64
%min.iters.check = icmp ult i32 %5, 8
br i1 %min.iters.check, label %for.cond15.preheader.us119.preheader197, label %vector.ph
vector.ph: ; preds = %for.cond15.preheader.us119.preheader
%n.vec = and i64 %wide.trip.count, 4294967288
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%9 = getelementptr inbounds [101 x i32], ptr %rm_w, i64 0, i64 %index
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %9, align 16, !tbaa !9
%10 = getelementptr inbounds i32, ptr %9, i64 4
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %10, align 16, !tbaa !9
%index.next = add nuw i64 %index, 8
%11 = icmp eq i64 %index.next, %n.vec
br i1 %11, label %middle.block, label %vector.body, !llvm.loop !15
middle.block: ; preds = %vector.body
%cmp.n = icmp eq i64 %n.vec, %wide.trip.count
br i1 %cmp.n, label %for.cond36.preheader, label %for.cond15.preheader.us119.preheader197
for.cond15.preheader.us119.preheader197: ; preds = %for.cond15.preheader.us119.preheader, %middle.block
%indvars.iv145.ph = phi i64 [ 0, %for.cond15.preheader.us119.preheader ], [ %n.vec, %middle.block ]
br label %for.cond15.preheader.us119
for.cond15.preheader.us119: ; preds = %for.cond15.preheader.us119.preheader197, %for.cond15.preheader.us119
%indvars.iv145 = phi i64 [ %indvars.iv.next146, %for.cond15.preheader.us119 ], [ %indvars.iv145.ph, %for.cond15.preheader.us119.preheader197 ]
%arrayidx31.us123 = getelementptr inbounds [101 x i32], ptr %rm_w, i64 0, i64 %indvars.iv145
store i32 1, ptr %arrayidx31.us123, align 4, !tbaa !9
%indvars.iv.next146 = add nuw nsw i64 %indvars.iv145, 1
%exitcond.not = icmp eq i64 %indvars.iv.next146, %wide.trip.count
br i1 %exitcond.not, label %for.cond36.preheader, label %for.cond15.preheader.us119, !llvm.loop !18
for.body5: ; preds = %for.cond3.preheader, %for.body5
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body5 ], [ 0, %for.cond3.preheader ]
%arrayidx7 = getelementptr inbounds [101 x [101 x i8]], ptr %a, i64 0, i64 %indvars.iv142, i64 %indvars.iv
%call8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx7)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%12 = load i32, ptr %w, align 4, !tbaa !9
%13 = sext i32 %12 to i64
%cmp4 = icmp slt i64 %indvars.iv.next, %13
br i1 %cmp4, label %for.body5, label %for.inc9.loopexit, !llvm.loop !19
for.inc9.loopexit: ; preds = %for.body5
%.pre = load i32, ptr %h, align 4, !tbaa !9
br label %for.inc9
for.inc9: ; preds = %for.inc9.loopexit, %for.cond3.preheader
%14 = phi i32 [ %.pre, %for.inc9.loopexit ], [ %3, %for.cond3.preheader ]
%15 = phi i32 [ %12, %for.inc9.loopexit ], [ %4, %for.cond3.preheader ]
%indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1
%16 = sext i32 %14 to i64
%cmp = icmp slt i64 %indvars.iv.next143, %16
br i1 %cmp, label %for.cond3.preheader, label %for.cond12.preheader, !llvm.loop !20
for.cond36.preheader: ; preds = %for.cond15.preheader.us119, %for.inc33.us, %middle.block, %for.cond12.preheader
%cmp37135 = icmp sgt i32 %6, 0
br i1 %cmp37135, label %for.cond40.preheader.preheader, label %for.end82
for.cond40.preheader.preheader: ; preds = %for.cond3.preheader.lr.ph, %for.cond36.preheader
%.ph = phi i32 [ %1, %for.cond3.preheader.lr.ph ], [ %6, %for.cond36.preheader ]
br label %for.cond40.preheader
for.cond40.preheader: ; preds = %for.cond40.preheader.preheader, %for.inc80
%17 = phi i32 [ %26, %for.inc80 ], [ %.ph, %for.cond40.preheader.preheader ]
%indvars.iv166 = phi i64 [ %indvars.iv.next167, %for.inc80 ], [ 0, %for.cond40.preheader.preheader ]
%18 = load i32, ptr %w, align 4, !tbaa !9
%cmp41127 = icmp sgt i32 %18, 0
br i1 %cmp41127, label %for.body43.preheader, label %for.end55.thread180
for.body43.preheader: ; preds = %for.cond40.preheader
%wide.trip.count161 = zext i32 %18 to i64
br label %for.body43
for.body43: ; preds = %for.body43.preheader, %for.inc53
%indvars.iv158 = phi i64 [ 0, %for.body43.preheader ], [ %indvars.iv.next159, %for.inc53 ]
%arrayidx47 = getelementptr inbounds [101 x [101 x i8]], ptr %a, i64 0, i64 %indvars.iv166, i64 %indvars.iv158
%19 = load i8, ptr %arrayidx47, align 1, !tbaa !11
%cmp49 = icmp eq i8 %19, 35
br i1 %cmp49, label %for.end55, label %for.inc53
for.inc53: ; preds = %for.body43
%indvars.iv.next159 = add nuw nsw i64 %indvars.iv158, 1
%exitcond162.not = icmp eq i64 %indvars.iv.next159, %wide.trip.count161
br i1 %exitcond162.not, label %for.inc80, label %for.body43, !llvm.loop !22
for.end55: ; preds = %for.body43
%20 = trunc i64 %indvars.iv158 to i32
%cmp56 = icmp eq i32 %18, %20
br i1 %cmp56, label %for.inc80, label %for.cond60.preheader
for.end55.thread180: ; preds = %for.cond40.preheader
%cmp56182 = icmp eq i32 %18, 0
br i1 %cmp56182, label %for.inc80, label %for.end78
for.cond60.preheader: ; preds = %for.end55
br i1 %cmp41127, label %for.body63, label %for.end78
for.body63: ; preds = %for.cond60.preheader, %for.inc76
%21 = phi i32 [ %24, %for.inc76 ], [ %18, %for.cond60.preheader ]
%indvars.iv163 = phi i64 [ %indvars.iv.next164, %for.inc76 ], [ 0, %for.cond60.preheader ]
%arrayidx65 = getelementptr inbounds [101 x i32], ptr %rm_w, i64 0, i64 %indvars.iv163
%22 = load i32, ptr %arrayidx65, align 4, !tbaa !9
%cmp66 = icmp eq i32 %22, 0
br i1 %cmp66, label %if.then68, label %for.inc76
if.then68: ; preds = %for.body63
%arrayidx72 = getelementptr inbounds [101 x [101 x i8]], ptr %a, i64 0, i64 %indvars.iv166, i64 %indvars.iv163
%23 = load i8, ptr %arrayidx72, align 1, !tbaa !11
%conv73 = sext i8 %23 to i32
%putchar107 = call i32 @putchar(i32 %conv73)
%.pre170 = load i32, ptr %w, align 4, !tbaa !9
br label %for.inc76
for.inc76: ; preds = %for.body63, %if.then68
%24 = phi i32 [ %21, %for.body63 ], [ %.pre170, %if.then68 ]
%indvars.iv.next164 = add nuw nsw i64 %indvars.iv163, 1
%25 = sext i32 %24 to i64
%cmp61 = icmp slt i64 %indvars.iv.next164, %25
br i1 %cmp61, label %for.body63, label %for.end78, !llvm.loop !23
for.end78: ; preds = %for.inc76, %for.end55.thread180, %for.cond60.preheader
%putchar = call i32 @putchar(i32 10)
%.pre171 = load i32, ptr %h, align 4, !tbaa !9
br label %for.inc80
for.inc80: ; preds = %for.inc53, %for.end55.thread180, %for.end55, %for.end78
%26 = phi i32 [ %17, %for.end55 ], [ %.pre171, %for.end78 ], [ %17, %for.end55.thread180 ], [ %17, %for.inc53 ]
%indvars.iv.next167 = add nuw nsw i64 %indvars.iv166, 1
%27 = sext i32 %26 to i64
%cmp37 = icmp slt i64 %indvars.iv.next167, %27
br i1 %cmp37, label %for.cond40.preheader, label %for.end82, !llvm.loop !24
for.end82: ; preds = %for.inc80, %for.cond15.preheader.lr.ph.split, %for.cond36.preheader
call void @llvm.lifetime.end.p0(i64 404, ptr nonnull %rm_w) #5
call void @llvm.lifetime.end.p0(i64 10201, ptr nonnull %a) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #5
call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %str) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2
; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13, !16, !17}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !13, !17, !16}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !13, !21}
!21 = !{!"llvm.loop.unswitch.partial.disable"}
!22 = distinct !{!22, !13}
!23 = distinct !{!23, !13}
!24 = distinct !{!24, !13}
|
#include<stdio.h>
int main(void)
{
int H, W, i, j;
scanf("%d %d", &H, &W);
while (H != 0 || W != 0)
{
for (i = 0; i < H; i++)
{
for (j = 0; j < W; j++)
{
printf("#");
}
printf("\n");
}
printf("\n");
scanf("%d %d", &H, &W);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133426/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133426/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp21 = icmp ne i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp122 = icmp ne i32 %1, 0
%2 = select i1 %cmp21, i1 true, i1 %cmp122
br i1 %2, label %for.cond.preheader, label %while.end
for.cond.preheader: ; preds = %entry, %for.end10
%3 = phi i32 [ %7, %for.end10 ], [ %0, %entry ]
%cmp219 = icmp sgt i32 %3, 0
br i1 %cmp219, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.020 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%4 = load i32, ptr %W, align 4, !tbaa !5
%cmp417 = icmp sgt i32 %4, 0
br i1 %cmp417, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.018 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar16 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.018, 1
%5 = load i32, ptr %W, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %5
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar15 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.020, 1
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %6
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%7 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp ne i32 %7, 0
%8 = load i32, ptr %W, align 4
%cmp1 = icmp ne i32 %8, 0
%9 = select i1 %cmp, i1 true, i1 %cmp1
br i1 %9, label %for.cond.preheader, label %while.end, !llvm.loop !12
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int a,b,c,x;
scanf("%d %d %d",&a,&b,&c);
if(a>b)
{
x=a;
a=b;
b=x;
}
while(c>=a)
{
if(c%b==a || c%b==0 || c%a==0)
{
printf("Yes\n");
exit(0);
}
else
{
c=c-a;
}
}
printf("No\n");
// your code goes here
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13347/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13347/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1
@str = private unnamed_addr constant [3 x i8] c"No\00", align 1
@str.3 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
; Function Attrs: nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
%c = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp sgt i32 %0, %1
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
store i32 %1, ptr %a, align 4, !tbaa !5
store i32 %0, ptr %b, align 4, !tbaa !5
br label %if.end
if.end: ; preds = %if.then, %entry
%2 = phi i32 [ %0, %if.then ], [ %1, %entry ]
%3 = phi i32 [ %1, %if.then ], [ %0, %entry ]
%c.promoted = load i32, ptr %c, align 4, !tbaa !5
%cmp1.not17 = icmp slt i32 %c.promoted, %3
br i1 %cmp1.not17, label %while.end, label %while.body
while.body: ; preds = %if.end, %if.else
%sub1618 = phi i32 [ %sub, %if.else ], [ %c.promoted, %if.end ]
%rem = srem i32 %sub1618, %2
%cmp2 = icmp eq i32 %rem, %3
%cmp4 = icmp eq i32 %rem, 0
%or.cond = or i1 %cmp2, %cmp4
br i1 %or.cond, label %if.then8, label %lor.lhs.false5
lor.lhs.false5: ; preds = %while.body
%rem6 = srem i32 %sub1618, %3
%cmp7 = icmp eq i32 %rem6, 0
br i1 %cmp7, label %if.then8, label %if.else
if.then8: ; preds = %lor.lhs.false5, %while.body
%puts15 = call i32 @puts(ptr nonnull dereferenceable(1) @str.3)
call void @exit(i32 noundef 0) #6
unreachable
if.else: ; preds = %lor.lhs.false5
%sub = sub nsw i32 %sub1618, %3
store i32 %sub, ptr %c, align 4, !tbaa !5
%cmp1.not = icmp slt i32 %sub, %3
br i1 %cmp1.not, label %while.end, label %while.body, !llvm.loop !9
while.end: ; preds = %if.else, %if.end
%puts = call i32 @puts(ptr nonnull dereferenceable(1) @str)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: noreturn nounwind
declare void @exit(i32 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
attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind }
attributes #5 = { nounwind }
attributes #6 = { noreturn nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
|
#include <stdio.h>
int main()
{
int h,w,i,j;
while(scanf("%d %d", &h, &w)!=EOF && (h!=0 || w!=0)){
for(i=h;i;i--){
for(j=w;j;j--){
putchar('#');
}
putchar('\n');
}
putchar('\n');
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133512/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133512/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
@stdout = external local_unnamed_addr global ptr, align 8
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%h = alloca i32, align 4
%w = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #3
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%cmp.not21 = icmp eq i32 %call20, -1
br i1 %cmp.not21, label %while.end, label %land.rhs
land.rhs: ; preds = %entry, %for.end10
%0 = load i32, ptr %h, align 4, !tbaa !5
%cmp1 = icmp ne i32 %0, 0
%1 = load i32, ptr %w, align 4
%cmp2 = icmp ne i32 %1, 0
%2 = select i1 %cmp1, i1 true, i1 %cmp2
br i1 %2, label %for.cond.preheader, label %while.end
for.cond.preheader: ; preds = %land.rhs
%tobool.not18 = icmp eq i32 %0, 0
br i1 %tobool.not18, label %for.end10, label %for.body
for.body: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %dec9, %for.end ], [ %0, %for.cond.preheader ]
%3 = load i32, ptr %w, align 4, !tbaa !5
%tobool4.not16 = icmp eq i32 %3, 0
br i1 %tobool4.not16, label %for.end, label %for.body5
for.body5: ; preds = %for.body, %for.body5
%j.017 = phi i32 [ %dec, %for.body5 ], [ %3, %for.body ]
%4 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i = call i32 @putc(i32 noundef 35, ptr noundef %4)
%dec = add nsw i32 %j.017, -1
%tobool4.not = icmp eq i32 %dec, 0
br i1 %tobool4.not, label %for.end, label %for.body5, !llvm.loop !11
for.end: ; preds = %for.body5, %for.body
%5 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i14 = call i32 @putc(i32 noundef 10, ptr noundef %5)
%dec9 = add nsw i32 %i.019, -1
%tobool.not = icmp eq i32 %dec9, 0
br i1 %tobool.not, label %for.end10, label %for.body, !llvm.loop !13
for.end10: ; preds = %for.end, %for.cond.preheader
%6 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i15 = call i32 @putc(i32 noundef 10, ptr noundef %6)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%cmp.not = icmp eq i32 %call, -1
br i1 %cmp.not, label %while.end, label %land.rhs, !llvm.loop !14
while.end: ; preds = %land.rhs, %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
|
#include <stdio.h>
int main(){
int H=1,W=1;
int h,w;
while(1){
scanf("%d%d", &H, &W);
if(H==0 && W==0)
break;
for(h=0;h<H;h++){
for(w=0;w<W;w++)
printf("#");
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133556/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133556/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
store i32 1, ptr %H, align 4, !tbaa !5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
store i32 1, ptr %W, align 4, !tbaa !5
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%h.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%w.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %w.017, 1
%4 = load i32, ptr %W, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %h.019, 1
%5 = load i32, ptr %H, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
int main()
{
int num,s[200050],i,j=0,k;
scanf("%d",&num);
for(i=1;i<=num;i++)
{
scanf("%d",&s[i]);
if(s[i]==1)
{
j=i;
}
if(s[i]==0)
{
k=i;
}
}
// printf("%d %d",k,j);
if(j<k)
{
printf("%d",j);
}
else
{
printf("%d",k);
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1336/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1336/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%num = alloca i32, align 4
%s = alloca [200050 x i32], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #5
call void @llvm.lifetime.start.p0(i64 800200, ptr nonnull %s) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %num)
%0 = load i32, ptr %num, align 4, !tbaa !5
%cmp.not23 = icmp sgt i32 %0, 0
call void @llvm.assume(i1 %cmp.not23)
br label %for.body
for.body: ; preds = %entry, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 1, %entry ]
%k.026 = phi i32 [ %k.1, %for.body ], [ undef, %entry ]
%j.025 = phi i32 [ %spec.select, %for.body ], [ 0, %entry ]
%arrayidx = getelementptr inbounds [200050 x i32], ptr %s, i64 0, i64 %indvars.iv
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx)
%1 = load i32, ptr %arrayidx, align 4, !tbaa !5
%cmp4 = icmp eq i32 %1, 1
%2 = trunc i64 %indvars.iv to i32
%spec.select = select i1 %cmp4, i32 %2, i32 %j.025
%cmp7 = icmp eq i32 %1, 0
%k.1 = select i1 %cmp7, i32 %2, i32 %k.026
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%3 = load i32, ptr %num, align 4, !tbaa !5
%4 = sext i32 %3 to i64
%cmp.not.not = icmp slt i64 %indvars.iv, %4
br i1 %cmp.not.not, label %for.body, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body
%spec.select.lcssa.k.1.lcssa = call i32 @llvm.smin.i32(i32 %spec.select, i32 %k.1)
%call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %spec.select.lcssa.k.1.lcssa)
call void @llvm.lifetime.end.p0(i64 800200, ptr nonnull %s) #5
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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
declare void @llvm.assume(i1 noundef) #3
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) }
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>
#include<stdlib.h>
int main()
{
int n,m,sx,sy,i,j,visited[105][105];
scanf("%d %d %d %d",&n,&m,&sx,&sy);
for(i=0;i<105;i++)
{
for(j=0;j<105;j++)
{
visited[i][j]=0;
}
}
visited[sx][sy]=1;
printf("%d %d\n",sx,sy);
for(i=1;i<=m;i++)
{
if(visited[sx][i]==0)
{
printf("%d %d\n",sx,i);
visited[sx][i]=1;
}
}
i=1;
int flag=1;
while(i<=n)
{
if(visited[i][1]==0 && flag==0)
{
for(j=1;j<=m;j++)
{
printf("%d %d\n",i,j);
}
flag=1;
}
else if(visited[i][1]==0 && flag==1)
{
for(j=m;j>=1;j--)
{
printf("%d %d\n",i,j);
}
flag=0;
}
i++;
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13365/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13365/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [12 x i8] c"%d %d %d %d\00", align 1
@.str.1 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
%m = alloca i32, align 4
%sx = alloca i32, align 4
%sy = alloca i32, align 4
%visited = alloca [105 x [105 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 4, ptr nonnull %sx) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %sy) #4
call void @llvm.lifetime.start.p0(i64 44100, ptr nonnull %visited) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m, ptr noundef nonnull %sx, ptr noundef nonnull %sy)
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(44100) %visited, i8 0, i64 44100, i1 false), !tbaa !5
%0 = load i32, ptr %sx, align 4, !tbaa !5
%idxprom9 = sext i32 %0 to i64
%1 = load i32, ptr %sy, align 4, !tbaa !5
%idxprom11 = sext i32 %1 to i64
%arrayidx12 = getelementptr inbounds [105 x [105 x i32]], ptr %visited, i64 0, i64 %idxprom9, i64 %idxprom11
store i32 1, ptr %arrayidx12, align 4, !tbaa !5
%call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %1)
%2 = load i32, ptr %m, align 4, !tbaa !5
%cmp15.not86 = icmp slt i32 %2, 1
br i1 %cmp15.not86, label %while.cond.preheader, label %for.body16.preheader
for.body16.preheader: ; preds = %entry
%.pre = load i32, ptr %sx, align 4, !tbaa !5
br label %for.body16
while.cond.preheader: ; preds = %for.inc27, %entry
%3 = load i32, ptr %n, align 4, !tbaa !5
%cmp30.not92 = icmp slt i32 %3, 1
br i1 %cmp30.not92, label %while.end, label %while.body
for.body16: ; preds = %for.body16.preheader, %for.inc27
%4 = phi i32 [ %2, %for.body16.preheader ], [ %9, %for.inc27 ]
%5 = phi i32 [ %.pre, %for.body16.preheader ], [ %10, %for.inc27 ]
%indvars.iv = phi i64 [ 1, %for.body16.preheader ], [ %indvars.iv.next, %for.inc27 ]
%idxprom17 = sext i32 %5 to i64
%arrayidx20 = getelementptr inbounds [105 x [105 x i32]], ptr %visited, i64 0, i64 %idxprom17, i64 %indvars.iv
%6 = load i32, ptr %arrayidx20, align 4, !tbaa !5
%cmp21 = icmp eq i32 %6, 0
br i1 %cmp21, label %if.then, label %for.inc27
if.then: ; preds = %for.body16
%7 = trunc i64 %indvars.iv to i32
%call22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %5, i32 noundef %7)
%8 = load i32, ptr %sx, align 4, !tbaa !5
%idxprom23 = sext i32 %8 to i64
%arrayidx26 = getelementptr inbounds [105 x [105 x i32]], ptr %visited, i64 0, i64 %idxprom23, i64 %indvars.iv
store i32 1, ptr %arrayidx26, align 4, !tbaa !5
%.pre103 = load i32, ptr %m, align 4, !tbaa !5
br label %for.inc27
for.inc27: ; preds = %for.body16, %if.then
%9 = phi i32 [ %4, %for.body16 ], [ %.pre103, %if.then ]
%10 = phi i32 [ %5, %for.body16 ], [ %8, %if.then ]
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%11 = sext i32 %9 to i64
%cmp15.not.not = icmp slt i64 %indvars.iv, %11
br i1 %cmp15.not.not, label %for.body16, label %while.cond.preheader, !llvm.loop !9
while.body: ; preds = %while.cond.preheader, %if.end58
%indvars.iv100 = phi i64 [ %indvars.iv.next101, %if.end58 ], [ 1, %while.cond.preheader ]
%flag.095 = phi i32 [ %flag.1, %if.end58 ], [ 1, %while.cond.preheader ]
%arrayidx33 = getelementptr inbounds [105 x [105 x i32]], ptr %visited, i64 0, i64 %indvars.iv100, i64 1
%12 = load i32, ptr %arrayidx33, align 4, !tbaa !5
%cmp34 = icmp eq i32 %12, 0
%cmp35 = icmp eq i32 %flag.095, 0
%or.cond = select i1 %cmp34, i1 %cmp35, i1 false
br i1 %or.cond, label %for.cond37.preheader, label %if.else
for.cond37.preheader: ; preds = %while.body
%13 = load i32, ptr %m, align 4, !tbaa !5
%cmp38.not90 = icmp slt i32 %13, 1
br i1 %cmp38.not90, label %if.end58, label %for.body39.preheader
for.body39.preheader: ; preds = %for.cond37.preheader
%14 = trunc i64 %indvars.iv100 to i32
br label %for.body39
for.body39: ; preds = %for.body39.preheader, %for.body39
%j.191 = phi i32 [ %inc42, %for.body39 ], [ 1, %for.body39.preheader ]
%call40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %14, i32 noundef %j.191)
%inc42 = add nuw nsw i32 %j.191, 1
%15 = load i32, ptr %m, align 4, !tbaa !5
%cmp38.not.not = icmp slt i32 %j.191, %15
br i1 %cmp38.not.not, label %for.body39, label %if.end58, !llvm.loop !11
if.else: ; preds = %while.body
%cmp49 = icmp eq i32 %flag.095, 1
%or.cond60 = select i1 %cmp34, i1 %cmp49, i1 false
br i1 %or.cond60, label %if.then50, label %if.end58
if.then50: ; preds = %if.else
%16 = load i32, ptr %m, align 4, !tbaa !5
%cmp5288 = icmp sgt i32 %16, 0
br i1 %cmp5288, label %for.body53.preheader, label %if.end58
for.body53.preheader: ; preds = %if.then50
%17 = trunc i64 %indvars.iv100 to i32
br label %for.body53
for.body53: ; preds = %for.body53.preheader, %for.body53
%j.289 = phi i32 [ %dec, %for.body53 ], [ %16, %for.body53.preheader ]
%call54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %17, i32 noundef %j.289)
%dec = add nsw i32 %j.289, -1
%cmp52 = icmp ugt i32 %j.289, 1
br i1 %cmp52, label %for.body53, label %if.end58, !llvm.loop !12
if.end58: ; preds = %for.body53, %for.body39, %if.then50, %for.cond37.preheader, %if.else
%flag.1 = phi i32 [ %flag.095, %if.else ], [ 1, %for.cond37.preheader ], [ 0, %if.then50 ], [ 1, %for.body39 ], [ 0, %for.body53 ]
%indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
%18 = load i32, ptr %n, align 4, !tbaa !5
%19 = sext i32 %18 to i64
%cmp30.not.not = icmp slt i64 %indvars.iv100, %19
br i1 %cmp30.not.not, label %while.body, label %while.end, !llvm.loop !13
while.end: ; preds = %if.end58, %while.cond.preheader
call void @llvm.lifetime.end.p0(i64 44100, ptr nonnull %visited) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %sy) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %sx) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
|
#include <stdio.h>
int main(void) {
int i;
int j;
int width;
int height;
while(1) {
scanf("%d %d", &height, &width);
if(width == 0 && height == 0) {
break;
}
for(i = 0; i < height; i++) {
for(j = 0; j < width; j++) {
putchar('#');
}
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133693/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133693/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
@stdout = external local_unnamed_addr global ptr, align 8
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%width = alloca i32, align 4
%height = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %width) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %height) #3
%call21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %height, ptr noundef nonnull %width)
%0 = load i32, ptr %width, align 4, !tbaa !5
%cmp22 = icmp eq i32 %0, 0
%1 = load i32, ptr %height, align 4
%cmp123 = icmp eq i32 %1, 0
%or.cond24 = select i1 %cmp22, i1 %cmp123, i1 false
br i1 %or.cond24, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %10, %for.end10 ], [ %1, %entry ]
%cmp219 = icmp sgt i32 %2, 0
br i1 %cmp219, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.020 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %width, align 4, !tbaa !5
%cmp417 = icmp sgt i32 %3, 0
br i1 %cmp417, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.018 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%4 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i = call noundef i32 @putc(i32 noundef 35, ptr noundef %4)
%inc = add nuw nsw i32 %j.018, 1
%5 = load i32, ptr %width, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %5
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !11
for.end: ; preds = %for.body5, %for.cond3.preheader
%6 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i15 = call noundef i32 @putc(i32 noundef 10, ptr noundef %6)
%inc9 = add nuw nsw i32 %i.020, 1
%7 = load i32, ptr %height, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %7
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !13
for.end10: ; preds = %for.end, %for.cond.preheader
%8 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i16 = call noundef i32 @putc(i32 noundef 10, ptr noundef %8)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %height, ptr noundef nonnull %width)
%9 = load i32, ptr %width, align 4, !tbaa !5
%cmp = icmp eq i32 %9, 0
%10 = load i32, ptr %height, align 4
%cmp1 = icmp eq i32 %10, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %height) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %width) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
|
#include<stdio.h>
int main (void)
{
int H;
int W;
int i,j;
while(1 ){
scanf("%d %d", &H, &W);
if(H == 0 && W == 0) break;
for(i=1; i<= H; i++){
for(j=1; j<=W; j++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133736/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133736/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ]
%cmp2.not18 = icmp slt i32 %2, 1
br i1 %cmp2.not18, label %for.end10, label %for.cond3.preheader
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 1, %for.cond.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp4.not16 = icmp slt i32 %3, 1
br i1 %cmp4.not16, label %for.end, label %for.body5
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.017 = phi i32 [ %inc, %for.body5 ], [ 1, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.017, 1
%4 = load i32, ptr %W, align 4, !tbaa !5
%cmp4.not.not = icmp slt i32 %j.017, %4
br i1 %cmp4.not.not, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.019, 1
%5 = load i32, ptr %H, align 4, !tbaa !5
%cmp2.not.not = icmp slt i32 %i.019, %5
br i1 %cmp2.not.not, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
int main(){
int H,W,i,x;
for(;;){
scanf("%d %d",&H,&W);
if((H == 0) && (W == 0)) break;
for(i=0;i < H ;i++){
for(x=0;x < W;x++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133787/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133787/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp23 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp124 = icmp eq i32 %1, 0
%or.cond25 = select i1 %cmp23, i1 %cmp124, i1 false
br i1 %or.cond25, label %for.end13, label %for.cond2.preheader
for.cond2.preheader: ; preds = %entry, %for.end11
%2 = phi i32 [ %6, %for.end11 ], [ %0, %entry ]
%cmp320 = icmp sgt i32 %2, 0
br i1 %cmp320, label %for.cond4.preheader, label %for.end11
for.cond4.preheader: ; preds = %for.cond2.preheader, %for.end
%i.021 = phi i32 [ %inc10, %for.end ], [ 0, %for.cond2.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp518 = icmp sgt i32 %3, 0
br i1 %cmp518, label %for.body6, label %for.end
for.body6: ; preds = %for.cond4.preheader, %for.body6
%x.019 = phi i32 [ %inc, %for.body6 ], [ 0, %for.cond4.preheader ]
%putchar17 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %x.019, 1
%4 = load i32, ptr %W, align 4, !tbaa !5
%cmp5 = icmp slt i32 %inc, %4
br i1 %cmp5, label %for.body6, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body6, %for.cond4.preheader
%putchar16 = call i32 @putchar(i32 10)
%inc10 = add nuw nsw i32 %i.021, 1
%5 = load i32, ptr %H, align 4, !tbaa !5
%cmp3 = icmp slt i32 %inc10, %5
br i1 %cmp3, label %for.cond4.preheader, label %for.end11, !llvm.loop !11
for.end11: ; preds = %for.end, %for.cond2.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %for.end13, label %for.cond2.preheader
for.end13: ; preds = %for.end11, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
//print a Rectangle
#include<stdio.h>
int main()
{
int i,j,k,a[100][2],count;
i=0;
while(1){
start:
scanf("%d %d",&a[i][0],&a[i][1]);
if ( a[i][0]>300 || a[i][1]>300)
goto start;
if(a[i][0]==0 && a[i][1]==0)
break;
i++;
}
count=i;
for(i=0;i<count;i++){
for(j=0;j<a[i][0];j++){
for(k=0;k<a[i][1];k++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133844/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133844/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca [100 x [2 x i32]], align 16
call void @llvm.lifetime.start.p0(i64 800, ptr nonnull %a) #4
br label %while.cond
while.cond: ; preds = %if.end, %entry
%indvars.iv73 = phi i32 [ %indvars.iv.next74, %if.end ], [ 0, %entry ]
%indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 0, %entry ]
%arrayidx = getelementptr inbounds [100 x [2 x i32]], ptr %a, i64 0, i64 %indvars.iv
%arrayidx4 = getelementptr inbounds [100 x [2 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 1
br label %start
start: ; preds = %start.backedge, %while.cond
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx4)
%0 = load i32, ptr %arrayidx, align 8, !tbaa !5
%cmp = icmp sgt i32 %0, 300
br i1 %cmp, label %start.backedge, label %lor.lhs.false
lor.lhs.false: ; preds = %start
%1 = load i32, ptr %arrayidx4, align 4, !tbaa !5
%cmp11 = icmp sgt i32 %1, 300
br i1 %cmp11, label %start.backedge, label %if.end
start.backedge: ; preds = %lor.lhs.false, %start
br label %start
if.end: ; preds = %lor.lhs.false
%2 = or i32 %1, %0
%or.cond = icmp eq i32 %2, 0
%indvars.iv.next = add nuw i64 %indvars.iv, 1
%indvars.iv.next74 = add nuw i32 %indvars.iv73, 1
br i1 %or.cond, label %for.cond.preheader, label %while.cond
for.cond.preheader: ; preds = %if.end
%3 = and i64 %indvars.iv, 4294967295
%cmp2266.not = icmp eq i64 %3, 0
br i1 %cmp2266.not, label %for.end44, label %for.cond23.preheader.preheader
for.cond23.preheader.preheader: ; preds = %for.cond.preheader
%wide.trip.count = zext i32 %indvars.iv73 to i64
br label %for.cond23.preheader
for.cond23.preheader: ; preds = %for.cond23.preheader.preheader, %for.end40
%indvars.iv70 = phi i64 [ 0, %for.cond23.preheader.preheader ], [ %indvars.iv.next71, %for.end40 ]
%arrayidx25 = getelementptr inbounds [100 x [2 x i32]], ptr %a, i64 0, i64 %indvars.iv70
%4 = load i32, ptr %arrayidx25, align 8, !tbaa !5
%cmp2764 = icmp sgt i32 %4, 0
br i1 %cmp2764, label %for.cond29.preheader.lr.ph, label %for.end40
for.cond29.preheader.lr.ph: ; preds = %for.cond23.preheader
%arrayidx32 = getelementptr inbounds [100 x [2 x i32]], ptr %a, i64 0, i64 %indvars.iv70, i64 1
br label %for.cond29.preheader
for.cond29.preheader: ; preds = %for.cond29.preheader.lr.ph, %for.end
%j.065 = phi i32 [ 0, %for.cond29.preheader.lr.ph ], [ %inc39, %for.end ]
%5 = load i32, ptr %arrayidx32, align 4, !tbaa !5
%cmp3362 = icmp sgt i32 %5, 0
br i1 %cmp3362, label %for.body34, label %for.end
for.body34: ; preds = %for.cond29.preheader, %for.body34
%k.063 = phi i32 [ %inc36, %for.body34 ], [ 0, %for.cond29.preheader ]
%putchar60 = call i32 @putchar(i32 35)
%inc36 = add nuw nsw i32 %k.063, 1
%6 = load i32, ptr %arrayidx32, align 4, !tbaa !5
%cmp33 = icmp slt i32 %inc36, %6
br i1 %cmp33, label %for.body34, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body34, %for.cond29.preheader
%putchar59 = call i32 @putchar(i32 10)
%inc39 = add nuw nsw i32 %j.065, 1
%7 = load i32, ptr %arrayidx25, align 8, !tbaa !5
%cmp27 = icmp slt i32 %inc39, %7
br i1 %cmp27, label %for.cond29.preheader, label %for.end40, !llvm.loop !11
for.end40: ; preds = %for.end, %for.cond23.preheader
%putchar = call i32 @putchar(i32 10)
%indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
%exitcond.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count
br i1 %exitcond.not, label %for.end44, label %for.cond23.preheader, !llvm.loop !12
for.end44: ; preds = %for.end40, %for.cond.preheader
call void @llvm.lifetime.end.p0(i64 800, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include<stdio.h>
int h[100];
int w[100];
int i;
int j;
int k;
int main(void){
for(i=0;i<100;i++){
scanf("%d %d",&h[i],&w[i]);
if(h[i] == 0 && w[i] == 0){
break;
}
}
for(i=0;i<100;i++){
for(j=0;j<h[i];j++){
for(k=0;k<w[i];k++){
printf("#");
}
printf("\n");
}
printf("\n");
if(h[i+1] == 0 && w[i+1] == 0){
break;
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133888/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133888/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@i = dso_local local_unnamed_addr global i32 0, align 4
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@h = dso_local global [100 x i32] zeroinitializer, align 16
@w = dso_local global [100 x i32] zeroinitializer, align 16
@j = dso_local local_unnamed_addr global i32 0, align 4
@k = dso_local local_unnamed_addr global i32 0, align 4
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
store i32 0, ptr @i, align 4, !tbaa !5
br label %for.body
for.body: ; preds = %entry, %for.inc
%storemerge49 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
%idxprom = sext i32 %storemerge49 to i64
%arrayidx = getelementptr inbounds [100 x i32], ptr @h, i64 0, i64 %idxprom
%arrayidx2 = getelementptr inbounds [100 x i32], ptr @w, i64 0, i64 %idxprom
%call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx2)
%0 = load i32, ptr @i, align 4, !tbaa !5
%idxprom3 = sext i32 %0 to i64
%arrayidx4 = getelementptr inbounds [100 x i32], ptr @h, i64 0, i64 %idxprom3
%1 = load i32, ptr %arrayidx4, align 4, !tbaa !5
%cmp5 = icmp eq i32 %1, 0
br i1 %cmp5, label %land.lhs.true, label %for.inc
land.lhs.true: ; preds = %for.body
%arrayidx7 = getelementptr inbounds [100 x i32], ptr @w, i64 0, i64 %idxprom3
%2 = load i32, ptr %arrayidx7, align 4, !tbaa !5
%cmp8 = icmp eq i32 %2, 0
br i1 %cmp8, label %for.end, label %for.inc
for.inc: ; preds = %for.body, %land.lhs.true
%inc = add nsw i32 %0, 1
store i32 %inc, ptr @i, align 4, !tbaa !5
%cmp = icmp slt i32 %0, 99
br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9
for.end: ; preds = %land.lhs.true, %for.inc
store i32 0, ptr @i, align 4, !tbaa !5
%.pre = load i32, ptr @h, align 16, !tbaa !5
br label %for.cond12.preheader
for.cond12.preheader: ; preds = %for.end, %for.inc41
%3 = phi i32 [ %.pre, %for.end ], [ %14, %for.inc41 ]
%4 = phi i32 [ 0, %for.end ], [ %add, %for.inc41 ]
store i32 0, ptr @j, align 4, !tbaa !5
%cmp1555 = icmp sgt i32 %3, 0
br i1 %cmp1555, label %for.cond17.preheader, label %for.end29
for.cond17.preheader: ; preds = %for.cond12.preheader, %for.end25
%5 = phi i32 [ %11, %for.end25 ], [ %4, %for.cond12.preheader ]
store i32 0, ptr @k, align 4, !tbaa !5
%idxprom1850 = sext i32 %5 to i64
%arrayidx1951 = getelementptr inbounds [100 x i32], ptr @w, i64 0, i64 %idxprom1850
%6 = load i32, ptr %arrayidx1951, align 4, !tbaa !5
%cmp2052 = icmp sgt i32 %6, 0
br i1 %cmp2052, label %for.body21, label %for.end25
for.body21: ; preds = %for.cond17.preheader, %for.body21
%putchar48 = tail call i32 @putchar(i32 35)
%7 = load i32, ptr @k, align 4, !tbaa !5
%inc24 = add nsw i32 %7, 1
store i32 %inc24, ptr @k, align 4, !tbaa !5
%8 = load i32, ptr @i, align 4, !tbaa !5
%idxprom18 = sext i32 %8 to i64
%arrayidx19 = getelementptr inbounds [100 x i32], ptr @w, i64 0, i64 %idxprom18
%9 = load i32, ptr %arrayidx19, align 4, !tbaa !5
%cmp20 = icmp slt i32 %inc24, %9
br i1 %cmp20, label %for.body21, label %for.end25, !llvm.loop !11
for.end25: ; preds = %for.body21, %for.cond17.preheader
%putchar47 = tail call i32 @putchar(i32 10)
%10 = load i32, ptr @j, align 4, !tbaa !5
%inc28 = add nsw i32 %10, 1
store i32 %inc28, ptr @j, align 4, !tbaa !5
%11 = load i32, ptr @i, align 4, !tbaa !5
%idxprom13 = sext i32 %11 to i64
%arrayidx14 = getelementptr inbounds [100 x i32], ptr @h, i64 0, i64 %idxprom13
%12 = load i32, ptr %arrayidx14, align 4, !tbaa !5
%cmp15 = icmp slt i32 %inc28, %12
br i1 %cmp15, label %for.cond17.preheader, label %for.end29, !llvm.loop !12
for.end29: ; preds = %for.end25, %for.cond12.preheader
%putchar = tail call i32 @putchar(i32 10)
%13 = load i32, ptr @i, align 4, !tbaa !5
%add = add nsw i32 %13, 1
%idxprom31 = sext i32 %add to i64
%arrayidx32 = getelementptr inbounds [100 x i32], ptr @h, i64 0, i64 %idxprom31
%14 = load i32, ptr %arrayidx32, align 4, !tbaa !5
%cmp33 = icmp eq i32 %14, 0
br i1 %cmp33, label %land.lhs.true34, label %for.inc41
land.lhs.true34: ; preds = %for.end29
%arrayidx37 = getelementptr inbounds [100 x i32], ptr @w, i64 0, i64 %idxprom31
%15 = load i32, ptr %arrayidx37, align 4, !tbaa !5
%cmp38 = icmp eq i32 %15, 0
br i1 %cmp38, label %for.end43, label %for.inc41
for.inc41: ; preds = %for.end29, %land.lhs.true34
store i32 %add, ptr @i, align 4, !tbaa !5
%cmp10 = icmp slt i32 %13, 99
br i1 %cmp10, label %for.cond12.preheader, label %for.end43, !llvm.loop !13
for.end43: ; preds = %land.lhs.true34, %for.inc41
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 @putchar(i32 noundef) local_unnamed_addr #2
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
|
#include <stdio.h>
int main()
{
int h,w,i,n;
while(1){
scanf("%d %d",&h,&w);
if(h == 0 && w == 0) break;
for(i = 0; i < h ; i++){
for(n=0;n<w;n++)printf("#");
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133930/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133930/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%h = alloca i32, align 4
%w = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%0 = load i32, ptr %h, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %w, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %w, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%n.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %n.017, 1
%4 = load i32, ptr %w, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.019, 1
%5 = load i32, ptr %h, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%6 = load i32, ptr %h, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %w, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include<stdio.h>
int main(void){
int H,W,i,j;
while(1){
scanf("%d %d",&H,&W);
if(H==0&&W==0){
break;
}
for(i=0;i<H;i++){
for(j=0;j<W;j++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133974/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133974/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.017, 1
%4 = load i32, ptr %W, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.019, 1
%5 = load i32, ptr %H, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
int
main (
int argc,
char *argv[ ]
)
{
int i, j;
for ( ; ; )
{
int h, w;
scanf ( "%d%d", &h, &w );
if ( h == 0 && w == 0 ) break ;
for ( i = 0; i < h; ++i )
{
for ( j = 0; j < w; ++j )
{
putchar ( '#' );
}
puts ( "" );
}
puts ( "" );
}
return ( 0 );
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134016/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134016/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
@stdout = external local_unnamed_addr global ptr, align 8
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 {
entry:
%h = alloca i32, align 4
%w = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #3
%call28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%0 = load i32, ptr %h, align 4, !tbaa !5
%cmp29 = icmp eq i32 %0, 0
%1 = load i32, ptr %w, align 4
%cmp130 = icmp eq i32 %1, 0
%or.cond31 = select i1 %cmp29, i1 %cmp130, i1 false
br i1 %or.cond31, label %for.end14, label %for.cond2.preheader
for.cond2.preheader: ; preds = %entry, %cleanup
%2 = phi i32 [ %9, %cleanup ], [ %0, %entry ]
%cmp326 = icmp sgt i32 %2, 0
br i1 %cmp326, label %for.cond4.preheader, label %cleanup
for.cond4.preheader: ; preds = %for.cond2.preheader, %for.end
%i.027 = phi i32 [ %inc10, %for.end ], [ 0, %for.cond2.preheader ]
%3 = load i32, ptr %w, align 4, !tbaa !5
%cmp524 = icmp sgt i32 %3, 0
br i1 %cmp524, label %for.body6, label %for.end
for.body6: ; preds = %for.cond4.preheader, %for.body6
%j.025 = phi i32 [ %inc, %for.body6 ], [ 0, %for.cond4.preheader ]
%4 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i = call noundef i32 @putc(i32 noundef 35, ptr noundef %4)
%inc = add nuw nsw i32 %j.025, 1
%5 = load i32, ptr %w, align 4, !tbaa !5
%cmp5 = icmp slt i32 %inc, %5
br i1 %cmp5, label %for.body6, label %for.end, !llvm.loop !11
for.end: ; preds = %for.body6, %for.cond4.preheader
%6 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i20 = call noundef i32 @putc(i32 noundef 10, ptr noundef %6)
%inc10 = add nuw nsw i32 %i.027, 1
%7 = load i32, ptr %h, align 4, !tbaa !5
%cmp3 = icmp slt i32 %inc10, %7
br i1 %cmp3, label %for.cond4.preheader, label %cleanup, !llvm.loop !13
cleanup: ; preds = %for.end, %for.cond2.preheader
%8 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i21 = call noundef i32 @putc(i32 noundef 10, ptr noundef %8)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%9 = load i32, ptr %h, align 4, !tbaa !5
%cmp = icmp eq i32 %9, 0
%10 = load i32, ptr %w, align 4
%cmp1 = icmp eq i32 %10, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %for.end14, label %for.cond2.preheader
for.end14: ; preds = %cleanup, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
|
#include<stdio.h>
int main(){
int t;
scanf("%d",&t);
while(t>0){
long long int a[4];
for(int i=0;i<4;i++){
scanf("%lld",&a[i]);
}
int count = 0;
int zcount = 0;
for(int i=0;i<4;i++){
if(a[i]%2!=0){
count++;
}
if(a[i] == 0){
zcount++;
}
}
if(count == 0){
printf("Yes\n");
}
else if(count == 1){
printf("Yes\n");
}
else if(count == 2){
printf("No\n");
}
else if(count == 3){
if(zcount == 0){
printf("Yes\n");
}
else{
if(a[3] == 0 ){
printf("Yes\n");
}
else{
printf("No\n");
}
}
}
else if(count == 4){
printf("Yes\n");
}
t--;
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13406/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13406/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1
@str.7 = private unnamed_addr constant [3 x i8] c"No\00", align 1
@str.9 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%t = alloca i32, align 4
%a = alloca [4 x i64], align 16
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)
%.pr = load i32, ptr %t, align 4, !tbaa !5
%cmp76 = icmp sgt i32 %.pr, 0
br i1 %cmp76, label %while.body.lr.ph, label %while.end
while.body.lr.ph: ; preds = %entry
%arrayidx38 = getelementptr inbounds [4 x i64], ptr %a, i64 0, i64 3
%arrayidx.1 = getelementptr inbounds [4 x i64], ptr %a, i64 0, i64 1
%arrayidx.2 = getelementptr inbounds [4 x i64], ptr %a, i64 0, i64 2
br label %while.body
while.body: ; preds = %while.body.lr.ph, %if.end54
call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %a) #4
%call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a)
%call2.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx.1)
%call2.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx.2)
%call2.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx38)
%0 = load i64, ptr %a, align 16, !tbaa !9
%1 = trunc i64 %0 to i32
%2 = and i32 %1, 1
%3 = load i64, ptr %arrayidx.1, align 8, !tbaa !9
%4 = trunc i64 %3 to i32
%5 = and i32 %4, 1
%spec.select.1 = add nuw nsw i32 %5, %2
%6 = load i64, ptr %arrayidx.2, align 16, !tbaa !9
%7 = trunc i64 %6 to i32
%8 = and i32 %7, 1
%spec.select.2 = add nuw nsw i32 %8, %spec.select.1
%9 = load i64, ptr %arrayidx38, align 8, !tbaa !9
%10 = trunc i64 %9 to i32
%11 = and i32 %10, 1
%spec.select.3 = add nuw nsw i32 %11, %spec.select.2
switch i32 %spec.select.3, label %if.end54 [
i32 0, label %if.end54.sink.split
i32 1, label %if.then25
i32 2, label %if.then29
i32 3, label %if.then33
i32 4, label %if.then48
]
if.then25: ; preds = %while.body
br label %if.end54.sink.split
if.then29: ; preds = %while.body
br label %if.end54.sink.split
if.then33: ; preds = %while.body
%cmp14.3 = icmp eq i64 %9, 0
%cmp14 = icmp eq i64 %0, 0
%inc16 = zext i1 %cmp14 to i32
%cmp14.1 = icmp eq i64 %3, 0
%inc16.1 = zext i1 %cmp14.1 to i32
%zcount.1.1 = add nuw nsw i32 %inc16, %inc16.1
%cmp14.2 = icmp eq i64 %6, 0
%inc16.2 = zext i1 %cmp14.2 to i32
%zcount.1.2 = add nuw nsw i32 %zcount.1.1, %inc16.2
%inc16.3.neg = sext i1 %cmp14.3 to i32
%cmp34 = icmp eq i32 %zcount.1.2, %inc16.3.neg
%str.5.str.4 = select i1 %cmp14.3, ptr @str.9, ptr @str.7
%spec.select = select i1 %cmp34, ptr @str.9, ptr %str.5.str.4
br label %if.end54.sink.split
if.then48: ; preds = %while.body
br label %if.end54.sink.split
if.end54.sink.split: ; preds = %if.then33, %while.body, %if.then29, %if.then48, %if.then25
%str.8.sink = phi ptr [ @str.9, %if.then25 ], [ @str.9, %if.then48 ], [ @str.7, %if.then29 ], [ @str.9, %while.body ], [ %spec.select, %if.then33 ]
%puts70 = call i32 @puts(ptr nonnull dereferenceable(1) %str.8.sink)
br label %if.end54
if.end54: ; preds = %if.end54.sink.split, %while.body
%12 = load i32, ptr %t, align 4, !tbaa !5
%dec = add nsw i32 %12, -1
store i32 %dec, ptr %t, align 4, !tbaa !5
call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %a) #4
%cmp = icmp sgt i32 %12, 1
br i1 %cmp, label %while.body, label %while.end, !llvm.loop !11
while.end: ; preds = %if.end54, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
|
#include <stdio.h>
int main (){
int H,W,s,s2,s3,dr[1000]={0},dr2[1000]={0},c=0,c2=0;
while (1){
scanf ("%d %d",&H,&W);
if (H==0&&W==0) break;
dr[c]=H;
dr2[c]=W;
c++;
}
for (s=0;s<c;s++){
for (s2=0;s2<dr[c2];s2++){
for (s3=0;s3<dr2[c2];s3++){
if (s3==dr2[c2]-1){
printf ("#\n");
}
else {
printf ("#");
}
}
}
c2++;
printf ("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134117/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134117/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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"#\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
%dr = alloca [1000 x i32], align 16
%dr2 = alloca [1000 x i32], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #5
call void @llvm.lifetime.start.p0(i64 4000, ptr nonnull %dr) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4000) %dr, i8 0, i64 4000, i1 false)
call void @llvm.lifetime.start.p0(i64 4000, ptr nonnull %dr2) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4000) %dr2, i8 0, i64 4000, i1 false)
%call42 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp43 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp144 = icmp eq i32 %1, 0
%or.cond45 = select i1 %cmp43, i1 %cmp144, i1 false
br i1 %or.cond45, label %for.end30, label %if.end
for.cond.preheader: ; preds = %if.end
%2 = and i64 %indvars.iv.next, 4294967295
%cmp451.not = icmp eq i64 %2, 0
br i1 %cmp451.not, label %for.end30, label %for.cond5.preheader.preheader
for.cond5.preheader.preheader: ; preds = %for.cond.preheader
%wide.trip.count = and i64 %indvars.iv.next, 4294967295
br label %for.cond5.preheader
if.end: ; preds = %entry, %if.end
%indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 0, %entry ]
%3 = phi i32 [ %6, %if.end ], [ %1, %entry ]
%4 = phi i32 [ %5, %if.end ], [ %0, %entry ]
%arrayidx = getelementptr inbounds [1000 x i32], ptr %dr, i64 0, i64 %indvars.iv
store i32 %4, ptr %arrayidx, align 4, !tbaa !5
%arrayidx3 = getelementptr inbounds [1000 x i32], ptr %dr2, i64 0, i64 %indvars.iv
store i32 %3, ptr %arrayidx3, align 4, !tbaa !5
%indvars.iv.next = add nuw i64 %indvars.iv, 1
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%5 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %5, 0
%6 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %6, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %for.cond.preheader, label %if.end
for.cond5.preheader: ; preds = %for.cond5.preheader.preheader, %for.end25
%indvars.iv57 = phi i64 [ 0, %for.cond5.preheader.preheader ], [ %indvars.iv.next58, %for.end25 ]
%arrayidx7 = getelementptr inbounds [1000 x i32], ptr %dr, i64 0, i64 %indvars.iv57
%7 = load i32, ptr %arrayidx7, align 4, !tbaa !5
%cmp849 = icmp sgt i32 %7, 0
br i1 %cmp849, label %for.cond10.preheader.lr.ph, label %for.end25
for.cond10.preheader.lr.ph: ; preds = %for.cond5.preheader
%arrayidx12 = getelementptr inbounds [1000 x i32], ptr %dr2, i64 0, i64 %indvars.iv57
%8 = load i32, ptr %arrayidx12, align 4, !tbaa !5
%cmp1347 = icmp sgt i32 %8, 0
%sub = add nsw i32 %8, -1
br i1 %cmp1347, label %for.cond10.preheader.us, label %for.end25
for.cond10.preheader.us: ; preds = %for.cond10.preheader.lr.ph, %for.cond10.for.inc23_crit_edge.us
%s2.050.us = phi i32 [ %inc24.us, %for.cond10.for.inc23_crit_edge.us ], [ 0, %for.cond10.preheader.lr.ph ]
br label %for.body14.us
for.body14.us: ; preds = %for.cond10.preheader.us, %for.inc.us
%s3.048.us = phi i32 [ 0, %for.cond10.preheader.us ], [ %inc22.us, %for.inc.us ]
%cmp17.us = icmp eq i32 %s3.048.us, %sub
br i1 %cmp17.us, label %if.then18.us, label %if.else.us
if.else.us: ; preds = %for.body14.us
%putchar41.us = call i32 @putchar(i32 35)
br label %for.inc.us
if.then18.us: ; preds = %for.body14.us
%puts.us = call i32 @puts(ptr nonnull dereferenceable(1) @str)
br label %for.inc.us
for.inc.us: ; preds = %if.then18.us, %if.else.us
%inc22.us = add nuw nsw i32 %s3.048.us, 1
%exitcond.not = icmp eq i32 %inc22.us, %8
br i1 %exitcond.not, label %for.cond10.for.inc23_crit_edge.us, label %for.body14.us, !llvm.loop !9
for.cond10.for.inc23_crit_edge.us: ; preds = %for.inc.us
%inc24.us = add nuw nsw i32 %s2.050.us, 1
%exitcond56.not = icmp eq i32 %inc24.us, %7
br i1 %exitcond56.not, label %for.end25, label %for.cond10.preheader.us, !llvm.loop !11
for.end25: ; preds = %for.cond10.for.inc23_crit_edge.us, %for.cond10.preheader.lr.ph, %for.cond5.preheader
%indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
%putchar = call i32 @putchar(i32 10)
%exitcond62.not = icmp eq i64 %indvars.iv.next58, %wide.trip.count
br i1 %exitcond62.not, label %for.end30, label %for.cond5.preheader, !llvm.loop !12
for.end30: ; preds = %for.end25, %entry, %for.cond.preheader
call void @llvm.lifetime.end.p0(i64 4000, ptr nonnull %dr2) #5
call void @llvm.lifetime.end.p0(i64 4000, ptr nonnull %dr) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4
; 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include<stdio.h>
int main(){
int H[3000], W[3000], i, l, k, n;
for(i=0;;i++){
scanf("%d %d", &H[i], &W[i]);
if(H[i]==0 && W[i]==0){
break;
}
}
n = i-1;
for(i=0;i<=n;i++){
for(l=0;l<H[i];l++){
for(k=0;k<W[i];k++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134168/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134168/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca [3000 x i32], align 16
%W = alloca [3000 x i32], align 16
call void @llvm.lifetime.start.p0(i64 12000, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 12000, ptr nonnull %W) #4
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%indvars.iv55 = phi i32 [ %indvars.iv.next56, %for.inc ], [ 0, %entry ]
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
%arrayidx = getelementptr inbounds [3000 x i32], ptr %H, i64 0, i64 %indvars.iv
%arrayidx2 = getelementptr inbounds [3000 x i32], ptr %W, i64 0, i64 %indvars.iv
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx2)
%0 = load i32, ptr %arrayidx, align 4, !tbaa !5
%cmp = icmp eq i32 %0, 0
br i1 %cmp, label %land.lhs.true, label %for.inc
land.lhs.true: ; preds = %for.cond
%1 = load i32, ptr %arrayidx2, align 4, !tbaa !5
%cmp7 = icmp eq i32 %1, 0
br i1 %cmp7, label %for.cond8.preheader, label %for.inc
for.cond8.preheader: ; preds = %land.lhs.true
%2 = and i64 %indvars.iv, 4294967295
%cmp9.not.not49.not = icmp eq i64 %2, 0
br i1 %cmp9.not.not49.not, label %for.end31, label %for.cond10.preheader.preheader
for.cond10.preheader.preheader: ; preds = %for.cond8.preheader
%wide.trip.count = zext i32 %indvars.iv55 to i64
br label %for.cond10.preheader
for.inc: ; preds = %for.cond, %land.lhs.true
%indvars.iv.next = add nuw i64 %indvars.iv, 1
%indvars.iv.next56 = add nuw i32 %indvars.iv55, 1
br label %for.cond
for.cond10.preheader: ; preds = %for.cond10.preheader.preheader, %for.end27
%indvars.iv52 = phi i64 [ 0, %for.cond10.preheader.preheader ], [ %indvars.iv.next53, %for.end27 ]
%arrayidx12 = getelementptr inbounds [3000 x i32], ptr %H, i64 0, i64 %indvars.iv52
%3 = load i32, ptr %arrayidx12, align 4, !tbaa !5
%cmp1347 = icmp sgt i32 %3, 0
br i1 %cmp1347, label %for.cond15.preheader.lr.ph, label %for.end27
for.cond15.preheader.lr.ph: ; preds = %for.cond10.preheader
%arrayidx17 = getelementptr inbounds [3000 x i32], ptr %W, i64 0, i64 %indvars.iv52
br label %for.cond15.preheader
for.cond15.preheader: ; preds = %for.cond15.preheader.lr.ph, %for.end23
%l.048 = phi i32 [ 0, %for.cond15.preheader.lr.ph ], [ %inc26, %for.end23 ]
%4 = load i32, ptr %arrayidx17, align 4, !tbaa !5
%cmp1845 = icmp sgt i32 %4, 0
br i1 %cmp1845, label %for.body19, label %for.end23
for.body19: ; preds = %for.cond15.preheader, %for.body19
%k.046 = phi i32 [ %inc22, %for.body19 ], [ 0, %for.cond15.preheader ]
%putchar44 = call i32 @putchar(i32 35)
%inc22 = add nuw nsw i32 %k.046, 1
%5 = load i32, ptr %arrayidx17, align 4, !tbaa !5
%cmp18 = icmp slt i32 %inc22, %5
br i1 %cmp18, label %for.body19, label %for.end23, !llvm.loop !9
for.end23: ; preds = %for.body19, %for.cond15.preheader
%putchar43 = call i32 @putchar(i32 10)
%inc26 = add nuw nsw i32 %l.048, 1
%6 = load i32, ptr %arrayidx12, align 4, !tbaa !5
%cmp13 = icmp slt i32 %inc26, %6
br i1 %cmp13, label %for.cond15.preheader, label %for.end27, !llvm.loop !11
for.end27: ; preds = %for.end23, %for.cond10.preheader
%putchar = call i32 @putchar(i32 10)
%indvars.iv.next53 = add nuw nsw i64 %indvars.iv52, 1
%exitcond.not = icmp eq i64 %indvars.iv.next53, %wide.trip.count
br i1 %exitcond.not, label %for.end31, label %for.cond10.preheader, !llvm.loop !12
for.end31: ; preds = %for.end27, %for.cond8.preheader
call void @llvm.lifetime.end.p0(i64 12000, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 12000, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include <stdio.h>
int main(void) {
int H, W;
int i, j;
while(1){
scanf("%d %d", &H, &W);
if(H == 0 && W == 0){
break;
}
for(i = 0; i < H; i++){
for(j = 0; j < W; j++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134210/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134210/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.017, 1
%4 = load i32, ptr %W, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.019, 1
%5 = load i32, ptr %H, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
int main(){
int h,w;
while(1){
scanf("%d %d",&h,&w);
if(h == 0 && w == 0)
return 0;
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
putchar('#');
}
putchar('\n');
}
putchar('\n');
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134254/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134254/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
@stdout = external local_unnamed_addr global ptr, align 8
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%h = alloca i32, align 4
%w = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #3
%call21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%0 = load i32, ptr %h, align 4, !tbaa !5
%cmp22 = icmp eq i32 %0, 0
%1 = load i32, ptr %w, align 4
%cmp123 = icmp eq i32 %1, 0
%or.cond24 = select i1 %cmp22, i1 %cmp123, i1 false
br i1 %or.cond24, label %if.then, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.cond.cleanup
%2 = phi i32 [ %5, %for.cond.cleanup ], [ %0, %entry ]
%cmp219 = icmp sgt i32 %2, 0
br i1 %cmp219, label %for.cond3.preheader, label %for.cond.cleanup
if.then: ; preds = %for.cond.cleanup, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #3
ret i32 0
for.cond3.preheader: ; preds = %for.cond.preheader, %for.cond.cleanup5
%i.020 = phi i32 [ %inc10, %for.cond.cleanup5 ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %w, align 4, !tbaa !5
%cmp417 = icmp sgt i32 %3, 0
br i1 %cmp417, label %for.body6, label %for.cond.cleanup5
for.cond.cleanup: ; preds = %for.cond.cleanup5, %for.cond.preheader
%4 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i = call i32 @putc(i32 noundef 10, ptr noundef %4)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%5 = load i32, ptr %h, align 4, !tbaa !5
%cmp = icmp eq i32 %5, 0
%6 = load i32, ptr %w, align 4
%cmp1 = icmp eq i32 %6, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %if.then, label %for.cond.preheader
for.cond.cleanup5: ; preds = %for.body6, %for.cond3.preheader
%7 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i15 = call i32 @putc(i32 noundef 10, ptr noundef %7)
%inc10 = add nuw nsw i32 %i.020, 1
%8 = load i32, ptr %h, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc10, %8
br i1 %cmp2, label %for.cond3.preheader, label %for.cond.cleanup, !llvm.loop !11
for.body6: ; preds = %for.cond3.preheader, %for.body6
%j.018 = phi i32 [ %inc, %for.body6 ], [ 0, %for.cond3.preheader ]
%9 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i16 = call i32 @putc(i32 noundef 35, ptr noundef %9)
%inc = add nuw nsw i32 %j.018, 1
%10 = load i32, ptr %w, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %10
br i1 %cmp4, label %for.body6, label %for.cond.cleanup5, !llvm.loop !13
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
|
#include<stdio.h>
int main(){
int h,w;
int i,j;
while(1)
{
scanf("%d %d",&h,&w);
if(h==0 && w==0)
{
break;
}
for(i=0;i<h;i++)
{
for(j=0;j<w;j++)
{
printf("#");
}
printf("\n");
}
printf("\n");
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134298/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134298/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%h = alloca i32, align 4
%w = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%0 = load i32, ptr %h, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %w, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %w, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.017, 1
%4 = load i32, ptr %w, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.019, 1
%5 = load i32, ptr %h, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%6 = load i32, ptr %h, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %w, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include<stdio.h>
int main()
{
int h,w;
scanf("%d %d", &h, &w);
while(h!=0 && w!=0) {
for(int i=0; i<h; ++i) {
for(int j=0; j<w; ++j)
printf("#");
printf("\n");
}
printf("\n");
scanf("%d %d", &h, &w);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134348/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134348/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%h = alloca i32, align 4
%w = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%0 = load i32, ptr %h, align 4, !tbaa !5
%cmp22 = icmp ne i32 %0, 0
%1 = load i32, ptr %w, align 4
%cmp123 = icmp ne i32 %1, 0
%2 = select i1 %cmp22, i1 %cmp123, i1 false
br i1 %2, label %for.cond.preheader, label %while.end
for.cond.preheader: ; preds = %entry, %for.cond.cleanup
%3 = phi i32 [ %5, %for.cond.cleanup ], [ %0, %entry ]
%cmp220 = icmp sgt i32 %3, 0
br i1 %cmp220, label %for.cond3.preheader, label %for.cond.cleanup
for.cond3.preheader: ; preds = %for.cond.preheader, %for.cond.cleanup5
%i.021 = phi i32 [ %inc10, %for.cond.cleanup5 ], [ 0, %for.cond.preheader ]
%4 = load i32, ptr %w, align 4, !tbaa !5
%cmp418 = icmp sgt i32 %4, 0
br i1 %cmp418, label %for.body6, label %for.cond.cleanup5
for.cond.cleanup: ; preds = %for.cond.cleanup5, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%5 = load i32, ptr %h, align 4, !tbaa !5
%cmp = icmp ne i32 %5, 0
%6 = load i32, ptr %w, align 4
%cmp1 = icmp ne i32 %6, 0
%7 = select i1 %cmp, i1 %cmp1, i1 false
br i1 %7, label %for.cond.preheader, label %while.end, !llvm.loop !9
for.cond.cleanup5: ; preds = %for.body6, %for.cond3.preheader
%putchar16 = call i32 @putchar(i32 10)
%inc10 = add nuw nsw i32 %i.021, 1
%8 = load i32, ptr %h, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc10, %8
br i1 %cmp2, label %for.cond3.preheader, label %for.cond.cleanup, !llvm.loop !11
for.body6: ; preds = %for.cond3.preheader, %for.body6
%j.019 = phi i32 [ %inc, %for.body6 ], [ 0, %for.cond3.preheader ]
%putchar17 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.019, 1
%9 = load i32, ptr %w, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %9
br i1 %cmp4, label %for.body6, label %for.cond.cleanup5, !llvm.loop !12
while.end: ; preds = %for.cond.cleanup, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include<stdio.h>
int main(){
int h,w,i,j;
while(1){
scanf("%d %d", &h, &w);
if( w == 0 && h == 0) break;
for(i=0;i < h;i++){
for(j=0;j < w;j++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134391/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134391/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%h = alloca i32, align 4
%w = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%0 = load i32, ptr %w, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %h, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %7, %for.end10 ], [ %1, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %w, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.017, 1
%4 = load i32, ptr %w, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.019, 1
%5 = load i32, ptr %h, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%6 = load i32, ptr %w, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %h, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include<stdio.h>
int main(){
int a,b,i,j,n;
while(1){
scanf("%d %d",&a,&b);
if(a==0&&b==0){
break;
}
for(i=0;i<a;i++){
for(j=0;j<b;j++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return (0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134441/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134441/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %b, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %b, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.017, 1
%4 = load i32, ptr %b, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.019, 1
%5 = load i32, ptr %a, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%6 = load i32, ptr %a, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %b, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include<stdio.h>
int main (){
int a,b;
int c,d;
for(;;){
scanf("%d %d",&a,&b);
if(a==0&&b==0)break;
for(c=0;c<a;c++){
for(d=0;d<b;d++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134485/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134485/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%cmp23 = icmp eq i32 %0, 0
%1 = load i32, ptr %b, align 4
%cmp124 = icmp eq i32 %1, 0
%or.cond25 = select i1 %cmp23, i1 %cmp124, i1 false
br i1 %or.cond25, label %for.end13, label %for.cond2.preheader
for.cond2.preheader: ; preds = %entry, %for.end11
%2 = phi i32 [ %6, %for.end11 ], [ %0, %entry ]
%cmp320 = icmp sgt i32 %2, 0
br i1 %cmp320, label %for.cond4.preheader, label %for.end11
for.cond4.preheader: ; preds = %for.cond2.preheader, %for.end
%c.021 = phi i32 [ %inc10, %for.end ], [ 0, %for.cond2.preheader ]
%3 = load i32, ptr %b, align 4, !tbaa !5
%cmp518 = icmp sgt i32 %3, 0
br i1 %cmp518, label %for.body6, label %for.end
for.body6: ; preds = %for.cond4.preheader, %for.body6
%d.019 = phi i32 [ %inc, %for.body6 ], [ 0, %for.cond4.preheader ]
%putchar17 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %d.019, 1
%4 = load i32, ptr %b, align 4, !tbaa !5
%cmp5 = icmp slt i32 %inc, %4
br i1 %cmp5, label %for.body6, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body6, %for.cond4.preheader
%putchar16 = call i32 @putchar(i32 10)
%inc10 = add nuw nsw i32 %c.021, 1
%5 = load i32, ptr %a, align 4, !tbaa !5
%cmp3 = icmp slt i32 %inc10, %5
br i1 %cmp3, label %for.cond4.preheader, label %for.end11, !llvm.loop !11
for.end11: ; preds = %for.end, %for.cond2.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%6 = load i32, ptr %a, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %b, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %for.end13, label %for.cond2.preheader
for.end13: ; preds = %for.end11, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
int main(int argc, const char * argv[]) {
int H, W;
while(1){
scanf("%d %d", &H, &W);
if(H == 0 && W == 0) break;
for(int i = 0; i < H; i++){
for(int j = 0; j < W; j++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134535/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134535/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp22 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp123 = icmp eq i32 %1, 0
%or.cond24 = select i1 %cmp22, i1 %cmp123, i1 false
br i1 %or.cond24, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.cond.cleanup
%2 = phi i32 [ %4, %for.cond.cleanup ], [ %0, %entry ]
%cmp219 = icmp sgt i32 %2, 0
br i1 %cmp219, label %for.cond3.preheader, label %for.cond.cleanup
for.cond3.preheader: ; preds = %for.cond.preheader, %for.cond.cleanup5
%i.020 = phi i32 [ %inc10, %for.cond.cleanup5 ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp417 = icmp sgt i32 %3, 0
br i1 %cmp417, label %for.body6, label %for.cond.cleanup5
for.cond.cleanup: ; preds = %for.cond.cleanup5, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%4 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %4, 0
%5 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %5, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
for.cond.cleanup5: ; preds = %for.body6, %for.cond3.preheader
%putchar15 = call i32 @putchar(i32 10)
%inc10 = add nuw nsw i32 %i.020, 1
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc10, %6
br i1 %cmp2, label %for.cond3.preheader, label %for.cond.cleanup, !llvm.loop !9
for.body6: ; preds = %for.cond3.preheader, %for.body6
%j.018 = phi i32 [ %inc, %for.body6 ], [ 0, %for.cond3.preheader ]
%putchar16 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.018, 1
%7 = load i32, ptr %W, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %7
br i1 %cmp4, label %for.body6, label %for.cond.cleanup5, !llvm.loop !11
while.end: ; preds = %for.cond.cleanup, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include<stdio.h>
int main(void){
int H, W;
while(1){
scanf("%d %d\n", &H, &W);
if(H == 0 && W == 0) break;
for(int i = 0; i < H; i++){
for(int j = 0; j < W; j++){
printf("#");
}
printf("\n");
}printf("\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134586/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134586/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp22 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp123 = icmp eq i32 %1, 0
%or.cond24 = select i1 %cmp22, i1 %cmp123, i1 false
br i1 %or.cond24, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.cond.cleanup
%2 = phi i32 [ %4, %for.cond.cleanup ], [ %0, %entry ]
%cmp219 = icmp sgt i32 %2, 0
br i1 %cmp219, label %for.cond3.preheader, label %for.cond.cleanup
for.cond3.preheader: ; preds = %for.cond.preheader, %for.cond.cleanup5
%i.020 = phi i32 [ %inc10, %for.cond.cleanup5 ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp417 = icmp sgt i32 %3, 0
br i1 %cmp417, label %for.body6, label %for.cond.cleanup5
for.cond.cleanup: ; preds = %for.cond.cleanup5, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%4 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %4, 0
%5 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %5, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
for.cond.cleanup5: ; preds = %for.body6, %for.cond3.preheader
%putchar15 = call i32 @putchar(i32 10)
%inc10 = add nuw nsw i32 %i.020, 1
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc10, %6
br i1 %cmp2, label %for.cond3.preheader, label %for.cond.cleanup, !llvm.loop !9
for.body6: ; preds = %for.cond3.preheader, %for.body6
%j.018 = phi i32 [ %inc, %for.body6 ], [ 0, %for.cond3.preheader ]
%putchar16 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.018, 1
%7 = load i32, ptr %W, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %7
br i1 %cmp4, label %for.body6, label %for.cond.cleanup5, !llvm.loop !11
while.end: ; preds = %for.cond.cleanup, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include<stdio.h>
int main()
{
int W,H,i,j;
for(i=1;;i++)
{
scanf("%d%d",&H,&W);
if(H==0 && W==0){break;}
for(i=1;i<=H;i++)
{
for(j=1;j<=W;j++)
{
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134629/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134629/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%W = alloca i32, align 4
%H = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
%call25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp26 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp127 = icmp eq i32 %1, 0
%or.cond28 = select i1 %cmp26, i1 %cmp127, i1 false
br i1 %or.cond28, label %for.end15, label %for.cond2.preheader
for.cond2.preheader: ; preds = %entry, %for.end11
%2 = phi i32 [ %6, %for.end11 ], [ %0, %entry ]
%cmp3.not23 = icmp slt i32 %2, 1
br i1 %cmp3.not23, label %for.end11, label %for.cond4.preheader
for.cond4.preheader: ; preds = %for.cond2.preheader, %for.end
%i.024 = phi i32 [ %inc10, %for.end ], [ 1, %for.cond2.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp5.not21 = icmp slt i32 %3, 1
br i1 %cmp5.not21, label %for.end, label %for.body6
for.body6: ; preds = %for.cond4.preheader, %for.body6
%j.022 = phi i32 [ %inc, %for.body6 ], [ 1, %for.cond4.preheader ]
%putchar20 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.022, 1
%4 = load i32, ptr %W, align 4, !tbaa !5
%cmp5.not.not = icmp slt i32 %j.022, %4
br i1 %cmp5.not.not, label %for.body6, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body6, %for.cond4.preheader
%putchar19 = call i32 @putchar(i32 10)
%inc10 = add nuw nsw i32 %i.024, 1
%5 = load i32, ptr %H, align 4, !tbaa !5
%cmp3.not.not = icmp slt i32 %i.024, %5
br i1 %cmp3.not.not, label %for.cond4.preheader, label %for.end11, !llvm.loop !11
for.end11: ; preds = %for.end, %for.cond2.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %for.end15, label %for.cond2.preheader
for.end15: ; preds = %for.end11, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
int main()
{ int i,j;
int h,w;
while(1){
scanf("%d %d",&h,&w);
if (h==0 && w ==0) break;
for(i=0; i < h; i++){
for(j=0; j < w; j++) putchar('#');
putchar('\n');
}
putchar('\n');
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134672/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134672/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
@stdout = external local_unnamed_addr global ptr, align 8
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%h = alloca i32, align 4
%w = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #3
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%0 = load i32, ptr %h, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %w, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %9, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %w, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%4 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i = call i32 @putc(i32 noundef 35, ptr noundef %4)
%inc = add nuw nsw i32 %j.017, 1
%5 = load i32, ptr %w, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %5
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !11
for.end: ; preds = %for.body5, %for.cond3.preheader
%6 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i14 = call i32 @putc(i32 noundef 10, ptr noundef %6)
%inc9 = add nuw nsw i32 %i.019, 1
%7 = load i32, ptr %h, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %7
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !13
for.end10: ; preds = %for.end, %for.cond.preheader
%8 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i15 = call i32 @putc(i32 noundef 10, ptr noundef %8)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%9 = load i32, ptr %h, align 4, !tbaa !5
%cmp = icmp eq i32 %9, 0
%10 = load i32, ptr %w, align 4
%cmp1 = icmp eq i32 %10, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
|
#include <stdio.h>
const int N =305;
const int M = 305;
int main()
{
int m, n;
while(scanf("%d %d", &n, &m))
{
if(n == 0 && m == n)
{
break;
}
for(int i = 0; i < n; i++)
{
for(int j = 0; j < m ; j++)
{
printf("#");
}
printf("\n");
}
printf("\n");
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134722/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134722/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@N = dso_local local_unnamed_addr constant i32 305, align 4
@M = dso_local local_unnamed_addr constant i32 305, align 4
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%m = alloca i32, align 4
%n = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4
%call21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m)
%tobool.not22 = icmp eq i32 %call21, 0
br i1 %tobool.not22, label %while.end, label %while.body
while.body: ; preds = %entry, %for.cond.cleanup
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp = icmp eq i32 %0, 0
%1 = load i32, ptr %m, align 4
%cmp1 = icmp eq i32 %1, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %while.body
%cmp219 = icmp sgt i32 %0, 0
br i1 %cmp219, label %for.cond3.preheader, label %for.cond.cleanup
for.cond3.preheader: ; preds = %for.cond.preheader, %for.cond.cleanup5
%i.020 = phi i32 [ %inc10, %for.cond.cleanup5 ], [ 0, %for.cond.preheader ]
%2 = load i32, ptr %m, align 4, !tbaa !5
%cmp417 = icmp sgt i32 %2, 0
br i1 %cmp417, label %for.body6, label %for.cond.cleanup5
for.cond.cleanup: ; preds = %for.cond.cleanup5, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m)
%tobool.not = icmp eq i32 %call, 0
br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !9
for.cond.cleanup5: ; preds = %for.body6, %for.cond3.preheader
%putchar15 = call i32 @putchar(i32 10)
%inc10 = add nuw nsw i32 %i.020, 1
%3 = load i32, ptr %n, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc10, %3
br i1 %cmp2, label %for.cond3.preheader, label %for.cond.cleanup, !llvm.loop !11
for.body6: ; preds = %for.cond3.preheader, %for.body6
%j.018 = phi i32 [ %inc, %for.body6 ], [ 0, %for.cond3.preheader ]
%putchar16 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.018, 1
%4 = load i32, ptr %m, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body6, label %for.cond.cleanup5, !llvm.loop !12
while.end: ; preds = %for.cond.cleanup, %while.body, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include <stdio.h>
int main(void) {
int H, W, i, j;
while (1) {
scanf("%d %d", &H, &W);
if ((H == 0) && (W == 0)) {
break;
}
for (i = 0; i < H; i++) {
for (j = 0; j < W; j++) {
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134773/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134773/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.017, 1
%4 = load i32, ptr %W, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.019, 1
%5 = load i32, ptr %H, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
int main(){
int a,b,i,d;
while(1){
scanf("%d %d",&a,&b);
if(a==0 && b==0)break;
for(i=0;i<a;i++){
for(d=0;d<b;d++)
{
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134816/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134816/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %b, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %b, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%d.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %d.017, 1
%4 = load i32, ptr %b, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.019, 1
%5 = load i32, ptr %a, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%6 = load i32, ptr %a, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %b, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include<stdio.h>
int main()
{
int t;
scanf("%d", &t);
int i;
int a, b, c, r;
int ans;
for (i = 0; i < t; i++)
{
scanf("%d %d %d %d", &a, &b, &c, &r);
ans = 0;
if (a > b)
{
a ^= b;
b ^= a;
a ^= b;
}
if (a < c - r)
{
if (c - r < b)
ans += c - r - a;
else
ans += b - a;
}
if (b > c + r)
{
if (c + r < a)
ans += b - a;
else
ans += b - c - r;
}
printf("%d\n", ans);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13486/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13486/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [12 x i8] c"%d %d %d %d\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%t = alloca i32, align 4
%a = alloca i32, align 4
%b = alloca i32, align 4
%c = alloca i32, align 4
%r = 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)
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %r) #3
%0 = load i32, ptr %t, align 4, !tbaa !5
%cmp41 = icmp sgt i32 %0, 0
br i1 %cmp41, label %for.body, label %for.end
for.body: ; preds = %entry, %if.end29
%i.042 = phi i32 [ %inc, %if.end29 ], [ 0, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c, ptr noundef nonnull %r)
%1 = load i32, ptr %a, align 4, !tbaa !5
%2 = load i32, ptr %b, align 4, !tbaa !5
%cmp2 = icmp sgt i32 %1, %2
br i1 %cmp2, label %if.then, label %if.end
if.then: ; preds = %for.body
store i32 %1, ptr %b, align 4, !tbaa !5
store i32 %2, ptr %a, align 4, !tbaa !5
br label %if.end
if.end: ; preds = %if.then, %for.body
%3 = phi i32 [ %1, %if.then ], [ %2, %for.body ]
%4 = phi i32 [ %2, %if.then ], [ %1, %for.body ]
%5 = load i32, ptr %c, align 4, !tbaa !5
%6 = load i32, ptr %r, align 4, !tbaa !5
%sub = sub nsw i32 %5, %6
%cmp5 = icmp slt i32 %4, %sub
br i1 %cmp5, label %if.then6, label %if.end15
if.then6: ; preds = %if.end
%cmp8 = icmp slt i32 %sub, %3
br i1 %cmp8, label %if.then9, label %if.else
if.then9: ; preds = %if.then6
%sub11 = sub nsw i32 %sub, %4
br label %if.end15
if.else: ; preds = %if.then6
%sub12 = sub nsw i32 %3, %4
br label %if.end15
if.end15: ; preds = %if.then9, %if.else, %if.end
%ans.0 = phi i32 [ %sub11, %if.then9 ], [ %sub12, %if.else ], [ 0, %if.end ]
%add16 = add nsw i32 %6, %5
%cmp17 = icmp sgt i32 %3, %add16
br i1 %cmp17, label %if.then18, label %if.end29
if.then18: ; preds = %if.end15
%cmp20 = icmp slt i32 %add16, %4
br i1 %cmp20, label %if.then21, label %if.else24
if.then21: ; preds = %if.then18
%sub22 = sub i32 %ans.0, %4
%add23 = add i32 %sub22, %3
br label %if.end29
if.else24: ; preds = %if.then18
%sub26 = sub i32 %ans.0, %add16
%add27 = add i32 %sub26, %3
br label %if.end29
if.end29: ; preds = %if.then21, %if.else24, %if.end15
%ans.1 = phi i32 [ %add23, %if.then21 ], [ %add27, %if.else24 ], [ %ans.0, %if.end15 ]
%call30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %ans.1)
%inc = add nuw nsw i32 %i.042, 1
%7 = load i32, ptr %t, align 4, !tbaa !5
%cmp = icmp slt i32 %inc, %7
br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9
for.end: ; preds = %if.end29, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %r) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
|
#include<stdio.h>
int main(void){
int i , j;
int H , W;
/* true でもできるんじゃないの? */
while(1){
scanf("%d %d",&H,&W);
if(H == 0 && W == 0){
break;
}
for(i = 0; i < H;i++){
for(j = 0; j < W; j++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134902/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134902/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.017, 1
%4 = load i32, ptr %W, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.019, 1
%5 = load i32, ptr %H, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
#include <string.h>
int min(int a,int b){
if(a < b){
return a;
}
return b;
}
int main(void){
int N;
scanf("%d",&N);
char S[N];
scanf("%s",S);
int sum[N+1];
sum[0] = 0;
for (int i = 0; i < N; i++) {
sum[i+1] = sum[i];
if(S[i] == 'W') sum[i+1]++;
}
int ans = N;
for (int i = 0; i < N; i++) {
ans = min(ans,sum[i]+N-i-1-(sum[N]-sum[i+1]));
}
printf("%d\n",ans);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134953/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134953/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1
@.str.2 = private unnamed_addr constant [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:
%a.b = tail call i32 @llvm.smin.i32(i32 %a, i32 %b)
ret i32 %a.b
}
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #1 {
entry:
%N = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #6
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N)
%0 = load i32, ptr %N, align 4, !tbaa !5
%1 = zext i32 %0 to i64
%2 = call ptr @llvm.stacksave.p0()
%vla = alloca i8, i64 %1, align 16
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %vla)
%3 = load i32, ptr %N, align 4, !tbaa !5
%add = add nsw i32 %3, 1
%4 = zext i32 %add to i64
%vla2 = alloca i32, i64 %4, align 16
store i32 0, ptr %vla2, align 16, !tbaa !5
%cmp48 = icmp sgt i32 %3, 0
br i1 %cmp48, label %for.body.preheader, label %for.cond.cleanup19
for.body.preheader: ; preds = %entry
%wide.trip.count = zext i32 %3 to i64
%xtraiter = and i64 %wide.trip.count, 1
%5 = icmp eq i32 %3, 1
br i1 %5, label %for.cond16.preheader.unr-lcssa, label %for.body.preheader.new
for.body.preheader.new: ; preds = %for.body.preheader
%unroll_iter = and i64 %wide.trip.count, 4294967294
br label %for.body
for.cond16.preheader.unr-lcssa: ; preds = %for.inc.1, %for.body.preheader
%.unr = phi i32 [ 0, %for.body.preheader ], [ %31, %for.inc.1 ]
%indvars.iv.unr = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next.1, %for.inc.1 ]
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.cond16.preheader, label %for.body.epil
for.body.epil: ; preds = %for.cond16.preheader.unr-lcssa
%6 = getelementptr i32, ptr %vla2, i64 %indvars.iv.unr
%arrayidx6.epil = getelementptr i32, ptr %6, i64 1
store i32 %.unr, ptr %arrayidx6.epil, align 4, !tbaa !5
%arrayidx8.epil = getelementptr inbounds i8, ptr %vla, i64 %indvars.iv.unr
%7 = load i8, ptr %arrayidx8.epil, align 1, !tbaa !9
%cmp9.epil = icmp eq i8 %7, 87
br i1 %cmp9.epil, label %if.then.epil, label %for.cond16.preheader
if.then.epil: ; preds = %for.body.epil
%inc.epil = add nsw i32 %.unr, 1
store i32 %inc.epil, ptr %arrayidx6.epil, align 4, !tbaa !5
br label %for.cond16.preheader
for.cond16.preheader: ; preds = %for.body.epil, %if.then.epil, %for.cond16.preheader.unr-lcssa
br i1 %cmp48, label %for.body20.lr.ph, label %for.cond.cleanup19
for.body20.lr.ph: ; preds = %for.cond16.preheader
%idxprom25 = zext i32 %3 to i64
%arrayidx26 = getelementptr inbounds i32, ptr %vla2, i64 %idxprom25
%8 = load i32, ptr %arrayidx26, align 4, !tbaa !5
%wide.trip.count57 = zext i32 %3 to i64
%.pre = load i32, ptr %vla2, align 16, !tbaa !5
%min.iters.check = icmp ult i32 %3, 8
br i1 %min.iters.check, label %for.body20.preheader, label %vector.ph
vector.ph: ; preds = %for.body20.lr.ph
%n.vec = and i64 %wide.trip.count, 4294967288
%vector.recur.init = insertelement <4 x i32> poison, i32 %.pre, i64 3
%minmax.ident.splatinsert = insertelement <4 x i32> poison, i32 %3, i64 0
%minmax.ident.splat = shufflevector <4 x i32> %minmax.ident.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
%broadcast.splatinsert = insertelement <4 x i32> poison, i32 %3, i64 0
%broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
%broadcast.splatinsert62 = insertelement <4 x i32> poison, i32 %8, i64 0
%broadcast.splat63 = shufflevector <4 x i32> %broadcast.splatinsert62, <4 x i32> poison, <4 x i32> zeroinitializer
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vector.recur = phi <4 x i32> [ %vector.recur.init, %vector.ph ], [ %wide.load61, %vector.body ]
%vec.phi = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %23, %vector.body ]
%vec.phi59 = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %24, %vector.body ]
%vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
%9 = xor <4 x i32> %vec.ind, <i32 -1, i32 -1, i32 -1, i32 -1>
%10 = or i64 %index, 1
%11 = getelementptr inbounds i32, ptr %vla2, i64 %10
%wide.load = load <4 x i32>, ptr %11, align 4, !tbaa !5
%12 = getelementptr inbounds i32, ptr %11, i64 4
%wide.load61 = load <4 x i32>, ptr %12, align 4, !tbaa !5
%13 = shufflevector <4 x i32> %vector.recur, <4 x i32> %wide.load, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%14 = shufflevector <4 x i32> %wide.load, <4 x i32> %wide.load61, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%15 = add <4 x i32> %broadcast.splat, %9
%reass.sub = sub <4 x i32> %broadcast.splat, %vec.ind
%16 = add <4 x i32> %reass.sub, <i32 -5, i32 -5, i32 -5, i32 -5>
%17 = add <4 x i32> %15, %13
%18 = add <4 x i32> %16, %14
%19 = sub <4 x i32> %17, %broadcast.splat63
%20 = sub <4 x i32> %18, %broadcast.splat63
%21 = add <4 x i32> %19, %wide.load
%22 = add <4 x i32> %20, %wide.load61
%23 = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %vec.phi, <4 x i32> %21)
%24 = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %vec.phi59, <4 x i32> %22)
%index.next = add nuw i64 %index, 8
%vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
%25 = icmp eq i64 %index.next, %n.vec
br i1 %25, label %middle.block, label %vector.body, !llvm.loop !10
middle.block: ; preds = %vector.body
%rdx.minmax = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %23, <4 x i32> %24)
%26 = call i32 @llvm.vector.reduce.smin.v4i32(<4 x i32> %rdx.minmax)
%cmp.n = icmp eq i64 %n.vec, %wide.trip.count
%vector.recur.extract = extractelement <4 x i32> %wide.load61, i64 3
br i1 %cmp.n, label %for.cond.cleanup19, label %for.body20.preheader
for.body20.preheader: ; preds = %for.body20.lr.ph, %middle.block
%scalar.recur.ph = phi i32 [ %vector.recur.extract, %middle.block ], [ %.pre, %for.body20.lr.ph ]
%indvars.iv54.ph = phi i64 [ %n.vec, %middle.block ], [ 0, %for.body20.lr.ph ]
%ans.051.ph = phi i32 [ %26, %middle.block ], [ %3, %for.body20.lr.ph ]
br label %for.body20
for.body: ; preds = %for.inc.1, %for.body.preheader.new
%27 = phi i32 [ 0, %for.body.preheader.new ], [ %31, %for.inc.1 ]
%indvars.iv = phi i64 [ 0, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.inc.1 ]
%niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.inc.1 ]
%indvars.iv.next = or i64 %indvars.iv, 1
%arrayidx6 = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv.next
store i32 %27, ptr %arrayidx6, align 4, !tbaa !5
%arrayidx8 = getelementptr inbounds i8, ptr %vla, i64 %indvars.iv
%28 = load i8, ptr %arrayidx8, align 2, !tbaa !9
%cmp9 = icmp eq i8 %28, 87
br i1 %cmp9, label %if.then, label %for.inc
if.then: ; preds = %for.body
%inc = add nsw i32 %27, 1
store i32 %inc, ptr %arrayidx6, align 4, !tbaa !5
br label %for.inc
for.inc: ; preds = %for.body, %if.then
%29 = phi i32 [ %27, %for.body ], [ %inc, %if.then ]
%indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
%arrayidx6.1 = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv.next.1
store i32 %29, ptr %arrayidx6.1, align 8, !tbaa !5
%arrayidx8.1 = getelementptr inbounds i8, ptr %vla, i64 %indvars.iv.next
%30 = load i8, ptr %arrayidx8.1, align 1, !tbaa !9
%cmp9.1 = icmp eq i8 %30, 87
br i1 %cmp9.1, label %if.then.1, label %for.inc.1
if.then.1: ; preds = %for.inc
%inc.1 = add nsw i32 %29, 1
store i32 %inc.1, ptr %arrayidx6.1, align 8, !tbaa !5
br label %for.inc.1
for.inc.1: ; preds = %if.then.1, %for.inc
%31 = phi i32 [ %29, %for.inc ], [ %inc.1, %if.then.1 ]
%niter.next.1 = add i64 %niter, 2
%niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
br i1 %niter.ncmp.1, label %for.cond16.preheader.unr-lcssa, label %for.body, !llvm.loop !14
for.cond.cleanup19: ; preds = %for.body20, %middle.block, %entry, %for.cond16.preheader
%ans.0.lcssa = phi i32 [ %3, %for.cond16.preheader ], [ %3, %entry ], [ %26, %middle.block ], [ %a.b.i, %for.body20 ]
%call36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %ans.0.lcssa)
call void @llvm.stackrestore.p0(ptr %2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #6
ret i32 0
for.body20: ; preds = %for.body20.preheader, %for.body20
%scalar.recur = phi i32 [ %33, %for.body20 ], [ %scalar.recur.ph, %for.body20.preheader ]
%indvars.iv54 = phi i64 [ %indvars.iv.next55, %for.body20 ], [ %indvars.iv54.ph, %for.body20.preheader ]
%ans.051 = phi i32 [ %a.b.i, %for.body20 ], [ %ans.051.ph, %for.body20.preheader ]
%indvars56 = trunc i64 %indvars.iv54 to i32
%32 = xor i32 %indvars56, -1
%indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
%arrayidx29 = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv.next55
%33 = load i32, ptr %arrayidx29, align 4, !tbaa !5
%sub30.neg = add i32 %3, %32
%add23 = add i32 %sub30.neg, %scalar.recur
%sub24 = sub i32 %add23, %8
%sub31 = add i32 %sub24, %33
%a.b.i = call i32 @llvm.smin.i32(i32 %ans.051, i32 %sub31)
%exitcond58.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count57
br i1 %exitcond58.not, label %for.cond.cleanup19, label %for.body20, !llvm.loop !15
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #5
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.smin.v4i32(<4 x i32>, <4 x i32>) #5
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.smin.v4i32(<4 x 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11, !12, !13}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11, !13, !12}
|
#include <stdio.h>
#include <stdlib.h>
int comp(const void *a,const void *b){
return *(int*)a-*(int*)b;
}
int main(){
int n,m,ans=0;
scanf("%d %d",&n,&m);
int x[m],d[m];
for(int i=0;i<m;i++){
scanf("%d",&x[i]);
}
qsort(x,m,sizeof(int),comp);
for(int i=0;i<m-1;i++){
d[i]=x[i+1]-x[i];
}
qsort(d,m-1,sizeof(int),comp);
for(int i=0;i<m-n;i++){
ans+= d[i];
}
printf("%d",ans);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135002/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135002/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @comp(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #0 {
entry:
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%sub = sub nsw i32 %0, %1
ret i32 %sub
}
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #1 {
entry:
%n = alloca i32, align 4
%m = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #7
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #7
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m)
%0 = load i32, ptr %m, align 4, !tbaa !5
%1 = zext i32 %0 to i64
%2 = call ptr @llvm.stacksave.p0()
%vla = alloca i32, i64 %1, align 16
%3 = load i32, ptr %m, align 4, !tbaa !5
%4 = zext i32 %3 to i64
%vla1 = alloca i32, i64 %4, align 16
%cmp44 = icmp sgt i32 %3, 0
br i1 %cmp44, label %for.body, label %entry.for.cond.cleanup_crit_edge
entry.for.cond.cleanup_crit_edge: ; preds = %entry
%.pre63 = sext i32 %3 to i64
br label %for.cond.cleanup
for.cond.cleanup: ; preds = %for.body, %entry.for.cond.cleanup_crit_edge
%conv.pre-phi = phi i64 [ %.pre63, %entry.for.cond.cleanup_crit_edge ], [ %17, %for.body ]
call void @qsort(ptr noundef nonnull %vla, i64 noundef %conv.pre-phi, i64 noundef 4, ptr noundef nonnull @comp) #7
%5 = load i32, ptr %m, align 4, !tbaa !5
%sub = add i32 %5, -1
%cmp546 = icmp sgt i32 %5, 1
br i1 %cmp546, label %for.body8.preheader, label %for.cond.cleanup7
for.body8.preheader: ; preds = %for.cond.cleanup
%wide.trip.count = zext i32 %sub to i64
%.pre = load i32, ptr %vla, align 16, !tbaa !5
%min.iters.check = icmp ult i32 %5, 9
br i1 %min.iters.check, label %for.body8.preheader81, label %vector.ph
vector.ph: ; preds = %for.body8.preheader
%n.vec = and i64 %wide.trip.count, 4294967288
%vector.recur.init = insertelement <4 x i32> poison, i32 %.pre, i64 3
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vector.recur = phi <4 x i32> [ %vector.recur.init, %vector.ph ], [ %wide.load64, %vector.body ]
%6 = or i64 %index, 1
%7 = getelementptr inbounds i32, ptr %vla, i64 %6
%wide.load = load <4 x i32>, ptr %7, align 4, !tbaa !5
%8 = getelementptr inbounds i32, ptr %7, i64 4
%wide.load64 = load <4 x i32>, ptr %8, align 4, !tbaa !5
%9 = shufflevector <4 x i32> %vector.recur, <4 x i32> %wide.load, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%10 = shufflevector <4 x i32> %wide.load, <4 x i32> %wide.load64, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%11 = sub nsw <4 x i32> %wide.load, %9
%12 = sub nsw <4 x i32> %wide.load64, %10
%13 = getelementptr inbounds i32, ptr %vla1, i64 %index
store <4 x i32> %11, ptr %13, align 16, !tbaa !5
%14 = getelementptr inbounds i32, ptr %13, i64 4
store <4 x i32> %12, ptr %14, align 16, !tbaa !5
%index.next = add nuw i64 %index, 8
%15 = icmp eq i64 %index.next, %n.vec
br i1 %15, label %middle.block, label %vector.body, !llvm.loop !9
middle.block: ; preds = %vector.body
%cmp.n = icmp eq i64 %n.vec, %wide.trip.count
%vector.recur.extract = extractelement <4 x i32> %wide.load64, i64 3
br i1 %cmp.n, label %for.cond.cleanup7, label %for.body8.preheader81
for.body8.preheader81: ; preds = %for.body8.preheader, %middle.block
%scalar.recur.ph = phi i32 [ %vector.recur.extract, %middle.block ], [ %.pre, %for.body8.preheader ]
%indvars.iv55.ph = phi i64 [ %n.vec, %middle.block ], [ 0, %for.body8.preheader ]
br label %for.body8
for.body: ; preds = %entry, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
%arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv
%call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%16 = load i32, ptr %m, align 4, !tbaa !5
%17 = sext i32 %16 to i64
%cmp = icmp slt i64 %indvars.iv.next, %17
br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !13
for.cond.cleanup7: ; preds = %for.body8, %middle.block, %for.cond.cleanup
%conv20 = sext i32 %sub to i64
call void @qsort(ptr noundef nonnull %vla1, i64 noundef %conv20, i64 noundef 4, ptr noundef nonnull @comp) #7
%18 = load i32, ptr %m, align 4, !tbaa !5
%19 = load i32, ptr %n, align 4, !tbaa !5
%sub23 = sub nsw i32 %18, %19
%cmp2449 = icmp sgt i32 %sub23, 0
br i1 %cmp2449, label %for.body27.preheader, label %for.cond.cleanup26
for.body27.preheader: ; preds = %for.cond.cleanup7
%wide.trip.count61 = zext i32 %sub23 to i64
%min.iters.check67 = icmp ult i32 %sub23, 8
br i1 %min.iters.check67, label %for.body27.preheader79, label %vector.ph68
vector.ph68: ; preds = %for.body27.preheader
%n.vec70 = and i64 %wide.trip.count61, 4294967288
br label %vector.body73
vector.body73: ; preds = %vector.body73, %vector.ph68
%index74 = phi i64 [ 0, %vector.ph68 ], [ %index.next78, %vector.body73 ]
%vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph68 ], [ %22, %vector.body73 ]
%vec.phi75 = phi <4 x i32> [ zeroinitializer, %vector.ph68 ], [ %23, %vector.body73 ]
%20 = getelementptr inbounds i32, ptr %vla1, i64 %index74
%wide.load76 = load <4 x i32>, ptr %20, align 16, !tbaa !5
%21 = getelementptr inbounds i32, ptr %20, i64 4
%wide.load77 = load <4 x i32>, ptr %21, align 16, !tbaa !5
%22 = add <4 x i32> %wide.load76, %vec.phi
%23 = add <4 x i32> %wide.load77, %vec.phi75
%index.next78 = add nuw i64 %index74, 8
%24 = icmp eq i64 %index.next78, %n.vec70
br i1 %24, label %middle.block65, label %vector.body73, !llvm.loop !14
middle.block65: ; preds = %vector.body73
%bin.rdx = add <4 x i32> %23, %22
%25 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
%cmp.n72 = icmp eq i64 %n.vec70, %wide.trip.count61
br i1 %cmp.n72, label %for.cond.cleanup26, label %for.body27.preheader79
for.body27.preheader79: ; preds = %for.body27.preheader, %middle.block65
%indvars.iv58.ph = phi i64 [ 0, %for.body27.preheader ], [ %n.vec70, %middle.block65 ]
%ans.050.ph = phi i32 [ 0, %for.body27.preheader ], [ %25, %middle.block65 ]
br label %for.body27
for.body8: ; preds = %for.body8.preheader81, %for.body8
%scalar.recur = phi i32 [ %26, %for.body8 ], [ %scalar.recur.ph, %for.body8.preheader81 ]
%indvars.iv55 = phi i64 [ %indvars.iv.next56, %for.body8 ], [ %indvars.iv55.ph, %for.body8.preheader81 ]
%indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
%arrayidx10 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.next56
%26 = load i32, ptr %arrayidx10, align 4, !tbaa !5
%sub13 = sub nsw i32 %26, %scalar.recur
%arrayidx15 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv55
store i32 %sub13, ptr %arrayidx15, align 4, !tbaa !5
%exitcond.not = icmp eq i64 %indvars.iv.next56, %wide.trip.count
br i1 %exitcond.not, label %for.cond.cleanup7, label %for.body8, !llvm.loop !15
for.cond.cleanup26: ; preds = %for.body27, %middle.block65, %for.cond.cleanup7
%ans.0.lcssa = phi i32 [ 0, %for.cond.cleanup7 ], [ %25, %middle.block65 ], [ %add30, %for.body27 ]
%call34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ans.0.lcssa)
call void @llvm.stackrestore.p0(ptr %2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #7
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #7
ret i32 0
for.body27: ; preds = %for.body27.preheader79, %for.body27
%indvars.iv58 = phi i64 [ %indvars.iv.next59, %for.body27 ], [ %indvars.iv58.ph, %for.body27.preheader79 ]
%ans.050 = phi i32 [ %add30, %for.body27 ], [ %ans.050.ph, %for.body27.preheader79 ]
%arrayidx29 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv58
%27 = load i32, ptr %arrayidx29, align 4, !tbaa !5
%add30 = add nsw i32 %27, %ans.050
%indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
%exitcond62.not = icmp eq i64 %indvars.iv.next59, %wide.trip.count61
br i1 %exitcond62.not, label %for.cond.cleanup26, label %for.body27, !llvm.loop !16
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2
; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #5
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #6
attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #5 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !11, !12}
!15 = distinct !{!15, !10, !12, !11}
!16 = distinct !{!16, !10, !12, !11}
|
#include<stdio.h>
#include<stdlib.h>
int compUp(const void* a, const void*b){
return *(int*)a - *(int*)b;
}
/*int compDown(const void* a, const void*b){
return *(int*)b - *(int*)a;
}*/
int main(void){
int N, M;
scanf("%d%d", &N, &M);
int X[M];
int i;
for(i = 0; i < M; i++){scanf("%d", &X[i]);}
qsort(X, M, sizeof(int), compUp);
int D[M-1];
for(i = 0; i < M-1; i++){D[i] = X[i+1] - X[i];}
qsort(D, M-1, sizeof(int), compUp);
int ans = 0;
if(N >= M){ans = 0;}
else{
for(i = 0; i < M-N; i++){ans += D[i];}
}
printf("%d\n", ans);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135046/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135046/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @compUp(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #0 {
entry:
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%sub = sub nsw i32 %0, %1
ret i32 %sub
}
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #1 {
entry:
%N = alloca i32, align 4
%M = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #7
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %M) #7
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %M)
%0 = load i32, ptr %M, align 4, !tbaa !5
%1 = zext i32 %0 to i64
%2 = call ptr @llvm.stacksave.p0()
%vla = alloca i32, i64 %1, align 16
%3 = load i32, ptr %M, align 4, !tbaa !5
%cmp45 = icmp sgt i32 %3, 0
br i1 %cmp45, label %for.body, label %entry.for.end_crit_edge
entry.for.end_crit_edge: ; preds = %entry
%.pre63 = sext i32 %3 to i64
br label %for.end
for.body: ; preds = %entry, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
%arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%4 = load i32, ptr %M, align 4, !tbaa !5
%5 = sext i32 %4 to i64
%cmp = icmp slt i64 %indvars.iv.next, %5
br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body, %entry.for.end_crit_edge
%conv.pre-phi = phi i64 [ %.pre63, %entry.for.end_crit_edge ], [ %5, %for.body ]
call void @qsort(ptr noundef nonnull %vla, i64 noundef %conv.pre-phi, i64 noundef 4, ptr noundef nonnull @compUp) #7
%6 = load i32, ptr %M, align 4, !tbaa !5
%sub = add i32 %6, -1
%7 = zext i32 %sub to i64
%vla2 = alloca i32, i64 %7, align 16
%cmp547 = icmp sgt i32 %6, 1
br i1 %cmp547, label %for.body7.preheader, label %for.end17
for.body7.preheader: ; preds = %for.end
%.pre = load i32, ptr %vla, align 16, !tbaa !5
%min.iters.check = icmp ult i32 %6, 9
br i1 %min.iters.check, label %for.body7.preheader81, label %vector.ph
vector.ph: ; preds = %for.body7.preheader
%n.vec = and i64 %7, 4294967288
%vector.recur.init = insertelement <4 x i32> poison, i32 %.pre, i64 3
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vector.recur = phi <4 x i32> [ %vector.recur.init, %vector.ph ], [ %wide.load64, %vector.body ]
%8 = or i64 %index, 1
%9 = getelementptr inbounds i32, ptr %vla, i64 %8
%wide.load = load <4 x i32>, ptr %9, align 4, !tbaa !5
%10 = getelementptr inbounds i32, ptr %9, i64 4
%wide.load64 = load <4 x i32>, ptr %10, align 4, !tbaa !5
%11 = shufflevector <4 x i32> %vector.recur, <4 x i32> %wide.load, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%12 = shufflevector <4 x i32> %wide.load, <4 x i32> %wide.load64, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
%13 = sub nsw <4 x i32> %wide.load, %11
%14 = sub nsw <4 x i32> %wide.load64, %12
%15 = getelementptr inbounds i32, ptr %vla2, i64 %index
store <4 x i32> %13, ptr %15, align 16, !tbaa !5
%16 = getelementptr inbounds i32, ptr %15, i64 4
store <4 x i32> %14, ptr %16, align 16, !tbaa !5
%index.next = add nuw i64 %index, 8
%17 = icmp eq i64 %index.next, %n.vec
br i1 %17, label %middle.block, label %vector.body, !llvm.loop !11
middle.block: ; preds = %vector.body
%cmp.n = icmp eq i64 %n.vec, %7
%vector.recur.extract = extractelement <4 x i32> %wide.load64, i64 3
br i1 %cmp.n, label %for.end17, label %for.body7.preheader81
for.body7.preheader81: ; preds = %for.body7.preheader, %middle.block
%scalar.recur.ph = phi i32 [ %vector.recur.extract, %middle.block ], [ %.pre, %for.body7.preheader ]
%indvars.iv55.ph = phi i64 [ %n.vec, %middle.block ], [ 0, %for.body7.preheader ]
br label %for.body7
for.body7: ; preds = %for.body7.preheader81, %for.body7
%scalar.recur = phi i32 [ %18, %for.body7 ], [ %scalar.recur.ph, %for.body7.preheader81 ]
%indvars.iv55 = phi i64 [ %indvars.iv.next56, %for.body7 ], [ %indvars.iv55.ph, %for.body7.preheader81 ]
%indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
%arrayidx9 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.next56
%18 = load i32, ptr %arrayidx9, align 4, !tbaa !5
%sub12 = sub nsw i32 %18, %scalar.recur
%arrayidx14 = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv55
store i32 %sub12, ptr %arrayidx14, align 4, !tbaa !5
%exitcond.not = icmp eq i64 %indvars.iv.next56, %7
br i1 %exitcond.not, label %for.end17, label %for.body7, !llvm.loop !14
for.end17: ; preds = %for.body7, %middle.block, %for.end
%conv19 = sext i32 %sub to i64
call void @qsort(ptr noundef nonnull %vla2, i64 noundef %conv19, i64 noundef 4, ptr noundef nonnull @compUp) #7
%19 = load i32, ptr %N, align 4, !tbaa !5
%20 = load i32, ptr %M, align 4, !tbaa !5
%cmp20.not = icmp slt i32 %19, %20
br i1 %cmp20.not, label %for.cond22.preheader, label %if.end
for.cond22.preheader: ; preds = %for.end17
%sub23 = sub nsw i32 %20, %19
%cmp2449 = icmp sgt i32 %sub23, 0
br i1 %cmp2449, label %for.body26.preheader, label %if.end
for.body26.preheader: ; preds = %for.cond22.preheader
%wide.trip.count61 = zext i32 %sub23 to i64
%min.iters.check67 = icmp ult i32 %sub23, 8
br i1 %min.iters.check67, label %for.body26.preheader79, label %vector.ph68
vector.ph68: ; preds = %for.body26.preheader
%n.vec70 = and i64 %wide.trip.count61, 4294967288
br label %vector.body73
vector.body73: ; preds = %vector.body73, %vector.ph68
%index74 = phi i64 [ 0, %vector.ph68 ], [ %index.next78, %vector.body73 ]
%vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph68 ], [ %23, %vector.body73 ]
%vec.phi75 = phi <4 x i32> [ zeroinitializer, %vector.ph68 ], [ %24, %vector.body73 ]
%21 = getelementptr inbounds i32, ptr %vla2, i64 %index74
%wide.load76 = load <4 x i32>, ptr %21, align 16, !tbaa !5
%22 = getelementptr inbounds i32, ptr %21, i64 4
%wide.load77 = load <4 x i32>, ptr %22, align 16, !tbaa !5
%23 = add <4 x i32> %wide.load76, %vec.phi
%24 = add <4 x i32> %wide.load77, %vec.phi75
%index.next78 = add nuw i64 %index74, 8
%25 = icmp eq i64 %index.next78, %n.vec70
br i1 %25, label %middle.block65, label %vector.body73, !llvm.loop !15
middle.block65: ; preds = %vector.body73
%bin.rdx = add <4 x i32> %24, %23
%26 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
%cmp.n72 = icmp eq i64 %n.vec70, %wide.trip.count61
br i1 %cmp.n72, label %if.end, label %for.body26.preheader79
for.body26.preheader79: ; preds = %for.body26.preheader, %middle.block65
%indvars.iv58.ph = phi i64 [ 0, %for.body26.preheader ], [ %n.vec70, %middle.block65 ]
%ans.051.ph = phi i32 [ 0, %for.body26.preheader ], [ %26, %middle.block65 ]
br label %for.body26
for.body26: ; preds = %for.body26.preheader79, %for.body26
%indvars.iv58 = phi i64 [ %indvars.iv.next59, %for.body26 ], [ %indvars.iv58.ph, %for.body26.preheader79 ]
%ans.051 = phi i32 [ %add29, %for.body26 ], [ %ans.051.ph, %for.body26.preheader79 ]
%arrayidx28 = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv58
%27 = load i32, ptr %arrayidx28, align 4, !tbaa !5
%add29 = add nsw i32 %27, %ans.051
%indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
%exitcond62.not = icmp eq i64 %indvars.iv.next59, %wide.trip.count61
br i1 %exitcond62.not, label %if.end, label %for.body26, !llvm.loop !16
if.end: ; preds = %for.body26, %middle.block65, %for.cond22.preheader, %for.end17
%ans.1 = phi i32 [ 0, %for.end17 ], [ 0, %for.cond22.preheader ], [ %26, %middle.block65 ], [ %add29, %for.body26 ]
%call33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %ans.1)
call void @llvm.stackrestore.p0(ptr %2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %M) #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) #2
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4
; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #5
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #6
attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #5 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10, !12, !13}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !10, !13, !12}
!15 = distinct !{!15, !10, !12, !13}
!16 = distinct !{!16, !10, !13, !12}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.