Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include <stdio.h>
int main(void) {
// your code goes here
int time, h, m, s;
scanf("%d\n", &time);
if(time < 0 || time >= 86400) {
return 0;
}
s = time % 60;
m = (time / 60) % 60;
h = time / 3600;
printf("%d:%d:%d\n", h, m, s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_239793/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_239793/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d:%d:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%time = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %time) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %time)
%0 = load i32, ptr %time, align 4
%or.cond = icmp ugt i32 %0, 86399
br i1 %or.cond, label %cleanup, label %if.end
if.end: ; preds = %entry
%rem = urem i32 %0, 60
%div = udiv i32 %0, 60
%rem2.lhs.trunc = trunc i32 %div to i16
%rem28 = urem i16 %rem2.lhs.trunc, 60
%rem2.zext = zext i16 %rem28 to i32
%div3 = udiv i32 %0, 3600
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div3, i32 noundef %rem2.zext, i32 noundef %rem)
br label %cleanup
cleanup: ; preds = %entry, %if.end
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %time) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
|
#include <stdio.h>
int main(void) {
int hour, minute, second;
hour = minute = 0;
scanf("%d", &second);
while(second >= 60) {
second -= 60;
minute += 1;
}
while(minute >= 60) {
minute -= 60;
hour += 1;
}
printf("%d:%d:%d\n", hour, minute, second);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_239836/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_239836/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%second = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %second) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %second)
%.pr = load i32, ptr %second, align 4, !tbaa !5
%cmp12 = icmp sgt i32 %.pr, 59
br i1 %cmp12, label %while.cond1.preheader, label %while.end6
while.cond1.preheader: ; preds = %entry
%0 = add nsw i32 %.pr, -60
%1 = add nuw i32 %.pr, 59
%smin = call i32 @llvm.smin.i32(i32 %.pr, i32 119)
%2 = sub nuw i32 %1, %smin
%3 = udiv i32 %2, 60
%.neg = mul nsw i32 %3, -60
%4 = add nsw i32 %.neg, %0
%5 = add nuw nsw i32 %3, 1
store i32 %4, ptr %second, align 4, !tbaa !5
%cmp215 = icmp ugt i32 %2, 3539
br i1 %cmp215, label %while.body3.preheader, label %while.end6
while.body3.preheader: ; preds = %while.cond1.preheader
%6 = add nsw i32 %3, -59
%7 = add nuw nsw i32 %3, 60
%smin20 = call i32 @llvm.smin.i32(i32 %5, i32 119)
%8 = sub nuw nsw i32 %7, %smin20
%9 = udiv i32 %8, 60
%.neg21 = mul nsw i32 %9, -60
%10 = add nsw i32 %.neg21, %6
%11 = add nuw nsw i32 %9, 1
br label %while.end6
while.end6: ; preds = %entry, %while.body3.preheader, %while.cond1.preheader
%.lcssa25 = phi i32 [ %4, %while.cond1.preheader ], [ %4, %while.body3.preheader ], [ %.pr, %entry ]
%hour.0.lcssa = phi i32 [ 0, %while.cond1.preheader ], [ %11, %while.body3.preheader ], [ 0, %entry ]
%minute.1.lcssa = phi i32 [ %5, %while.cond1.preheader ], [ %10, %while.body3.preheader ], [ 0, %entry ]
%call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %hour.0.lcssa, i32 noundef %minute.1.lcssa, i32 noundef %.lcssa25)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %second) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main()
{
int t; scanf("%d",&t);
while(t--) {
int n;
scanf("%d",&n);
long long a[n],ans=0;
scanf("%lld%lld",&a[0],&a[1]);
ans=a[0]*a[1];
for(int i=2; i<n; i++) {
scanf("%lld",&a[i]);
if(a[i]*a[i-1]>ans) ans=a[i]*a[i-1];
}
printf("%lld\n",ans);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23988/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23988/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [9 x i8] c"%lld%lld\00", align 1
@.str.2 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1
@.str.3 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%t = alloca i32, align 4
%n = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t)
%0 = load i32, ptr %t, align 4, !tbaa !5
%dec31 = add nsw i32 %0, -1
store i32 %dec31, ptr %t, align 4, !tbaa !5
%tobool.not32 = icmp eq i32 %0, 0
br i1 %tobool.not32, label %while.end, label %while.body
while.body: ; preds = %entry, %for.cond.cleanup
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%1 = load i32, ptr %n, align 4, !tbaa !5
%2 = zext i32 %1 to i64
%3 = call ptr @llvm.stacksave.p0()
%vla = alloca i64, i64 %2, align 16
%arrayidx2 = getelementptr inbounds i64, ptr %vla, i64 1
%call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %vla, ptr noundef nonnull %arrayidx2)
%4 = load i64, ptr %vla, align 16, !tbaa !9
%5 = load i64, ptr %arrayidx2, align 8, !tbaa !9
%mul = mul nsw i64 %5, %4
%6 = load i32, ptr %n, align 4, !tbaa !5
%cmp28 = icmp sgt i32 %6, 2
br i1 %cmp28, label %for.body.preheader, label %for.cond.cleanup
for.body.preheader: ; preds = %while.body
%invariant.gep = getelementptr i64, ptr %vla, i64 -1
br label %for.body
for.cond.cleanup: ; preds = %for.body, %while.body
%ans.0.lcssa = phi i64 [ %mul, %while.body ], [ %spec.select, %for.body ]
%call20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %ans.0.lcssa)
call void @llvm.stackrestore.p0(ptr %3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5
%7 = load i32, ptr %t, align 4, !tbaa !5
%dec = add nsw i32 %7, -1
store i32 %dec, ptr %t, align 4, !tbaa !5
%tobool.not = icmp eq i32 %7, 0
br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !11
for.body: ; preds = %for.body.preheader, %for.body
%indvars.iv = phi i64 [ 2, %for.body.preheader ], [ %indvars.iv.next, %for.body ]
%ans.029 = phi i64 [ %mul, %for.body.preheader ], [ %spec.select, %for.body ]
%arrayidx6 = getelementptr inbounds i64, ptr %vla, i64 %indvars.iv
%call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %arrayidx6)
%8 = load i64, ptr %arrayidx6, align 8, !tbaa !9
%gep = getelementptr i64, ptr %invariant.gep, i64 %indvars.iv
%9 = load i64, ptr %gep, align 8, !tbaa !9
%mul12 = mul nsw i64 %9, %8
%spec.select = call i64 @llvm.smax.i64(i64 %mul12, i64 %ans.029)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%10 = load i32, ptr %n, align 4, !tbaa !5
%11 = sext i32 %10 to i64
%cmp = icmp slt i64 %indvars.iv.next, %11
br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !13
while.end: ; preds = %for.cond.cleanup, %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) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
|
#include<stdio.h>
int main(void){
int S;
int h;
int m;
int s;
scanf("%d",&S);
h = S/(60*60);
m = (S-h*60*60)/60;
s = S-h*60*60-m*60;
printf("%d:%d:%d\n",h,m,s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_239922/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_239922/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%mul1.neg = mul nsw i32 %div, -3600
%sub = add i32 %mul1.neg, %0
%div2 = sdiv i32 %sub, 60
%mul6.neg = mul nsw i32 %div2, -60
%sub7 = add i32 %mul6.neg, %sub
%call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div2, i32 noundef %sub7)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
#include <math.h>
int main(){
int t, h, m, s;
scanf("%d", &t);
h = floor(t / 3600);
m = floor(t / 60) - 60 * h;
s = t - (3600 * h + 60 * m);
printf("%d:%d:%d\n", h, m, s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_239966/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_239966/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%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
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t)
%0 = load i32, ptr %t, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%div2 = sdiv i32 %0, 60
%mul.neg = mul nsw i32 %div, -60
%narrow = add nsw i32 %mul.neg, %div2
%mul6.neg = mul nsw i32 %div, -3600
%mul7.neg = mul i32 %narrow, -60
%add.neg = add i32 %mul6.neg, %0
%sub8 = add i32 %add.neg, %mul7.neg
%call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %narrow, i32 noundef %sub8)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main()
{
int a,m=0,h=0,n=0;
while(scanf("%d",&a)!=EOF)
{
n=a%60;
h=a/3600;
m=(a-h*3600)/60;
printf("%d:%d:%d\n",h,m,n);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240007/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240007/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
%call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%cmp.not5 = icmp eq i32 %call4, -1
br i1 %cmp.not5, label %while.end, label %while.body
while.body: ; preds = %entry, %while.body
%0 = load i32, ptr %a, align 4, !tbaa !5
%rem = srem i32 %0, 60
%div = sdiv i32 %0, 3600
%mul.neg = mul nsw i32 %div, -3600
%sub = add i32 %mul.neg, %0
%div1 = sdiv i32 %sub, 60
%call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1, i32 noundef %rem)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%cmp.not = icmp eq i32 %call, -1
br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !9
while.end: ; preds = %while.body, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
|
#include<stdio.h>
int main()
{
int S,h,m,s;
scanf("%d",&S);
h=S/3600;
m=S%3600/60;
s=S%3600%60;
printf("%d:%d:%d\n",h,m,s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240050/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240050/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div15 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div15 to i32
%rem36 = srem i16 %div1.lhs.trunc, 60
%rem3.sext = sext i16 %rem36 to i32
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem3.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void)
{
int h,m,s,n,ha;
scanf("%d",&n);
h=n/3600;
ha=n%3600;
m=ha/60;
s=ha%60;
printf("%d:%d:%d\n",h,m,s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240094/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240094/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div15 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div15 to i32
%rem26 = srem i16 %div1.lhs.trunc, 60
%rem2.sext = sext i16 %rem26 to i32
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem2.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(){
int hours, minutes, seconds, total_sec;
scanf("%d", &total_sec);
minutes = total_sec/60;
hours = minutes/60;
seconds = total_sec%60;
minutes = minutes%60;
printf("%d:%d:%d\n",hours,minutes,seconds);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240137/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240137/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%total_sec = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %total_sec) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %total_sec)
%0 = load i32, ptr %total_sec, align 4, !tbaa !5
%div = sdiv i32 %0, 60
%div1 = sdiv i32 %0, 3600
%rem = srem i32 %0, 60
%rem2 = srem i32 %div, 60
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div1, i32 noundef %rem2, i32 noundef %rem)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %total_sec) #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, h, m, s;
scanf("%d", &a);
h = a / 3600;
a %= 3600;
m = a / 60;
s = a % 60;
printf("%d:%d:%d\n", h, m, s);
return(0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240180/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240180/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%0 = load i32, ptr %a, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
store i32 %rem, ptr %a, align 4, !tbaa !5
%div1.lhs.trunc = trunc i32 %rem to i16
%div14 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div14 to i32
%rem25 = srem i16 %div1.lhs.trunc, 60
%rem2.sext = sext i16 %rem25 to i32
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem2.sext)
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 tmp,h,m,s;
scanf("%d",&tmp);
h=tmp/3600;
tmp=tmp%3600;
m=tmp/60;
tmp=tmp%60;
s=tmp;
printf("%d:%d:%d\n",h,m,s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240230/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240230/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%tmp = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %tmp) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %tmp)
%0 = load i32, ptr %tmp, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div14 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div14 to i32
%rem25 = srem i16 %div1.lhs.trunc, 60
%rem2.sext = sext i16 %rem25 to i32
store i32 %rem2.sext, ptr %tmp, align 4, !tbaa !5
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem2.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %tmp) #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 S, h, m, s;
scanf("%d", &S);
h = S/(60*60);
m = (S%(60*60))/60;
s = (S%(60*60))%60;
printf("%d:%d:%d\n", h, m, s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240274/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240274/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div15 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div15 to i32
%rem36 = srem i16 %div1.lhs.trunc, 60
%rem3.sext = sext i16 %rem36 to i32
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem3.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void){
int a,c,d,e;
d=e=c=0;
0<=a<=86400;
scanf("%d",&a);
if(a>=3600){
d=a/3600;
a=a%3600;
}
if(a>=60){
e=a/60;
a=a%60;
}
if(a>=1) c=a;
else{
c=0;
}
printf("%d:%d:%d\n",d,e,c);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240324/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240324/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%0 = load i32, ptr %a, align 4, !tbaa !5
%cmp3 = icmp sgt i32 %0, 3599
br i1 %cmp3, label %if.then, label %if.end
if.then: ; preds = %entry
%div = udiv i32 %0, 3600
%rem = urem i32 %0, 3600
store i32 %rem, ptr %a, align 4, !tbaa !5
br label %if.end
if.end: ; preds = %if.then, %entry
%1 = phi i32 [ %rem, %if.then ], [ %0, %entry ]
%d.0 = phi i32 [ %div, %if.then ], [ 0, %entry ]
%cmp5 = icmp sgt i32 %1, 59
br i1 %cmp5, label %if.then7, label %if.end10
if.then7: ; preds = %if.end
%div8.lhs.trunc = trunc i32 %1 to i16
%div818 = udiv i16 %div8.lhs.trunc, 60
%div8.zext = zext i16 %div818 to i32
%rem919 = urem i16 %div8.lhs.trunc, 60
%rem9.zext = zext i16 %rem919 to i32
store i32 %rem9.zext, ptr %a, align 4, !tbaa !5
br label %if.end10
if.end10: ; preds = %if.then7, %if.end
%2 = phi i32 [ %rem9.zext, %if.then7 ], [ %1, %if.end ]
%e.0 = phi i32 [ %div8.zext, %if.then7 ], [ 0, %if.end ]
%. = call i32 @llvm.smax.i32(i32 %2, i32 0)
%call15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %d.0, i32 noundef %e.0, i32 noundef %.)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void)
{
int ss,h,m,s;
scanf("%d",&ss);
m=ss/60;
m=m%60;
s=ss%60;
h=ss/3600;
printf("%d:%d:%d\n",h,m,s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240368/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240368/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%ss = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %ss) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %ss)
%0 = load i32, ptr %ss, align 4, !tbaa !5
%div = sdiv i32 %0, 60
%rem = srem i32 %div, 60
%rem1 = srem i32 %0, 60
%div2 = sdiv i32 %0, 3600
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div2, i32 noundef %rem, i32 noundef %rem1)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %ss) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(){
int x,h,m,s;
scanf("%d",&x);
h=x/3600;
m=(x%3600)/60;
s=(x%3600)%60;
printf("%d:%d:%d\n",h,m,s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240410/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240410/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%x = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x)
%0 = load i32, ptr %x, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div15 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div15 to i32
%rem36 = srem i16 %div1.lhs.trunc, 60
%rem3.sext = sext i16 %rem36 to i32
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem3.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(){
int S, h, m, s;
scanf("%d", &S);
h=S/3600;
S=S-h*3600;
m=S/60;
s=S-m*60;
printf("%d:%d:%d\n", h, m, s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240454/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240454/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%mul.neg = mul nsw i32 %div, -3600
%sub = add i32 %mul.neg, %0
store i32 %sub, ptr %S, align 4, !tbaa !5
%div1 = sdiv i32 %sub, 60
%mul2.neg = mul nsw i32 %div1, -60
%sub3 = add i32 %mul2.neg, %sub
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1, i32 noundef %sub3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void)
{
int sn,h,m,s;
scanf("%d",&sn);
h = sn/3600;
m = (sn-(h*3600))/60;
s = sn-h*3600-m*60;
printf("%d:%d:%d\n",h,m,s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240504/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240504/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%sn = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %sn) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %sn)
%0 = load i32, ptr %sn, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%mul.neg = mul nsw i32 %div, -3600
%sub = add i32 %mul.neg, %0
%div1 = sdiv i32 %sub, 60
%mul4.neg = mul nsw i32 %div1, -60
%sub5 = add i32 %mul4.neg, %sub
%call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1, i32 noundef %sub5)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %sn) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void)
{
int a,b,c,d,e;
scanf("%d",&a);
b=a%60;
c=a/60;
d=c/60;
e=c%60;
printf("%d:%d:%d\n",d,e,b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240548/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240548/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%0 = load i32, ptr %a, align 4, !tbaa !5
%rem = srem i32 %0, 60
%div = sdiv i32 %0, 60
%div1 = sdiv i32 %0, 3600
%rem2 = srem i32 %div, 60
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div1, i32 noundef %rem2, i32 noundef %rem)
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 S,h,m,s;
scanf("%d",&S);
h = S / 3600;
S = S - h * 3600;
m = S / 60;
s = S - m *60;
printf("%d:%d:%d\n",h,m,s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240591/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240591/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%mul.neg = mul nsw i32 %div, -3600
%sub = add i32 %mul.neg, %0
store i32 %sub, ptr %S, align 4, !tbaa !5
%div1 = sdiv i32 %sub, 60
%mul2.neg = mul nsw i32 %div1, -60
%sub3 = add i32 %mul2.neg, %sub
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1, i32 noundef %sub3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(){
int S,h,m,s;
do{
scanf("%d", &S);
}while(S<0||S>=86400);
h=S/3600;
m=(S%3600)/60;
s=(S%3600)%60;
printf("%d:%d:%d\n",h,m,s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240634/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240634/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
br label %do.body
do.body: ; preds = %do.body, %entry
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4
%1 = icmp ugt i32 %0, 86399
br i1 %1, label %do.body, label %do.end, !llvm.loop !5
do.end: ; preds = %do.body
%div = udiv i32 %0, 3600
%rem = urem i32 %0, 3600
%div2.lhs.trunc = trunc i32 %rem to i16
%div26 = udiv i16 %div2.lhs.trunc, 60
%div2.zext = zext i16 %div26 to i32
%rem47 = urem i16 %div2.lhs.trunc, 60
%rem4.zext = zext i16 %rem47 to i32
%call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div2.zext, i32 noundef %rem4.zext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
|
#include<stdio.h>
int main(){
int S; // input, [s]
int h, m, s; // output, [hour, min, sec]
scanf("%d", &S);
h = S/3600;
S = S%3600;
m = S/60;
s = S%60;
printf("%d:%d:%d\n", h, m, s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240678/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240678/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
store i32 %rem, ptr %S, align 4, !tbaa !5
%div1.lhs.trunc = trunc i32 %rem to i16
%div14 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div14 to i32
%rem25 = srem i16 %div1.lhs.trunc, 60
%rem2.sext = sext i16 %rem25 to i32
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem2.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main()
{
int S,h,m,s;
scanf("%d",&S);
h=S/3600;
m=S/60%60;
s=S%60;
printf("%d:%d:%d\n", h,m,s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240720/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240720/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%div1 = sdiv i32 %0, 60
%rem = srem i32 %div1, 60
%rem2 = srem i32 %0, 60
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, i32 noundef %rem2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(){
int sec,h,m,s;
scanf("%d", &sec);
h = sec / 3600;
m = (sec % 3600) / 60;
s = (sec % 3600) % 60;
printf("%d:%d:%d\n",h,m,s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240771/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240771/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%sec = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %sec) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %sec)
%0 = load i32, ptr %sec, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div15 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div15 to i32
%rem36 = srem i16 %div1.lhs.trunc, 60
%rem3.sext = sext i16 %rem36 to i32
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem3.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %sec) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void) {
int n, h, m, s;
scanf("%d", &n);
h = n / 3600;
n = n % 3600;
m = n / 60;
s = n % 60;
printf("%d:%d:%d\n", h, m, s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240821/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240821/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
store i32 %rem, ptr %n, align 4, !tbaa !5
%div1.lhs.trunc = trunc i32 %rem to i16
%div14 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div14 to i32
%rem25 = srem i16 %div1.lhs.trunc, 60
%rem2.sext = sext i16 %rem25 to i32
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem2.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void){
int i,time,min,sec;
scanf("%d",&i);
time = i / 3600;
min = i % 3600;
sec = min % 60;
printf("%d:%d:%d\n",time,min/60,sec);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240865/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240865/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%i = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %i)
%0 = load i32, ptr %i, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%rem1.lhs.trunc = trunc i32 %rem to i16
%rem15 = srem i16 %rem1.lhs.trunc, 60
%rem1.sext = sext i16 %rem15 to i32
%div26 = sdiv i16 %rem1.lhs.trunc, 60
%div2.sext = sext i16 %div26 to i32
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div2.sext, i32 noundef %rem1.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #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 s,m,h;
scanf("%d",&s);
m = s/60;
s = s%60;
h = m/60;
m = m%60;
printf("%d:%d:%d\n",h,m,s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240915/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240915/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%s = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s)
%0 = load i32, ptr %s, align 4, !tbaa !5
%div = sdiv i32 %0, 60
%rem = srem i32 %0, 60
store i32 %rem, ptr %s, align 4, !tbaa !5
%div1 = sdiv i32 %0, 3600
%rem2 = srem i32 %div, 60
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div1, i32 noundef %rem2, i32 noundef %rem)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void)
{
int h, m, s;
scanf("%d", &s);
h = s / 3600;
m = (s % 3600) / 60;
s = s % 60;
printf("%d:%d:%d\n", h, m, s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_240959/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_240959/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%s = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s)
%0 = load i32, ptr %s, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div14 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div14 to i32
%rem2 = srem i32 %0, 60
store i32 %rem2, ptr %s, align 4, !tbaa !5
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void)
{
int S, h, m, s, a;
scanf("%d", &S);
h = S / 3600;
a = S % 3600;
m = a / 60;
s = a % 60;
printf("%d:%d:%d\n", h, m, s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241000/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241000/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div15 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div15 to i32
%rem26 = srem i16 %div1.lhs.trunc, 60
%rem2.sext = sext i16 %rem26 to i32
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem2.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(){
int S, h, m, s;
scanf("%d", &S);
h=S/3600;
m=S%3600 / 60;
s=S%3600 % 60;
printf("%d:%d:%d\n", h, m, s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241059/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241059/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div15 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div15 to i32
%rem36 = srem i16 %div1.lhs.trunc, 60
%rem3.sext = sext i16 %rem36 to i32
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem3.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(){
int x,s,m,h;
scanf("%d",&x);
h=x/3600;
m=(x-h*3600)/60;
s=x-h*3600-m*60;
printf("%d:%d:%d\n",h,m,s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241101/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241101/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%x = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x)
%0 = load i32, ptr %x, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%mul.neg = mul nsw i32 %div, -3600
%sub = add i32 %mul.neg, %0
%div1 = sdiv i32 %sub, 60
%mul4.neg = mul nsw i32 %div1, -60
%sub5 = add i32 %mul4.neg, %sub
%call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1, i32 noundef %sub5)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
/*test7.c*/
#include<stdio.h>
int main(void){
int s,m,h;
scanf("%d",&s);
h=s/3600;
m=s/60;
if(h>=1){
m=m-h*60;
}
s=s-3600*h-60*m;
printf("%d:%d:%d\n",h,m,s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241145/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241145/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%s = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s)
%0 = load i32, ptr %s, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%div1 = sdiv i32 %0, 60
%cmp = icmp sgt i32 %0, 3599
%mul.neg = mul nsw i32 %div, -60
%sub = select i1 %cmp, i32 %mul.neg, i32 0
%m.0 = add nsw i32 %sub, %div1
%mul2.neg = mul nsw i32 %div, -3600
%sub3 = add i32 %mul2.neg, %0
%mul4.neg = mul i32 %m.0, -60
%sub5 = add i32 %sub3, %mul4.neg
store i32 %sub5, ptr %s, align 4, !tbaa !5
%call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %m.0, i32 noundef %sub5)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main()
{
int S;
int h,m,s;
scanf("%d",&S);
h=S/3600;
m=(S%3600)/60;
s=(S%3600)%60;
printf("%d:%d:%d\n",h,m,s);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241189/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241189/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div15 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div15 to i32
%rem36 = srem i16 %div1.lhs.trunc, 60
%rem3.sext = sext i16 %rem36 to i32
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem3.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void)
{
int s1,s2,m,h;
scanf("%d",&s1);
h = s1 / 3600;
m = (s1 % 3600) / 60;
s2 = (s1 % 3600 % 60) % 60;
printf("%d:%d:%d\n",h,m,s2);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241231/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241231/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%s1 = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s1) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s1)
%0 = load i32, ptr %s1, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div16 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div16 to i32
%rem37 = srem i16 %div1.lhs.trunc, 60
%rem3.sext = sext i16 %rem37 to i32
%call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem3.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s1) #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 num,h,m,s;
scanf("%d",&num);
s = num % 60;
num = num / 60;
m = num % 60;
h = num / 60;
printf("%d:%d:%d\n",h,m,s);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241275/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241275/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%num = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %num)
%0 = load i32, ptr %num, align 4, !tbaa !5
%rem = srem i32 %0, 60
%div = sdiv i32 %0, 60
store i32 %div, ptr %num, align 4, !tbaa !5
%rem1 = srem i32 %div, 60
%div2 = sdiv i32 %0, 3600
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div2, i32 noundef %rem1, i32 noundef %rem)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #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,h,m,s;
scanf("%d",&a);
h=a/3600;
a=a-h*3600;
m=a/60;
s=a-m*60;
printf("%d:%d:%d\n",h,m,s);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241318/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241318/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%0 = load i32, ptr %a, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%mul.neg = mul nsw i32 %div, -3600
%sub = add i32 %mul.neg, %0
store i32 %sub, ptr %a, align 4, !tbaa !5
%div1 = sdiv i32 %sub, 60
%mul2.neg = mul nsw i32 %div1, -60
%sub3 = add i32 %mul2.neg, %sub
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1, i32 noundef %sub3)
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 S;
int h, m, s;
scanf("%d", &S);
h = S / 3600;
m = (S - 3600*h)/60;
s = S - (3600 * h + 60 * m);
printf("%d:%d:%d\n",h,m,s);
return(0);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241361/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241361/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%mul.neg = mul nsw i32 %div, -3600
%sub = add i32 %mul.neg, %0
%div1 = sdiv i32 %sub, 60
%mul3.neg = mul nsw i32 %div1, -60
%sub4 = add i32 %sub, %mul3.neg
%call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1, i32 noundef %sub4)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int s,m,h;
scanf("%d",&s);
h=s/3600;
s-=3600*h;
m=s/60;
s-=60*m;
printf("%d:%d:%d\n",h,m,s);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241404/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241404/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%s = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s)
%0 = load i32, ptr %s, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%mul.neg = mul nsw i32 %div, -3600
%sub = add i32 %mul.neg, %0
%div1 = sdiv i32 %sub, 60
%mul2.neg = mul nsw i32 %div1, -60
%sub3 = add i32 %mul2.neg, %sub
store i32 %sub3, ptr %s, align 4, !tbaa !5
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1, i32 noundef %sub3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(int argc, const char * argv[]) {
// insert code here...
int sec;
int h,m,s;
scanf("%d",&sec);
h = sec / 3600;
m = (sec % 3600) / 60;
s = sec % 60;
printf("%d:%d:%d\n",h,m,s);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241448/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241448/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 {
entry:
%sec = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %sec) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %sec)
%0 = load i32, ptr %sec, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div14 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div14 to i32
%rem2 = srem i32 %0, 60
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %sec) #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 seconds;
scanf("%d", &seconds);
int hours = seconds / 3600;
int minutes = (seconds % 3600) / 60;
seconds %= 60;
printf("%d:%d:%d\n", hours, minutes, seconds);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241491/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241491/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%seconds = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %seconds) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %seconds)
%0 = load i32, ptr %seconds, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div14 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div14 to i32
%rem2 = srem i32 %0, 60
store i32 %rem2, ptr %seconds, align 4, !tbaa !5
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %seconds) #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 s;
scanf("%d",&s);
printf("%d:%d:%d\n",s/3600,s%3600/60,s%3600%60);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241541/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241541/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%s = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s)
%0 = load i32, ptr %s, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div15 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div15 to i32
%rem36 = srem i16 %div1.lhs.trunc, 60
%rem3.sext = sext i16 %rem36 to i32
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem3.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
typedef long long ll;
int max(int a, int b){
if(a > b) return a;
else return b;
}
int min(int a, int b){
if(a < b) return a;
else return b;
}
int sort(const void *a ,const void *b){
return *(int*)a - *(int*)b;
}
int f(int a){
int count = 0;
int flag = 0;
for(int i = 1; i <= pow(a,0.5); ++i){
if(a % i == 0) count ++;
if(i*i == a)flag = 1;
}
count *= 2;
if(flag == 1) --count;
return count;
}
int main(){
int s;
scanf("%d",&s);
int h,m,sec;
h = s / 3600; s %= 3600;
m = s/60; s %= 60;
sec = s;
printf("%d:%d:%d\n",h, m, sec);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241585/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241585/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
define dso_local i32 @max(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 {
entry:
%a.b = tail call i32 @llvm.smax.i32(i32 %a, i32 %b)
ret i32 %a.b
}
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
define dso_local i32 @min(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 {
entry:
%a.b = tail call i32 @llvm.smin.i32(i32 %a, i32 %b)
ret i32 %a.b
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @sort(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #1 {
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: nounwind uwtable
define dso_local i32 @f(i32 noundef %a) local_unnamed_addr #2 {
entry:
%conv1 = sitofp i32 %a to double
%sqrt25 = tail call double @sqrt(double %conv1) #7
%abs26 = tail call double @llvm.fabs.f64(double %sqrt25)
%cmp27 = fcmp ult double %abs26, 1.000000e+00
br i1 %cmp27, label %for.cond.cleanup, label %for.body
for.cond.cleanup.loopexit: ; preds = %for.body
%0 = shl nuw nsw i32 %spec.select24, 1
%1 = icmp eq i32 %flag.1, 1
%2 = sext i1 %1 to i32
%3 = add nsw i32 %0, %2
br label %for.cond.cleanup
for.cond.cleanup: ; preds = %for.cond.cleanup.loopexit, %entry
%spec.select = phi i32 [ 0, %entry ], [ %3, %for.cond.cleanup.loopexit ]
ret i32 %spec.select
for.body: ; preds = %entry, %for.body
%i.030 = phi i32 [ %inc9, %for.body ], [ 1, %entry ]
%flag.029 = phi i32 [ %flag.1, %for.body ], [ 0, %entry ]
%count.028 = phi i32 [ %spec.select24, %for.body ], [ 0, %entry ]
%rem = srem i32 %a, %i.030
%cmp3 = icmp eq i32 %rem, 0
%inc = zext i1 %cmp3 to i32
%spec.select24 = add nuw nsw i32 %count.028, %inc
%mul = mul nsw i32 %i.030, %i.030
%cmp5 = icmp eq i32 %mul, %a
%flag.1 = select i1 %cmp5, i32 1, i32 %flag.029
%inc9 = add nuw nsw i32 %i.030, 1
%conv = sitofp i32 %inc9 to double
%sqrt = tail call double @sqrt(double %conv1) #7
%abs = tail call double @llvm.fabs.f64(double %sqrt)
%cmp = fcmp ult double %abs, %conv
br i1 %cmp, label %for.cond.cleanup.loopexit, label %for.body, !llvm.loop !9
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #4 {
entry:
%s = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #7
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s)
%0 = load i32, ptr %s, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div14 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div14 to i32
%rem25 = srem i16 %div1.lhs.trunc, 60
%rem2.sext = sext i16 %rem25 to i32
store i32 %rem2.sext, ptr %s, align 4, !tbaa !5
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem2.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #7
ret i32 0
}
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5
declare double @sqrt(double) local_unnamed_addr
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #6
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #6
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #6
attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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"}
|
#include <stdio.h>
int main(void)
{
int a,h,m,s;
scanf("%d",&a);
h=a/(60*60);
m=(a-h*60*60)/60;
s=a-(h*60*60+m*60);
printf("%d:%d:%d\n",h,m,s);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241628/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241628/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%0 = load i32, ptr %a, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%mul1.neg = mul nsw i32 %div, -3600
%sub = add i32 %mul1.neg, %0
%div2 = sdiv i32 %sub, 60
%mul5.neg = mul nsw i32 %div2, -60
%sub6 = add i32 %sub, %mul5.neg
%call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div2, i32 noundef %sub6)
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 h, m, s;
int temp;
int S;
h = 0;
m = 0;
s = 0;
temp = 0;
S = 0;
// 数値入力
scanf("%d", &S);
// 計算
// 時
h = S / 3600;
temp = S % 3600;
// 分
m = temp / 60;
// 秒
s = temp % 60;
// 結果出力
printf("%d:%d:%d\n", h, m, s);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241686/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241686/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
store i32 0, ptr %S, align 4, !tbaa !5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div15 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div15 to i32
%rem26 = srem i16 %div1.lhs.trunc, 60
%rem2.sext = sext i16 %rem26 to i32
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem2.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void)
{
int s, h, m;
scanf("%d", &s);
m = s / 60;
s -= m * 60;
h = m / 60;
m -= h * 60;
printf("%d:%d:%d\n", h, m, s);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241729/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241729/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%s = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s)
%0 = load i32, ptr %s, align 4, !tbaa !5
%div = sdiv i32 %0, 60
%mul.neg = mul nsw i32 %div, -60
%sub = add i32 %mul.neg, %0
store i32 %sub, ptr %s, align 4, !tbaa !5
%div1 = sdiv i32 %0, 3600
%mul2.neg = mul nsw i32 %div1, -60
%sub3 = add nsw i32 %mul2.neg, %div
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div1, i32 noundef %sub3, i32 noundef %sub)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(){
int s,m,h;
scanf("%d", &s);
m = s / 60;
s = s % 60;
h = m / 60;
m = m % 60;
printf("%d:%d:%d\n", h, m, s);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241772/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241772/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%s = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s)
%0 = load i32, ptr %s, align 4, !tbaa !5
%div = sdiv i32 %0, 60
%rem = srem i32 %0, 60
store i32 %rem, ptr %s, align 4, !tbaa !5
%div1 = sdiv i32 %0, 3600
%rem2 = srem i32 %div, 60
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div1, i32 noundef %rem2, i32 noundef %rem)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(){
int S;
scanf("%d", &S);
printf("%d:%d:%d\n", S/3600,S%3600/60,S%60);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241822/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241822/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div14 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div14 to i32
%rem2 = srem i32 %0, 60
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int
main()
{
int S;
int h, m, s;
scanf("%d", &S);
h = S / (60 * 60);
m = (S / 60) % 60;
s = S % 60;
printf("%d:%d:%d\n", h, m, s);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241866/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241866/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%div1 = sdiv i32 %0, 60
%rem = srem i32 %div1, 60
%rem2 = srem i32 %0, 60
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, i32 noundef %rem2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(){
int S=0;
int h, m, s;
scanf("%d", &S);
h = S/3600;
m = (S%3600)/60;
s = (S%3600)%60;
printf("%d:%d:%d\n", h, m, s);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241909/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241909/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
store i32 0, ptr %S, align 4, !tbaa !5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div15 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div15 to i32
%rem36 = srem i16 %div1.lhs.trunc, 60
%rem3.sext = sext i16 %rem36 to i32
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem3.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(){
int S;
scanf("%d",&S);
printf("%d:%d:%d\n", S/3600,(S%3600)/60,(S%3600)%60);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_241952/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_241952/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div15 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div15 to i32
%rem36 = srem i16 %div1.lhs.trunc, 60
%rem3.sext = sext i16 %rem36 to i32
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem3.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(){
int S;
scanf("%d",&S);
printf("%d:%d:%d\n",S/3600,(S%3600)/60,S%60);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242001/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242001/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div14 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div14 to i32
%rem2 = srem i32 %0, 60
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(){
int h,m,s;
scanf("%d",&s);
h=s/3600;
m=s%3600/60;
s=s%60;
printf("%d:%d:%d\n",h,m,s);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242052/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242052/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%s = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s)
%0 = load i32, ptr %s, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div14 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div14 to i32
%rem2 = srem i32 %0, 60
store i32 %rem2, ptr %s, align 4, !tbaa !5
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void)
{
int input, h, m, tmp;
scanf("%d", &input);
h = input/(60*60);
input -= h*(60*60);
m = input/60;
input -= m*60;
printf("%d:%d:%d\n", h, m, input);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242096/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242096/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%input = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %input) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %input)
%0 = load i32, ptr %input, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%mul.neg = mul nsw i32 %div, -3600
%sub = add i32 %mul.neg, %0
%div1 = sdiv i32 %sub, 60
%mul2.neg = mul nsw i32 %div1, -60
%sub3 = add i32 %mul2.neg, %sub
store i32 %sub3, ptr %input, align 4, !tbaa !5
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1, i32 noundef %sub3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %input) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @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 S;
scanf("%d",&S);
printf("%d:%d:%d\n",S/3600,S/60%60,S%60);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242139/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242139/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%div1 = sdiv i32 %0, 60
%rem = srem i32 %div1, 60
%rem2 = srem i32 %0, 60
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, i32 noundef %rem2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(){
int S,h,m,s;
scanf("%d", &S);
h = S / 3600;
m = (S - h * 3600) / 60;
s = S % 60;
printf("%d:%d:%d\n",h,m,s);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242182/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242182/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%mul.neg = mul nsw i32 %div, -3600
%sub = add i32 %mul.neg, %0
%div1 = sdiv i32 %sub, 60
%rem = srem i32 %0, 60
%call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1, i32 noundef %rem)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void){
int S, se, M, H;
scanf("%d", &S);
H = S / 3600;
M = (S - H * 3600) / 60;
se = S - H * 3600 - M * 60;
printf("%d:%d:%d\n", H, M, se);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242225/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242225/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%mul.neg = mul nsw i32 %div, -3600
%sub = add i32 %mul.neg, %0
%div1 = sdiv i32 %sub, 60
%mul4.neg = mul nsw i32 %div1, -60
%sub5 = add i32 %mul4.neg, %sub
%call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1, i32 noundef %sub5)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(){
int S,h,m,s;
scanf("%d",&S);
h = S/3600;
m = (S%3600)/60;
s = (S%3600)%60;
printf("%d:%d:%d\n",h,m,s);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242269/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242269/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%S = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %S) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S)
%0 = load i32, ptr %S, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div15 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div15 to i32
%rem36 = srem i16 %div1.lhs.trunc, 60
%rem3.sext = sext i16 %rem36 to i32
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem3.sext)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %S) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void){
int sec;
scanf("%d", &sec);
printf("%d:%d:%d\n", sec / 3600, (sec % 3600) / 60, sec % 60);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242311/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242311/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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:%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%sec = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %sec) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %sec)
%0 = load i32, ptr %sec, align 4, !tbaa !5
%div = sdiv i32 %0, 3600
%rem = srem i32 %0, 3600
%div1.lhs.trunc = trunc i32 %rem to i16
%div14 = sdiv i16 %div1.lhs.trunc, 60
%div1.sext = sext i16 %div14 to i32
%rem2 = srem i32 %0, 60
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %div1.sext, i32 noundef %rem2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %sec) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(){
int n,m,i,a[10]={0},j,k,
ans[10]={0},
at[11]={10,2,5,5,4,5,6,3,7,6},
aj[11]={0,1,7,4,3,2,9,5,6,8};
scanf("%d%d",&n,&m);
for(i=0;i<m;i++){
int ab;
scanf("%d",&ab);
a[ab]=1;
}
int min1[10],c=0;
for(i=1;i<10;i++){
//if(c==2)break;
if(a[i]==1){
min1[c]=i;
c++;
}
}
//for(i=0;i<c;i++)printf("%d\n",min1[i]);
int dp[10001][10]={0};
dp[0][0]=1;
//for(i=0;i<c;i++)dp[min1[i]][0]=1;
for(i=0;i<10001;i++){
for(j=0;j<c;j++){
if(i>=at[min1[j]]&&dp[i-at[min1[j]]][0]>0){
int tmp=dp[i-at[min1[j]]][0]+1,king=dp[i][0];
//for(k=0;k<10;k++)king+=dp[i][k];
//for(k=1;k<10;k++)tmp+=dp[i-at[min1[j]]][k];
//printf("%d:%d,%d\n",i,tmp,king);
if(king<=tmp){
for(k=0;k<10;k++){
dp[i][k]=dp[i-at[min1[j]]][k];
}
dp[i][0]=dp[i-at[min1[j]]][0]+1;
dp[i][min1[j]]++;
}
}
}
}
//puts("o");
for(i=9;i>0;i--){
//printf("%d\n",dp[5][i]);
for(k=0;k<dp[n][i];k++)printf("%d",i);
}
puts("");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242355/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242355/source.c"
target datalayout = "e-m:e-p270: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.at = private unnamed_addr constant [11 x i32] [i32 10, i32 2, i32 5, i32 5, i32 4, i32 5, i32 6, i32 3, i32 7, i32 6, i32 0], align 16
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
%m = alloca i32, align 4
%a = alloca [10 x i32], align 16
%ab = alloca i32, align 4
%min1 = alloca [10 x i32], align 16
%dp = alloca [10001 x [10 x i32]], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #5
call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %a) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %a, i8 0, i64 40, i1 false)
%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
%cmp147 = icmp sgt i32 %0, 0
br i1 %cmp147, label %for.body, label %for.end.thread
for.end.thread: ; preds = %entry
call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %min1) #5
br label %for.inc11
for.body: ; preds = %entry, %for.body
%i.0148 = phi i32 [ %inc, %for.body ], [ 0, %entry ]
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %ab) #5
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %ab)
%1 = load i32, ptr %ab, align 4, !tbaa !5
%idxprom = sext i32 %1 to i64
%arrayidx = getelementptr inbounds [10 x i32], ptr %a, i64 0, i64 %idxprom
store i32 1, ptr %arrayidx, align 4, !tbaa !5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %ab) #5
%inc = add nuw nsw i32 %i.0148, 1
%2 = load i32, ptr %m, align 4, !tbaa !5
%cmp = icmp slt i32 %inc, %2
br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body
%arrayidx6.phi.trans.insert = getelementptr inbounds [10 x i32], ptr %a, i64 0, i64 1
%.pre = load i32, ptr %arrayidx6.phi.trans.insert, align 4, !tbaa !5
call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %min1) #5
%cmp7 = icmp eq i32 %.pre, 1
br i1 %cmp7, label %if.then, label %for.inc11
if.then: ; preds = %for.end
store i32 1, ptr %min1, align 16, !tbaa !5
br label %for.inc11
for.inc11: ; preds = %for.end.thread, %for.end, %if.then
%c.1 = phi i32 [ 1, %if.then ], [ 0, %for.end ], [ 0, %for.end.thread ]
%arrayidx6.1 = getelementptr inbounds [10 x i32], ptr %a, i64 0, i64 2
%3 = load i32, ptr %arrayidx6.1, align 8, !tbaa !5
%cmp7.1 = icmp eq i32 %3, 1
br i1 %cmp7.1, label %if.then.1, label %for.inc11.1
if.then.1: ; preds = %for.inc11
%idxprom8.1 = zext i32 %c.1 to i64
%arrayidx9.1 = getelementptr inbounds [10 x i32], ptr %min1, i64 0, i64 %idxprom8.1
store i32 2, ptr %arrayidx9.1, align 4, !tbaa !5
%inc10.1 = add nuw nsw i32 %c.1, 1
br label %for.inc11.1
for.inc11.1: ; preds = %if.then.1, %for.inc11
%c.1.1 = phi i32 [ %inc10.1, %if.then.1 ], [ %c.1, %for.inc11 ]
%arrayidx6.2 = getelementptr inbounds [10 x i32], ptr %a, i64 0, i64 3
%4 = load i32, ptr %arrayidx6.2, align 4, !tbaa !5
%cmp7.2 = icmp eq i32 %4, 1
br i1 %cmp7.2, label %if.then.2, label %for.inc11.2
if.then.2: ; preds = %for.inc11.1
%idxprom8.2 = zext i32 %c.1.1 to i64
%arrayidx9.2 = getelementptr inbounds [10 x i32], ptr %min1, i64 0, i64 %idxprom8.2
store i32 3, ptr %arrayidx9.2, align 4, !tbaa !5
%inc10.2 = add nuw nsw i32 %c.1.1, 1
br label %for.inc11.2
for.inc11.2: ; preds = %if.then.2, %for.inc11.1
%c.1.2 = phi i32 [ %inc10.2, %if.then.2 ], [ %c.1.1, %for.inc11.1 ]
%arrayidx6.3 = getelementptr inbounds [10 x i32], ptr %a, i64 0, i64 4
%5 = load i32, ptr %arrayidx6.3, align 16, !tbaa !5
%cmp7.3 = icmp eq i32 %5, 1
br i1 %cmp7.3, label %if.then.3, label %for.inc11.3
if.then.3: ; preds = %for.inc11.2
%idxprom8.3 = zext i32 %c.1.2 to i64
%arrayidx9.3 = getelementptr inbounds [10 x i32], ptr %min1, i64 0, i64 %idxprom8.3
store i32 4, ptr %arrayidx9.3, align 4, !tbaa !5
%inc10.3 = add nuw nsw i32 %c.1.2, 1
br label %for.inc11.3
for.inc11.3: ; preds = %if.then.3, %for.inc11.2
%c.1.3 = phi i32 [ %inc10.3, %if.then.3 ], [ %c.1.2, %for.inc11.2 ]
%arrayidx6.4 = getelementptr inbounds [10 x i32], ptr %a, i64 0, i64 5
%6 = load i32, ptr %arrayidx6.4, align 4, !tbaa !5
%cmp7.4 = icmp eq i32 %6, 1
br i1 %cmp7.4, label %if.then.4, label %for.inc11.4
if.then.4: ; preds = %for.inc11.3
%idxprom8.4 = zext i32 %c.1.3 to i64
%arrayidx9.4 = getelementptr inbounds [10 x i32], ptr %min1, i64 0, i64 %idxprom8.4
store i32 5, ptr %arrayidx9.4, align 4, !tbaa !5
%inc10.4 = add nuw nsw i32 %c.1.3, 1
br label %for.inc11.4
for.inc11.4: ; preds = %if.then.4, %for.inc11.3
%c.1.4 = phi i32 [ %inc10.4, %if.then.4 ], [ %c.1.3, %for.inc11.3 ]
%arrayidx6.5 = getelementptr inbounds [10 x i32], ptr %a, i64 0, i64 6
%7 = load i32, ptr %arrayidx6.5, align 8, !tbaa !5
%cmp7.5 = icmp eq i32 %7, 1
br i1 %cmp7.5, label %if.then.5, label %for.inc11.5
if.then.5: ; preds = %for.inc11.4
%idxprom8.5 = zext i32 %c.1.4 to i64
%arrayidx9.5 = getelementptr inbounds [10 x i32], ptr %min1, i64 0, i64 %idxprom8.5
store i32 6, ptr %arrayidx9.5, align 4, !tbaa !5
%inc10.5 = add nuw nsw i32 %c.1.4, 1
br label %for.inc11.5
for.inc11.5: ; preds = %if.then.5, %for.inc11.4
%c.1.5 = phi i32 [ %inc10.5, %if.then.5 ], [ %c.1.4, %for.inc11.4 ]
%arrayidx6.6 = getelementptr inbounds [10 x i32], ptr %a, i64 0, i64 7
%8 = load i32, ptr %arrayidx6.6, align 4, !tbaa !5
%cmp7.6 = icmp eq i32 %8, 1
br i1 %cmp7.6, label %if.then.6, label %for.inc11.6
if.then.6: ; preds = %for.inc11.5
%idxprom8.6 = zext i32 %c.1.5 to i64
%arrayidx9.6 = getelementptr inbounds [10 x i32], ptr %min1, i64 0, i64 %idxprom8.6
store i32 7, ptr %arrayidx9.6, align 4, !tbaa !5
%inc10.6 = add nuw nsw i32 %c.1.5, 1
br label %for.inc11.6
for.inc11.6: ; preds = %if.then.6, %for.inc11.5
%c.1.6 = phi i32 [ %inc10.6, %if.then.6 ], [ %c.1.5, %for.inc11.5 ]
%arrayidx6.7 = getelementptr inbounds [10 x i32], ptr %a, i64 0, i64 8
%9 = load i32, ptr %arrayidx6.7, align 16, !tbaa !5
%cmp7.7 = icmp eq i32 %9, 1
br i1 %cmp7.7, label %if.then.7, label %for.inc11.7
if.then.7: ; preds = %for.inc11.6
%idxprom8.7 = zext i32 %c.1.6 to i64
%arrayidx9.7 = getelementptr inbounds [10 x i32], ptr %min1, i64 0, i64 %idxprom8.7
store i32 8, ptr %arrayidx9.7, align 4, !tbaa !5
%inc10.7 = add nuw nsw i32 %c.1.6, 1
br label %for.inc11.7
for.inc11.7: ; preds = %if.then.7, %for.inc11.6
%c.1.7 = phi i32 [ %inc10.7, %if.then.7 ], [ %c.1.6, %for.inc11.6 ]
%arrayidx6.8 = getelementptr inbounds [10 x i32], ptr %a, i64 0, i64 9
%10 = load i32, ptr %arrayidx6.8, align 4, !tbaa !5
%cmp7.8 = icmp eq i32 %10, 1
br i1 %cmp7.8, label %for.inc11.8.thread, label %for.inc11.8
for.inc11.8.thread: ; preds = %for.inc11.7
%idxprom8.8 = zext i32 %c.1.7 to i64
%arrayidx9.8 = getelementptr inbounds [10 x i32], ptr %min1, i64 0, i64 %idxprom8.8
store i32 9, ptr %arrayidx9.8, align 4, !tbaa !5
%inc10.8 = add nuw nsw i32 %c.1.7, 1
call void @llvm.lifetime.start.p0(i64 400040, ptr nonnull %dp) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400040) %dp, i8 0, i64 400040, i1 false)
store i32 1, ptr %dp, align 16, !tbaa !5
br label %for.cond19.preheader.us.preheader
for.inc11.8: ; preds = %for.inc11.7
call void @llvm.lifetime.start.p0(i64 400040, ptr nonnull %dp) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400040) %dp, i8 0, i64 400040, i1 false)
store i32 1, ptr %dp, align 16, !tbaa !5
%cmp20152.not = icmp eq i32 %c.1.7, 0
br i1 %cmp20152.not, label %for.cond95.preheader, label %for.cond19.preheader.us.preheader
for.cond19.preheader.us.preheader: ; preds = %for.inc11.8.thread, %for.inc11.8
%c.1.8175 = phi i32 [ %inc10.8, %for.inc11.8.thread ], [ %c.1.7, %for.inc11.8 ]
%wide.trip.count = zext i32 %c.1.8175 to i64
br label %for.cond19.preheader.us
for.cond19.preheader.us: ; preds = %for.cond19.preheader.us.preheader, %for.cond19.for.inc92_crit_edge.us
%indvars.iv165 = phi i64 [ 0, %for.cond19.preheader.us.preheader ], [ %indvars.iv.next166, %for.cond19.for.inc92_crit_edge.us ]
%arrayidx45.us = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %indvars.iv165
%11 = trunc i64 %indvars.iv165 to i32
%arrayidx64.us.1 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %indvars.iv165, i64 1
%arrayidx64.us.5 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %indvars.iv165, i64 5
%arrayidx64.us.9 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %indvars.iv165, i64 9
br label %for.body21.us
for.body21.us: ; preds = %for.cond19.preheader.us, %for.inc89.us
%indvars.iv = phi i64 [ 0, %for.cond19.preheader.us ], [ %indvars.iv.next, %for.inc89.us ]
%arrayidx23.us = getelementptr inbounds [10 x i32], ptr %min1, i64 0, i64 %indvars.iv
%12 = load i32, ptr %arrayidx23.us, align 4, !tbaa !5
%idxprom24.us = sext i32 %12 to i64
%arrayidx25.us = getelementptr inbounds [11 x i32], ptr @__const.main.at, i64 0, i64 %idxprom24.us
%13 = load i32, ptr %arrayidx25.us, align 4, !tbaa !5
%14 = sext i32 %13 to i64
%cmp26.not.us = icmp slt i64 %indvars.iv165, %14
br i1 %cmp26.not.us, label %for.inc89.us, label %land.lhs.true.us
land.lhs.true.us: ; preds = %for.body21.us
%sub.us = sub nsw i32 %11, %13
%idxprom31.us = sext i32 %sub.us to i64
%arrayidx32.us = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom31.us
%15 = load i32, ptr %arrayidx32.us, align 8, !tbaa !5
%cmp34.us = icmp sgt i32 %15, 0
br i1 %cmp34.us, label %if.then35.us, label %for.inc89.us
if.then35.us: ; preds = %land.lhs.true.us
%add.us = add nuw nsw i32 %15, 1
%16 = load i32, ptr %arrayidx45.us, align 8, !tbaa !5
%cmp47.not.us = icmp sgt i32 %16, %add.us
br i1 %cmp47.not.us, label %for.inc89.us, label %for.body51.us.preheader
for.body51.us.preheader: ; preds = %if.then35.us
store i32 %15, ptr %arrayidx45.us, align 8, !tbaa !5
%arrayidx60.us.1 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom31.us, i64 1
%17 = load <4 x i32>, ptr %arrayidx60.us.1, align 4, !tbaa !5
store <4 x i32> %17, ptr %arrayidx64.us.1, align 4, !tbaa !5
%arrayidx60.us.5 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom31.us, i64 5
%18 = load <4 x i32>, ptr %arrayidx60.us.5, align 4, !tbaa !5
store <4 x i32> %18, ptr %arrayidx64.us.5, align 4, !tbaa !5
%arrayidx60.us.9 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom31.us, i64 9
%19 = load i32, ptr %arrayidx60.us.9, align 4, !tbaa !5
store i32 %19, ptr %arrayidx64.us.9, align 4, !tbaa !5
%20 = load i32, ptr %arrayidx32.us, align 8, !tbaa !5
%add76.us = add nsw i32 %20, 1
store i32 %add76.us, ptr %arrayidx45.us, align 8, !tbaa !5
%arrayidx85.us = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %indvars.iv165, i64 %idxprom24.us
%21 = load i32, ptr %arrayidx85.us, align 4, !tbaa !5
%inc86.us = add nsw i32 %21, 1
store i32 %inc86.us, ptr %arrayidx85.us, align 4, !tbaa !5
br label %for.inc89.us
for.inc89.us: ; preds = %for.body51.us.preheader, %if.then35.us, %land.lhs.true.us, %for.body21.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.cond19.for.inc92_crit_edge.us, label %for.body21.us, !llvm.loop !11
for.cond19.for.inc92_crit_edge.us: ; preds = %for.inc89.us
%indvars.iv.next166 = add nuw nsw i64 %indvars.iv165, 1
%exitcond168.not = icmp eq i64 %indvars.iv.next166, 10001
br i1 %exitcond168.not, label %for.cond95.preheader, label %for.cond19.preheader.us, !llvm.loop !12
for.cond95.preheader: ; preds = %for.cond19.for.inc92_crit_edge.us, %for.inc11.8
%22 = load i32, ptr %n, align 4, !tbaa !5
%idxprom99155 = sext i32 %22 to i64
%arrayidx102156 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99155, i64 9
%23 = load i32, ptr %arrayidx102156, align 4, !tbaa !5
%cmp103157 = icmp sgt i32 %23, 0
br i1 %cmp103157, label %for.body104, label %for.inc109
for.body104: ; preds = %for.cond95.preheader, %for.body104
%k.1158 = phi i32 [ %inc107, %for.body104 ], [ 0, %for.cond95.preheader ]
%call105 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 9)
%inc107 = add nuw nsw i32 %k.1158, 1
%24 = load i32, ptr %n, align 4, !tbaa !5
%idxprom99 = sext i32 %24 to i64
%arrayidx102 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99, i64 9
%25 = load i32, ptr %arrayidx102, align 4, !tbaa !5
%cmp103 = icmp slt i32 %inc107, %25
br i1 %cmp103, label %for.body104, label %for.inc109, !llvm.loop !13
for.inc109: ; preds = %for.body104, %for.cond95.preheader
%idxprom99155.1.pre-phi = phi i64 [ %idxprom99155, %for.cond95.preheader ], [ %idxprom99, %for.body104 ]
%arrayidx102156.1 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99155.1.pre-phi, i64 8
%26 = load i32, ptr %arrayidx102156.1, align 8, !tbaa !5
%cmp103157.1 = icmp sgt i32 %26, 0
br i1 %cmp103157.1, label %for.body104.1, label %for.inc109.1
for.body104.1: ; preds = %for.inc109, %for.body104.1
%k.1158.1 = phi i32 [ %inc107.1, %for.body104.1 ], [ 0, %for.inc109 ]
%call105.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 8)
%inc107.1 = add nuw nsw i32 %k.1158.1, 1
%27 = load i32, ptr %n, align 4, !tbaa !5
%idxprom99.1 = sext i32 %27 to i64
%arrayidx102.1 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99.1, i64 8
%28 = load i32, ptr %arrayidx102.1, align 8, !tbaa !5
%cmp103.1 = icmp slt i32 %inc107.1, %28
br i1 %cmp103.1, label %for.body104.1, label %for.inc109.1, !llvm.loop !13
for.inc109.1: ; preds = %for.body104.1, %for.inc109
%idxprom99155.2.pre-phi = phi i64 [ %idxprom99155.1.pre-phi, %for.inc109 ], [ %idxprom99.1, %for.body104.1 ]
%arrayidx102156.2 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99155.2.pre-phi, i64 7
%29 = load i32, ptr %arrayidx102156.2, align 4, !tbaa !5
%cmp103157.2 = icmp sgt i32 %29, 0
br i1 %cmp103157.2, label %for.body104.2, label %for.inc109.2
for.body104.2: ; preds = %for.inc109.1, %for.body104.2
%k.1158.2 = phi i32 [ %inc107.2, %for.body104.2 ], [ 0, %for.inc109.1 ]
%call105.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 7)
%inc107.2 = add nuw nsw i32 %k.1158.2, 1
%30 = load i32, ptr %n, align 4, !tbaa !5
%idxprom99.2 = sext i32 %30 to i64
%arrayidx102.2 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99.2, i64 7
%31 = load i32, ptr %arrayidx102.2, align 4, !tbaa !5
%cmp103.2 = icmp slt i32 %inc107.2, %31
br i1 %cmp103.2, label %for.body104.2, label %for.inc109.2, !llvm.loop !13
for.inc109.2: ; preds = %for.body104.2, %for.inc109.1
%idxprom99155.3.pre-phi = phi i64 [ %idxprom99155.2.pre-phi, %for.inc109.1 ], [ %idxprom99.2, %for.body104.2 ]
%arrayidx102156.3 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99155.3.pre-phi, i64 6
%32 = load i32, ptr %arrayidx102156.3, align 8, !tbaa !5
%cmp103157.3 = icmp sgt i32 %32, 0
br i1 %cmp103157.3, label %for.body104.3, label %for.inc109.3
for.body104.3: ; preds = %for.inc109.2, %for.body104.3
%k.1158.3 = phi i32 [ %inc107.3, %for.body104.3 ], [ 0, %for.inc109.2 ]
%call105.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 6)
%inc107.3 = add nuw nsw i32 %k.1158.3, 1
%33 = load i32, ptr %n, align 4, !tbaa !5
%idxprom99.3 = sext i32 %33 to i64
%arrayidx102.3 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99.3, i64 6
%34 = load i32, ptr %arrayidx102.3, align 8, !tbaa !5
%cmp103.3 = icmp slt i32 %inc107.3, %34
br i1 %cmp103.3, label %for.body104.3, label %for.inc109.3, !llvm.loop !13
for.inc109.3: ; preds = %for.body104.3, %for.inc109.2
%idxprom99155.4.pre-phi = phi i64 [ %idxprom99155.3.pre-phi, %for.inc109.2 ], [ %idxprom99.3, %for.body104.3 ]
%arrayidx102156.4 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99155.4.pre-phi, i64 5
%35 = load i32, ptr %arrayidx102156.4, align 4, !tbaa !5
%cmp103157.4 = icmp sgt i32 %35, 0
br i1 %cmp103157.4, label %for.body104.4, label %for.inc109.4
for.body104.4: ; preds = %for.inc109.3, %for.body104.4
%k.1158.4 = phi i32 [ %inc107.4, %for.body104.4 ], [ 0, %for.inc109.3 ]
%call105.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 5)
%inc107.4 = add nuw nsw i32 %k.1158.4, 1
%36 = load i32, ptr %n, align 4, !tbaa !5
%idxprom99.4 = sext i32 %36 to i64
%arrayidx102.4 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99.4, i64 5
%37 = load i32, ptr %arrayidx102.4, align 4, !tbaa !5
%cmp103.4 = icmp slt i32 %inc107.4, %37
br i1 %cmp103.4, label %for.body104.4, label %for.inc109.4, !llvm.loop !13
for.inc109.4: ; preds = %for.body104.4, %for.inc109.3
%idxprom99155.5.pre-phi = phi i64 [ %idxprom99155.4.pre-phi, %for.inc109.3 ], [ %idxprom99.4, %for.body104.4 ]
%arrayidx102156.5 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99155.5.pre-phi, i64 4
%38 = load i32, ptr %arrayidx102156.5, align 8, !tbaa !5
%cmp103157.5 = icmp sgt i32 %38, 0
br i1 %cmp103157.5, label %for.body104.5, label %for.inc109.5
for.body104.5: ; preds = %for.inc109.4, %for.body104.5
%k.1158.5 = phi i32 [ %inc107.5, %for.body104.5 ], [ 0, %for.inc109.4 ]
%call105.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 4)
%inc107.5 = add nuw nsw i32 %k.1158.5, 1
%39 = load i32, ptr %n, align 4, !tbaa !5
%idxprom99.5 = sext i32 %39 to i64
%arrayidx102.5 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99.5, i64 4
%40 = load i32, ptr %arrayidx102.5, align 8, !tbaa !5
%cmp103.5 = icmp slt i32 %inc107.5, %40
br i1 %cmp103.5, label %for.body104.5, label %for.inc109.5, !llvm.loop !13
for.inc109.5: ; preds = %for.body104.5, %for.inc109.4
%idxprom99155.6.pre-phi = phi i64 [ %idxprom99155.5.pre-phi, %for.inc109.4 ], [ %idxprom99.5, %for.body104.5 ]
%arrayidx102156.6 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99155.6.pre-phi, i64 3
%41 = load i32, ptr %arrayidx102156.6, align 4, !tbaa !5
%cmp103157.6 = icmp sgt i32 %41, 0
br i1 %cmp103157.6, label %for.body104.6, label %for.inc109.6
for.body104.6: ; preds = %for.inc109.5, %for.body104.6
%k.1158.6 = phi i32 [ %inc107.6, %for.body104.6 ], [ 0, %for.inc109.5 ]
%call105.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 3)
%inc107.6 = add nuw nsw i32 %k.1158.6, 1
%42 = load i32, ptr %n, align 4, !tbaa !5
%idxprom99.6 = sext i32 %42 to i64
%arrayidx102.6 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99.6, i64 3
%43 = load i32, ptr %arrayidx102.6, align 4, !tbaa !5
%cmp103.6 = icmp slt i32 %inc107.6, %43
br i1 %cmp103.6, label %for.body104.6, label %for.inc109.6, !llvm.loop !13
for.inc109.6: ; preds = %for.body104.6, %for.inc109.5
%idxprom99155.7.pre-phi = phi i64 [ %idxprom99155.6.pre-phi, %for.inc109.5 ], [ %idxprom99.6, %for.body104.6 ]
%arrayidx102156.7 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99155.7.pre-phi, i64 2
%44 = load i32, ptr %arrayidx102156.7, align 8, !tbaa !5
%cmp103157.7 = icmp sgt i32 %44, 0
br i1 %cmp103157.7, label %for.body104.7, label %for.inc109.7
for.body104.7: ; preds = %for.inc109.6, %for.body104.7
%k.1158.7 = phi i32 [ %inc107.7, %for.body104.7 ], [ 0, %for.inc109.6 ]
%call105.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 2)
%inc107.7 = add nuw nsw i32 %k.1158.7, 1
%45 = load i32, ptr %n, align 4, !tbaa !5
%idxprom99.7 = sext i32 %45 to i64
%arrayidx102.7 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99.7, i64 2
%46 = load i32, ptr %arrayidx102.7, align 8, !tbaa !5
%cmp103.7 = icmp slt i32 %inc107.7, %46
br i1 %cmp103.7, label %for.body104.7, label %for.inc109.7, !llvm.loop !13
for.inc109.7: ; preds = %for.body104.7, %for.inc109.6
%idxprom99155.8.pre-phi = phi i64 [ %idxprom99155.7.pre-phi, %for.inc109.6 ], [ %idxprom99.7, %for.body104.7 ]
%arrayidx102156.8 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99155.8.pre-phi, i64 1
%47 = load i32, ptr %arrayidx102156.8, align 4, !tbaa !5
%cmp103157.8 = icmp sgt i32 %47, 0
br i1 %cmp103157.8, label %for.body104.8, label %for.inc109.8
for.body104.8: ; preds = %for.inc109.7, %for.body104.8
%k.1158.8 = phi i32 [ %inc107.8, %for.body104.8 ], [ 0, %for.inc109.7 ]
%call105.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 1)
%inc107.8 = add nuw nsw i32 %k.1158.8, 1
%48 = load i32, ptr %n, align 4, !tbaa !5
%idxprom99.8 = sext i32 %48 to i64
%arrayidx102.8 = getelementptr inbounds [10001 x [10 x i32]], ptr %dp, i64 0, i64 %idxprom99.8, i64 1
%49 = load i32, ptr %arrayidx102.8, align 4, !tbaa !5
%cmp103.8 = icmp slt i32 %inc107.8, %49
br i1 %cmp103.8, label %for.body104.8, label %for.inc109.8, !llvm.loop !13
for.inc109.8: ; preds = %for.body104.8, %for.inc109.7
%putchar = call i32 @putchar(i32 10)
call void @llvm.lifetime.end.p0(i64 400040, ptr nonnull %dp) #5
call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %min1) #5
call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %a) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
|
#include <stdio.h>
#include <string.h>
#define MAXN 200000
int main() {
char s[MAXN+1];
long ct[26];
while (scanf("%s", s)==1) {
memset(ct, 0, sizeof(ct));
for (int i=0; s[i]; i++)
ct[s[i]-'a']++;
long r = 1;
for (int i=0; i<26; i++)
for (int j=i+1; j<26; j++)
r += ct[i] * ct[j];
printf("%ld\n", r);
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242399/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242399/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1
@.str.1 = private unnamed_addr constant [5 x i8] c"%ld\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%s = alloca [200001 x i8], align 16
%ct = alloca [26 x i64], align 16
call void @llvm.lifetime.start.p0(i64 200001, ptr nonnull %s) #5
call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %ct) #5
%call45 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s)
%cmp46 = icmp eq i32 %call45, 1
br i1 %cmp46, label %while.body, label %while.end
while.body: ; preds = %entry, %for.cond.cleanup11
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %ct, i8 0, i64 208, i1 false)
%0 = load i8, ptr %s, align 16, !tbaa !5
%tobool.not38 = icmp eq i8 %0, 0
br i1 %tobool.not38, label %for.body12.preheader, label %for.body
for.body: ; preds = %while.body, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %while.body ]
%1 = phi i8 [ %3, %for.body ], [ %0, %while.body ]
%conv = sext i8 %1 to i64
%sub = add nsw i64 %conv, -97
%arrayidx5 = getelementptr inbounds [26 x i64], ptr %ct, i64 0, i64 %sub
%2 = load i64, ptr %arrayidx5, align 8, !tbaa !8
%inc = add nsw i64 %2, 1
store i64 %inc, ptr %arrayidx5, align 8, !tbaa !8
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%arrayidx = getelementptr inbounds [200001 x i8], ptr %s, i64 0, i64 %indvars.iv.next
%3 = load i8, ptr %arrayidx, align 1, !tbaa !5
%tobool.not = icmp eq i8 %3, 0
br i1 %tobool.not, label %for.body12.preheader, label %for.body, !llvm.loop !10
for.body12.preheader: ; preds = %for.body, %while.body
br label %for.body12
for.cond8.loopexit: ; preds = %for.body17, %middle.block, %for.body12
%r.1.lcssa = phi i64 [ %r.043, %for.body12 ], [ %14, %middle.block ], [ %add22, %for.body17 ]
%indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
%exitcond55.not = icmp eq i64 %indvars.iv.next53, 26
br i1 %exitcond55.not, label %for.cond.cleanup11, label %for.body12, !llvm.loop !12
for.cond.cleanup11: ; preds = %for.cond8.loopexit
%call29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %r.1.lcssa)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s)
%cmp = icmp eq i32 %call, 1
br i1 %cmp, label %while.body, label %while.end, !llvm.loop !13
for.body12: ; preds = %for.body12.preheader, %for.cond8.loopexit
%indvars.iv52 = phi i64 [ %indvars.iv.next53, %for.cond8.loopexit ], [ 0, %for.body12.preheader ]
%indvars.iv47 = phi i64 [ %indvars.iv.next48, %for.cond8.loopexit ], [ 1, %for.body12.preheader ]
%r.043 = phi i64 [ %r.1.lcssa, %for.cond8.loopexit ], [ 1, %for.body12.preheader ]
%4 = sub nsw i64 25, %indvars.iv52
%indvars.iv.next53 = add nuw nsw i64 %indvars.iv52, 1
%cmp1440 = icmp ult i64 %indvars.iv52, 25
br i1 %cmp1440, label %for.body17.lr.ph, label %for.cond8.loopexit
for.body17.lr.ph: ; preds = %for.body12
%arrayidx19 = getelementptr inbounds [26 x i64], ptr %ct, i64 0, i64 %indvars.iv52
%5 = load i64, ptr %arrayidx19, align 8, !tbaa !8
%min.iters.check = icmp ult i64 %4, 4
br i1 %min.iters.check, label %for.body17.preheader, label %vector.ph
vector.ph: ; preds = %for.body17.lr.ph
%n.vec = and i64 %4, -4
%ind.end = add i64 %indvars.iv47, %n.vec
%6 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %r.043, i64 0
%broadcast.splatinsert = insertelement <2 x i64> poison, i64 %5, i64 0
%broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vec.phi = phi <2 x i64> [ %6, %vector.ph ], [ %11, %vector.body ]
%vec.phi56 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %12, %vector.body ]
%offset.idx = add i64 %indvars.iv47, %index
%7 = getelementptr inbounds [26 x i64], ptr %ct, i64 0, i64 %offset.idx
%wide.load = load <2 x i64>, ptr %7, align 8, !tbaa !8
%8 = getelementptr inbounds i64, ptr %7, i64 2
%wide.load57 = load <2 x i64>, ptr %8, align 8, !tbaa !8
%9 = mul nsw <2 x i64> %wide.load, %broadcast.splat
%10 = mul nsw <2 x i64> %wide.load57, %broadcast.splat
%11 = add <2 x i64> %9, %vec.phi
%12 = add <2 x i64> %10, %vec.phi56
%index.next = add nuw i64 %index, 4
%13 = icmp eq i64 %index.next, %n.vec
br i1 %13, label %middle.block, label %vector.body, !llvm.loop !14
middle.block: ; preds = %vector.body
%bin.rdx = add <2 x i64> %12, %11
%14 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
%cmp.n = icmp eq i64 %4, %n.vec
br i1 %cmp.n, label %for.cond8.loopexit, label %for.body17.preheader
for.body17.preheader: ; preds = %for.body17.lr.ph, %middle.block
%indvars.iv49.ph = phi i64 [ %indvars.iv47, %for.body17.lr.ph ], [ %ind.end, %middle.block ]
%r.141.ph = phi i64 [ %r.043, %for.body17.lr.ph ], [ %14, %middle.block ]
br label %for.body17
for.body17: ; preds = %for.body17.preheader, %for.body17
%indvars.iv49 = phi i64 [ %indvars.iv.next50, %for.body17 ], [ %indvars.iv49.ph, %for.body17.preheader ]
%r.141 = phi i64 [ %add22, %for.body17 ], [ %r.141.ph, %for.body17.preheader ]
%arrayidx21 = getelementptr inbounds [26 x i64], ptr %ct, i64 0, i64 %indvars.iv49
%15 = load i64, ptr %arrayidx21, align 8, !tbaa !8
%mul = mul nsw i64 %15, %5
%add22 = add nsw i64 %mul, %r.141
%indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
%exitcond.not = icmp eq i64 %indvars.iv.next50, 26
br i1 %exitcond.not, label %for.cond8.loopexit, label %for.body17, !llvm.loop !17
while.end: ; preds = %for.cond.cleanup11, %entry
call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %ct) #5
call void @llvm.lifetime.end.p0(i64 200001, ptr nonnull %s) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11, !15, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !11, !16, !15}
|
/*
AOJ - ITP11_1_b
Date: 20181023
Author: Mikoron * ♡mikoiwate351♡
*/
#include<stdio.h>
#include<string.h>
#define CMAX 101
#define TOP 1
#define FRONT 2
#define RIGHT 3
#define LEFT 4
#define BACK 5
#define BOTTOM 6
typedef struct {
short suf[7];
} dice_state_t;
void show_state(dice_state_t *dice, short s_suf);
void change_state(dice_state_t *dice, char command);
void search_RIGHT(dice_state_t *dice, short s_TOP, short s_FRONT);
void replace_y(dice_state_t *dice);
void replace_x(dice_state_t *dice);
void replace_z(dice_state_t *dice);
int main(void) {
short i, order_num, s_TOP, s_FRONT;
dice_state_t dice;
for(i = 1; i < 7; i++) scanf("%hd", &dice.suf[i]);
scanf("%hd", &order_num);
for(i = 0; i < order_num; i++) {
scanf("%hd %hd", &s_TOP, &s_FRONT);
search_RIGHT(&dice, s_TOP, s_FRONT);
show_state(&dice, RIGHT);
}
return 0;
}
void show_state(dice_state_t *dice, short s_suf) {
printf("%hd\n", dice->suf[s_suf]);
}
void change_state(dice_state_t *dice, char command) {
short i;
switch(command) {
case 'N':
replace_y(dice);
break;
case 'E':
replace_x(dice);
break;
case 'S':
for(i = 0; i < 3; i++) replace_y(dice);
break;
case 'W':
for(i = 0; i < 3; i++) replace_x(dice);
break;
}
}
void search_RIGHT(dice_state_t *dice, short s_TOP, short s_FRONT) {
short flag = 0, i, j;
for(i = 0; i < 2; i++) {
if(flag == 1) break;
for(j = 0; j < 4; j++) {
if(dice->suf[TOP] == s_TOP) flag = 1;
if(flag == 1) break;
if(i == 0) replace_y(dice);
else if(i == 1) replace_x(dice);
}
}
for(i = 0; i < 3; i++) {
if(dice->suf[FRONT] == s_FRONT) break;
replace_z(dice);
}
}
void replace_y(dice_state_t *dice) {
short buf;
buf = dice->suf[TOP];
dice->suf[TOP] = dice->suf[FRONT]; // 1 -> 2
dice->suf[FRONT] = dice->suf[BOTTOM]; // 2 -> 6
dice->suf[BOTTOM] = dice->suf[BACK]; // 6 -> 5
dice->suf[BACK] = buf; // 5 -> 1
}
void replace_x(dice_state_t *dice) {
short buf;
buf = dice->suf[TOP];
dice->suf[TOP] = dice->suf[LEFT]; // 1 -> 4
dice->suf[LEFT] = dice->suf[BOTTOM]; // 4 -> 6
dice->suf[BOTTOM] = dice->suf[RIGHT]; // 6 -> 3
dice->suf[RIGHT] = buf; // 3 -> 1
}
void replace_z(dice_state_t *dice) {
short buf;
buf = dice->suf[FRONT];
dice->suf[FRONT] = dice->suf[RIGHT]; // 2 -> 3
dice->suf[RIGHT] = dice->suf[BACK]; // 3 -> 5
dice->suf[BACK] = dice->suf[LEFT]; // 5 -> 4
dice->suf[LEFT] = buf; // 4 -> 2
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242463/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242463/source.c"
target datalayout = "e-m:e-p270: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.dice_state_t = type { [7 x i16] }
@.str = private unnamed_addr constant [4 x i8] c"%hd\00", align 1
@.str.1 = private unnamed_addr constant [8 x i8] c"%hd %hd\00", align 1
@.str.2 = private unnamed_addr constant [5 x i8] c"%hd\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%order_num = alloca i16, align 2
%s_TOP = alloca i16, align 2
%s_FRONT = alloca i16, align 2
%dice = alloca %struct.dice_state_t, align 2
call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %order_num) #5
call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %s_TOP) #5
call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %s_FRONT) #5
call void @llvm.lifetime.start.p0(i64 14, ptr nonnull %dice) #5
%arrayidx = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 1
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx)
%arrayidx.1 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 2
%call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.1)
%arrayidx.2 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 3
%call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.2)
%arrayidx.3 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 4
%call.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.3)
%arrayidx.4 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 5
%call.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.4)
%arrayidx.5 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 6
%call.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.5)
%call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %order_num)
%0 = load i16, ptr %order_num, align 2, !tbaa !5
%cmp619 = icmp sgt i16 %0, 0
br i1 %cmp619, label %for.body8, label %for.end12
for.body8: ; preds = %entry, %search_RIGHT.exit
%i.120 = phi i16 [ %inc11, %search_RIGHT.exit ], [ 0, %entry ]
%call9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s_TOP, ptr noundef nonnull %s_FRONT)
%1 = load i16, ptr %s_TOP, align 2, !tbaa !5
%2 = load i16, ptr %s_FRONT, align 2, !tbaa !5
%arrayidx.promoted86.i = load i16, ptr %arrayidx, align 2, !tbaa !5
%cmp12.us.i = icmp eq i16 %arrayidx.promoted86.i, %1
%arrayidx40.promoted.i.pre = load i16, ptr %arrayidx.1, align 2, !tbaa !5
br i1 %cmp12.us.i, label %for.cond34.preheader.i, label %if.end20.us.i
if.end20.us.i: ; preds = %for.body8
store i16 %arrayidx40.promoted.i.pre, ptr %arrayidx, align 2, !tbaa !5
%3 = load i16, ptr %arrayidx.5, align 2, !tbaa !5
store i16 %3, ptr %arrayidx.1, align 2, !tbaa !5
%4 = load i16, ptr %arrayidx.4, align 2, !tbaa !5
store i16 %4, ptr %arrayidx.5, align 2, !tbaa !5
store i16 %arrayidx.promoted86.i, ptr %arrayidx.4, align 2, !tbaa !5
%cmp12.us.1.i = icmp eq i16 %arrayidx40.promoted.i.pre, %1
br i1 %cmp12.us.1.i, label %for.cond34.preheader.i, label %if.end20.us.1.i
if.end20.us.1.i: ; preds = %if.end20.us.i
store i16 %3, ptr %arrayidx, align 2, !tbaa !5
store i16 %4, ptr %arrayidx.1, align 2, !tbaa !5
store i16 %arrayidx.promoted86.i, ptr %arrayidx.5, align 2, !tbaa !5
store i16 %arrayidx40.promoted.i.pre, ptr %arrayidx.4, align 2, !tbaa !5
%cmp12.us.2.i = icmp eq i16 %3, %1
br i1 %cmp12.us.2.i, label %for.cond34.preheader.i, label %if.end20.us.2.i
if.end20.us.2.i: ; preds = %if.end20.us.1.i
store i16 %4, ptr %arrayidx, align 2, !tbaa !5
store i16 %arrayidx.promoted86.i, ptr %arrayidx.1, align 2, !tbaa !5
store i16 %arrayidx40.promoted.i.pre, ptr %arrayidx.5, align 2, !tbaa !5
store i16 %3, ptr %arrayidx.4, align 2, !tbaa !5
%cmp12.us.3.i = icmp eq i16 %4, %1
br i1 %cmp12.us.3.i, label %for.cond34.preheader.i, label %if.end20.us77.i
if.end20.us77.i: ; preds = %if.end20.us.2.i
store i16 %arrayidx40.promoted.i.pre, ptr %arrayidx.1, align 2, !tbaa !5
store i16 %4, ptr %arrayidx.4, align 2, !tbaa !5
%5 = load i16, ptr %arrayidx.3, align 2, !tbaa !5
store i16 %5, ptr %arrayidx, align 2, !tbaa !5
store i16 %3, ptr %arrayidx.3, align 2, !tbaa !5
%6 = load i16, ptr %arrayidx.2, align 2, !tbaa !5
store i16 %6, ptr %arrayidx.5, align 2, !tbaa !5
store i16 %arrayidx.promoted86.i, ptr %arrayidx.2, align 2, !tbaa !5
%cmp12.us76.1.i = icmp eq i16 %5, %1
br i1 %cmp12.us76.1.i, label %for.cond34.preheader.i, label %if.end20.us77.2.i
if.end20.us77.2.i: ; preds = %if.end20.us77.i
store i16 %6, ptr %arrayidx, align 2, !tbaa !5
store i16 %arrayidx.promoted86.i, ptr %arrayidx.3, align 2, !tbaa !5
store i16 %5, ptr %arrayidx.5, align 2, !tbaa !5
store i16 %3, ptr %arrayidx.2, align 2, !tbaa !5
%cmp12.us76.3.i = icmp eq i16 %6, %1
br i1 %cmp12.us76.3.i, label %for.cond34.preheader.i, label %if.end20.us77.3.i
if.end20.us77.3.i: ; preds = %if.end20.us77.2.i
store i16 %arrayidx.promoted86.i, ptr %arrayidx, align 2, !tbaa !5
store i16 %5, ptr %arrayidx.3, align 2, !tbaa !5
store i16 %3, ptr %arrayidx.5, align 2, !tbaa !5
store i16 %6, ptr %arrayidx.2, align 2, !tbaa !5
br label %for.cond34.preheader.i
for.cond34.preheader.i: ; preds = %if.end20.us77.3.i, %if.end20.us77.2.i, %if.end20.us77.i, %if.end20.us.2.i, %if.end20.us.1.i, %if.end20.us.i, %for.body8
%arrayidx40.promoted.i = phi i16 [ %arrayidx40.promoted.i.pre, %if.end20.us77.3.i ], [ %arrayidx40.promoted.i.pre, %if.end20.us77.2.i ], [ %arrayidx40.promoted.i.pre, %if.end20.us77.i ], [ %arrayidx.promoted86.i, %if.end20.us.2.i ], [ %4, %if.end20.us.1.i ], [ %3, %if.end20.us.i ], [ %arrayidx40.promoted.i.pre, %for.body8 ]
%cmp43.i = icmp eq i16 %arrayidx40.promoted.i, %2
%.pre = load i16, ptr %arrayidx.2, align 2, !tbaa !5
br i1 %cmp43.i, label %search_RIGHT.exit, label %if.end46.i
if.end46.i: ; preds = %for.cond34.preheader.i
store i16 %.pre, ptr %arrayidx.1, align 2, !tbaa !5
%7 = load i16, ptr %arrayidx.4, align 2, !tbaa !5
store i16 %7, ptr %arrayidx.2, align 2, !tbaa !5
%8 = load i16, ptr %arrayidx.3, align 2, !tbaa !5
store i16 %8, ptr %arrayidx.4, align 2, !tbaa !5
store i16 %arrayidx40.promoted.i, ptr %arrayidx.3, align 2, !tbaa !5
%cmp43.1.i = icmp eq i16 %.pre, %2
br i1 %cmp43.1.i, label %search_RIGHT.exit, label %if.end46.1.i
if.end46.1.i: ; preds = %if.end46.i
store i16 %7, ptr %arrayidx.1, align 2, !tbaa !5
store i16 %8, ptr %arrayidx.2, align 2, !tbaa !5
store i16 %arrayidx40.promoted.i, ptr %arrayidx.4, align 2, !tbaa !5
store i16 %.pre, ptr %arrayidx.3, align 2, !tbaa !5
%cmp43.2.i = icmp eq i16 %7, %2
br i1 %cmp43.2.i, label %search_RIGHT.exit, label %if.end46.2.i
if.end46.2.i: ; preds = %if.end46.1.i
store i16 %8, ptr %arrayidx.1, align 2, !tbaa !5
store i16 %arrayidx40.promoted.i, ptr %arrayidx.2, align 2, !tbaa !5
store i16 %.pre, ptr %arrayidx.4, align 2, !tbaa !5
store i16 %7, ptr %arrayidx.3, align 2, !tbaa !5
br label %search_RIGHT.exit
search_RIGHT.exit: ; preds = %for.cond34.preheader.i, %if.end46.i, %if.end46.1.i, %if.end46.2.i
%9 = phi i16 [ %.pre, %for.cond34.preheader.i ], [ %7, %if.end46.i ], [ %8, %if.end46.1.i ], [ %arrayidx40.promoted.i, %if.end46.2.i ]
%conv.i = sext i16 %9 to i32
%call.i = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv.i)
%inc11 = add nuw nsw i16 %i.120, 1
%10 = load i16, ptr %order_num, align 2, !tbaa !5
%cmp6 = icmp slt i16 %inc11, %10
br i1 %cmp6, label %for.body8, label %for.end12, !llvm.loop !9
for.end12: ; preds = %search_RIGHT.exit, %entry
call void @llvm.lifetime.end.p0(i64 14, ptr nonnull %dice) #5
call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %s_FRONT) #5
call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %s_TOP) #5
call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %order_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 norecurse nosync nounwind memory(argmem: readwrite) uwtable
define dso_local void @search_RIGHT(ptr nocapture noundef %dice, i16 noundef signext %s_TOP, i16 noundef signext %s_FRONT) local_unnamed_addr #3 {
entry:
%arrayidx = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 1
%arrayidx2.i62 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 4
%arrayidx6.i63 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 6
%arrayidx10.i64 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 3
%arrayidx2.i = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 2
%arrayidx10.i = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 5
%arrayidx.promoted86 = load i16, ptr %arrayidx, align 2, !tbaa !5
%cmp12.us = icmp eq i16 %arrayidx.promoted86, %s_TOP
br i1 %cmp12.us, label %for.cond34.preheader, label %if.end20.us
if.end20.us: ; preds = %entry
%0 = load i16, ptr %arrayidx2.i, align 2, !tbaa !5
store i16 %0, ptr %arrayidx, align 2, !tbaa !5
%1 = load i16, ptr %arrayidx6.i63, align 2, !tbaa !5
store i16 %1, ptr %arrayidx2.i, align 2, !tbaa !5
%2 = load i16, ptr %arrayidx10.i, align 2, !tbaa !5
store i16 %2, ptr %arrayidx6.i63, align 2, !tbaa !5
store i16 %arrayidx.promoted86, ptr %arrayidx10.i, align 2, !tbaa !5
%cmp12.us.1 = icmp eq i16 %0, %s_TOP
br i1 %cmp12.us.1, label %for.cond34.preheader, label %if.end20.us.1
if.end20.us.1: ; preds = %if.end20.us
store i16 %1, ptr %arrayidx, align 2, !tbaa !5
store i16 %2, ptr %arrayidx2.i, align 2, !tbaa !5
store i16 %arrayidx.promoted86, ptr %arrayidx6.i63, align 2, !tbaa !5
store i16 %0, ptr %arrayidx10.i, align 2, !tbaa !5
%cmp12.us.2 = icmp eq i16 %1, %s_TOP
br i1 %cmp12.us.2, label %for.cond34.preheader, label %if.end20.us.2
if.end20.us.2: ; preds = %if.end20.us.1
store i16 %2, ptr %arrayidx, align 2, !tbaa !5
store i16 %arrayidx.promoted86, ptr %arrayidx2.i, align 2, !tbaa !5
store i16 %0, ptr %arrayidx6.i63, align 2, !tbaa !5
store i16 %1, ptr %arrayidx10.i, align 2, !tbaa !5
%cmp12.us.3 = icmp eq i16 %2, %s_TOP
br i1 %cmp12.us.3, label %for.cond34.preheader, label %if.end20.us.3
if.end20.us.3: ; preds = %if.end20.us.2
store i16 %arrayidx.promoted86, ptr %arrayidx, align 2, !tbaa !5
store i16 %0, ptr %arrayidx2.i, align 2, !tbaa !5
store i16 %1, ptr %arrayidx6.i63, align 2, !tbaa !5
store i16 %2, ptr %arrayidx10.i, align 2, !tbaa !5
%cmp12.us76 = icmp eq i16 %arrayidx.promoted86, %s_TOP
br i1 %cmp12.us76, label %for.cond34.preheader, label %if.end20.us77
if.end20.us77: ; preds = %if.end20.us.3
%3 = load i16, ptr %arrayidx2.i62, align 2, !tbaa !5
store i16 %3, ptr %arrayidx, align 2, !tbaa !5
%4 = load i16, ptr %arrayidx6.i63, align 2, !tbaa !5
store i16 %4, ptr %arrayidx2.i62, align 2, !tbaa !5
%5 = load i16, ptr %arrayidx10.i64, align 2, !tbaa !5
store i16 %5, ptr %arrayidx6.i63, align 2, !tbaa !5
store i16 %arrayidx.promoted86, ptr %arrayidx10.i64, align 2, !tbaa !5
%cmp12.us76.1 = icmp eq i16 %3, %s_TOP
br i1 %cmp12.us76.1, label %for.cond34.preheader, label %if.end20.us77.1
if.end20.us77.1: ; preds = %if.end20.us77
store i16 %4, ptr %arrayidx, align 2, !tbaa !5
store i16 %5, ptr %arrayidx2.i62, align 2, !tbaa !5
store i16 %arrayidx.promoted86, ptr %arrayidx6.i63, align 2, !tbaa !5
store i16 %3, ptr %arrayidx10.i64, align 2, !tbaa !5
%cmp12.us76.2 = icmp eq i16 %4, %s_TOP
br i1 %cmp12.us76.2, label %for.cond34.preheader, label %if.end20.us77.2
if.end20.us77.2: ; preds = %if.end20.us77.1
store i16 %5, ptr %arrayidx, align 2, !tbaa !5
store i16 %arrayidx.promoted86, ptr %arrayidx2.i62, align 2, !tbaa !5
store i16 %3, ptr %arrayidx6.i63, align 2, !tbaa !5
store i16 %4, ptr %arrayidx10.i64, align 2, !tbaa !5
%cmp12.us76.3 = icmp eq i16 %5, %s_TOP
br i1 %cmp12.us76.3, label %for.cond34.preheader, label %if.end20.us77.3
if.end20.us77.3: ; preds = %if.end20.us77.2
store i16 %arrayidx.promoted86, ptr %arrayidx, align 2, !tbaa !5
store i16 %3, ptr %arrayidx2.i62, align 2, !tbaa !5
store i16 %4, ptr %arrayidx6.i63, align 2, !tbaa !5
store i16 %5, ptr %arrayidx10.i64, align 2, !tbaa !5
br label %for.cond34.preheader
for.cond34.preheader: ; preds = %if.end20.us.2, %if.end20.us.1, %if.end20.us, %entry, %if.end20.us77.3, %if.end20.us77.2, %if.end20.us77.1, %if.end20.us77, %if.end20.us.3
%arrayidx40.promoted = load i16, ptr %arrayidx2.i, align 2, !tbaa !5
%cmp43 = icmp eq i16 %arrayidx40.promoted, %s_FRONT
br i1 %cmp43, label %for.end49, label %if.end46
if.end46: ; preds = %for.cond34.preheader
%6 = load i16, ptr %arrayidx10.i64, align 2, !tbaa !5
store i16 %6, ptr %arrayidx2.i, align 2, !tbaa !5
%7 = load i16, ptr %arrayidx10.i, align 2, !tbaa !5
store i16 %7, ptr %arrayidx10.i64, align 2, !tbaa !5
%8 = load i16, ptr %arrayidx2.i62, align 2, !tbaa !5
store i16 %8, ptr %arrayidx10.i, align 2, !tbaa !5
store i16 %arrayidx40.promoted, ptr %arrayidx2.i62, align 2, !tbaa !5
%cmp43.1 = icmp eq i16 %6, %s_FRONT
br i1 %cmp43.1, label %for.end49, label %if.end46.1
if.end46.1: ; preds = %if.end46
store i16 %7, ptr %arrayidx2.i, align 2, !tbaa !5
store i16 %8, ptr %arrayidx10.i64, align 2, !tbaa !5
store i16 %arrayidx40.promoted, ptr %arrayidx10.i, align 2, !tbaa !5
store i16 %6, ptr %arrayidx2.i62, align 2, !tbaa !5
%cmp43.2 = icmp eq i16 %7, %s_FRONT
br i1 %cmp43.2, label %for.end49, label %if.end46.2
if.end46.2: ; preds = %if.end46.1
store i16 %8, ptr %arrayidx2.i, align 2, !tbaa !5
store i16 %arrayidx40.promoted, ptr %arrayidx10.i64, align 2, !tbaa !5
store i16 %6, ptr %arrayidx10.i, align 2, !tbaa !5
store i16 %7, ptr %arrayidx2.i62, align 2, !tbaa !5
br label %for.end49
for.end49: ; preds = %if.end46.2, %if.end46.1, %if.end46, %for.cond34.preheader
ret void
}
; Function Attrs: nofree nounwind uwtable
define dso_local void @show_state(ptr nocapture noundef readonly %dice, i16 noundef signext %s_suf) local_unnamed_addr #0 {
entry:
%idxprom = sext i16 %s_suf to i64
%arrayidx = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 %idxprom
%0 = load i16, ptr %arrayidx, align 2, !tbaa !5
%conv = sext i16 %0 to i32
%call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv)
ret void
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @change_state(ptr nocapture noundef %dice, i8 noundef signext %command) local_unnamed_addr #4 {
entry:
%conv = sext i8 %command to i32
switch i32 %conv, label %sw.epilog [
i32 78, label %sw.bb
i32 69, label %sw.bb1
i32 83, label %for.cond.preheader
i32 87, label %for.cond6.preheader
]
for.cond6.preheader: ; preds = %entry
%arrayidx.i28 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 1
%arrayidx2.i29 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 4
%arrayidx6.i30 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 6
%arrayidx10.i31 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 3
%arrayidx.i28.promoted = load i16, ptr %arrayidx.i28, align 2, !tbaa !5
%arrayidx2.i29.promoted = load i16, ptr %arrayidx2.i29, align 2, !tbaa !5
%arrayidx6.i30.promoted = load i16, ptr %arrayidx6.i30, align 2, !tbaa !5
%arrayidx10.i31.promoted = load i16, ptr %arrayidx10.i31, align 2, !tbaa !5
store i16 %arrayidx10.i31.promoted, ptr %arrayidx.i28, align 2, !tbaa !5
store i16 %arrayidx.i28.promoted, ptr %arrayidx2.i29, align 2, !tbaa !5
store i16 %arrayidx2.i29.promoted, ptr %arrayidx6.i30, align 2, !tbaa !5
store i16 %arrayidx6.i30.promoted, ptr %arrayidx10.i31, align 2, !tbaa !5
br label %sw.epilog
for.cond.preheader: ; preds = %entry
%arrayidx.i24 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 1
%arrayidx2.i25 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 2
%arrayidx6.i26 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 6
%arrayidx10.i27 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 5
%arrayidx.i24.promoted = load i16, ptr %arrayidx.i24, align 2, !tbaa !5
%arrayidx2.i25.promoted = load i16, ptr %arrayidx2.i25, align 2, !tbaa !5
%arrayidx6.i26.promoted = load i16, ptr %arrayidx6.i26, align 2, !tbaa !5
%arrayidx10.i27.promoted = load i16, ptr %arrayidx10.i27, align 2, !tbaa !5
store i16 %arrayidx10.i27.promoted, ptr %arrayidx.i24, align 2, !tbaa !5
store i16 %arrayidx.i24.promoted, ptr %arrayidx2.i25, align 2, !tbaa !5
store i16 %arrayidx2.i25.promoted, ptr %arrayidx6.i26, align 2, !tbaa !5
store i16 %arrayidx6.i26.promoted, ptr %arrayidx10.i27, align 2, !tbaa !5
br label %sw.epilog
sw.bb: ; preds = %entry
%arrayidx.i = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 1
%0 = load i16, ptr %arrayidx.i, align 2, !tbaa !5
%arrayidx2.i = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 2
%1 = load i16, ptr %arrayidx2.i, align 2, !tbaa !5
store i16 %1, ptr %arrayidx.i, align 2, !tbaa !5
%arrayidx6.i = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 6
%2 = load i16, ptr %arrayidx6.i, align 2, !tbaa !5
store i16 %2, ptr %arrayidx2.i, align 2, !tbaa !5
%arrayidx10.i = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 5
%3 = load i16, ptr %arrayidx10.i, align 2, !tbaa !5
store i16 %3, ptr %arrayidx6.i, align 2, !tbaa !5
store i16 %0, ptr %arrayidx10.i, align 2, !tbaa !5
br label %sw.epilog
sw.bb1: ; preds = %entry
%arrayidx.i20 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 1
%4 = load i16, ptr %arrayidx.i20, align 2, !tbaa !5
%arrayidx2.i21 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 4
%5 = load i16, ptr %arrayidx2.i21, align 2, !tbaa !5
store i16 %5, ptr %arrayidx.i20, align 2, !tbaa !5
%arrayidx6.i22 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 6
%6 = load i16, ptr %arrayidx6.i22, align 2, !tbaa !5
store i16 %6, ptr %arrayidx2.i21, align 2, !tbaa !5
%arrayidx10.i23 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 3
%7 = load i16, ptr %arrayidx10.i23, align 2, !tbaa !5
store i16 %7, ptr %arrayidx6.i22, align 2, !tbaa !5
store i16 %4, ptr %arrayidx10.i23, align 2, !tbaa !5
br label %sw.epilog
sw.epilog: ; preds = %for.cond6.preheader, %for.cond.preheader, %entry, %sw.bb1, %sw.bb
ret void
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @replace_y(ptr nocapture noundef %dice) local_unnamed_addr #4 {
entry:
%arrayidx = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 1
%0 = load i16, ptr %arrayidx, align 2, !tbaa !5
%arrayidx2 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 2
%1 = load i16, ptr %arrayidx2, align 2, !tbaa !5
store i16 %1, ptr %arrayidx, align 2, !tbaa !5
%arrayidx6 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 6
%2 = load i16, ptr %arrayidx6, align 2, !tbaa !5
store i16 %2, ptr %arrayidx2, align 2, !tbaa !5
%arrayidx10 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 5
%3 = load i16, ptr %arrayidx10, align 2, !tbaa !5
store i16 %3, ptr %arrayidx6, align 2, !tbaa !5
store i16 %0, ptr %arrayidx10, align 2, !tbaa !5
ret void
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @replace_x(ptr nocapture noundef %dice) local_unnamed_addr #4 {
entry:
%arrayidx = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 1
%0 = load i16, ptr %arrayidx, align 2, !tbaa !5
%arrayidx2 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 4
%1 = load i16, ptr %arrayidx2, align 2, !tbaa !5
store i16 %1, ptr %arrayidx, align 2, !tbaa !5
%arrayidx6 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 6
%2 = load i16, ptr %arrayidx6, align 2, !tbaa !5
store i16 %2, ptr %arrayidx2, align 2, !tbaa !5
%arrayidx10 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 3
%3 = load i16, ptr %arrayidx10, align 2, !tbaa !5
store i16 %3, ptr %arrayidx6, align 2, !tbaa !5
store i16 %0, ptr %arrayidx10, align 2, !tbaa !5
ret void
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @replace_z(ptr nocapture noundef %dice) local_unnamed_addr #4 {
entry:
%arrayidx = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 2
%0 = load <4 x i16>, ptr %arrayidx, align 2, !tbaa !5
%1 = shufflevector <4 x i16> %0, <4 x i16> poison, <4 x i32> <i32 1, i32 3, i32 0, i32 2>
store <4 x i16> %1, ptr %arrayidx, align 2, !tbaa !5
ret void
}
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"short", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
|
#include<stdio.h>
int main(void)
{
int D[7],i,j,n,t,f,T,F;
for(i=1;i<=6;i++){scanf("%d",&D[i]);}
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d",&T,&F);
for(j=1;j<=6;j++){if(T==D[j])t=j;}
for(j=1;j<=6;j++){if(F==D[j])f=j;}
switch(t){
case 1:switch(f){
case 2:printf("%d\n",D[3]);break;
case 3:printf("%d\n",D[5]);break;
case 4:printf("%d\n",D[2]);break;
case 5:printf("%d\n",D[4]);break;
}break;
case 2:switch(f){
case 1:printf("%d\n",D[4]);break;
case 3:printf("%d\n",D[1]);break;
case 4:printf("%d\n",D[6]);break;
case 6:printf("%d\n",D[3]);break;
}break;
case 3:switch(f){
case 1:printf("%d\n",D[2]);break;
case 2:printf("%d\n",D[6]);break;
case 5:printf("%d\n",D[1]);break;
case 6:printf("%d\n",D[5]);break;
}break;
case 4:switch(f){
case 1:printf("%d\n",D[5]);break;
case 2:printf("%d\n",D[1]);break;
case 5:printf("%d\n",D[6]);break;
case 6:printf("%d\n",D[2]);break;
}break;
case 5:switch(f){
case 1:printf("%d\n",D[3]);break;
case 3:printf("%d\n",D[6]);break;
case 4:printf("%d\n",D[1]);break;
case 6:printf("%d\n",D[4]);break;
}break;
case 6:switch(f){
case 2:printf("%d\n",D[4]);break;
case 3:printf("%d\n",D[2]);break;
case 4:printf("%d\n",D[5]);break;
case 5:printf("%d\n",D[3]);break;
}break;
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242506/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242506/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%D = alloca [7 x i32], align 16
%n = alloca i32, align 4
%T = alloca i32, align 4
%F = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %D) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %T) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %F) #3
%arrayidx = getelementptr inbounds [7 x i32], ptr %D, i64 0, i64 1
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx)
%arrayidx.1 = getelementptr inbounds [7 x i32], ptr %D, i64 0, i64 2
%call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.1)
%arrayidx.2 = getelementptr inbounds [7 x i32], ptr %D, i64 0, i64 3
%call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.2)
%arrayidx.3 = getelementptr inbounds [7 x i32], ptr %D, i64 0, i64 4
%call.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.3)
%arrayidx.4 = getelementptr inbounds [7 x i32], ptr %D, i64 0, i64 5
%call.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.4)
%arrayidx.5 = getelementptr inbounds [7 x i32], ptr %D, i64 0, i64 6
%call.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.5)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp3134 = icmp sgt i32 %0, 0
br i1 %cmp3134, label %for.body4, label %for.end111
for.body4: ; preds = %entry, %for.inc109
%f.0137 = phi i32 [ %spec.select128.5, %for.inc109 ], [ undef, %entry ]
%t.0136 = phi i32 [ %spec.select.5, %for.inc109 ], [ undef, %entry ]
%i.1135 = phi i32 [ %inc110, %for.inc109 ], [ 0, %entry ]
%call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %T, ptr noundef nonnull %F)
%1 = load i32, ptr %T, align 4, !tbaa !5
%2 = load i32, ptr %arrayidx, align 4, !tbaa !5
%cmp11 = icmp eq i32 %1, %2
%3 = load i32, ptr %arrayidx.1, align 8, !tbaa !5
%cmp11.1 = icmp eq i32 %1, %3
%4 = load i32, ptr %arrayidx.2, align 4, !tbaa !5
%cmp11.2 = icmp eq i32 %1, %4
%5 = load i32, ptr %arrayidx.3, align 16, !tbaa !5
%cmp11.3 = icmp eq i32 %1, %5
%6 = load i32, ptr %arrayidx.4, align 4, !tbaa !5
%cmp11.4 = icmp eq i32 %1, %6
%7 = load i32, ptr %arrayidx.5, align 8, !tbaa !5
%cmp11.5 = icmp eq i32 %1, %7
%8 = load i32, ptr %F, align 4, !tbaa !5
%cmp20 = icmp eq i32 %8, %2
%spec.select128 = select i1 %cmp20, i32 1, i32 %f.0137
%cmp20.1 = icmp eq i32 %8, %3
%spec.select128.1 = select i1 %cmp20.1, i32 2, i32 %spec.select128
%cmp20.2 = icmp eq i32 %8, %4
%spec.select128.2 = select i1 %cmp20.2, i32 3, i32 %spec.select128.1
%cmp20.3 = icmp eq i32 %8, %5
%spec.select128.3 = select i1 %cmp20.3, i32 4, i32 %spec.select128.2
%cmp20.4 = icmp eq i32 %8, %6
%spec.select128.4 = select i1 %cmp20.4, i32 5, i32 %spec.select128.3
%cmp20.5 = icmp eq i32 %8, %7
%spec.select128.5 = select i1 %cmp20.5, i32 6, i32 %spec.select128.4
%spec.select = select i1 %cmp11, i32 1, i32 %t.0136
%spec.select.1 = select i1 %cmp11.1, i32 2, i32 %spec.select
%spec.select.2 = select i1 %cmp11.2, i32 3, i32 %spec.select.1
%spec.select.3 = select i1 %cmp11.3, i32 4, i32 %spec.select.2
%spec.select.4 = select i1 %cmp11.4, i32 5, i32 %spec.select.3
%spec.select.5 = select i1 %cmp11.5, i32 6, i32 %spec.select.4
switch i32 %spec.select.5, label %for.inc109 [
i32 1, label %sw.bb
i32 2, label %sw.bb38
i32 3, label %sw.bb52
i32 4, label %sw.bb66
i32 5, label %sw.bb80
i32 6, label %sw.bb94
]
sw.bb: ; preds = %for.body4
switch i32 %spec.select128.5, label %for.inc109 [
i32 2, label %for.inc109.sink.split
i32 3, label %sw.bb29
i32 4, label %sw.bb32
i32 5, label %sw.bb35
]
sw.bb29: ; preds = %sw.bb
br label %for.inc109.sink.split
sw.bb32: ; preds = %sw.bb
br label %for.inc109.sink.split
sw.bb35: ; preds = %sw.bb
br label %for.inc109.sink.split
sw.bb38: ; preds = %for.body4
switch i32 %spec.select128.5, label %for.inc109 [
i32 1, label %for.inc109.sink.split
i32 3, label %sw.bb42
i32 4, label %sw.bb45
i32 6, label %sw.bb48
]
sw.bb42: ; preds = %sw.bb38
br label %for.inc109.sink.split
sw.bb45: ; preds = %sw.bb38
br label %for.inc109.sink.split
sw.bb48: ; preds = %sw.bb38
br label %for.inc109.sink.split
sw.bb52: ; preds = %for.body4
switch i32 %spec.select128.5, label %for.inc109 [
i32 1, label %for.inc109.sink.split
i32 2, label %sw.bb56
i32 5, label %sw.bb59
i32 6, label %sw.bb62
]
sw.bb56: ; preds = %sw.bb52
br label %for.inc109.sink.split
sw.bb59: ; preds = %sw.bb52
br label %for.inc109.sink.split
sw.bb62: ; preds = %sw.bb52
br label %for.inc109.sink.split
sw.bb66: ; preds = %for.body4
switch i32 %spec.select128.5, label %for.inc109 [
i32 1, label %for.inc109.sink.split
i32 2, label %sw.bb70
i32 5, label %sw.bb73
i32 6, label %sw.bb76
]
sw.bb70: ; preds = %sw.bb66
br label %for.inc109.sink.split
sw.bb73: ; preds = %sw.bb66
br label %for.inc109.sink.split
sw.bb76: ; preds = %sw.bb66
br label %for.inc109.sink.split
sw.bb80: ; preds = %for.body4
switch i32 %spec.select128.5, label %for.inc109 [
i32 1, label %for.inc109.sink.split
i32 3, label %sw.bb84
i32 4, label %sw.bb87
i32 6, label %sw.bb90
]
sw.bb84: ; preds = %sw.bb80
br label %for.inc109.sink.split
sw.bb87: ; preds = %sw.bb80
br label %for.inc109.sink.split
sw.bb90: ; preds = %sw.bb80
br label %for.inc109.sink.split
sw.bb94: ; preds = %for.body4
switch i32 %spec.select128.5, label %for.inc109 [
i32 2, label %for.inc109.sink.split
i32 3, label %sw.bb98
i32 4, label %sw.bb101
i32 5, label %sw.bb104
]
sw.bb98: ; preds = %sw.bb94
br label %for.inc109.sink.split
sw.bb101: ; preds = %sw.bb94
br label %for.inc109.sink.split
sw.bb104: ; preds = %sw.bb94
br label %for.inc109.sink.split
for.inc109.sink.split: ; preds = %sw.bb94, %sw.bb80, %sw.bb66, %sw.bb52, %sw.bb38, %sw.bb, %sw.bb98, %sw.bb101, %sw.bb104, %sw.bb84, %sw.bb87, %sw.bb90, %sw.bb70, %sw.bb73, %sw.bb76, %sw.bb56, %sw.bb59, %sw.bb62, %sw.bb42, %sw.bb45, %sw.bb48, %sw.bb29, %sw.bb32, %sw.bb35
%.sink = phi i32 [ %5, %sw.bb35 ], [ %3, %sw.bb32 ], [ %6, %sw.bb29 ], [ %4, %sw.bb48 ], [ %7, %sw.bb45 ], [ %2, %sw.bb42 ], [ %6, %sw.bb62 ], [ %2, %sw.bb59 ], [ %7, %sw.bb56 ], [ %3, %sw.bb76 ], [ %7, %sw.bb73 ], [ %2, %sw.bb70 ], [ %5, %sw.bb90 ], [ %2, %sw.bb87 ], [ %7, %sw.bb84 ], [ %4, %sw.bb104 ], [ %6, %sw.bb101 ], [ %3, %sw.bb98 ], [ %4, %sw.bb ], [ %5, %sw.bb38 ], [ %3, %sw.bb52 ], [ %6, %sw.bb66 ], [ %4, %sw.bb80 ], [ %5, %sw.bb94 ]
%call37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.sink)
br label %for.inc109
for.inc109: ; preds = %for.inc109.sink.split, %for.body4, %sw.bb, %sw.bb38, %sw.bb52, %sw.bb66, %sw.bb80, %sw.bb94
%inc110 = add nuw nsw i32 %i.1135, 1
%9 = load i32, ptr %n, align 4, !tbaa !5
%cmp3 = icmp slt i32 %inc110, %9
br i1 %cmp3, label %for.body4, label %for.end111, !llvm.loop !9
for.end111: ; preds = %for.inc109, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %F) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %T) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3
call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %D) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
|
#include <stdio.h>
int main(){
int d[6],n,i,j,blank,ue,mae;
for(i = 0; i < 6; i++){
scanf("%d",&d[i]);
}
scanf("%d",&n);
for(j = 0; j < n; j++){
scanf("%d %d",&ue,&mae);
for(i = 0; d[1] != mae && i < 3; i++){
//3S
blank=d[0];
d[0]=d[4];
d[4]=d[5];
d[5]=d[1];
d[1]=blank;
}
if(d[1] != mae){
//1E
blank=d[0];
d[0]=d[3];
d[3]=d[5];
d[5]=d[2];
d[2]=blank;
for(i = 0; d[1] != mae; i++){
//3S
blank=d[0];
d[0]=d[4];
d[4]=d[5];
d[5]=d[1];
d[1]=blank;
}
}
for(i = 0; d[0] != ue; i++){
//3E
blank=d[0];
d[0]=d[3];
d[3]=d[5];
d[5]=d[2];
d[2]=blank;
}
printf("%d\n",d[2]);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242557/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242557/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%d = alloca [6 x i32], align 16
%n = alloca i32, align 4
%ue = alloca i32, align 4
%mae = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %d) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %ue) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %mae) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %d)
%arrayidx.1 = getelementptr inbounds [6 x i32], ptr %d, i64 0, i64 1
%call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.1)
%arrayidx.2 = getelementptr inbounds [6 x i32], ptr %d, i64 0, i64 2
%call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.2)
%arrayidx.3 = getelementptr inbounds [6 x i32], ptr %d, i64 0, i64 3
%call.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.3)
%arrayidx.4 = getelementptr inbounds [6 x i32], ptr %d, i64 0, i64 4
%call.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.4)
%arrayidx.5 = getelementptr inbounds [6 x i32], ptr %d, i64 0, i64 5
%call.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.5)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp393 = icmp sgt i32 %0, 0
br i1 %cmp393, label %for.body4, label %for.end66
for.body4: ; preds = %entry, %for.end61
%j.094 = phi i32 [ %inc65, %for.end61 ], [ 0, %entry ]
%call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %ue, ptr noundef nonnull %mae)
%1 = load i32, ptr %mae, align 4, !tbaa !5
%arrayidx7.promoted = load i32, ptr %arrayidx.1, align 4, !tbaa !5
%cmp878.not = icmp eq i32 %arrayidx7.promoted, %1
%d.promoted87.pre.pre = load i32, ptr %d, align 16, !tbaa !5
br i1 %cmp878.not, label %for.end21.thread, label %for.body10.lr.ph
for.end21.thread: ; preds = %for.body4
%.pre105.pre110 = load i32, ptr %arrayidx.2, align 8, !tbaa !5
br label %if.end
for.body10.lr.ph: ; preds = %for.body4
%arrayidx12.promoted = load i32, ptr %arrayidx.4, align 16, !tbaa !5
%arrayidx14.promoted = load i32, ptr %arrayidx.5, align 4, !tbaa !5
%cmp8 = icmp ne i32 %d.promoted87.pre.pre, %1
br i1 %cmp8, label %for.body10.1, label %for.end21, !llvm.loop !9
for.body10.1: ; preds = %for.body10.lr.ph
%cmp8.1 = icmp ne i32 %arrayidx12.promoted, %1
br i1 %cmp8.1, label %for.body10.2, label %for.end21, !llvm.loop !9
for.body10.2: ; preds = %for.body10.1
%cmp8.2 = icmp ne i32 %arrayidx14.promoted, %1
br label %for.end21
for.end21: ; preds = %for.body10.2, %for.body10.1, %for.body10.lr.ph
%.lcssa134 = phi i32 [ %arrayidx14.promoted, %for.body10.lr.ph ], [ %arrayidx7.promoted, %for.body10.1 ], [ %d.promoted87.pre.pre, %for.body10.2 ]
%.lcssa133 = phi i32 [ %arrayidx12.promoted, %for.body10.lr.ph ], [ %arrayidx14.promoted, %for.body10.1 ], [ %arrayidx7.promoted, %for.body10.2 ]
%.lcssa132 = phi i32 [ %arrayidx7.promoted, %for.body10.lr.ph ], [ %d.promoted87.pre.pre, %for.body10.1 ], [ %arrayidx12.promoted, %for.body10.2 ]
%.lcssa = phi i32 [ %d.promoted87.pre.pre, %for.body10.lr.ph ], [ %arrayidx12.promoted, %for.body10.1 ], [ %arrayidx14.promoted, %for.body10.2 ]
%cmp8.lcssa = phi i1 [ %cmp8, %for.body10.lr.ph ], [ %cmp8.1, %for.body10.1 ], [ %cmp8.2, %for.body10.2 ]
store i32 %.lcssa134, ptr %arrayidx.4, align 16, !tbaa !5
store i32 %.lcssa133, ptr %d, align 16, !tbaa !5
store i32 %.lcssa132, ptr %arrayidx.5, align 4, !tbaa !5
store i32 %.lcssa, ptr %arrayidx.1, align 4, !tbaa !5
%.pre105.pre = load i32, ptr %arrayidx.2, align 8, !tbaa !5
br i1 %cmp8.lcssa, label %for.body35.preheader, label %if.end
for.body35.preheader: ; preds = %for.end21
%2 = load i32, ptr %arrayidx.3, align 4, !tbaa !5
%3 = load i32, ptr %arrayidx.5, align 4, !tbaa !5
store i32 %3, ptr %arrayidx.3, align 4, !tbaa !5
store i32 %.lcssa133, ptr %arrayidx.2, align 8, !tbaa !5
%.pre = load i32, ptr %arrayidx.4, align 16, !tbaa !5
br label %for.body35
for.body35: ; preds = %for.body35.preheader, %for.body35
%4 = phi i32 [ %7, %for.body35 ], [ %.pre105.pre, %for.body35.preheader ]
%5 = phi i32 [ %4, %for.body35 ], [ %.pre, %for.body35.preheader ]
%6 = phi i32 [ %5, %for.body35 ], [ %2, %for.body35.preheader ]
%7 = phi i32 [ %6, %for.body35 ], [ %.lcssa, %for.body35.preheader ]
%cmp34.not = icmp eq i32 %6, %1
br i1 %cmp34.not, label %if.end.loopexit, label %for.body35, !llvm.loop !11
if.end.loopexit: ; preds = %for.body35
store i32 %5, ptr %d, align 16, !tbaa !5
store i32 %4, ptr %arrayidx.4, align 16, !tbaa !5
store i32 %7, ptr %arrayidx.5, align 4, !tbaa !5
store i32 %6, ptr %arrayidx.1, align 4, !tbaa !5
br label %if.end
if.end: ; preds = %if.end.loopexit, %for.end21.thread, %for.end21
%.pre105 = phi i32 [ %.pre105.pre, %for.end21 ], [ %.pre105.pre110, %for.end21.thread ], [ %.lcssa133, %if.end.loopexit ]
%d.promoted87 = phi i32 [ %.lcssa133, %for.end21 ], [ %d.promoted87.pre.pre, %for.end21.thread ], [ %5, %if.end.loopexit ]
%8 = load i32, ptr %ue, align 4, !tbaa !5
%cmp49.not88 = icmp eq i32 %d.promoted87, %8
br i1 %cmp49.not88, label %for.end61, label %for.body50.lr.ph
for.body50.lr.ph: ; preds = %if.end
%arrayidx52.promoted = load i32, ptr %arrayidx.3, align 4, !tbaa !5
%arrayidx54.promoted = load i32, ptr %arrayidx.5, align 4, !tbaa !5
br label %for.body50
for.body50: ; preds = %for.body50.lr.ph, %for.body50
%9 = phi i32 [ %.pre105, %for.body50.lr.ph ], [ %12, %for.body50 ]
%10 = phi i32 [ %arrayidx54.promoted, %for.body50.lr.ph ], [ %9, %for.body50 ]
%11 = phi i32 [ %arrayidx52.promoted, %for.body50.lr.ph ], [ %10, %for.body50 ]
%12 = phi i32 [ %d.promoted87, %for.body50.lr.ph ], [ %11, %for.body50 ]
%cmp49.not = icmp eq i32 %11, %8
br i1 %cmp49.not, label %for.cond47.for.end61_crit_edge, label %for.body50, !llvm.loop !12
for.cond47.for.end61_crit_edge: ; preds = %for.body50
store i32 %10, ptr %arrayidx.3, align 4, !tbaa !5
store i32 %8, ptr %d, align 16, !tbaa !5
store i32 %9, ptr %arrayidx.5, align 4, !tbaa !5
store i32 %12, ptr %arrayidx.2, align 8, !tbaa !5
br label %for.end61
for.end61: ; preds = %for.cond47.for.end61_crit_edge, %if.end
%13 = phi i32 [ %12, %for.cond47.for.end61_crit_edge ], [ %.pre105, %if.end ]
%call63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %13)
%inc65 = add nuw nsw i32 %j.094, 1
%14 = load i32, ptr %n, align 4, !tbaa !5
%cmp3 = icmp slt i32 %inc65, %14
br i1 %cmp3, label %for.body4, label %for.end66, !llvm.loop !13
for.end66: ; preds = %for.end61, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %mae) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %ue) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3
call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %d) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
|
#include <stdio.h>
#include <string.h>
int main(){
int dice[6],side[]={2,3,5,4,2};
int a,b,i,j,k,l,n;
char move[]={"00NWESn"};
for(i=1; i<=6; i++) scanf("%d",&dice[i]);
scanf("%d",&n);
for(i=0; i<n; i++){
scanf("%d %d",&a,&b);
for(j=1; dice[j]!=a; j++);
dice[0]=dice[1];
switch(move[j]){
case 'E':
dice[1]=dice[4];
dice[4]=dice[6];
dice[6]=dice[3];
dice[3]=dice[0];
break;
case 'N':
dice[1]=dice[2];
dice[2]=dice[6];
dice[6]=dice[5];
dice[5]=dice[0];
break;
case 'S':
dice[1]=dice[5];
dice[5]=dice[6];
dice[6]=dice[2];
dice[2]=dice[0];
break;
case 'W':
dice[1]=dice[3];
dice[3]=dice[6];
dice[6]=dice[4];
dice[4]=dice[0];
break;
case 'n':
dice[1]=dice[6];
dice[6]=dice[0];
dice[0]=dice[2];
dice[2]=dice[5];
dice[5]=dice[0];
break;
}
for(l=0; dice[side[l]]!=b; l++);
printf("%d\n",dice[side[l+1]]);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242643/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242643/source.c"
target datalayout = "e-m:e-p270: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.side = private unnamed_addr constant [5 x i32] [i32 2, i32 3, i32 5, i32 4, i32 2], align 16
@__const.main.move = private unnamed_addr constant [8 x i8] c"00NWESn\00", align 1
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [6 x i8] c"%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:
%dice = alloca [6 x i32], align 16
%a = alloca i32, align 4
%b = alloca i32, align 4
%n = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %dice) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3
%arrayidx = getelementptr inbounds [6 x i32], ptr %dice, i64 0, i64 1
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx)
%arrayidx.1 = getelementptr inbounds [6 x i32], ptr %dice, i64 0, i64 2
%call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.1)
%arrayidx.2 = getelementptr inbounds [6 x i32], ptr %dice, i64 0, i64 3
%call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.2)
%arrayidx.3 = getelementptr inbounds [6 x i32], ptr %dice, i64 0, i64 4
%call.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.3)
%arrayidx.4 = getelementptr inbounds [6 x i32], ptr %dice, i64 0, i64 5
%call.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.4)
%arrayidx.5 = getelementptr inbounds [6 x i32], ptr %dice, i64 0, i64 6
%call.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.5)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp392 = icmp sgt i32 %0, 0
br i1 %cmp392, label %for.body4, label %for.end82
for.body4: ; preds = %entry, %for.end74
%i.193 = phi i32 [ %inc81, %for.end74 ], [ 0, %entry ]
%call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a, ptr noundef nonnull %b)
%1 = load i32, ptr %a, align 4, !tbaa !5
br label %for.cond6
for.cond6: ; preds = %for.cond6, %for.body4
%indvars.iv = phi i64 [ %indvars.iv.next, %for.cond6 ], [ 1, %for.body4 ]
%arrayidx8 = getelementptr inbounds [6 x i32], ptr %dice, i64 0, i64 %indvars.iv
%2 = load i32, ptr %arrayidx8, align 4, !tbaa !5
%cmp9.not = icmp eq i32 %2, %1
%indvars.iv.next = add nuw i64 %indvars.iv, 1
br i1 %cmp9.not, label %for.end13, label %for.cond6, !llvm.loop !9
for.end13: ; preds = %for.cond6
%3 = load i32, ptr %arrayidx, align 4, !tbaa !5
store i32 %3, ptr %dice, align 16, !tbaa !5
%arrayidx17 = getelementptr inbounds [8 x i8], ptr @__const.main.move, i64 0, i64 %indvars.iv
%4 = load i8, ptr %arrayidx17, align 1, !tbaa !11
%conv = sext i8 %4 to i32
switch i32 %conv, label %sw.epilog [
i32 69, label %sw.bb
i32 78, label %sw.bb26
i32 83, label %sw.bb35
i32 87, label %sw.bb44
i32 110, label %sw.bb53
]
sw.bb: ; preds = %for.end13
%5 = load i32, ptr %arrayidx.3, align 16, !tbaa !5
store i32 %5, ptr %arrayidx, align 4, !tbaa !5
%6 = load i32, ptr %arrayidx.5, align 8, !tbaa !5
store i32 %6, ptr %arrayidx.3, align 16, !tbaa !5
%7 = load i32, ptr %arrayidx.2, align 4, !tbaa !5
store i32 %7, ptr %arrayidx.5, align 8, !tbaa !5
store i32 %3, ptr %arrayidx.2, align 4, !tbaa !5
br label %sw.epilog
sw.bb26: ; preds = %for.end13
%8 = load i32, ptr %arrayidx.1, align 8, !tbaa !5
store i32 %8, ptr %arrayidx, align 4, !tbaa !5
%9 = load i32, ptr %arrayidx.5, align 8, !tbaa !5
store i32 %9, ptr %arrayidx.1, align 8, !tbaa !5
%10 = load i32, ptr %arrayidx.4, align 4, !tbaa !5
store i32 %10, ptr %arrayidx.5, align 8, !tbaa !5
store i32 %3, ptr %arrayidx.4, align 4, !tbaa !5
br label %sw.epilog
sw.bb35: ; preds = %for.end13
%11 = load i32, ptr %arrayidx.4, align 4, !tbaa !5
store i32 %11, ptr %arrayidx, align 4, !tbaa !5
%12 = load i32, ptr %arrayidx.5, align 8, !tbaa !5
store i32 %12, ptr %arrayidx.4, align 4, !tbaa !5
%13 = load i32, ptr %arrayidx.1, align 8, !tbaa !5
store i32 %13, ptr %arrayidx.5, align 8, !tbaa !5
store i32 %3, ptr %arrayidx.1, align 8, !tbaa !5
br label %sw.epilog
sw.bb44: ; preds = %for.end13
%14 = load i32, ptr %arrayidx.2, align 4, !tbaa !5
store i32 %14, ptr %arrayidx, align 4, !tbaa !5
%15 = load i32, ptr %arrayidx.5, align 8, !tbaa !5
store i32 %15, ptr %arrayidx.2, align 4, !tbaa !5
%16 = load i32, ptr %arrayidx.3, align 16, !tbaa !5
store i32 %16, ptr %arrayidx.5, align 8, !tbaa !5
store i32 %3, ptr %arrayidx.3, align 16, !tbaa !5
br label %sw.epilog
sw.bb53: ; preds = %for.end13
%17 = load i32, ptr %arrayidx.1, align 8, !tbaa !5
store i32 %17, ptr %dice, align 16, !tbaa !5
%18 = load <2 x i32>, ptr %arrayidx.4, align 4, !tbaa !5
store i32 %3, ptr %arrayidx.5, align 8, !tbaa !5
%19 = shufflevector <2 x i32> %18, <2 x i32> poison, <2 x i32> <i32 1, i32 0>
store <2 x i32> %19, ptr %arrayidx, align 4, !tbaa !5
store i32 %17, ptr %arrayidx.4, align 4, !tbaa !5
br label %sw.epilog
sw.epilog: ; preds = %for.end13, %sw.bb53, %sw.bb44, %sw.bb35, %sw.bb26, %sw.bb
%20 = load i32, ptr %b, align 4, !tbaa !5
br label %for.cond64
for.cond64: ; preds = %for.cond64, %sw.epilog
%indvars.iv96 = phi i64 [ %indvars.iv.next97, %for.cond64 ], [ 0, %sw.epilog ]
%arrayidx66 = getelementptr inbounds [5 x i32], ptr @__const.main.side, i64 0, i64 %indvars.iv96
%21 = load i32, ptr %arrayidx66, align 4, !tbaa !5
%idxprom67 = sext i32 %21 to i64
%arrayidx68 = getelementptr inbounds [6 x i32], ptr %dice, i64 0, i64 %idxprom67
%22 = load i32, ptr %arrayidx68, align 4, !tbaa !5
%cmp69.not = icmp eq i32 %22, %20
%indvars.iv.next97 = add nuw i64 %indvars.iv96, 1
br i1 %cmp69.not, label %for.end74, label %for.cond64, !llvm.loop !12
for.end74: ; preds = %for.cond64
%add = add i64 %indvars.iv96, 1
%idxprom75 = and i64 %add, 4294967295
%arrayidx76 = getelementptr inbounds [5 x i32], ptr @__const.main.side, i64 0, i64 %idxprom75
%23 = load i32, ptr %arrayidx76, align 4, !tbaa !5
%idxprom77 = sext i32 %23 to i64
%arrayidx78 = getelementptr inbounds [6 x i32], ptr %dice, i64 0, i64 %idxprom77
%24 = load i32, ptr %arrayidx78, align 4, !tbaa !5
%call79 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %24)
%inc81 = add nuw nsw i32 %i.193, 1
%25 = load i32, ptr %n, align 4, !tbaa !5
%cmp3 = icmp slt i32 %inc81, %25
br i1 %cmp3, label %for.body4, label %for.end82, !llvm.loop !13
for.end82: ; preds = %for.end74, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %dice) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
|
#include<stdio.h>
#include<math.h>
#include<string.h>
typedef struct dice{
int e[7]; /*Dice Eyes 1~6、0の目=swapの退避用*/
}dice_t;
typedef struct question{
int top;
int fro;
}que_t;
/*ダイス奥回転*/
void DiceRoteN(dice_t* pDice){
pDice->e[0] = pDice->e[1];
pDice->e[1] = pDice->e[2];
pDice->e[2] = pDice->e[6];
pDice->e[6] = pDice->e[5];
pDice->e[5] = pDice->e[0];
return ;
}
/*ダイス時計回り回転*/
void DiceRoteE(dice_t* pDice){
pDice->e[0] = pDice->e[1];
pDice->e[1] = pDice->e[4];
pDice->e[4] = pDice->e[6];
pDice->e[6] = pDice->e[3];
pDice->e[3] = pDice->e[0];
return ;
}
/*ダイス右スピン*/
void DiceRoteS(dice_t* pDice){
pDice->e[0] = pDice->e[2];
pDice->e[2] = pDice->e[4];
pDice->e[4] = pDice->e[5];
pDice->e[5] = pDice->e[3];
pDice->e[3] = pDice->e[0];
return ;
}
int main(){
int i,j;
dice_t dice;
dice_t* pDice = &dice;
int q_num;
que_t que[24];
/*ダイス登録*/
for(i=1; i<7; i++){
scanf("%d", &dice.e[i]);
}
/*質問数*/
scanf("%d", &q_num);
/*質問登録*/
for(i=0; i<q_num; i++){
scanf("%d %d", &que[i].top, &que[i].fro);
}
for(i=0; i<q_num; i++){
for(j=0; j<5; j++){
if( dice.e[1] == que[i].top ) break; /*奥回転で見つからない場合にやめる*/
DiceRoteN( pDice );
}
if( dice.e[1] != que[i].top){
while( dice.e[1] != que[i].top ) DiceRoteE( pDice );
}
while( dice.e[2] != que[i].fro) DiceRoteS( pDice ); /*前面が合うまで横回転*/
printf("%d\n", dice.e[3]);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242687/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242687/source.c"
target datalayout = "e-m:e-p270: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.dice = type { [7 x i32] }
%struct.question = type { i32, i32 }
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @DiceRoteN(ptr nocapture noundef %pDice) local_unnamed_addr #0 {
entry:
%arrayidx = getelementptr inbounds [7 x i32], ptr %pDice, i64 0, i64 1
%arrayidx4 = getelementptr inbounds [7 x i32], ptr %pDice, i64 0, i64 2
%0 = load <2 x i32>, ptr %arrayidx, align 4, !tbaa !5
store <2 x i32> %0, ptr %pDice, align 4, !tbaa !5
%arrayidx8 = getelementptr inbounds [7 x i32], ptr %pDice, i64 0, i64 6
%1 = load i32, ptr %arrayidx8, align 4, !tbaa !5
store i32 %1, ptr %arrayidx4, align 4, !tbaa !5
%arrayidx12 = getelementptr inbounds [7 x i32], ptr %pDice, i64 0, i64 5
%2 = load i32, ptr %arrayidx12, align 4, !tbaa !5
store i32 %2, ptr %arrayidx8, align 4, !tbaa !5
%3 = extractelement <2 x i32> %0, i64 0
store i32 %3, ptr %arrayidx12, align 4, !tbaa !5
ret void
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @DiceRoteE(ptr nocapture noundef %pDice) local_unnamed_addr #0 {
entry:
%arrayidx = getelementptr inbounds [7 x i32], ptr %pDice, i64 0, i64 1
%0 = load i32, ptr %arrayidx, align 4, !tbaa !5
store i32 %0, ptr %pDice, align 4, !tbaa !5
%arrayidx4 = getelementptr inbounds [7 x i32], ptr %pDice, i64 0, i64 4
%1 = load i32, ptr %arrayidx4, align 4, !tbaa !5
store i32 %1, ptr %arrayidx, align 4, !tbaa !5
%arrayidx8 = getelementptr inbounds [7 x i32], ptr %pDice, i64 0, i64 6
%2 = load i32, ptr %arrayidx8, align 4, !tbaa !5
store i32 %2, ptr %arrayidx4, align 4, !tbaa !5
%arrayidx12 = getelementptr inbounds [7 x i32], ptr %pDice, i64 0, i64 3
%3 = load i32, ptr %arrayidx12, align 4, !tbaa !5
store i32 %3, ptr %arrayidx8, align 4, !tbaa !5
store i32 %0, ptr %arrayidx12, align 4, !tbaa !5
ret void
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @DiceRoteS(ptr nocapture noundef %pDice) local_unnamed_addr #0 {
entry:
%arrayidx = getelementptr inbounds [7 x i32], ptr %pDice, i64 0, i64 2
%0 = load <4 x i32>, ptr %arrayidx, align 4, !tbaa !5
%1 = extractelement <4 x i32> %0, i64 0
store i32 %1, ptr %pDice, align 4, !tbaa !5
%2 = shufflevector <4 x i32> %0, <4 x i32> poison, <4 x i32> <i32 2, i32 0, i32 3, i32 1>
store <4 x i32> %2, ptr %arrayidx, align 4, !tbaa !5
ret void
}
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #1 {
entry:
%dice = alloca %struct.dice, align 4
%q_num = alloca i32, align 4
%que = alloca [24 x %struct.question], align 16
call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %dice) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %q_num) #4
call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %que) #4
%arrayidx = getelementptr inbounds [7 x i32], ptr %dice, i64 0, i64 1
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx)
%arrayidx.1 = getelementptr inbounds [7 x i32], ptr %dice, i64 0, i64 2
%call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.1)
%arrayidx.2 = getelementptr inbounds [7 x i32], ptr %dice, i64 0, i64 3
%call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.2)
%arrayidx.3 = getelementptr inbounds [7 x i32], ptr %dice, i64 0, i64 4
%call.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.3)
%arrayidx.4 = getelementptr inbounds [7 x i32], ptr %dice, i64 0, i64 5
%call.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.4)
%arrayidx.5 = getelementptr inbounds [7 x i32], ptr %dice, i64 0, i64 6
%call.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.5)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %q_num)
%0 = load i32, ptr %q_num, align 4, !tbaa !5
%cmp381 = icmp sgt i32 %0, 0
br i1 %cmp381, label %for.body4, label %for.end56
for.cond13.preheader: ; preds = %for.body4
%1 = icmp sgt i32 %2, 0
br i1 %1, label %for.cond16.preheader, label %for.end56
for.body4: ; preds = %entry, %for.body4
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body4 ], [ 0, %entry ]
%arrayidx6 = getelementptr inbounds [24 x %struct.question], ptr %que, i64 0, i64 %indvars.iv
%fro = getelementptr inbounds [24 x %struct.question], ptr %que, i64 0, i64 %indvars.iv, i32 1
%call9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx6, ptr noundef nonnull %fro)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%2 = load i32, ptr %q_num, align 4, !tbaa !5
%3 = sext i32 %2 to i64
%cmp3 = icmp slt i64 %indvars.iv.next, %3
br i1 %cmp3, label %for.body4, label %for.cond13.preheader, !llvm.loop !9
for.cond16.preheader: ; preds = %for.cond13.preheader, %while.end50
%indvars.iv106 = phi i64 [ %indvars.iv.next107, %while.end50 ], [ 0, %for.cond13.preheader ]
%arrayidx20.promoted = load i32, ptr %arrayidx, align 4, !tbaa !5
%arrayidx22 = getelementptr inbounds [24 x %struct.question], ptr %que, i64 0, i64 %indvars.iv106
%4 = load i32, ptr %arrayidx22, align 8, !tbaa !11
%arrayidx4.i.promoted = load i32, ptr %arrayidx.1, align 4, !tbaa !5
%arrayidx8.i.promoted = load i32, ptr %arrayidx.5, align 4, !tbaa !5
%arrayidx12.i.promoted = load i32, ptr %arrayidx.4, align 4, !tbaa !5
%cmp24 = icmp eq i32 %arrayidx20.promoted, %4
br i1 %cmp24, label %for.end27, label %if.end
if.end: ; preds = %for.cond16.preheader
store i32 %arrayidx20.promoted, ptr %dice, align 4, !tbaa !5
store i32 %arrayidx4.i.promoted, ptr %arrayidx, align 4, !tbaa !5
store i32 %arrayidx8.i.promoted, ptr %arrayidx.1, align 4, !tbaa !5
store i32 %arrayidx12.i.promoted, ptr %arrayidx.5, align 4, !tbaa !5
store i32 %arrayidx20.promoted, ptr %arrayidx.4, align 4, !tbaa !5
%cmp24.1 = icmp eq i32 %arrayidx4.i.promoted, %4
br i1 %cmp24.1, label %if.end41, label %if.end.1
if.end.1: ; preds = %if.end
store i32 %arrayidx4.i.promoted, ptr %dice, align 4, !tbaa !5
store i32 %arrayidx8.i.promoted, ptr %arrayidx, align 4, !tbaa !5
store i32 %arrayidx12.i.promoted, ptr %arrayidx.1, align 4, !tbaa !5
store i32 %arrayidx20.promoted, ptr %arrayidx.5, align 4, !tbaa !5
store i32 %arrayidx4.i.promoted, ptr %arrayidx.4, align 4, !tbaa !5
%cmp24.2 = icmp eq i32 %arrayidx8.i.promoted, %4
br i1 %cmp24.2, label %if.end41, label %if.end.2
if.end.2: ; preds = %if.end.1
store i32 %arrayidx8.i.promoted, ptr %dice, align 4, !tbaa !5
store i32 %arrayidx12.i.promoted, ptr %arrayidx, align 4, !tbaa !5
store i32 %arrayidx20.promoted, ptr %arrayidx.1, align 4, !tbaa !5
store i32 %arrayidx4.i.promoted, ptr %arrayidx.5, align 4, !tbaa !5
store i32 %arrayidx8.i.promoted, ptr %arrayidx.4, align 4, !tbaa !5
%cmp24.3 = icmp eq i32 %arrayidx12.i.promoted, %4
br i1 %cmp24.3, label %if.end41, label %if.end.4
if.end.4: ; preds = %if.end.2
store i32 %arrayidx20.promoted, ptr %dice, align 4, !tbaa !5
store i32 %arrayidx4.i.promoted, ptr %arrayidx, align 4, !tbaa !5
store i32 %arrayidx8.i.promoted, ptr %arrayidx.1, align 4, !tbaa !5
store i32 %arrayidx12.i.promoted, ptr %arrayidx.5, align 4, !tbaa !5
store i32 %arrayidx20.promoted, ptr %arrayidx.4, align 4, !tbaa !5
br label %for.end27
for.end27: ; preds = %if.end.4, %for.cond16.preheader
%arrayidx8.i78.promoted = phi i32 [ %arrayidx20.promoted, %if.end.4 ], [ %arrayidx12.i.promoted, %for.cond16.preheader ]
%arrayidx44.promoted = phi i32 [ %arrayidx8.i.promoted, %if.end.4 ], [ %arrayidx4.i.promoted, %for.cond16.preheader ]
%arrayidx8.i74.promoted = phi i32 [ %arrayidx12.i.promoted, %if.end.4 ], [ %arrayidx8.i.promoted, %for.cond16.preheader ]
%arrayidx29.promoted = phi i32 [ %arrayidx4.i.promoted, %if.end.4 ], [ %arrayidx20.promoted, %for.cond16.preheader ]
%cmp33.not = icmp eq i32 %arrayidx29.promoted, %4
br i1 %cmp33.not, label %if.end41, label %while.body.lr.ph
while.body.lr.ph: ; preds = %for.end27
%arrayidx4.i73.promoted = load i32, ptr %arrayidx.3, align 4, !tbaa !5
%arrayidx12.i75.promoted = load i32, ptr %arrayidx.2, align 4, !tbaa !5
br label %while.body
while.body: ; preds = %while.body.lr.ph, %while.body
%5 = phi i32 [ %arrayidx12.i75.promoted, %while.body.lr.ph ], [ %8, %while.body ]
%6 = phi i32 [ %arrayidx8.i74.promoted, %while.body.lr.ph ], [ %5, %while.body ]
%7 = phi i32 [ %arrayidx4.i73.promoted, %while.body.lr.ph ], [ %6, %while.body ]
%8 = phi i32 [ %arrayidx29.promoted, %while.body.lr.ph ], [ %7, %while.body ]
%cmp40.not = icmp eq i32 %7, %4
br i1 %cmp40.not, label %while.cond.if.end41.loopexit_crit_edge, label %while.body, !llvm.loop !13
while.cond.if.end41.loopexit_crit_edge: ; preds = %while.body
store i32 %8, ptr %dice, align 4, !tbaa !5
store i32 %6, ptr %arrayidx.3, align 4, !tbaa !5
store i32 %4, ptr %arrayidx, align 4, !tbaa !5
store i32 %5, ptr %arrayidx.5, align 4, !tbaa !5
store i32 %8, ptr %arrayidx.2, align 4, !tbaa !5
br label %if.end41
if.end41: ; preds = %if.end, %if.end.1, %if.end.2, %while.cond.if.end41.loopexit_crit_edge, %for.end27
%arrayidx44.promoted119 = phi i32 [ %arrayidx44.promoted, %while.cond.if.end41.loopexit_crit_edge ], [ %arrayidx44.promoted, %for.end27 ], [ %arrayidx8.i.promoted, %if.end ], [ %arrayidx12.i.promoted, %if.end.1 ], [ %arrayidx20.promoted, %if.end.2 ]
%arrayidx8.i78.promoted118 = phi i32 [ %arrayidx8.i78.promoted, %while.cond.if.end41.loopexit_crit_edge ], [ %arrayidx8.i78.promoted, %for.end27 ], [ %arrayidx20.promoted, %if.end ], [ %arrayidx4.i.promoted, %if.end.1 ], [ %arrayidx8.i.promoted, %if.end.2 ]
%fro47 = getelementptr inbounds [24 x %struct.question], ptr %que, i64 0, i64 %indvars.iv106, i32 1
%9 = load i32, ptr %fro47, align 4, !tbaa !14
%cmp48.not89 = icmp eq i32 %arrayidx44.promoted119, %9
%.pre = load i32, ptr %arrayidx.2, align 4, !tbaa !5
br i1 %cmp48.not89, label %while.end50, label %while.body49.lr.ph
while.body49.lr.ph: ; preds = %if.end41
%arrayidx4.i77.promoted = load i32, ptr %arrayidx.3, align 4, !tbaa !5
br label %while.body49
while.body49: ; preds = %while.body49.lr.ph, %while.body49
%10 = phi i32 [ %.pre, %while.body49.lr.ph ], [ %13, %while.body49 ]
%11 = phi i32 [ %arrayidx8.i78.promoted118, %while.body49.lr.ph ], [ %10, %while.body49 ]
%12 = phi i32 [ %arrayidx4.i77.promoted, %while.body49.lr.ph ], [ %11, %while.body49 ]
%13 = phi i32 [ %arrayidx44.promoted119, %while.body49.lr.ph ], [ %12, %while.body49 ]
%cmp48.not = icmp eq i32 %12, %9
br i1 %cmp48.not, label %while.cond42.while.end50_crit_edge, label %while.body49, !llvm.loop !15
while.cond42.while.end50_crit_edge: ; preds = %while.body49
store i32 %13, ptr %dice, align 4, !tbaa !5
store i32 %11, ptr %arrayidx.3, align 4, !tbaa !5
store i32 %9, ptr %arrayidx.1, align 4, !tbaa !5
store i32 %10, ptr %arrayidx.4, align 4, !tbaa !5
store i32 %13, ptr %arrayidx.2, align 4, !tbaa !5
br label %while.end50
while.end50: ; preds = %while.cond42.while.end50_crit_edge, %if.end41
%14 = phi i32 [ %13, %while.cond42.while.end50_crit_edge ], [ %.pre, %if.end41 ]
%call53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %14)
%indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
%15 = load i32, ptr %q_num, align 4, !tbaa !5
%16 = sext i32 %15 to i64
%cmp14 = icmp slt i64 %indvars.iv.next107, %16
br i1 %cmp14, label %for.cond16.preheader, label %for.end56, !llvm.loop !16
for.end56: ; preds = %while.end50, %entry, %for.cond13.preheader
call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %que) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %q_num) #4
call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %dice) #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) #2
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2
attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-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 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 0}
!12 = !{!"question", !6, i64 0, !6, i64 4}
!13 = distinct !{!13, !10}
!14 = !{!12, !6, i64 4}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
|
#include<stdio.h>
typedef long long unsigned llu;
typedef unsigned u;
u G[1111][1111],Gi[1111],V[1111],S[1111];
u D(u n)
{
if(V[n])return 0;u i,j=V[n]=1;
for(i=Gi[n];i--;)j+=D(G[n][i]);
return j;
}
int main()
{
u n,q,x,i=-1,j,k,e=0;
for(scanf("%u%u%u",&n,&q,&x);++i<x;)scanf("%u",S+i);
for(i=-1;++i<q;)
{
scanf("%u%u",&j,&k);
G[j][Gi[j]++]=k;
G[k][Gi[k]++]=j;
}
for(k=0;x--;e+=j*(j-1)>>1)k=k<(j=D(S[x]))?j:k;
for(i=j=0;i++<n;)if(!V[i])e+=j++;
printf("%u\n",e+k*j-q);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24273/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24273/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@V = dso_local local_unnamed_addr global [1111 x i32] zeroinitializer, align 16
@Gi = dso_local local_unnamed_addr global [1111 x i32] zeroinitializer, align 16
@G = dso_local local_unnamed_addr global [1111 x [1111 x i32]] zeroinitializer, align 16
@.str = private unnamed_addr constant [7 x i8] c"%u%u%u\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%u\00", align 1
@S = dso_local global [1111 x i32] zeroinitializer, align 16
@.str.2 = private unnamed_addr constant [5 x i8] c"%u%u\00", align 1
@.str.3 = private unnamed_addr constant [4 x i8] c"%u\0A\00", align 1
; Function Attrs: nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable
define dso_local i32 @D(i32 noundef %n) local_unnamed_addr #0 {
entry:
%idxprom = zext i32 %n to i64
%arrayidx = getelementptr inbounds [1111 x i32], ptr @V, i64 0, i64 %idxprom
%0 = load i32, ptr %arrayidx, align 4, !tbaa !5
%tobool.not = icmp eq i32 %0, 0
br i1 %tobool.not, label %if.end, label %return
if.end: ; preds = %entry
store i32 1, ptr %arrayidx, align 4, !tbaa !5
%arrayidx4 = getelementptr inbounds [1111 x i32], ptr @Gi, i64 0, i64 %idxprom
%1 = load i32, ptr %arrayidx4, align 4, !tbaa !5
%tobool5.not15 = icmp eq i32 %1, 0
br i1 %tobool5.not15, label %return, label %for.body.preheader
for.body.preheader: ; preds = %if.end
%2 = zext i32 %1 to i64
br label %for.body
for.body: ; preds = %for.body.preheader, %for.body
%indvars.iv = phi i64 [ %2, %for.body.preheader ], [ %indvars.iv.next, %for.body ]
%j.017 = phi i32 [ 1, %for.body.preheader ], [ %add, %for.body ]
%indvars.iv.next = add nsw i64 %indvars.iv, -1
%idxprom8 = and i64 %indvars.iv.next, 4294967295
%arrayidx9 = getelementptr inbounds [1111 x [1111 x i32]], ptr @G, i64 0, i64 %idxprom, i64 %idxprom8
%3 = load i32, ptr %arrayidx9, align 4, !tbaa !5
%call = tail call i32 @D(i32 noundef %3)
%add = add i32 %call, %j.017
%4 = and i64 %indvars.iv.next, 4294967295
%tobool5.not = icmp eq i64 %4, 0
br i1 %tobool5.not, label %return, label %for.body, !llvm.loop !9
return: ; preds = %for.body, %if.end, %entry
%retval.0 = phi i32 [ 0, %entry ], [ 1, %if.end ], [ %add, %for.body ]
ret i32 %retval.0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #2 {
entry:
%n = alloca i32, align 4
%q = alloca i32, align 4
%x = alloca i32, align 4
%j = alloca i32, align 4
%k = 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 %q) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %j) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %q, ptr noundef nonnull %x)
%0 = load i32, ptr %x, align 4, !tbaa !5
%cmp47.not = icmp eq i32 %0, 0
br i1 %cmp47.not, label %for.cond2.preheader, label %for.body
for.cond2.preheader: ; preds = %for.body, %entry
%1 = phi i32 [ 0, %entry ], [ %3, %for.body ]
%2 = load i32, ptr %q, align 4, !tbaa !5
%cmp449.not = icmp eq i32 %2, 0
br i1 %cmp449.not, label %for.end19, label %for.body5
for.body: ; preds = %entry, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
%add.ptr = getelementptr inbounds i32, ptr @S, 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 %x, align 4, !tbaa !5
%4 = zext i32 %3 to i64
%cmp = icmp ult i64 %indvars.iv.next, %4
br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !11
for.body5: ; preds = %for.cond2.preheader, %for.body5
%inc350 = phi i32 [ %inc3, %for.body5 ], [ 0, %for.cond2.preheader ]
%call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %j, ptr noundef nonnull %k)
%5 = load i32, ptr %k, align 4, !tbaa !5
%6 = load i32, ptr %j, align 4, !tbaa !5
%idxprom = zext i32 %6 to i64
%arrayidx8 = getelementptr inbounds [1111 x i32], ptr @Gi, i64 0, i64 %idxprom
%7 = load i32, ptr %arrayidx8, align 4, !tbaa !5
%inc9 = add i32 %7, 1
store i32 %inc9, ptr %arrayidx8, align 4, !tbaa !5
%idxprom10 = zext i32 %7 to i64
%arrayidx11 = getelementptr inbounds [1111 x [1111 x i32]], ptr @G, i64 0, i64 %idxprom, i64 %idxprom10
store i32 %5, ptr %arrayidx11, align 4, !tbaa !5
%idxprom12 = zext i32 %5 to i64
%arrayidx15 = getelementptr inbounds [1111 x i32], ptr @Gi, i64 0, i64 %idxprom12
%8 = load i32, ptr %arrayidx15, align 4, !tbaa !5
%inc16 = add i32 %8, 1
store i32 %inc16, ptr %arrayidx15, align 4, !tbaa !5
%idxprom17 = zext i32 %8 to i64
%arrayidx18 = getelementptr inbounds [1111 x [1111 x i32]], ptr @G, i64 0, i64 %idxprom12, i64 %idxprom17
store i32 %6, ptr %arrayidx18, align 4, !tbaa !5
%inc3 = add nuw i32 %inc350, 1
%9 = load i32, ptr %q, align 4, !tbaa !5
%cmp4 = icmp ult i32 %inc3, %9
br i1 %cmp4, label %for.body5, label %for.end19.loopexit, !llvm.loop !12
for.end19.loopexit: ; preds = %for.body5
%.pre = load i32, ptr %x, align 4, !tbaa !5
br label %for.end19
for.end19: ; preds = %for.end19.loopexit, %for.cond2.preheader
%10 = phi i32 [ %.pre, %for.end19.loopexit ], [ %1, %for.cond2.preheader ]
store i32 0, ptr %k, align 4, !tbaa !5
%dec51 = add i32 %10, -1
store i32 %dec51, ptr %x, align 4, !tbaa !5
%tobool.not52 = icmp eq i32 %10, 0
br i1 %tobool.not52, label %for.end26, label %for.body21
for.body21: ; preds = %for.end19, %for.body21
%11 = phi i32 [ %cond, %for.body21 ], [ 0, %for.end19 ]
%dec54 = phi i32 [ %dec, %for.body21 ], [ %dec51, %for.end19 ]
%e.053 = phi i32 [ %add, %for.body21 ], [ 0, %for.end19 ]
%idxprom22 = zext i32 %dec54 to i64
%arrayidx23 = getelementptr inbounds [1111 x i32], ptr @S, i64 0, i64 %idxprom22
%12 = load i32, ptr %arrayidx23, align 4, !tbaa !5
%call24 = call i32 @D(i32 noundef %12)
store i32 %call24, ptr %j, align 4, !tbaa !5
%cmp25 = icmp ult i32 %11, %call24
%13 = load i32, ptr %k, align 4
%cond = select i1 %cmp25, i32 %call24, i32 %13
store i32 %cond, ptr %k, align 4, !tbaa !5
%sub = add i32 %call24, -1
%mul = mul i32 %sub, %call24
%shr = lshr i32 %mul, 1
%add = add i32 %shr, %e.053
%14 = load i32, ptr %x, align 4, !tbaa !5
%dec = add i32 %14, -1
store i32 %dec, ptr %x, align 4, !tbaa !5
%tobool.not = icmp eq i32 %14, 0
br i1 %tobool.not, label %for.end26, label %for.body21, !llvm.loop !13
for.end26: ; preds = %for.body21, %for.end19
%15 = phi i32 [ 0, %for.end19 ], [ %cond, %for.body21 ]
%e.0.lcssa = phi i32 [ 0, %for.end19 ], [ %add, %for.body21 ]
store i32 0, ptr %j, align 4, !tbaa !5
%16 = load i32, ptr %n, align 4, !tbaa !5
%cmp2957.not = icmp eq i32 %16, 0
br i1 %cmp2957.not, label %for.end36, label %for.body30.preheader
for.body30.preheader: ; preds = %for.end26
%xtraiter = and i32 %16, 1
%17 = icmp eq i32 %16, 1
br i1 %17, label %for.end36.loopexit.unr-lcssa, label %for.body30.preheader.new
for.body30.preheader.new: ; preds = %for.body30.preheader
%unroll_iter = and i32 %16, -2
br label %for.body30
for.body30: ; preds = %if.end.1, %for.body30.preheader.new
%indvars.iv63 = phi i64 [ 1, %for.body30.preheader.new ], [ %indvars.iv.next64.1, %if.end.1 ]
%e.159 = phi i32 [ %e.0.lcssa, %for.body30.preheader.new ], [ %e.2.1, %if.end.1 ]
%inc345658 = phi i32 [ 0, %for.body30.preheader.new ], [ %inc3455.1, %if.end.1 ]
%niter = phi i32 [ 0, %for.body30.preheader.new ], [ %niter.next.1, %if.end.1 ]
%arrayidx32 = getelementptr inbounds [1111 x i32], ptr @V, i64 0, i64 %indvars.iv63
%18 = load i32, ptr %arrayidx32, align 4, !tbaa !5
%tobool33.not = icmp eq i32 %18, 0
br i1 %tobool33.not, label %if.then, label %if.end
if.then: ; preds = %for.body30
%inc34 = add i32 %inc345658, 1
store i32 %inc34, ptr %j, align 4, !tbaa !5
%add35 = add i32 %inc345658, %e.159
br label %if.end
if.end: ; preds = %if.then, %for.body30
%inc3455 = phi i32 [ %inc345658, %for.body30 ], [ %inc34, %if.then ]
%e.2 = phi i32 [ %e.159, %for.body30 ], [ %add35, %if.then ]
%indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
%arrayidx32.1 = getelementptr inbounds [1111 x i32], ptr @V, i64 0, i64 %indvars.iv.next64
%19 = load i32, ptr %arrayidx32.1, align 4, !tbaa !5
%tobool33.not.1 = icmp eq i32 %19, 0
br i1 %tobool33.not.1, label %if.then.1, label %if.end.1
if.then.1: ; preds = %if.end
%inc34.1 = add i32 %inc3455, 1
store i32 %inc34.1, ptr %j, align 4, !tbaa !5
%add35.1 = add i32 %inc3455, %e.2
br label %if.end.1
if.end.1: ; preds = %if.then.1, %if.end
%inc3455.1 = phi i32 [ %inc3455, %if.end ], [ %inc34.1, %if.then.1 ]
%e.2.1 = phi i32 [ %e.2, %if.end ], [ %add35.1, %if.then.1 ]
%indvars.iv.next64.1 = add nuw nsw i64 %indvars.iv63, 2
%niter.next.1 = add i32 %niter, 2
%niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter
br i1 %niter.ncmp.1, label %for.end36.loopexit.unr-lcssa, label %for.body30, !llvm.loop !14
for.end36.loopexit.unr-lcssa: ; preds = %if.end.1, %for.body30.preheader
%inc3455.lcssa.ph = phi i32 [ undef, %for.body30.preheader ], [ %inc3455.1, %if.end.1 ]
%e.2.lcssa.ph = phi i32 [ undef, %for.body30.preheader ], [ %e.2.1, %if.end.1 ]
%indvars.iv63.unr = phi i64 [ 1, %for.body30.preheader ], [ %indvars.iv.next64.1, %if.end.1 ]
%e.159.unr = phi i32 [ %e.0.lcssa, %for.body30.preheader ], [ %e.2.1, %if.end.1 ]
%inc345658.unr = phi i32 [ 0, %for.body30.preheader ], [ %inc3455.1, %if.end.1 ]
%lcmp.mod.not = icmp eq i32 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.end36, label %for.body30.epil
for.body30.epil: ; preds = %for.end36.loopexit.unr-lcssa
%arrayidx32.epil = getelementptr inbounds [1111 x i32], ptr @V, i64 0, i64 %indvars.iv63.unr
%20 = load i32, ptr %arrayidx32.epil, align 4, !tbaa !5
%tobool33.not.epil = icmp eq i32 %20, 0
br i1 %tobool33.not.epil, label %if.then.epil, label %for.end36
if.then.epil: ; preds = %for.body30.epil
%inc34.epil = add i32 %inc345658.unr, 1
store i32 %inc34.epil, ptr %j, align 4, !tbaa !5
%add35.epil = add i32 %inc345658.unr, %e.159.unr
br label %for.end36
for.end36: ; preds = %for.end36.loopexit.unr-lcssa, %if.then.epil, %for.body30.epil, %for.end26
%21 = phi i32 [ 0, %for.end26 ], [ %inc3455.lcssa.ph, %for.end36.loopexit.unr-lcssa ], [ %inc345658.unr, %for.body30.epil ], [ %inc34.epil, %if.then.epil ]
%e.1.lcssa = phi i32 [ %e.0.lcssa, %for.end26 ], [ %e.2.lcssa.ph, %for.end36.loopexit.unr-lcssa ], [ %e.159.unr, %for.body30.epil ], [ %add35.epil, %if.then.epil ]
%mul37 = mul i32 %21, %15
%add38 = add i32 %mul37, %e.1.lcssa
%22 = load i32, ptr %q, align 4, !tbaa !5
%sub39 = sub i32 %add38, %22
%call40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %sub39)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %j) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %q) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4
ret i32 0
}
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
attributes #0 = { nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
|
#include <stdio.h>
int face[7][7][4] = {
{{0},{0},{0},{0},{0},{0},{0}},
{{0},{0},{0,1,2,3},{0,1,3,5},{0,1,4,2},{0,1,5,4},{0}},
{{0},{0,2,1,4},{0},{0,2,3,1},{0,2,4,6},{0},{0,2,6,3}},
{{0},{0,3,1,2},{0,3,2,6},{0},{0},{0,3,5,1},{0,3,6,5}},
{{0},{0,4,1,5},{0,4,2,1},{0},{0},{0,4,5,6},{0,4,6,2}},
{{0},{0,5,1,3},{0},{0,5,3,6},{0,5,4,1},{0},{0,5,6,4}},
{{0},{0},{0,6,2,4},{0,6,3,2},{0,6,4,5},{0,6,5,3},{0}}};
int assign[7];
int main()
{
int q, i, t, f;
for (i = 1; i <= 6; i++) scanf("%d", assign+i);
scanf("%d", &q);
while (q--) {
scanf("%d%d", &t, &f);
for (i = 1; i <= 6; i++) {
if (assign[i] == t) t = i;
if (assign[i] == f) f = i;
}
printf("%d\n", assign[face[t][f][3]]);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242773/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242773/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@face = dso_local local_unnamed_addr global [7 x [7 x [4 x i32]]] [[7 x [4 x i32]] zeroinitializer, [7 x [4 x i32]] [[4 x i32] zeroinitializer, [4 x i32] zeroinitializer, [4 x i32] [i32 0, i32 1, i32 2, i32 3], [4 x i32] [i32 0, i32 1, i32 3, i32 5], [4 x i32] [i32 0, i32 1, i32 4, i32 2], [4 x i32] [i32 0, i32 1, i32 5, i32 4], [4 x i32] zeroinitializer], [7 x [4 x i32]] [[4 x i32] zeroinitializer, [4 x i32] [i32 0, i32 2, i32 1, i32 4], [4 x i32] zeroinitializer, [4 x i32] [i32 0, i32 2, i32 3, i32 1], [4 x i32] [i32 0, i32 2, i32 4, i32 6], [4 x i32] zeroinitializer, [4 x i32] [i32 0, i32 2, i32 6, i32 3]], [7 x [4 x i32]] [[4 x i32] zeroinitializer, [4 x i32] [i32 0, i32 3, i32 1, i32 2], [4 x i32] [i32 0, i32 3, i32 2, i32 6], [4 x i32] zeroinitializer, [4 x i32] zeroinitializer, [4 x i32] [i32 0, i32 3, i32 5, i32 1], [4 x i32] [i32 0, i32 3, i32 6, i32 5]], [7 x [4 x i32]] [[4 x i32] zeroinitializer, [4 x i32] [i32 0, i32 4, i32 1, i32 5], [4 x i32] [i32 0, i32 4, i32 2, i32 1], [4 x i32] zeroinitializer, [4 x i32] zeroinitializer, [4 x i32] [i32 0, i32 4, i32 5, i32 6], [4 x i32] [i32 0, i32 4, i32 6, i32 2]], [7 x [4 x i32]] [[4 x i32] zeroinitializer, [4 x i32] [i32 0, i32 5, i32 1, i32 3], [4 x i32] zeroinitializer, [4 x i32] [i32 0, i32 5, i32 3, i32 6], [4 x i32] [i32 0, i32 5, i32 4, i32 1], [4 x i32] zeroinitializer, [4 x i32] [i32 0, i32 5, i32 6, i32 4]], [7 x [4 x i32]] [[4 x i32] zeroinitializer, [4 x i32] zeroinitializer, [4 x i32] [i32 0, i32 6, i32 2, i32 4], [4 x i32] [i32 0, i32 6, i32 3, i32 2], [4 x i32] [i32 0, i32 6, i32 4, i32 5], [4 x i32] [i32 0, i32 6, i32 5, i32 3], [4 x i32] zeroinitializer]], align 16
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@assign = dso_local global [7 x i32] zeroinitializer, align 16
@.str.1 = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%q = alloca i32, align 4
%t = alloca i32, align 4
%f = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %q) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %f) #3
%call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds ([7 x i32], ptr @assign, i64 0, i64 1))
%call.1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds ([7 x i32], ptr @assign, i64 0, i64 2))
%call.2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds ([7 x i32], ptr @assign, i64 0, i64 3))
%call.3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds ([7 x i32], ptr @assign, i64 0, i64 4))
%call.4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds ([7 x i32], ptr @assign, i64 0, i64 5))
%call.5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds ([7 x i32], ptr @assign, i64 0, i64 6))
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %q)
%0 = load i32, ptr %q, align 4, !tbaa !5
%dec39 = add nsw i32 %0, -1
store i32 %dec39, ptr %q, align 4, !tbaa !5
%tobool.not40 = icmp eq i32 %0, 0
br i1 %tobool.not40, label %while.end, label %while.body
while.body: ; preds = %entry, %for.inc12.5
%call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %t, ptr noundef nonnull %f)
%t.promoted = load i32, ptr %t, align 4, !tbaa !5
%f.promoted = load i32, ptr %f, align 4, !tbaa !5
%1 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @assign, i64 0, i64 1), align 4, !tbaa !5
%cmp6 = icmp eq i32 %1, %t.promoted
br i1 %cmp6, label %if.then, label %if.end
if.then: ; preds = %while.body
store i32 1, ptr %t, align 4, !tbaa !5
br label %if.end
if.end: ; preds = %if.then, %while.body
%i.132 = phi i32 [ 1, %if.then ], [ %t.promoted, %while.body ]
%cmp9 = icmp eq i32 %1, %f.promoted
br i1 %cmp9, label %if.then10, label %for.inc12
if.then10: ; preds = %if.end
store i32 1, ptr %f, align 4, !tbaa !5
br label %for.inc12
for.inc12: ; preds = %if.end, %if.then10
%i.134 = phi i32 [ %f.promoted, %if.end ], [ 1, %if.then10 ]
%2 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @assign, i64 0, i64 2), align 8, !tbaa !5
%cmp6.1 = icmp eq i32 %2, %i.132
br i1 %cmp6.1, label %if.then.1, label %if.end.1
if.then.1: ; preds = %for.inc12
store i32 2, ptr %t, align 4, !tbaa !5
br label %if.end.1
if.end.1: ; preds = %if.then.1, %for.inc12
%i.132.1 = phi i32 [ 2, %if.then.1 ], [ %i.132, %for.inc12 ]
%cmp9.1 = icmp eq i32 %2, %i.134
br i1 %cmp9.1, label %if.then10.1, label %for.inc12.1
if.then10.1: ; preds = %if.end.1
store i32 2, ptr %f, align 4, !tbaa !5
br label %for.inc12.1
for.inc12.1: ; preds = %if.then10.1, %if.end.1
%i.134.1 = phi i32 [ %i.134, %if.end.1 ], [ 2, %if.then10.1 ]
%3 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @assign, i64 0, i64 3), align 4, !tbaa !5
%cmp6.2 = icmp eq i32 %3, %i.132.1
br i1 %cmp6.2, label %if.then.2, label %if.end.2
if.then.2: ; preds = %for.inc12.1
store i32 3, ptr %t, align 4, !tbaa !5
br label %if.end.2
if.end.2: ; preds = %if.then.2, %for.inc12.1
%i.132.2 = phi i32 [ 3, %if.then.2 ], [ %i.132.1, %for.inc12.1 ]
%cmp9.2 = icmp eq i32 %3, %i.134.1
br i1 %cmp9.2, label %if.then10.2, label %for.inc12.2
if.then10.2: ; preds = %if.end.2
store i32 3, ptr %f, align 4, !tbaa !5
br label %for.inc12.2
for.inc12.2: ; preds = %if.then10.2, %if.end.2
%i.134.2 = phi i32 [ %i.134.1, %if.end.2 ], [ 3, %if.then10.2 ]
%4 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @assign, i64 0, i64 4), align 16, !tbaa !5
%cmp6.3 = icmp eq i32 %4, %i.132.2
br i1 %cmp6.3, label %if.then.3, label %if.end.3
if.then.3: ; preds = %for.inc12.2
store i32 4, ptr %t, align 4, !tbaa !5
br label %if.end.3
if.end.3: ; preds = %if.then.3, %for.inc12.2
%i.132.3 = phi i32 [ 4, %if.then.3 ], [ %i.132.2, %for.inc12.2 ]
%cmp9.3 = icmp eq i32 %4, %i.134.2
br i1 %cmp9.3, label %if.then10.3, label %for.inc12.3
if.then10.3: ; preds = %if.end.3
store i32 4, ptr %f, align 4, !tbaa !5
br label %for.inc12.3
for.inc12.3: ; preds = %if.then10.3, %if.end.3
%i.134.3 = phi i32 [ %i.134.2, %if.end.3 ], [ 4, %if.then10.3 ]
%5 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @assign, i64 0, i64 5), align 4, !tbaa !5
%cmp6.4 = icmp eq i32 %5, %i.132.3
br i1 %cmp6.4, label %if.then.4, label %if.end.4
if.then.4: ; preds = %for.inc12.3
store i32 5, ptr %t, align 4, !tbaa !5
br label %if.end.4
if.end.4: ; preds = %if.then.4, %for.inc12.3
%i.132.4 = phi i32 [ 5, %if.then.4 ], [ %i.132.3, %for.inc12.3 ]
%cmp9.4 = icmp eq i32 %5, %i.134.3
br i1 %cmp9.4, label %if.then10.4, label %for.inc12.4
if.then10.4: ; preds = %if.end.4
store i32 5, ptr %f, align 4, !tbaa !5
br label %for.inc12.4
for.inc12.4: ; preds = %if.then10.4, %if.end.4
%i.134.4 = phi i32 [ %i.134.3, %if.end.4 ], [ 5, %if.then10.4 ]
%6 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @assign, i64 0, i64 6), align 8, !tbaa !5
%cmp6.5 = icmp eq i32 %6, %i.132.4
br i1 %cmp6.5, label %if.then.5, label %if.end.5
if.then.5: ; preds = %for.inc12.4
store i32 6, ptr %t, align 4, !tbaa !5
br label %if.end.5
if.end.5: ; preds = %if.then.5, %for.inc12.4
%7 = phi i32 [ 6, %if.then.5 ], [ %i.132.4, %for.inc12.4 ]
%cmp9.5 = icmp eq i32 %6, %i.134.4
br i1 %cmp9.5, label %if.then10.5, label %for.inc12.5
if.then10.5: ; preds = %if.end.5
store i32 6, ptr %f, align 4, !tbaa !5
br label %for.inc12.5
for.inc12.5: ; preds = %if.then10.5, %if.end.5
%8 = phi i32 [ 6, %if.then10.5 ], [ %i.134.4, %if.end.5 ]
%idxprom15 = sext i32 %7 to i64
%idxprom17 = sext i32 %8 to i64
%arrayidx19 = getelementptr inbounds [7 x [7 x [4 x i32]]], ptr @face, i64 0, i64 %idxprom15, i64 %idxprom17, i64 3
%9 = load i32, ptr %arrayidx19, align 4, !tbaa !5
%idxprom20 = sext i32 %9 to i64
%arrayidx21 = getelementptr inbounds [7 x i32], ptr @assign, i64 0, i64 %idxprom20
%10 = load i32, ptr %arrayidx21, align 4, !tbaa !5
%call22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %10)
%11 = load i32, ptr %q, align 4, !tbaa !5
%dec = add nsw i32 %11, -1
store i32 %dec, ptr %q, align 4, !tbaa !5
%tobool.not = icmp eq i32 %11, 0
br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !9
while.end: ; preds = %for.inc12.5, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %f) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %q) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
|
#include <stdio.h>
int main(){
int a,b;
scanf ("%d%d",&a,&b);
if (a > b)printf("a > b\n");
else if (a == b)printf("a == b\n");
else printf("a < b\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242838/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242838/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@str = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
@str.4 = private unnamed_addr constant [7 x i8] c"a == b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp sgt i32 %0, %1
%cmp2 = icmp eq i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void)
{
int a,b;
scanf("%d %d",&a,&b);
if(a < b)
printf("a < b\n");
else if(a > b)
printf("a > b\n");
else
printf("a == b\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242881/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242881/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
%cmp2 = icmp sgt i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main()
{
int a=0,b=0;
scanf("%d %d\n",&a,&b);
if(a<b)
{
printf("a < b\n");
}else if(a>b)
{
printf("a > b\n");
}else
{
printf("a == b\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242924/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242924/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 = private unnamed_addr constant [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\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
store i32 0, ptr %a, align 4, !tbaa !5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
store i32 0, ptr %b, align 4, !tbaa !5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
%cmp2 = icmp sgt i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
if(a<b) {
printf("a < b\n");
}
else if(a>b) {
printf("a > b\n");
}
else if(a == b) {
printf("a == b\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_242968/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_242968/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
br i1 %cmp, label %if.end10.sink.split, label %if.else
if.else: ; preds = %entry
%cmp2 = icmp sgt i32 %0, %1
br i1 %cmp2, label %if.end10.sink.split, label %if.else5
if.else5: ; preds = %if.else
%cmp6 = icmp eq i32 %0, %1
br i1 %cmp6, label %if.end10.sink.split, label %if.end10
if.end10.sink.split: ; preds = %if.else5, %if.else, %entry
%str.4.sink = phi ptr [ @str.5, %entry ], [ @str.4, %if.else ], [ @str, %if.else5 ]
%puts12 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
br label %if.end10
if.end10: ; preds = %if.end10.sink.split, %if.else5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(int argc, const char * argv[]) {
// insert code here...
int a,b;
scanf("%d %d",&a,&b);
if(a<b){
printf("a < b\n");
}
else if(a==b){
printf("a == b\n");
}
else{
printf("a > b\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243017/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243017/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [6 x i8] c"a > b\00", align 1
@str.4 = private unnamed_addr constant [7 x i8] c"a == b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\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) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
%cmp2 = icmp eq i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
#include<stdlib.h>
int main()
{
int a = 0;
int b = 0;
scanf("%d %d", &a, &b);
if (a < b)
{
printf("a < b\n");
}
if (a > b)
{
printf("a > b\n");
}
if (a == b)
{
printf("a == b\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243060/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243060/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [6 x i8] c"a < b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [7 x i8] c"a == b\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
store i32 0, ptr %a, align 4, !tbaa !5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
store i32 0, ptr %b, align 4, !tbaa !5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%puts = call i32 @puts(ptr nonnull dereferenceable(1) @str)
%.pre = load i32, ptr %a, align 4, !tbaa !5
%.pre12 = load i32, ptr %b, align 4, !tbaa !5
br label %if.end
if.end: ; preds = %if.then, %entry
%2 = phi i32 [ %.pre12, %if.then ], [ %1, %entry ]
%3 = phi i32 [ %.pre, %if.then ], [ %0, %entry ]
%cmp2 = icmp sgt i32 %3, %2
br i1 %cmp2, label %if.then3, label %if.end5
if.then3: ; preds = %if.end
%puts10 = call i32 @puts(ptr nonnull dereferenceable(1) @str.4)
%.pre13 = load i32, ptr %a, align 4, !tbaa !5
%.pre14 = load i32, ptr %b, align 4, !tbaa !5
br label %if.end5
if.end5: ; preds = %if.then3, %if.end
%4 = phi i32 [ %.pre14, %if.then3 ], [ %2, %if.end ]
%5 = phi i32 [ %.pre13, %if.then3 ], [ %3, %if.end ]
%cmp6 = icmp eq i32 %5, %4
br i1 %cmp6, label %if.then7, label %if.end9
if.then7: ; preds = %if.end5
%puts11 = call i32 @puts(ptr nonnull dereferenceable(1) @str.5)
br label %if.end9
if.end9: ; preds = %if.then7, %if.end5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(){
int a,b;
scanf("%d%d",&a,&b);
if(a<b)printf("a < b\n");
if(a>b)printf("a > b\n");
if(a==b)printf("a == b\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243103/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243103/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@str = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [7 x i8] c"a == b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%puts = call i32 @puts(ptr nonnull dereferenceable(1) @str)
%.pre = load i32, ptr %a, align 4, !tbaa !5
%.pre12 = load i32, ptr %b, align 4, !tbaa !5
br label %if.end
if.end: ; preds = %if.then, %entry
%2 = phi i32 [ %.pre12, %if.then ], [ %1, %entry ]
%3 = phi i32 [ %.pre, %if.then ], [ %0, %entry ]
%cmp2 = icmp sgt i32 %3, %2
br i1 %cmp2, label %if.then3, label %if.end5
if.then3: ; preds = %if.end
%puts10 = call i32 @puts(ptr nonnull dereferenceable(1) @str.4)
%.pre13 = load i32, ptr %a, align 4, !tbaa !5
%.pre14 = load i32, ptr %b, align 4, !tbaa !5
br label %if.end5
if.end5: ; preds = %if.then3, %if.end
%4 = phi i32 [ %.pre14, %if.then3 ], [ %2, %if.end ]
%5 = phi i32 [ %.pre13, %if.then3 ], [ %3, %if.end ]
%cmp6 = icmp eq i32 %5, %4
br i1 %cmp6, label %if.then7, label %if.end9
if.then7: ; preds = %if.end5
%puts11 = call i32 @puts(ptr nonnull dereferenceable(1) @str.5)
br label %if.end9
if.end9: ; preds = %if.then7, %if.end5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(int argc, const char * argv[]){
int a,b;
scanf("%d %d",&a,&b);
if(a<b){
printf("a < b\n");
}
else if(a>b){
printf("a > b\n");
}
else{
printf("a == b\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243161/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243161/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\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) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
%cmp2 = icmp sgt i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void)
{
int a,b;
scanf("%d%d",&a,&b);
if(a == b ){
printf("a == b\n");
}
else if(a > b){
printf("a > b\n");
}
else{
printf("a < b\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243219/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243219/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@str = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [7 x i8] c"a == b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp eq i32 %0, %1
%cmp2 = icmp sgt i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int a, b;
scanf("%d", &a);
scanf("%d", &b);
if (a > b){printf("a > b\n");}
else if (a < b){ printf("a < b\n"); }
else{ printf("a == b\n"); }
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243262/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243262/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a > b\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)
%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
%cmp = icmp sgt i32 %0, %1
%cmp3 = icmp slt i32 %0, %1
%str.4.str = select i1 %cmp3, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts10 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main() {
int a, b;
scanf("%d%d", &a, &b);
if (a < b) printf("a < b\n");
else if(a > b)printf("a > b\n");
else printf("a == b\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243305/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243305/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@str = private unnamed_addr constant [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
%cmp2 = icmp sgt i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(){
int a,b;
scanf("%d %d",&a,&b);
if(a < b){
printf("a < b\n");
}else if(a > b){
printf("a > b\n");
}else{
printf("a == b\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243349/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243349/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
%cmp2 = icmp sgt i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int a, b;
scanf("%d %d",&a, &b);
if(a<b){
printf("a < b\n");
}
else if(a>b){
printf("a > b\n");
}
else{
printf("a == b\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243442/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243442/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
%cmp2 = icmp sgt i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int a,b;
scanf("%d%d",&a,&b);
if (a < b){
printf("a < b\n",a,b);
}else if(a > b){
printf("a > b\n",a,b);
}else if(a == b){
printf("a == b\n",a,b);
}
return 0 ;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243486/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243486/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@str = private unnamed_addr constant [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
br i1 %cmp, label %if.end10.sink.split, label %if.else
if.else: ; preds = %entry
%cmp2 = icmp sgt i32 %0, %1
br i1 %cmp2, label %if.end10.sink.split, label %if.else5
if.else5: ; preds = %if.else
%cmp6 = icmp eq i32 %0, %1
br i1 %cmp6, label %if.end10.sink.split, label %if.end10
if.end10.sink.split: ; preds = %if.else5, %if.else, %entry
%str.4.sink = phi ptr [ @str.5, %entry ], [ @str.4, %if.else ], [ @str, %if.else5 ]
%puts13 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
br label %if.end10
if.end10: ; preds = %if.end10.sink.split, %if.else5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void)
{
int a, b;
scanf("%d %d", &a, &b);
if(a == b){
printf("a == b\n");
}
else if(a > b){
printf("a > b\n");
}
else if(a < b){
printf("a < b\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243529/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243529/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [6 x i8] c"a < b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [7 x i8] c"a == b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp eq i32 %0, %1
br i1 %cmp, label %if.end10.sink.split, label %if.else
if.else: ; preds = %entry
%cmp2 = icmp sgt i32 %0, %1
br i1 %cmp2, label %if.end10.sink.split, label %if.else5
if.else5: ; preds = %if.else
%cmp6 = icmp slt i32 %0, %1
br i1 %cmp6, label %if.end10.sink.split, label %if.end10
if.end10.sink.split: ; preds = %if.else5, %if.else, %entry
%str.4.sink = phi ptr [ @str.5, %entry ], [ @str.4, %if.else ], [ @str, %if.else5 ]
%puts12 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
br label %if.end10
if.end10: ; preds = %if.end10.sink.split, %if.else5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void)
{
int ab, cd;
scanf("%d %d", &ab, &cd);
if(ab < cd)
{
printf("a < b\n");
}
if(ab > cd)
{
printf("a > b\n");
}
if(ab == cd)
{
printf("a == b\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243572/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243572/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [6 x i8] c"a < b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [7 x i8] c"a == b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%ab = alloca i32, align 4
%cd = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %ab) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %cd) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %ab, ptr noundef nonnull %cd)
%0 = load i32, ptr %ab, align 4, !tbaa !5
%1 = load i32, ptr %cd, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%puts = call i32 @puts(ptr nonnull dereferenceable(1) @str)
%.pre = load i32, ptr %ab, align 4, !tbaa !5
%.pre12 = load i32, ptr %cd, align 4, !tbaa !5
br label %if.end
if.end: ; preds = %if.then, %entry
%2 = phi i32 [ %.pre12, %if.then ], [ %1, %entry ]
%3 = phi i32 [ %.pre, %if.then ], [ %0, %entry ]
%cmp2 = icmp sgt i32 %3, %2
br i1 %cmp2, label %if.then3, label %if.end5
if.then3: ; preds = %if.end
%puts10 = call i32 @puts(ptr nonnull dereferenceable(1) @str.4)
%.pre13 = load i32, ptr %ab, align 4, !tbaa !5
%.pre14 = load i32, ptr %cd, align 4, !tbaa !5
br label %if.end5
if.end5: ; preds = %if.then3, %if.end
%4 = phi i32 [ %.pre14, %if.then3 ], [ %2, %if.end ]
%5 = phi i32 [ %.pre13, %if.then3 ], [ %3, %if.end ]
%cmp6 = icmp eq i32 %5, %4
br i1 %cmp6, label %if.then7, label %if.end9
if.then7: ; preds = %if.end5
%puts11 = call i32 @puts(ptr nonnull dereferenceable(1) @str.5)
br label %if.end9
if.end9: ; preds = %if.then7, %if.end5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %cd) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %ab) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define INF 1000000000
int nums[10000];
char in[10000];
int compare (const void * a, const void * b)
{
return ( *(int*)a - *(int*)b );
}
int main(){
int i, n;
scanf("%s", in);
char * pch = strtok (in, "+");
while (pch != NULL){
sscanf(pch, "%d", &nums[i++]);
pch = strtok (NULL, "+");
}
n=i;
qsort(nums, n, sizeof(int), compare);
for(i=0; i<n; i++){
printf("%d", nums[i]);
if(i<n-1) printf("+");
}
printf("\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24363/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24363/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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
@in = dso_local global [10000 x i8] zeroinitializer, align 16
@.str.1 = private unnamed_addr constant [2 x i8] c"+\00", align 1
@.str.2 = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@nums = dso_local global [10000 x i32] zeroinitializer, align 16
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @compare(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #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:
%call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @in)
%call1 = tail call ptr @strtok(ptr noundef nonnull @in, ptr noundef nonnull @.str.1) #6
%cmp.not23 = icmp eq ptr %call1, null
br i1 %cmp.not23, label %while.end.thread, label %while.body
while.end.thread: ; preds = %entry
tail call void @qsort(ptr noundef nonnull @nums, i64 noundef 0, i64 noundef 4, ptr noundef nonnull @compare) #6
br label %for.end
while.body: ; preds = %entry, %while.body
%indvars.iv = phi i64 [ %indvars.iv.next, %while.body ], [ 0, %entry ]
%pch.025 = phi ptr [ %call3, %while.body ], [ %call1, %entry ]
%indvars.iv.next = add i64 %indvars.iv, 1
%arrayidx = getelementptr inbounds [10000 x i32], ptr @nums, i64 0, i64 %indvars.iv
%call2 = tail call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %pch.025, ptr noundef nonnull @.str.2, ptr noundef nonnull %arrayidx) #6
%call3 = tail call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.1) #6
%cmp.not = icmp eq ptr %call3, null
br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !9
while.end: ; preds = %while.body
%0 = trunc i64 %indvars.iv.next to i32
%sext = shl i64 %indvars.iv.next, 32
%conv = ashr exact i64 %sext, 32
tail call void @qsort(ptr noundef nonnull @nums, i64 noundef %conv, i64 noundef 4, ptr noundef nonnull @compare) #6
%cmp426 = icmp sgt i32 %0, 0
br i1 %cmp426, label %for.body.lr.ph, label %for.end
for.body.lr.ph: ; preds = %while.end
%1 = and i64 %indvars.iv, 4294967295
%wide.trip.count = and i64 %indvars.iv.next, 4294967295
br label %for.body
for.body: ; preds = %for.body.lr.ph, %for.inc
%indvars.iv28 = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next29, %for.inc ]
%arrayidx7 = getelementptr inbounds [10000 x i32], ptr @nums, i64 0, i64 %indvars.iv28
%2 = load i32, ptr %arrayidx7, align 4, !tbaa !5
%call8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %2)
%cmp9 = icmp ult i64 %indvars.iv28, %1
br i1 %cmp9, label %if.then, label %for.inc
if.then: ; preds = %for.body
%putchar22 = tail call i32 @putchar(i32 43)
br label %for.inc
for.inc: ; preds = %for.body, %if.then
%indvars.iv.next29 = add nuw nsw i64 %indvars.iv28, 1
%exitcond.not = icmp eq i64 %indvars.iv.next29, %wide.trip.count
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !11
for.end: ; preds = %for.inc, %while.end.thread, %while.end
%putchar = tail call i32 @putchar(i32 10)
ret i32 0
}
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nofree nounwind willreturn
declare ptr @strtok(ptr noundef, ptr nocapture noundef readonly) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #4
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #5
attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nofree nounwind }
attributes #6 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
int main(void)
{
int a,b;
scanf("%d %d",&a,&b);
if(a>b)
{
printf("a > b\n");
}
else if(a<b)
{
printf("a < b\n");
}
else
{
printf("a == b\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243673/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243673/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp sgt i32 %0, %1
%cmp2 = icmp slt i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void)
{
int a,b;
scanf("%d",&a);
scanf("%d",&b);
if(a<b)
{
printf("a < b\n");
}
if(a>b)
{
printf("a > b\n");
}
if(a==b)
{
printf("a == b\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243716/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243716/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [6 x i8] c"a < b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [7 x i8] c"a == b\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)
%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
%cmp = icmp slt i32 %0, %1
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%puts = call i32 @puts(ptr nonnull dereferenceable(1) @str)
%.pre = load i32, ptr %a, align 4, !tbaa !5
%.pre13 = load i32, ptr %b, align 4, !tbaa !5
br label %if.end
if.end: ; preds = %if.then, %entry
%2 = phi i32 [ %.pre13, %if.then ], [ %1, %entry ]
%3 = phi i32 [ %.pre, %if.then ], [ %0, %entry ]
%cmp3 = icmp sgt i32 %3, %2
br i1 %cmp3, label %if.then4, label %if.end6
if.then4: ; preds = %if.end
%puts11 = call i32 @puts(ptr nonnull dereferenceable(1) @str.4)
%.pre14 = load i32, ptr %a, align 4, !tbaa !5
%.pre15 = load i32, ptr %b, align 4, !tbaa !5
br label %if.end6
if.end6: ; preds = %if.then4, %if.end
%4 = phi i32 [ %.pre15, %if.then4 ], [ %2, %if.end ]
%5 = phi i32 [ %.pre14, %if.then4 ], [ %3, %if.end ]
%cmp7 = icmp eq i32 %5, %4
br i1 %cmp7, label %if.then8, label %if.end10
if.then8: ; preds = %if.end6
%puts12 = call i32 @puts(ptr nonnull dereferenceable(1) @str.5)
br label %if.end10
if.end10: ; preds = %if.then8, %if.end6
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdlib.h>
#include <stdio.h>
#define LARGE 131072
int powers[] = {1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072};
int n;
int tree[18][LARGE];
void buildTree(int level, int count) {
int total = count / 2;
// printf("total : %d\n", total);
int i;
int mode = level % 2;
for (i = 0; i < total; i++) {
if (mode) {
tree[level][i] = tree[level - 1][i * 2] | tree[level - 1][i * 2 + 1];
} else {
tree[level][i] = tree[level - 1][i * 2] ^ tree[level - 1][i * 2 + 1];
}
}
}
void insert(int p, int level) {
// printf("insert: %d\n", p);
int mode = level % 2;
if (mode) {
tree[level][p] = tree[level - 1][p * 2] | tree[level - 1][p * 2 + 1];
} else {
tree[level][p] = tree[level - 1][p * 2] ^ tree[level - 1][p * 2 + 1];
}
}
int m;
void init() {
scanf("%d%d", &n, &m);
int i;
for (i = 0; i < powers[n]; i++) {
scanf("%d", &tree[0][i]);
}
for (i = 1; i <= n; i++) {
buildTree(i, powers[n - i + 1]);
}
}
int main () {
init();
int i;
for (i = 0; i < m; i++) {
int p, b;
scanf("%d%d", &p, &b);
// printf("p: %d\n", p);
p--;
tree[0][p] = b;
p /= 2;
int j;
for (j = 1; j <= n; j++) {
insert(p, j);
p /= 2;
}
printf("%d\n", tree[n][0]);
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24376/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24376/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@powers = dso_local local_unnamed_addr global [18 x i32] [i32 1, i32 2, i32 4, i32 8, i32 16, i32 32, i32 64, i32 128, i32 256, i32 512, i32 1024, i32 2048, i32 4096, i32 8192, i32 16384, i32 32768, i32 65536, i32 131072], align 16
@tree = dso_local global [18 x [131072 x i32]] zeroinitializer, align 16
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@n = dso_local global i32 0, align 4
@m = dso_local global i32 0, align 4
@.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable
define dso_local void @buildTree(i32 noundef %level, i32 noundef %count) local_unnamed_addr #0 {
entry:
%cmp43 = icmp sgt i32 %count, 1
br i1 %cmp43, label %for.body.lr.ph, label %for.end
for.body.lr.ph: ; preds = %entry
%div = sdiv i32 %count, 2
%0 = and i32 %level, 1
%tobool.not = icmp eq i32 %0, 0
%sub = add nsw i32 %level, -1
%idxprom = sext i32 %sub to i64
%idxprom9 = sext i32 %level to i64
%wide.trip.count54 = zext i32 %div to i64
br i1 %tobool.not, label %for.body.us.preheader, label %for.body.preheader
for.body.preheader: ; preds = %for.body.lr.ph
%xtraiter = and i64 %wide.trip.count54, 1
%1 = and i32 %count, -2
%2 = icmp eq i32 %1, 2
br i1 %2, label %for.end.loopexit58.unr-lcssa, label %for.body.preheader.new
for.body.preheader.new: ; preds = %for.body.preheader
%unroll_iter = and i64 %wide.trip.count54, 4294967294
br label %for.body
for.body.us.preheader: ; preds = %for.body.lr.ph
%xtraiter59 = and i64 %wide.trip.count54, 1
%3 = and i32 %count, -2
%4 = icmp eq i32 %3, 2
br i1 %4, label %for.end.loopexit.unr-lcssa, label %for.body.us.preheader.new
for.body.us.preheader.new: ; preds = %for.body.us.preheader
%unroll_iter61 = and i64 %wide.trip.count54, 4294967294
br label %for.body.us
for.body.us: ; preds = %for.body.us, %for.body.us.preheader.new
%indvars.iv49 = phi i64 [ 0, %for.body.us.preheader.new ], [ %indvars.iv.next50.1, %for.body.us ]
%niter62 = phi i64 [ 0, %for.body.us.preheader.new ], [ %niter62.next.1, %for.body.us ]
%5 = shl nuw nsw i64 %indvars.iv49, 1
%arrayidx18.us = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom, i64 %5
%6 = load i32, ptr %arrayidx18.us, align 16, !tbaa !5
%7 = or i64 %5, 1
%arrayidx25.us = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom, i64 %7
%8 = load i32, ptr %arrayidx25.us, align 4, !tbaa !5
%xor.us = xor i32 %8, %6
%arrayidx29.us = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom9, i64 %indvars.iv49
store i32 %xor.us, ptr %arrayidx29.us, align 8, !tbaa !5
%indvars.iv.next50 = or i64 %indvars.iv49, 1
%9 = shl nuw nsw i64 %indvars.iv.next50, 1
%arrayidx18.us.1 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom, i64 %9
%10 = load i32, ptr %arrayidx18.us.1, align 8, !tbaa !5
%11 = or i64 %9, 1
%arrayidx25.us.1 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom, i64 %11
%12 = load i32, ptr %arrayidx25.us.1, align 4, !tbaa !5
%xor.us.1 = xor i32 %12, %10
%arrayidx29.us.1 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom9, i64 %indvars.iv.next50
store i32 %xor.us.1, ptr %arrayidx29.us.1, align 4, !tbaa !5
%indvars.iv.next50.1 = add nuw nsw i64 %indvars.iv49, 2
%niter62.next.1 = add nuw i64 %niter62, 2
%niter62.ncmp.1 = icmp eq i64 %niter62.next.1, %unroll_iter61
br i1 %niter62.ncmp.1, label %for.end.loopexit.unr-lcssa, label %for.body.us, !llvm.loop !9
for.body: ; preds = %for.body, %for.body.preheader.new
%indvars.iv = phi i64 [ 0, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.body ]
%niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ]
%13 = shl nuw nsw i64 %indvars.iv, 1
%arrayidx2 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom, i64 %13
%14 = load i32, ptr %arrayidx2, align 16, !tbaa !5
%15 = or i64 %13, 1
%arrayidx8 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom, i64 %15
%16 = load i32, ptr %arrayidx8, align 4, !tbaa !5
%or = or i32 %16, %14
%arrayidx12 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom9, i64 %indvars.iv
store i32 %or, ptr %arrayidx12, align 8, !tbaa !5
%indvars.iv.next = or i64 %indvars.iv, 1
%17 = shl nuw nsw i64 %indvars.iv.next, 1
%arrayidx2.1 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom, i64 %17
%18 = load i32, ptr %arrayidx2.1, align 8, !tbaa !5
%19 = or i64 %17, 1
%arrayidx8.1 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom, i64 %19
%20 = load i32, ptr %arrayidx8.1, align 4, !tbaa !5
%or.1 = or i32 %20, %18
%arrayidx12.1 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom9, i64 %indvars.iv.next
store i32 %or.1, ptr %arrayidx12.1, align 4, !tbaa !5
%indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
%niter.next.1 = add nuw i64 %niter, 2
%niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
br i1 %niter.ncmp.1, label %for.end.loopexit58.unr-lcssa, label %for.body, !llvm.loop !9
for.end.loopexit.unr-lcssa: ; preds = %for.body.us, %for.body.us.preheader
%indvars.iv49.unr = phi i64 [ 0, %for.body.us.preheader ], [ %indvars.iv.next50.1, %for.body.us ]
%lcmp.mod60.not = icmp eq i64 %xtraiter59, 0
br i1 %lcmp.mod60.not, label %for.end, label %for.body.us.epil
for.body.us.epil: ; preds = %for.end.loopexit.unr-lcssa
%21 = shl nuw nsw i64 %indvars.iv49.unr, 1
%arrayidx18.us.epil = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom, i64 %21
%22 = load i32, ptr %arrayidx18.us.epil, align 8, !tbaa !5
%23 = or i64 %21, 1
%arrayidx25.us.epil = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom, i64 %23
%24 = load i32, ptr %arrayidx25.us.epil, align 4, !tbaa !5
%xor.us.epil = xor i32 %24, %22
%arrayidx29.us.epil = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom9, i64 %indvars.iv49.unr
store i32 %xor.us.epil, ptr %arrayidx29.us.epil, align 4, !tbaa !5
br label %for.end
for.end.loopexit58.unr-lcssa: ; preds = %for.body, %for.body.preheader
%indvars.iv.unr = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next.1, %for.body ]
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.end, label %for.body.epil
for.body.epil: ; preds = %for.end.loopexit58.unr-lcssa
%25 = shl nuw nsw i64 %indvars.iv.unr, 1
%arrayidx2.epil = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom, i64 %25
%26 = load i32, ptr %arrayidx2.epil, align 8, !tbaa !5
%27 = or i64 %25, 1
%arrayidx8.epil = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom, i64 %27
%28 = load i32, ptr %arrayidx8.epil, align 4, !tbaa !5
%or.epil = or i32 %28, %26
%arrayidx12.epil = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom9, i64 %indvars.iv.unr
store i32 %or.epil, ptr %arrayidx12.epil, align 4, !tbaa !5
br label %for.end
for.end: ; preds = %for.body.epil, %for.end.loopexit58.unr-lcssa, %for.body.us.epil, %for.end.loopexit.unr-lcssa, %entry
ret void
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable
define dso_local void @insert(i32 noundef %p, i32 noundef %level) local_unnamed_addr #2 {
entry:
%0 = and i32 %level, 1
%tobool.not = icmp eq i32 %0, 0
%sub13 = add nsw i32 %level, -1
%idxprom14 = sext i32 %sub13 to i64
%mul16 = shl nsw i32 %p, 1
%idxprom17 = sext i32 %mul16 to i64
%arrayidx18 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom14, i64 %idxprom17
%1 = load i32, ptr %arrayidx18, align 8, !tbaa !5
%add23 = or i32 %mul16, 1
%idxprom24 = sext i32 %add23 to i64
%arrayidx25 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom14, i64 %idxprom24
%2 = load i32, ptr %arrayidx25, align 4, !tbaa !5
%idxprom26 = sext i32 %level to i64
%idxprom28 = sext i32 %p to i64
%arrayidx29 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom26, i64 %idxprom28
%xor = xor i32 %2, %1
%or = or i32 %2, %1
%xor.sink = select i1 %tobool.not, i32 %xor, i32 %or
store i32 %xor.sink, ptr %arrayidx29, align 4, !tbaa !5
ret void
}
; Function Attrs: nofree nounwind uwtable
define dso_local void @init() local_unnamed_addr #3 {
entry:
%call = tail 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
%idxprom21 = sext i32 %0 to i64
%arrayidx22 = getelementptr inbounds [18 x i32], ptr @powers, i64 0, i64 %idxprom21
%1 = load i32, ptr %arrayidx22, align 4, !tbaa !5
%cmp23 = icmp sgt i32 %1, 0
br i1 %cmp23, label %for.body, label %for.cond4.preheader
for.cond4.preheader: ; preds = %for.body, %entry
%.lcssa = phi i32 [ %0, %entry ], [ %2, %for.body ]
%cmp5.not25 = icmp slt i32 %.lcssa, 1
br i1 %cmp5.not25, label %for.end11, label %for.body6.lr.ph
for.body6.lr.ph: ; preds = %for.cond4.preheader
%sub = add nuw i32 %.lcssa, 1
%wide.trip.count = zext i32 %sub to i64
br label %for.body6
for.body: ; preds = %entry, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
%arrayidx2 = getelementptr inbounds [131072 x i32], ptr @tree, i64 0, i64 %indvars.iv
%call3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx2)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%2 = load i32, ptr @n, align 4, !tbaa !5
%idxprom = sext i32 %2 to i64
%arrayidx = getelementptr inbounds [18 x i32], ptr @powers, i64 0, i64 %idxprom
%3 = load i32, ptr %arrayidx, 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.cond4.preheader, !llvm.loop !11
for.body6: ; preds = %for.body6.lr.ph, %buildTree.exit
%indvars.iv30 = phi i64 [ 1, %for.body6.lr.ph ], [ %indvars.iv.next31, %buildTree.exit ]
%5 = trunc i64 %indvars.iv30 to i32
%add = sub i32 %sub, %5
%idxprom7 = sext i32 %add to i64
%arrayidx8 = getelementptr inbounds [18 x i32], ptr @powers, i64 0, i64 %idxprom7
%6 = load i32, ptr %arrayidx8, align 4, !tbaa !5
%cmp43.i = icmp sgt i32 %6, 1
br i1 %cmp43.i, label %for.body.lr.ph.i, label %buildTree.exit
for.body.lr.ph.i: ; preds = %for.body6
%div.i1819 = lshr i32 %6, 1
%7 = and i32 %5, 1
%tobool.not.i = icmp eq i32 %7, 0
%8 = add nsw i64 %indvars.iv30, -1
%wide.trip.count54.i = zext i32 %div.i1819 to i64
br i1 %tobool.not.i, label %for.body.us.i.preheader, label %for.body.i.preheader
for.body.i.preheader: ; preds = %for.body.lr.ph.i
%xtraiter = and i64 %wide.trip.count54.i, 1
%9 = icmp eq i32 %div.i1819, 1
br i1 %9, label %buildTree.exit.loopexit38.unr-lcssa, label %for.body.i.preheader.new
for.body.i.preheader.new: ; preds = %for.body.i.preheader
%unroll_iter = and i64 %wide.trip.count54.i, 2147483646
br label %for.body.i
for.body.us.i.preheader: ; preds = %for.body.lr.ph.i
%xtraiter40 = and i64 %wide.trip.count54.i, 1
%10 = icmp eq i32 %div.i1819, 1
br i1 %10, label %buildTree.exit.loopexit.unr-lcssa, label %for.body.us.i.preheader.new
for.body.us.i.preheader.new: ; preds = %for.body.us.i.preheader
%unroll_iter42 = and i64 %wide.trip.count54.i, 2147483646
br label %for.body.us.i
for.body.us.i: ; preds = %for.body.us.i, %for.body.us.i.preheader.new
%indvars.iv49.i = phi i64 [ 0, %for.body.us.i.preheader.new ], [ %indvars.iv.next50.i.1, %for.body.us.i ]
%niter43 = phi i64 [ 0, %for.body.us.i.preheader.new ], [ %niter43.next.1, %for.body.us.i ]
%11 = shl nuw nsw i64 %indvars.iv49.i, 1
%arrayidx18.us.i = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %8, i64 %11
%12 = load i32, ptr %arrayidx18.us.i, align 16, !tbaa !5
%13 = or i64 %11, 1
%arrayidx25.us.i = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %8, i64 %13
%14 = load i32, ptr %arrayidx25.us.i, align 4, !tbaa !5
%xor.us.i = xor i32 %14, %12
%arrayidx29.us.i = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %indvars.iv30, i64 %indvars.iv49.i
store i32 %xor.us.i, ptr %arrayidx29.us.i, align 8, !tbaa !5
%indvars.iv.next50.i = or i64 %indvars.iv49.i, 1
%15 = shl nuw nsw i64 %indvars.iv.next50.i, 1
%arrayidx18.us.i.1 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %8, i64 %15
%16 = load i32, ptr %arrayidx18.us.i.1, align 8, !tbaa !5
%17 = or i64 %15, 1
%arrayidx25.us.i.1 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %8, i64 %17
%18 = load i32, ptr %arrayidx25.us.i.1, align 4, !tbaa !5
%xor.us.i.1 = xor i32 %18, %16
%arrayidx29.us.i.1 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %indvars.iv30, i64 %indvars.iv.next50.i
store i32 %xor.us.i.1, ptr %arrayidx29.us.i.1, align 4, !tbaa !5
%indvars.iv.next50.i.1 = add nuw nsw i64 %indvars.iv49.i, 2
%niter43.next.1 = add nuw i64 %niter43, 2
%niter43.ncmp.1 = icmp eq i64 %niter43.next.1, %unroll_iter42
br i1 %niter43.ncmp.1, label %buildTree.exit.loopexit.unr-lcssa, label %for.body.us.i, !llvm.loop !9
for.body.i: ; preds = %for.body.i, %for.body.i.preheader.new
%indvars.iv.i = phi i64 [ 0, %for.body.i.preheader.new ], [ %indvars.iv.next.i.1, %for.body.i ]
%niter = phi i64 [ 0, %for.body.i.preheader.new ], [ %niter.next.1, %for.body.i ]
%19 = shl nuw nsw i64 %indvars.iv.i, 1
%arrayidx2.i = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %8, i64 %19
%20 = load i32, ptr %arrayidx2.i, align 16, !tbaa !5
%21 = or i64 %19, 1
%arrayidx8.i = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %8, i64 %21
%22 = load i32, ptr %arrayidx8.i, align 4, !tbaa !5
%or.i = or i32 %22, %20
%arrayidx12.i = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %indvars.iv30, i64 %indvars.iv.i
store i32 %or.i, ptr %arrayidx12.i, align 8, !tbaa !5
%indvars.iv.next.i = or i64 %indvars.iv.i, 1
%23 = shl nuw nsw i64 %indvars.iv.next.i, 1
%arrayidx2.i.1 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %8, i64 %23
%24 = load i32, ptr %arrayidx2.i.1, align 8, !tbaa !5
%25 = or i64 %23, 1
%arrayidx8.i.1 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %8, i64 %25
%26 = load i32, ptr %arrayidx8.i.1, align 4, !tbaa !5
%or.i.1 = or i32 %26, %24
%arrayidx12.i.1 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %indvars.iv30, i64 %indvars.iv.next.i
store i32 %or.i.1, ptr %arrayidx12.i.1, align 4, !tbaa !5
%indvars.iv.next.i.1 = add nuw nsw i64 %indvars.iv.i, 2
%niter.next.1 = add nuw i64 %niter, 2
%niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
br i1 %niter.ncmp.1, label %buildTree.exit.loopexit38.unr-lcssa, label %for.body.i, !llvm.loop !9
buildTree.exit.loopexit.unr-lcssa: ; preds = %for.body.us.i, %for.body.us.i.preheader
%indvars.iv49.i.unr = phi i64 [ 0, %for.body.us.i.preheader ], [ %indvars.iv.next50.i.1, %for.body.us.i ]
%lcmp.mod41.not = icmp eq i64 %xtraiter40, 0
br i1 %lcmp.mod41.not, label %buildTree.exit, label %for.body.us.i.epil
for.body.us.i.epil: ; preds = %buildTree.exit.loopexit.unr-lcssa
%27 = shl nuw nsw i64 %indvars.iv49.i.unr, 1
%arrayidx18.us.i.epil = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %8, i64 %27
%28 = load i32, ptr %arrayidx18.us.i.epil, align 8, !tbaa !5
%29 = or i64 %27, 1
%arrayidx25.us.i.epil = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %8, i64 %29
%30 = load i32, ptr %arrayidx25.us.i.epil, align 4, !tbaa !5
%xor.us.i.epil = xor i32 %30, %28
%arrayidx29.us.i.epil = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %indvars.iv30, i64 %indvars.iv49.i.unr
store i32 %xor.us.i.epil, ptr %arrayidx29.us.i.epil, align 4, !tbaa !5
br label %buildTree.exit
buildTree.exit.loopexit38.unr-lcssa: ; preds = %for.body.i, %for.body.i.preheader
%indvars.iv.i.unr = phi i64 [ 0, %for.body.i.preheader ], [ %indvars.iv.next.i.1, %for.body.i ]
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %buildTree.exit, label %for.body.i.epil
for.body.i.epil: ; preds = %buildTree.exit.loopexit38.unr-lcssa
%31 = shl nuw nsw i64 %indvars.iv.i.unr, 1
%arrayidx2.i.epil = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %8, i64 %31
%32 = load i32, ptr %arrayidx2.i.epil, align 8, !tbaa !5
%33 = or i64 %31, 1
%arrayidx8.i.epil = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %8, i64 %33
%34 = load i32, ptr %arrayidx8.i.epil, align 4, !tbaa !5
%or.i.epil = or i32 %34, %32
%arrayidx12.i.epil = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %indvars.iv30, i64 %indvars.iv.i.unr
store i32 %or.i.epil, ptr %arrayidx12.i.epil, align 4, !tbaa !5
br label %buildTree.exit
buildTree.exit: ; preds = %for.body.i.epil, %buildTree.exit.loopexit38.unr-lcssa, %for.body.us.i.epil, %buildTree.exit.loopexit.unr-lcssa, %for.body6
%indvars.iv.next31 = add nuw nsw i64 %indvars.iv30, 1
%exitcond.not = icmp eq i64 %indvars.iv.next31, %wide.trip.count
br i1 %exitcond.not, label %for.end11, label %for.body6, !llvm.loop !12
for.end11: ; preds = %buildTree.exit, %for.cond4.preheader
ret void
}
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #3 {
entry:
%p = alloca i32, align 4
%b = alloca i32, align 4
tail call void @init()
%0 = load i32, ptr @m, align 4, !tbaa !5
%cmp19 = icmp sgt i32 %0, 0
br i1 %cmp19, label %for.body, label %for.end11
for.body: ; preds = %entry, %for.end
%i.020 = phi i32 [ %inc10, %for.end ], [ 0, %entry ]
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %p) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %p, ptr noundef nonnull %b)
%1 = load i32, ptr %p, align 4, !tbaa !5
%dec = add nsw i32 %1, -1
%2 = load i32, ptr %b, align 4, !tbaa !5
%idxprom = sext i32 %dec to i64
%arrayidx = getelementptr inbounds [131072 x i32], ptr @tree, i64 0, i64 %idxprom
store i32 %2, ptr %arrayidx, align 4, !tbaa !5
%div = sdiv i32 %dec, 2
store i32 %div, ptr %p, align 4, !tbaa !5
%3 = load i32, ptr @n, align 4, !tbaa !5
%cmp2.not16 = icmp slt i32 %3, 1
br i1 %cmp2.not16, label %for.end, label %for.body3.preheader
for.body3.preheader: ; preds = %for.body
%4 = add nuw i32 %3, 1
%wide.trip.count = zext i32 %4 to i64
br label %for.body3
for.body3: ; preds = %for.body3.preheader, %for.body3
%indvars.iv = phi i64 [ 1, %for.body3.preheader ], [ %indvars.iv.next, %for.body3 ]
%div41517 = phi i32 [ %div, %for.body3.preheader ], [ %div4, %for.body3 ]
%5 = and i64 %indvars.iv, 1
%tobool.not.i = icmp eq i64 %5, 0
%6 = add nsw i64 %indvars.iv, -1
%mul16.i = shl nsw i32 %div41517, 1
%idxprom17.i = sext i32 %mul16.i to i64
%arrayidx18.i = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %6, i64 %idxprom17.i
%7 = load i32, ptr %arrayidx18.i, align 8, !tbaa !5
%add23.i = or i32 %mul16.i, 1
%idxprom24.i = sext i32 %add23.i to i64
%arrayidx25.i = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %6, i64 %idxprom24.i
%8 = load i32, ptr %arrayidx25.i, align 4, !tbaa !5
%idxprom28.i = sext i32 %div41517 to i64
%arrayidx29.i = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %indvars.iv, i64 %idxprom28.i
%xor.i = xor i32 %8, %7
%or.i = or i32 %8, %7
%xor.sink.i = select i1 %tobool.not.i, i32 %xor.i, i32 %or.i
store i32 %xor.sink.i, ptr %arrayidx29.i, align 4, !tbaa !5
%div4 = sdiv i32 %div41517, 2
%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, label %for.body3, !llvm.loop !13
for.cond1.for.end_crit_edge: ; preds = %for.body3
store i32 %div4, ptr %p, align 4, !tbaa !5
br label %for.end
for.end: ; preds = %for.cond1.for.end_crit_edge, %for.body
%idxprom5 = sext i32 %3 to i64
%arrayidx6 = getelementptr inbounds [18 x [131072 x i32]], ptr @tree, i64 0, i64 %idxprom5
%9 = load i32, ptr %arrayidx6, align 16, !tbaa !5
%call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %9)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %p) #5
%inc10 = add nuw nsw i32 %i.020, 1
%10 = load i32, ptr @m, align 4, !tbaa !5
%cmp = icmp slt i32 %inc10, %10
br i1 %cmp, label %for.body, label %for.end11, !llvm.loop !14
for.end11: ; preds = %for.end, %entry
ret i32 0
}
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4
attributes #0 = { nofree norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
|
#include<stdio.h>
int main (void){
int a,b;
scanf("%d %d",&a,&b);
if(a==b)
printf("a == b\n");
else if(a>b)
printf("a > b\n");
else printf("a < b\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243802/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243802/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [6 x i8] c"a < b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [7 x i8] c"a == b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp eq i32 %0, %1
%cmp2 = icmp sgt i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main() {
int a, b ;
scanf ("%d %d", &a, &b ) ;
if (a < b) {
printf("a < b\n") ;
}
else if (a > b) {
printf("a > b\n") ;
}
else if (a == b) {
printf("a == b\n") ;
}
return 0 ;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243846/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243846/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
br i1 %cmp, label %if.end10.sink.split, label %if.else
if.else: ; preds = %entry
%cmp2 = icmp sgt i32 %0, %1
br i1 %cmp2, label %if.end10.sink.split, label %if.else5
if.else5: ; preds = %if.else
%cmp6 = icmp eq i32 %0, %1
br i1 %cmp6, label %if.end10.sink.split, label %if.end10
if.end10.sink.split: ; preds = %if.else5, %if.else, %entry
%str.4.sink = phi ptr [ @str.5, %entry ], [ @str.4, %if.else ], [ @str, %if.else5 ]
%puts12 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
br label %if.end10
if.end10: ; preds = %if.end10.sink.split, %if.else5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void)
{
int a,b;
scanf("%d %d",&a,&b);
if(a<b){
printf("a < b\n");
}
if(a>b){
printf("a > b\n");
}
if(a==b){
printf("a == b\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243897/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243897/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [6 x i8] c"a < b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [7 x i8] c"a == b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%puts = call i32 @puts(ptr nonnull dereferenceable(1) @str)
%.pre = load i32, ptr %a, align 4, !tbaa !5
%.pre12 = load i32, ptr %b, align 4, !tbaa !5
br label %if.end
if.end: ; preds = %if.then, %entry
%2 = phi i32 [ %.pre12, %if.then ], [ %1, %entry ]
%3 = phi i32 [ %.pre, %if.then ], [ %0, %entry ]
%cmp2 = icmp sgt i32 %3, %2
br i1 %cmp2, label %if.then3, label %if.end5
if.then3: ; preds = %if.end
%puts10 = call i32 @puts(ptr nonnull dereferenceable(1) @str.4)
%.pre13 = load i32, ptr %a, align 4, !tbaa !5
%.pre14 = load i32, ptr %b, align 4, !tbaa !5
br label %if.end5
if.end5: ; preds = %if.then3, %if.end
%4 = phi i32 [ %.pre14, %if.then3 ], [ %2, %if.end ]
%5 = phi i32 [ %.pre13, %if.then3 ], [ %3, %if.end ]
%cmp6 = icmp eq i32 %5, %4
br i1 %cmp6, label %if.then7, label %if.end9
if.then7: ; preds = %if.end5
%puts11 = call i32 @puts(ptr nonnull dereferenceable(1) @str.5)
br label %if.end9
if.end9: ; preds = %if.then7, %if.end5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int a,b;
scanf("%d%d", &a, &b);
if(a<b)
printf("a < b\n");
else if(a>b)
printf("a > b\n");
else
printf("a == b\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_243954/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_243954/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@str = private unnamed_addr constant [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
%cmp2 = icmp sgt i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void)
{
int a,b;
scanf("%d %d", &a,&b);
if(a < b){
printf("a < b\n");
} else if(a > b){
printf("a > b\n");
} else if(a == b){
printf("a == b\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244025/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244025/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
br i1 %cmp, label %if.end10.sink.split, label %if.else
if.else: ; preds = %entry
%cmp2 = icmp sgt i32 %0, %1
br i1 %cmp2, label %if.end10.sink.split, label %if.else5
if.else5: ; preds = %if.else
%cmp6 = icmp eq i32 %0, %1
br i1 %cmp6, label %if.end10.sink.split, label %if.end10
if.end10.sink.split: ; preds = %if.else5, %if.else, %entry
%str.4.sink = phi ptr [ @str.5, %entry ], [ @str.4, %if.else ], [ @str, %if.else5 ]
%puts12 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
br label %if.end10
if.end10: ; preds = %if.end10.sink.split, %if.else5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int a,b;
scanf("%d",&a);
scanf("%d",&b);
if(a<b)printf("a < b\n");
if(a>b)printf("a > b\n");
if(a==b)printf("a == b\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244069/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244069/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [6 x i8] c"a < b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [7 x i8] c"a == b\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)
%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
%cmp = icmp slt i32 %0, %1
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%puts = call i32 @puts(ptr nonnull dereferenceable(1) @str)
%.pre = load i32, ptr %a, align 4, !tbaa !5
%.pre13 = load i32, ptr %b, align 4, !tbaa !5
br label %if.end
if.end: ; preds = %if.then, %entry
%2 = phi i32 [ %.pre13, %if.then ], [ %1, %entry ]
%3 = phi i32 [ %.pre, %if.then ], [ %0, %entry ]
%cmp3 = icmp sgt i32 %3, %2
br i1 %cmp3, label %if.then4, label %if.end6
if.then4: ; preds = %if.end
%puts11 = call i32 @puts(ptr nonnull dereferenceable(1) @str.4)
%.pre14 = load i32, ptr %a, align 4, !tbaa !5
%.pre15 = load i32, ptr %b, align 4, !tbaa !5
br label %if.end6
if.end6: ; preds = %if.then4, %if.end
%4 = phi i32 [ %.pre15, %if.then4 ], [ %2, %if.end ]
%5 = phi i32 [ %.pre14, %if.then4 ], [ %3, %if.end ]
%cmp7 = icmp eq i32 %5, %4
br i1 %cmp7, label %if.then8, label %if.end10
if.then8: ; preds = %if.end6
%puts12 = call i32 @puts(ptr nonnull dereferenceable(1) @str.5)
br label %if.end10
if.end10: ; preds = %if.then8, %if.end6
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void)
{
int a,b;
scanf("%d %d",&a,&b);
if(a < b)
printf("a < b\n");
else if(a > b)
printf("a > b\n");
else
printf("a == b\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244111/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244111/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
%cmp2 = icmp sgt i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int a, b;
scanf("%d %d",&a ,&b);
if(a<b){
printf("a < b\n");
}
else if(a>b){
printf("a > b\n");
}
else{
printf("a == b\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244155/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244155/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
%cmp2 = icmp sgt i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void){
// Here your code !
int a=0,b=0;
scanf("%d%d",&a,&b);
if(a>b) printf("a > b\n");
else if (a<b) printf("a < b\n");
else printf("a == b\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244205/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244205/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@str = private unnamed_addr constant [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a > b\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
store i32 0, ptr %a, align 4, !tbaa !5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
store i32 0, ptr %b, align 4, !tbaa !5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp sgt i32 %0, %1
%cmp2 = icmp slt i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main()
{
int a,b,c;
scanf("%d %d",&a,&b);
c=a-b;
if(c<0)
{
printf("a < b\n");
}
else if(c==0)
{
printf("a == b\n");
}
else
{
printf("a > b\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244249/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244249/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [6 x i8] c"a > b\00", align 1
@str.4 = private unnamed_addr constant [7 x i8] c"a == b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
%cmp2 = icmp eq i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main (void){
int a;
int b;
scanf("%d",&a);
scanf("%d",&b);
if(a < b) {
printf("a < b\n");
}
else if(a > b){
printf("a > b\n");
}
else if (a == b){
printf("a == b\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244292/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244292/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\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)
%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
%cmp = icmp slt i32 %0, %1
br i1 %cmp, label %if.end11.sink.split, label %if.else
if.else: ; preds = %entry
%cmp3 = icmp sgt i32 %0, %1
br i1 %cmp3, label %if.end11.sink.split, label %if.else6
if.else6: ; preds = %if.else
%cmp7 = icmp eq i32 %0, %1
br i1 %cmp7, label %if.end11.sink.split, label %if.end11
if.end11.sink.split: ; preds = %if.else6, %if.else, %entry
%str.4.sink = phi ptr [ @str.5, %entry ], [ @str.4, %if.else ], [ @str, %if.else6 ]
%puts13 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
br label %if.end11
if.end11: ; preds = %if.end11.sink.split, %if.else6
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(){
int a,b;
scanf("%d %d",&a,&b);
if(a<b){
printf("a < b\n");
}else if(a>b){
printf("a > b\n");
}else{
printf("a == b\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244342/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244342/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
%cmp2 = icmp sgt i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void){
int a,b;
scanf("%d%d",&a,&b);
if(a < b){
printf("a < b\n");
}else if(a > b){
printf("a > b\n");
}else{
printf("a == b\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244386/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244386/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@str = private unnamed_addr constant [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp slt i32 %0, %1
%cmp2 = icmp sgt i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void)
{
int a=0,b=0;
scanf("%d %d",&a,&b);
if(a>b)
{
printf("a > b\n");
}
else if(a<b)
{
printf("a < b\n");
}
else
{
printf("a == b\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_244436/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_244436/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"a == b\00", align 1
@str.4 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1
@str.5 = private unnamed_addr constant [6 x i8] c"a > b\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
store i32 0, ptr %a, align 4, !tbaa !5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
store i32 0, ptr %b, align 4, !tbaa !5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%cmp = icmp sgt i32 %0, %1
%cmp2 = icmp slt i32 %0, %1
%str.4.str = select i1 %cmp2, ptr @str.4, ptr @str
%str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str
%puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.