Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include <stdio.h>
int main(void) {
int a, sum = 0;
scanf("%d", &a);
sum = sum + a + a * a + a * a * a;
printf("%d\n", sum);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129560/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129560/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%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
%mul = mul nsw i32 %0, %0
%add1 = add nsw i32 %mul, %0
%mul3 = mul nsw i32 %mul, %0
%add4 = add nsw i32 %add1, %mul3
%call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add4)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
#include <math.h>
int main()
{
int a,sum;
scanf("%d",&a);
sum = a + pow(a,2) + pow(a,3);
printf("%d\n",sum);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129610/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129610/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%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
%conv = sitofp i32 %0 to double
%square = fmul double %conv, %conv
%add = fadd double %square, %conv
%call4 = call double @pow(double noundef %conv, double noundef 3.000000e+00) #4
%add5 = fadd double %call4, %add
%conv6 = fptosi double %add5 to i32
%call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv6)
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 nofree nounwind willreturn memory(write)
declare double @pow(double noundef, double noundef) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
#include<math.h>
void main()
{
int a;
scanf("%d",&a);
printf("%d\n",a+(a*a)+(a*a*a));
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129654/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129654/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local void @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
%mul = mul nsw i32 %0, %0
%add = add nsw i32 %mul, %0
%mul2 = mul nsw i32 %mul, %0
%add3 = add nsw i32 %add, %mul2
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret void
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="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()
{
unsigned long long int a;
scanf("%llu",&a);
a = a + a*a + a*a*a;
printf("%llu\n",a);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129698/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129698/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%llu\00", align 1
@.str.1 = private unnamed_addr constant [6 x i8] c"%llu\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i64, align 8
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%0 = load i64, ptr %a, align 8, !tbaa !5
%mul = mul i64 %0, %0
%add = add i64 %mul, %0
%mul2 = mul i64 %mul, %0
%add3 = add i64 %add, %mul2
store i64 %add3, ptr %a, align 8, !tbaa !5
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %add3)
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main()
{
int a;
scanf("%d",&a);
printf("%d",a+(a*a)+(a*a*a));
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129740/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129740/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%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
%mul = mul nsw i32 %0, %0
%add = add nsw i32 %mul, %0
%mul2 = mul nsw i32 %mul, %0
%add3 = add nsw i32 %add, %mul2
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main()
{
int a;
scanf("%d",&a);
printf("%d",a+a*a+a*a*a);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129784/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129784/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%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
%mul = mul nsw i32 %0, %0
%add = add nsw i32 %mul, %0
%mul2 = mul nsw i32 %mul, %0
%add3 = add nsw i32 %add, %mul2
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int a;
scanf("%d",&a);
printf("%d",a+a*a+a*a*a);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129827/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129827/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%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
%mul = mul nsw i32 %0, %0
%add = add nsw i32 %mul, %0
%mul2 = mul nsw i32 %mul, %0
%add3 = add nsw i32 %add, %mul2
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main()
{
int a;
int sum;
int be;
scanf("%d", &a);
be = a;
sum = be;
for (int i = 0; i < 2; i++)
{
be=be *a;
sum += be;
}
printf("%d\n",sum);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129870/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129870/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%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
%mul = mul nsw i32 %0, %0
%add = add nsw i32 %mul, %0
%mul.1 = mul nsw i32 %mul, %0
%add.1 = add nsw i32 %mul.1, %add
%call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add.1)
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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~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;
scanf("%d", &a);
printf("%d", a*a*a + a*a + a);
return (0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129913/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129913/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%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
%1 = add i32 %0, 1
%mul15 = mul i32 %1, %0
%add6 = add i32 %mul15, 1
%add3 = mul i32 %add6, %0
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add3)
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"}
|
/**
* AOJ #1109: Fermat's Last Theorem (ICPC Domestic 2000)
*/
#include <stdio.h>
#define CUBE(x) ((x)*(x)*(x))
/**
* Compute z^3 - max{ x^3+y^3 | x>0, y>0, x^3+y^3 <= z^3 }.
*/
int fermat(int z)
{
int x, y, max = 0;
for (x = 1; x < z; x++) {
for (y = x; CUBE(x) + CUBE(y) <= CUBE(z); y++) {
if (max < CUBE(x) + CUBE(y)) {
max = CUBE(x) + CUBE(y);
}
}
}
return CUBE(z) - max;
}
int main()
{
int z;
for (;;) {
scanf("%d", &z);
if (z == 0) break;
printf("%d\n", fermat(z));
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129964/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129964/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree nosync nounwind memory(none) uwtable
define dso_local i32 @fermat(i32 noundef %z) local_unnamed_addr #0 {
entry:
%cmp59 = icmp sgt i32 %z, 1
%mul5 = mul nsw i32 %z, %z
%mul6 = mul nsw i32 %mul5, %z
br i1 %cmp59, label %for.cond1.preheader, label %for.end22
for.cond1.preheader: ; preds = %entry, %for.inc20
%max.061 = phi i32 [ %max.1.lcssa, %for.inc20 ], [ 0, %entry ]
%x.060 = phi i32 [ %inc21, %for.inc20 ], [ 1, %entry ]
%mul = mul nsw i32 %x.060, %x.060
%mul2 = mul nsw i32 %mul, %x.060
%mul64 = shl nuw i32 %x.060, 1
%mul45363 = mul i32 %x.060, %mul64
%add54 = mul i32 %mul45363, %x.060
%cmp7.not55 = icmp sgt i32 %add54, %mul6
br i1 %cmp7.not55, label %for.inc20, label %for.body8
for.body8: ; preds = %for.cond1.preheader, %for.body8
%add58 = phi i32 [ %add, %for.body8 ], [ %add54, %for.cond1.preheader ]
%max.157 = phi i32 [ %spec.select, %for.body8 ], [ %max.061, %for.cond1.preheader ]
%y.056 = phi i32 [ %inc, %for.body8 ], [ %x.060, %for.cond1.preheader ]
%spec.select = tail call i32 @llvm.smax.i32(i32 %max.157, i32 %add58)
%inc = add nuw nsw i32 %y.056, 1
%mul3 = mul nsw i32 %inc, %inc
%mul4 = mul nsw i32 %mul3, %inc
%add = add nuw nsw i32 %mul4, %mul2
%cmp7.not = icmp sgt i32 %add, %mul6
br i1 %cmp7.not, label %for.inc20, label %for.body8, !llvm.loop !5
for.inc20: ; preds = %for.body8, %for.cond1.preheader
%max.1.lcssa = phi i32 [ %max.061, %for.cond1.preheader ], [ %spec.select, %for.body8 ]
%inc21 = add nuw nsw i32 %x.060, 1
%exitcond.not = icmp eq i32 %inc21, %z
br i1 %exitcond.not, label %for.end22, label %for.cond1.preheader, !llvm.loop !7
for.end22: ; preds = %for.inc20, %entry
%max.0.lcssa = phi i32 [ 0, %entry ], [ %max.1.lcssa, %for.inc20 ]
%sub = sub nsw i32 %mul6, %max.0.lcssa
ret i32 %sub
}
; 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:
%z = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %z) #5
%call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %z)
%0 = load i32, ptr %z, align 4, !tbaa !8
%cmp4 = icmp eq i32 %0, 0
br i1 %cmp4, label %for.end, label %if.end
if.end: ; preds = %entry, %fermat.exit
%1 = phi i32 [ %2, %fermat.exit ], [ %0, %entry ]
%cmp59.i = icmp sgt i32 %1, 1
%mul5.i = mul nsw i32 %1, %1
%mul6.i = mul nsw i32 %mul5.i, %1
br i1 %cmp59.i, label %for.cond1.preheader.i, label %fermat.exit
for.cond1.preheader.i: ; preds = %if.end, %for.inc20.i
%max.061.i = phi i32 [ %max.1.lcssa.i, %for.inc20.i ], [ 0, %if.end ]
%x.060.i = phi i32 [ %inc21.i, %for.inc20.i ], [ 1, %if.end ]
%mul.i = mul i32 %x.060.i, %x.060.i
%mul2.i = mul nsw i32 %mul.i, %x.060.i
%mul45363.i = shl i32 %mul.i, 1
%add54.i = mul i32 %mul45363.i, %x.060.i
%cmp7.not55.i = icmp sgt i32 %add54.i, %mul6.i
br i1 %cmp7.not55.i, label %for.inc20.i, label %for.body8.i
for.body8.i: ; preds = %for.cond1.preheader.i, %for.body8.i
%add58.i = phi i32 [ %add.i, %for.body8.i ], [ %add54.i, %for.cond1.preheader.i ]
%max.157.i = phi i32 [ %spec.select.i, %for.body8.i ], [ %max.061.i, %for.cond1.preheader.i ]
%y.056.i = phi i32 [ %inc.i, %for.body8.i ], [ %x.060.i, %for.cond1.preheader.i ]
%spec.select.i = call i32 @llvm.smax.i32(i32 %max.157.i, i32 %add58.i)
%inc.i = add nuw nsw i32 %y.056.i, 1
%mul3.i = mul nsw i32 %inc.i, %inc.i
%mul4.i = mul nsw i32 %mul3.i, %inc.i
%add.i = add nuw nsw i32 %mul4.i, %mul2.i
%cmp7.not.i = icmp sgt i32 %add.i, %mul6.i
br i1 %cmp7.not.i, label %for.inc20.i, label %for.body8.i, !llvm.loop !5
for.inc20.i: ; preds = %for.body8.i, %for.cond1.preheader.i
%max.1.lcssa.i = phi i32 [ %max.061.i, %for.cond1.preheader.i ], [ %spec.select.i, %for.body8.i ]
%inc21.i = add nuw nsw i32 %x.060.i, 1
%exitcond.not.i = icmp eq i32 %inc21.i, %1
br i1 %exitcond.not.i, label %fermat.exit, label %for.cond1.preheader.i, !llvm.loop !7
fermat.exit: ; preds = %for.inc20.i, %if.end
%max.0.lcssa.i = phi i32 [ 0, %if.end ], [ %max.1.lcssa.i, %for.inc20.i ]
%sub.i = sub nsw i32 %mul6.i, %max.0.lcssa.i
%call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub.i)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %z)
%2 = load i32, ptr %z, align 4, !tbaa !8
%cmp = icmp eq i32 %2, 0
br i1 %cmp, label %for.end, label %if.end
for.end: ; preds = %fermat.exit, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %z) #5
ret i32 0
}
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #4
attributes #0 = { nofree nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int n,i,j,cnt=0;
scanf("%d",&n);
for(i=0;i<=n/7;i++){
for(j=0;j<=n/4;j++){if(n==7*i+4*j){cnt=1;}}
}
printf(cnt?"Yes":"No");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130005/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130005/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
@.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%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, 7
%cmp3.not15 = icmp slt i32 %0, -3
br i1 %cmp3.not15, label %for.end9, label %for.cond1.preheader.preheader
for.cond1.preheader.preheader: ; preds = %entry
%div2 = sdiv i32 %0, 4
%1 = add nsw i32 %div2, 1
%min.iters.check = icmp ult i32 %1, 8
%n.vec = and i32 %1, -8
%broadcast.splatinsert26 = insertelement <4 x i32> poison, i32 %0, i64 0
%broadcast.splat27 = shufflevector <4 x i32> %broadcast.splatinsert26, <4 x i32> poison, <4 x i32> zeroinitializer
%cmp.n = icmp eq i32 %1, %n.vec
br label %for.cond1.preheader
for.cond1.preheader: ; preds = %for.cond1.preheader.preheader, %for.cond1.for.inc7_crit_edge
%2 = phi <2 x i32> [ %16, %for.cond1.for.inc7_crit_edge ], [ zeroinitializer, %for.cond1.preheader.preheader ]
%3 = extractelement <2 x i32> %2, i64 0
%mul = mul nuw nsw i32 %3, 7
%4 = extractelement <2 x i32> %2, i64 1
br i1 %min.iters.check, label %for.body4.preheader, label %vector.ph
vector.ph: ; preds = %for.cond1.preheader
%minmax.ident.splat = shufflevector <2 x i32> %2, <2 x i32> poison, <4 x i32> <i32 1, i32 1, i32 1, i32 1>
%broadcast.splatinsert = insertelement <4 x i32> poison, i32 %mul, i64 0
%broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vec.phi = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %11, %vector.body ]
%vec.phi24 = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %12, %vector.body ]
%vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
%5 = shl nsw <4 x i32> %vec.ind, <i32 2, i32 2, i32 2, i32 2>
%step.add = shl <4 x i32> %vec.ind, <i32 2, i32 2, i32 2, i32 2>
%6 = add <4 x i32> %step.add, <i32 16, i32 16, i32 16, i32 16>
%7 = add nuw nsw <4 x i32> %5, %broadcast.splat
%8 = add nuw nsw <4 x i32> %6, %broadcast.splat
%9 = icmp eq <4 x i32> %broadcast.splat27, %7
%10 = icmp eq <4 x i32> %broadcast.splat27, %8
%11 = select <4 x i1> %9, <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> %vec.phi
%12 = select <4 x i1> %10, <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> %vec.phi24
%index.next = add nuw i32 %index, 8
%vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
%13 = icmp eq i32 %index.next, %n.vec
br i1 %13, label %middle.block, label %vector.body, !llvm.loop !9
middle.block: ; preds = %vector.body
%rdx.select.cmp.not = icmp ne <4 x i32> %11, %minmax.ident.splat
%rdx.select.cmp3032 = icmp ne <4 x i32> %12, %minmax.ident.splat
%rdx.select.cmp30 = select <4 x i1> %rdx.select.cmp.not, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i1> %rdx.select.cmp3032
%14 = bitcast <4 x i1> %rdx.select.cmp30 to i4
%.not = icmp eq i4 %14, 0
%rdx.select31 = select i1 %.not, i32 %4, i32 1
br i1 %cmp.n, label %for.cond1.for.inc7_crit_edge, label %for.body4.preheader
for.body4.preheader: ; preds = %for.cond1.preheader, %middle.block
%cnt.117.ph = phi i32 [ %4, %for.cond1.preheader ], [ %rdx.select31, %middle.block ]
%j.016.ph = phi i32 [ 0, %for.cond1.preheader ], [ %n.vec, %middle.block ]
br label %for.body4
for.body4: ; preds = %for.body4.preheader, %for.body4
%cnt.117 = phi i32 [ %spec.select, %for.body4 ], [ %cnt.117.ph, %for.body4.preheader ]
%j.016 = phi i32 [ %inc, %for.body4 ], [ %j.016.ph, %for.body4.preheader ]
%mul5 = shl nsw i32 %j.016, 2
%add = add nuw nsw i32 %mul5, %mul
%cmp6 = icmp eq i32 %0, %add
%spec.select = select i1 %cmp6, i32 1, i32 %cnt.117
%inc = add nuw nsw i32 %j.016, 1
%exitcond.not = icmp eq i32 %j.016, %div2
br i1 %exitcond.not, label %for.cond1.for.inc7_crit_edge, label %for.body4, !llvm.loop !13
for.cond1.for.inc7_crit_edge: ; preds = %for.body4, %middle.block
%spec.select.lcssa = phi i32 [ %rdx.select31, %middle.block ], [ %spec.select, %for.body4 ]
%inc8 = add nuw nsw i32 %3, 1
%exitcond23.not = icmp eq i32 %3, %div
%15 = insertelement <2 x i32> poison, i32 %inc8, i64 0
%16 = insertelement <2 x i32> %15, i32 %spec.select.lcssa, i64 1
br i1 %exitcond23.not, label %for.end9.loopexit22, label %for.cond1.preheader, !llvm.loop !14
for.end9.loopexit22: ; preds = %for.cond1.for.inc7_crit_edge
%17 = icmp eq i32 %spec.select.lcssa, 0
%18 = select i1 %17, ptr @.str.2, ptr @.str.1
br label %for.end9
for.end9: ; preds = %for.end9.loopexit22, %entry
%cnt.0.lcssa = phi ptr [ @.str.2, %entry ], [ %18, %for.end9.loopexit22 ]
%call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %cnt.0.lcssa)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !12, !11}
!14 = distinct !{!14, !10}
|
/*2019/07/29 */
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#define MOD 1000000007
typedef long long int ll;
void llswap(ll *x,ll *y){ll temp;temp=*x;*x=*y;*y=temp;}
void swap(int *x,int *y){int tmp;tmp=*x;*x=*y;*y=tmp;}
int rmax(int x,int y){return x>y?x:y;}
int rmin(int x,int y){return x>y?y:x;}
ll llrmax(ll x,ll y){return x>y?x:y;}
ll llrmin(ll x,ll y){return x>y?y:x;}
int asc(const void *a,const void *b){return *(int*)a-*(int*)b;}
int desc(const void *a,const void *b){return *(int*)b-*(int*)a;}
/*
int asc_t(const void *a,const void *b){return ((user_t*)a)->score - ((user_t*)b)->score;}
int desc_t(const void *a,const void *b){return ((user_t*)b)->score - ((user_t*)a)->score;}
*/
int main(){
int n;
scanf("%d",&n);
for(int i=0;i<=100;i+=4){
for(int j=0;j<=100;j+=7){
if(i+j==n){
printf("Yes\n");
return 0;
}
}
}
printf("No\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130049/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130049/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@str = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
@str.3 = private unnamed_addr constant [3 x i8] c"No\00", align 1
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @llswap(ptr nocapture noundef %x, ptr nocapture noundef %y) local_unnamed_addr #0 {
entry:
%0 = load i64, ptr %x, align 8, !tbaa !5
%1 = load i64, ptr %y, align 8, !tbaa !5
store i64 %1, ptr %x, align 8, !tbaa !5
store i64 %0, ptr %y, align 8, !tbaa !5
ret void
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @swap(ptr nocapture noundef %x, ptr nocapture noundef %y) local_unnamed_addr #0 {
entry:
%0 = load i32, ptr %x, align 4, !tbaa !9
%1 = load i32, ptr %y, align 4, !tbaa !9
store i32 %1, ptr %x, align 4, !tbaa !9
store i32 %0, ptr %y, align 4, !tbaa !9
ret void
}
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
define dso_local i32 @rmax(i32 noundef %x, i32 noundef %y) local_unnamed_addr #2 {
entry:
%cond = tail call i32 @llvm.smax.i32(i32 %x, i32 %y)
ret i32 %cond
}
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
define dso_local i32 @rmin(i32 noundef %x, i32 noundef %y) local_unnamed_addr #2 {
entry:
%cond = tail call i32 @llvm.smin.i32(i32 %x, i32 %y)
ret i32 %cond
}
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
define dso_local i64 @llrmax(i64 noundef %x, i64 noundef %y) local_unnamed_addr #2 {
entry:
%cond = tail call i64 @llvm.smax.i64(i64 %x, i64 %y)
ret i64 %cond
}
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
define dso_local i64 @llrmin(i64 noundef %x, i64 noundef %y) local_unnamed_addr #2 {
entry:
%cond = tail call i64 @llvm.smin.i64(i64 %x, i64 %y)
ret i64 %cond
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @asc(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #3 {
entry:
%0 = load i32, ptr %a, align 4, !tbaa !9
%1 = load i32, ptr %b, align 4, !tbaa !9
%sub = sub nsw i32 %0, %1
ret i32 %sub
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @desc(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #3 {
entry:
%0 = load i32, ptr %b, align 4, !tbaa !9
%1 = load i32, ptr %a, align 4, !tbaa !9
%sub = sub nsw i32 %0, %1
ret i32 %sub
}
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #4 {
for.body4:
%n = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #8
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !9
%1 = mul i32 %0, -1227133513
%2 = icmp ult i32 %1, 15
%indvars.iv.next = add i32 %1, 613566756
%3 = icmp ult i32 %indvars.iv.next, 15
%4 = insertelement <16 x i32> poison, i32 %1, i64 0
%5 = shufflevector <16 x i32> %4, <16 x i32> poison, <16 x i32> zeroinitializer
%.fr75 = freeze <16 x i32> %5
%6 = add <16 x i32> %.fr75, <i32 1227133512, i32 1840700268, i32 -1840700272, i32 -1227133516, i32 -613566760, i32 -4, i32 613566752, i32 1227133508, i32 1840700264, i32 -1840700276, i32 -1227133520, i32 -613566764, i32 -8, i32 613566748, i32 1227133504, i32 1840700260>
%7 = icmp ult <16 x i32> %6, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
%8 = insertelement <8 x i32> poison, i32 %1, i64 0
%9 = shufflevector <8 x i32> %8, <8 x i32> poison, <8 x i32> zeroinitializer
%.fr76 = freeze <8 x i32> %9
%10 = add <8 x i32> %.fr76, <i32 -1840700280, i32 -1227133524, i32 -613566768, i32 -12, i32 613566744, i32 1227133500, i32 1840700256, i32 -1840700284>
%11 = icmp ult <8 x i32> %10, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
%12 = bitcast <16 x i1> %7 to i16
%13 = icmp ne i16 %12, 0
%14 = bitcast <8 x i1> %11 to i8
%15 = icmp ne i8 %14, 0
%op.rdx = or i1 %13, %15
%op.rdx73 = select i1 %op.rdx, i1 true, i1 %3
%op.rdx74 = select i1 %op.rdx73, i1 true, i1 %2
%str.str.3 = select i1 %op.rdx74, ptr @str, ptr @str.3
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.str.3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #8
ret i32 0
}
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #6
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #6
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #6
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #6
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #7
attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 = { nofree nounwind }
attributes #8 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
|
#include <stdio.h>
#include <math.h>
#include <stdbool.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
int main(void){
int n,i,j;
scanf("%d",&n);
for(i=0;i<=25;i++){
for(j=0;j<=15;j++){
if(i*4+j*7==n) {printf("Yes");return 0;}
}
}
printf("No");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130092/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130092/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
@.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
for.body3:
%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
%.fr101 = freeze i32 %0
%1 = mul i32 %.fr101, -1227133513
%2 = icmp ult i32 %1, 16
%indvars.iv.next = add i32 %1, 613566756
%3 = icmp ult i32 %indvars.iv.next, 16
%4 = insertelement <4 x i32> poison, i32 %1, i64 0
%5 = and <4 x i32> %4, <i32 -16, i32 poison, i32 poison, i32 poison>
%6 = shufflevector <4 x i32> %5, <4 x i32> poison, <4 x i32> zeroinitializer
%.fr = freeze <4 x i32> %6
%7 = icmp eq <4 x i32> %.fr, <i32 1840700272, i32 -613566752, i32 1227133520, i32 -1227133504>
%8 = and i32 %1, -16
%9 = icmp eq i32 %8, 613566768
%10 = insertelement <16 x i32> poison, i32 %1, i64 0
%11 = shufflevector <16 x i32> %10, <16 x i32> poison, <16 x i32> zeroinitializer
%.fr99 = freeze <16 x i32> %11
%12 = add <16 x i32> %.fr99, <i32 1227133512, i32 1840700268, i32 -1227133516, i32 -613566760, i32 -4, i32 1227133508, i32 1840700264, i32 -1840700276, i32 -613566764, i32 -8, i32 613566748, i32 1840700260, i32 -1840700280, i32 -1227133524, i32 -12, i32 613566744>
%13 = icmp ult <16 x i32> %12, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
%indvars.iv.next.22 = add i32 %1, 1227133500
%14 = icmp ult i32 %indvars.iv.next.22, 16
%15 = and i32 %1, -16
%16 = icmp eq i32 %15, -1840700256
%indvars.iv.next.24 = add i32 %1, -1840700284
%17 = icmp ult i32 %indvars.iv.next.24, 16
%18 = bitcast <16 x i1> %13 to i16
%19 = icmp ne i16 %18, 0
%20 = bitcast <4 x i1> %7 to i4
%21 = icmp ne i4 %20, 0
%op.rdx = or i1 %19, %21
%op.rdx93 = or i1 %op.rdx, %3
%op.rdx94 = or i1 %2, %14
%op.rdx95 = or i1 %17, %9
%op.rdx96 = or i1 %op.rdx93, %op.rdx94
%op.rdx97 = or i1 %op.rdx95, %16
%op.rdx98 = or i1 %op.rdx96, %op.rdx97
%.str.1..str.2 = select i1 %op.rdx98, ptr @.str.1, ptr @.str.2
%call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1..str.2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void)
{
int n, cake = 4, donut = 7, flag = 0;
scanf("%d", &n);
for (int i = 0; i <= 100 ;i++) {
for (int j = 0; j <= 100 ; j++) {
if (n == cake * i + donut * j) {
flag++;
break;
}
else if(n < cake * i + donut * j){
break;
}
}
if (n == cake * i) {
flag++;
break;
}
if (n == donut * i) {
flag++;
break;
}
}
if (flag != 0) {
printf("Yes\n");
}
else {
printf("No\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130135/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130135/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@str = private unnamed_addr constant [3 x i8] c"No\00", align 1
@str.3 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%1 = mul i32 %0, -1227133513
br label %for.cond1.preheader
for.cond: ; preds = %if.end18
%inc25 = add nuw nsw i32 %i.060, 1
%indvars.iv.next = add i32 %indvars.iv, 613566756
%exitcond64.not = icmp eq i32 %inc25, 101
br i1 %exitcond64.not, label %cleanup26, label %for.cond1.preheader, !llvm.loop !9
for.cond1.preheader: ; preds = %entry, %for.cond
%indvars.iv = phi i32 [ %1, %entry ], [ %indvars.iv.next, %for.cond ]
%i.060 = phi i32 [ 0, %entry ], [ %inc25, %for.cond ]
%flag.059 = phi i32 [ 0, %entry ], [ %flag.1, %for.cond ]
%mul = shl nuw nsw i32 %i.060, 2
br label %for.body4
for.body4: ; preds = %if.else, %for.cond1.preheader
%j.058 = phi i32 [ 0, %for.cond1.preheader ], [ %inc13, %if.else ]
%exitcond = icmp eq i32 %j.058, %indvars.iv
br i1 %exitcond, label %if.then, label %if.else
if.then: ; preds = %for.body4
%inc = add nsw i32 %flag.059, 1
br label %cleanup
if.else: ; preds = %for.body4
%mul5 = mul nuw nsw i32 %j.058, 7
%add = add nuw nsw i32 %mul5, %mul
%cmp10 = icmp sge i32 %0, %add
%inc13 = add nuw nsw i32 %j.058, 1
%cmp2 = icmp ult i32 %j.058, 100
%or.cond = and i1 %cmp10, %cmp2
br i1 %or.cond, label %for.body4, label %cleanup, !llvm.loop !11
cleanup: ; preds = %if.else, %if.then
%flag.1 = phi i32 [ %inc, %if.then ], [ %flag.059, %if.else ]
%cmp15 = icmp eq i32 %0, %mul
br i1 %cmp15, label %if.then16, label %if.end18
if.then16: ; preds = %cleanup
%inc17 = add nsw i32 %flag.1, 1
br label %cleanup26
if.end18: ; preds = %cleanup
%exitcond63 = icmp eq i32 %i.060, %1
br i1 %exitcond63, label %if.then21, label %for.cond
if.then21: ; preds = %if.end18
%inc22 = add nsw i32 %flag.1, 1
br label %cleanup26
cleanup26: ; preds = %for.cond, %if.then21, %if.then16
%flag.2 = phi i32 [ %inc17, %if.then16 ], [ %inc22, %if.then21 ], [ %flag.1, %for.cond ]
%cmp28.not = icmp eq i32 %flag.2, 0
%str.str.3 = select i1 %cmp28.not, ptr @str, ptr @str.3
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.str.3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include<stdio.h>
int main(void){
int N,i,j;
scanf("%d",&N);
//int cmax=N/4;
//int dmax=N/7;
for(i=0;i<=(N/4);i++){
for(j=0;j<=(N/7);j++){
if(N==(i*4+j*7)){
printf("Yes");
return 0;
}
}
}
printf("No");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130186/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130186/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
@.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%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, 4
%cmp.not20 = icmp slt i32 %0, -3
br i1 %cmp.not20, label %cleanup, label %for.cond1.preheader.preheader
for.cond1.preheader.preheader: ; preds = %entry
%div2 = sdiv i32 %0, 7
%1 = mul i32 %0, -1227133513
br label %for.body4
for.body4: ; preds = %for.cond1.for.inc8_crit_edge, %for.cond1.preheader.preheader
%indvars.iv = phi i32 [ %1, %for.cond1.preheader.preheader ], [ %indvars.iv.next, %for.cond1.for.inc8_crit_edge ]
%i.021 = phi i32 [ 0, %for.cond1.preheader.preheader ], [ %inc9, %for.cond1.for.inc8_crit_edge ]
%.not = icmp ugt i32 %indvars.iv, %div2
br i1 %.not, label %for.cond1.for.inc8_crit_edge, label %cleanup
for.cond1.for.inc8_crit_edge: ; preds = %for.body4
%inc9 = add nuw nsw i32 %i.021, 1
%indvars.iv.next = add i32 %indvars.iv, 613566756
%exitcond.not = icmp eq i32 %i.021, %div
br i1 %exitcond.not, label %cleanup, label %for.body4, !llvm.loop !9
cleanup: ; preds = %for.cond1.for.inc8_crit_edge, %for.body4, %entry
%.str.2.sink = phi ptr [ @.str.2, %entry ], [ @.str.1, %for.body4 ], [ @.str.2, %for.cond1.for.inc8_crit_edge ]
%call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
|
#include<stdio.h>
int main(){
int n,i,j;
scanf("%d",&n);
for(i=0;i<=25;i++){
for(j=0;j<14;j++){
if(n==i*4+j*7){
puts("Yes");
return 0;
}
}
}
puts("No");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130229/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130229/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
@.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
for.body3:
%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
%1 = mul i32 %0, -1227133513
%2 = icmp ult i32 %1, 14
%indvars.iv.next = add i32 %1, 613566756
%3 = icmp ult i32 %indvars.iv.next, 14
%4 = insertelement <16 x i32> poison, i32 %1, i64 0
%5 = shufflevector <16 x i32> %4, <16 x i32> poison, <16 x i32> zeroinitializer
%.fr95 = freeze <16 x i32> %5
%6 = add <16 x i32> %.fr95, <i32 1227133512, i32 1840700268, i32 -1840700272, i32 -1227133516, i32 -613566760, i32 -4, i32 613566752, i32 1227133508, i32 1840700264, i32 -1840700276, i32 -1227133520, i32 -613566764, i32 -8, i32 613566748, i32 1227133504, i32 1840700260>
%7 = icmp ult <16 x i32> %6, <i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14>
%8 = insertelement <8 x i32> poison, i32 %1, i64 0
%9 = shufflevector <8 x i32> %8, <8 x i32> poison, <8 x i32> zeroinitializer
%.fr96 = freeze <8 x i32> %9
%10 = add <8 x i32> %.fr96, <i32 -1840700280, i32 -1227133524, i32 -613566768, i32 -12, i32 613566744, i32 1227133500, i32 1840700256, i32 -1840700284>
%11 = icmp ult <8 x i32> %10, <i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14>
%12 = bitcast <16 x i1> %7 to i16
%13 = icmp ne i16 %12, 0
%14 = bitcast <8 x i1> %11 to i8
%15 = icmp ne i8 %14, 0
%op.rdx = or i1 %13, %15
%op.rdx93 = select i1 %op.rdx, i1 true, i1 %3
%op.rdx94 = select i1 %op.rdx93, i1 true, i1 %2
%.str.1..str.2 = select i1 %op.rdx94, ptr @.str.1, ptr @.str.2
%call10 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.1..str.2)
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 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
// AOJ 2292 Common Palindromes
// 2019.8.16 bal4u
#include <stdio.h>
#include <string.h>
typedef long long ll;
#if 1
#define gc() getchar_unlocked()
#else
#define gc() getchar()
#endif
int ins(char *s) // 文字列の入力 スペース以下の文字で入力終了
{
char *p = s;
do *s = gc();
while (*s++ > ' ');
*--s = 0;
return s - p;
}
#define MAX 100010
//// 回文木の構築
typedef struct { int par, son[30], suffix_link, len, cnt; } NODE;
NODE node[MAX]; int sz = 2;
int last;
char S[MAX]; int W; // 文字列
void init_palindromic_tree() { // 回文木の初期化
int i;
for (i = 0; i < MAX; i++) {
node[i].par = -1;
memset(node[i].son, -1, sizeof(node[i].son));
}
node[0].suffix_link = -1, node[0].len = -1;
node[1].par = 0;
}
void add_palindromic_tree(int idx) { // 文字を回文木に追加。文字位置 S[idx]
char c = S[idx]; int a = S[idx] - '>';
int t = last;
while (1) {
if (idx-1-node[t].len >= 0 && S[idx-1-node[t].len] == c) break;
t = node[t].suffix_link;
}
if (node[t].son[a] > 0) {
last = node[t].son[a], node[last].cnt++;
return;
}
last = sz++;
node[t].son[a] = last;
node[last].len = node[t].len + 2, node[last].par = t, node[last].cnt = 1;
if (node[last].len == 1) node[last].suffix_link = 1;
else while (1) {
t = node[t].suffix_link;
if (idx-1-node[t].len >= 0 && S[idx-1-node[t].len] == c) {
node[last].suffix_link = node[t].son[a];
break;
}
}
}
char *ss; int ws;
char *tt; int wt;
int f[2][MAX];
int main()
{
int i, t; ll ans;
ws = ins(ss = S);
S[ws] = '>', S[ws+1] = '@';
wt = ins(tt = ss + ws + 2);
W = ws + wt + 2;
init_palindromic_tree();
for (i = 0; i < ws; i++) {
add_palindromic_tree(i);
f[0][last]++;
}
add_palindromic_tree(i++), add_palindromic_tree(i++);
for ( ; i < W; i++) {
add_palindromic_tree(i);
f[1][last]++;
}
ans = 0;
for (i = sz-1; i > 1; i--) {
ans += (ll)f[0][i] * f[1][i];
f[0][node[i].suffix_link] += f[0][i];
f[1][node[i].suffix_link] += f[1][i];
}
printf("%lld\n",ans);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130272/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130272/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.NODE = type { i32, [30 x i32], i32, i32, i32 }
%struct._IO_FILE = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i16, i8, [1 x i8], ptr, i64, ptr, ptr, ptr, ptr, i64, i32, [20 x i8] }
@sz = dso_local local_unnamed_addr global i32 2, align 4
@node = dso_local local_unnamed_addr global [100010 x %struct.NODE] zeroinitializer, align 16
@S = dso_local global [100010 x i8] zeroinitializer, align 16
@last = dso_local local_unnamed_addr global i32 0, align 4
@ss = dso_local local_unnamed_addr global ptr null, align 8
@ws = dso_local local_unnamed_addr global i32 0, align 4
@tt = dso_local local_unnamed_addr global ptr null, align 8
@wt = dso_local local_unnamed_addr global i32 0, align 4
@W = dso_local local_unnamed_addr global i32 0, align 4
@f = dso_local local_unnamed_addr global [2 x [100010 x i32]] zeroinitializer, align 16
@.str = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1
@stdin = external local_unnamed_addr global ptr, align 8
; Function Attrs: nounwind uwtable
define dso_local i32 @ins(ptr noundef %s) local_unnamed_addr #0 {
entry:
br label %do.body
do.body: ; preds = %getchar_unlocked.exit, %entry
%s.addr.0 = phi ptr [ %s, %entry ], [ %incdec.ptr, %getchar_unlocked.exit ]
%0 = load ptr, ptr @stdin, align 8, !tbaa !5
%_IO_read_ptr.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 1
%1 = load ptr, ptr %_IO_read_ptr.i, align 8, !tbaa !9
%_IO_read_end.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 2
%2 = load ptr, ptr %_IO_read_end.i, align 8, !tbaa !14
%cmp.not.i = icmp ult ptr %1, %2
br i1 %cmp.not.i, label %cond.false.i, label %cond.true.i, !prof !15
cond.true.i: ; preds = %do.body
%call.i = tail call i32 @__uflow(ptr noundef nonnull %0) #6
br label %getchar_unlocked.exit
cond.false.i: ; preds = %do.body
%incdec.ptr.i = getelementptr inbounds i8, ptr %1, i64 1
store ptr %incdec.ptr.i, ptr %_IO_read_ptr.i, align 8, !tbaa !9
%3 = load i8, ptr %1, align 1, !tbaa !16
%conv3.i = zext i8 %3 to i32
br label %getchar_unlocked.exit
getchar_unlocked.exit: ; preds = %cond.true.i, %cond.false.i
%cond.i = phi i32 [ %call.i, %cond.true.i ], [ %conv3.i, %cond.false.i ]
%conv = trunc i32 %cond.i to i8
store i8 %conv, ptr %s.addr.0, align 1, !tbaa !16
%incdec.ptr = getelementptr inbounds i8, ptr %s.addr.0, i64 1
%cmp = icmp sgt i8 %conv, 32
br i1 %cmp, label %do.body, label %do.end, !llvm.loop !17
do.end: ; preds = %getchar_unlocked.exit
store i8 0, ptr %s.addr.0, align 1, !tbaa !16
%sub.ptr.lhs.cast = ptrtoint ptr %s.addr.0 to i64
%sub.ptr.rhs.cast = ptrtoint ptr %s to i64
%sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
%conv4 = trunc i64 %sub.ptr.sub to i32
ret i32 %conv4
}
; Function Attrs: nofree nosync nounwind memory(write, argmem: none, inaccessiblemem: none) uwtable
define dso_local void @init_palindromic_tree() local_unnamed_addr #1 {
entry:
br label %for.body
for.body: ; preds = %for.body, %entry
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next.4, %for.body ]
%arrayidx = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %indvars.iv
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(124) %arrayidx, i8 -1, i64 124, i1 false)
%arrayidx.1 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %indvars.iv.next
%indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(124) %arrayidx.1, i8 -1, i64 124, i1 false)
%arrayidx.2 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %indvars.iv.next.1
%indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(124) %arrayidx.2, i8 -1, i64 124, i1 false)
%arrayidx.3 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %indvars.iv.next.2
%indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(124) %arrayidx.3, i8 -1, i64 124, i1 false)
%arrayidx.4 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %indvars.iv.next.3
%indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 5
%exitcond.not.4 = icmp eq i64 %indvars.iv.next.4, 100010
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(124) %arrayidx.4, i8 -1, i64 124, i1 false)
br i1 %exitcond.not.4, label %for.end, label %for.body, !llvm.loop !19
for.end: ; preds = %for.body
store i32 -1, ptr getelementptr inbounds ([100010 x %struct.NODE], ptr @node, i64 0, i64 0, i32 2), align 4, !tbaa !20
store i32 -1, ptr getelementptr inbounds ([100010 x %struct.NODE], ptr @node, i64 0, i64 0, i32 3), align 16, !tbaa !22
store i32 0, ptr getelementptr inbounds ([100010 x %struct.NODE], ptr @node, i64 0, i64 1), align 8, !tbaa !23
ret void
}
; 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 norecurse nosync nounwind memory(readwrite, argmem: read, inaccessiblemem: none) uwtable
define dso_local void @add_palindromic_tree(i32 noundef %idx) local_unnamed_addr #3 {
entry:
%idxprom = sext i32 %idx to i64
%arrayidx = getelementptr inbounds [100010 x i8], ptr @S, i64 0, i64 %idxprom
%0 = load i8, ptr %arrayidx, align 1, !tbaa !16
%conv = sext i8 %0 to i64
%sub3 = add nsw i32 %idx, -1
br label %while.cond
while.cond: ; preds = %if.end, %entry
%t.0.in = phi ptr [ @last, %entry ], [ %suffix_link, %if.end ]
%t.0 = load i32, ptr %t.0.in, align 4, !tbaa !24
%idxprom4 = sext i32 %t.0 to i64
%len = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom4, i32 3
%1 = load i32, ptr %len, align 8, !tbaa !22
%sub6 = sub nsw i32 %sub3, %1
%cmp = icmp sgt i32 %sub6, -1
br i1 %cmp, label %land.lhs.true, label %if.end
land.lhs.true: ; preds = %while.cond
%idxprom13 = zext i32 %sub6 to i64
%arrayidx14 = getelementptr inbounds [100010 x i8], ptr @S, i64 0, i64 %idxprom13
%2 = load i8, ptr %arrayidx14, align 1, !tbaa !16
%cmp17 = icmp eq i8 %2, %0
br i1 %cmp17, label %while.end, label %if.end
if.end: ; preds = %land.lhs.true, %while.cond
%suffix_link = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom4, i32 2
br label %while.cond
while.end: ; preds = %land.lhs.true
%sub = add nsw i64 %conv, -62
%arrayidx24 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom4, i32 1, i64 %sub
%3 = load i32, ptr %arrayidx24, align 4, !tbaa !24
%cmp25 = icmp sgt i32 %3, 0
br i1 %cmp25, label %if.then27, label %if.end35
if.then27: ; preds = %while.end
store i32 %3, ptr @last, align 4, !tbaa !24
%idxprom33 = zext i32 %3 to i64
%cnt = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom33, i32 4
%4 = load i32, ptr %cnt, align 4, !tbaa !25
%inc = add nsw i32 %4, 1
store i32 %inc, ptr %cnt, align 4, !tbaa !25
br label %cleanup
if.end35: ; preds = %while.end
%5 = load i32, ptr @sz, align 4, !tbaa !24
%inc36 = add nsw i32 %5, 1
store i32 %inc36, ptr @sz, align 4, !tbaa !24
store i32 %5, ptr @last, align 4, !tbaa !24
store i32 %5, ptr %arrayidx24, align 4, !tbaa !24
%6 = load i32, ptr %len, align 8, !tbaa !22
%add = add nsw i32 %6, 2
%idxprom45 = sext i32 %5 to i64
%len47 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45, i32 3
store i32 %add, ptr %len47, align 8, !tbaa !22
%arrayidx49 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45
store i32 %t.0, ptr %arrayidx49, align 8, !tbaa !23
%cnt52 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45, i32 4
store i32 1, ptr %cnt52, align 4, !tbaa !25
%cmp56 = icmp eq i32 %add, 1
br i1 %cmp56, label %if.then58, label %while.cond62
if.then58: ; preds = %if.end35
%suffix_link61 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45, i32 2
store i32 1, ptr %suffix_link61, align 4, !tbaa !20
br label %cleanup
while.cond62: ; preds = %if.end35, %while.cond62.backedge
%t.1 = phi i32 [ %7, %while.cond62.backedge ], [ %t.0, %if.end35 ]
%idxprom64 = sext i32 %t.1 to i64
%suffix_link66 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom64, i32 2
%7 = load i32, ptr %suffix_link66, align 4, !tbaa !20
%idxprom68 = sext i32 %7 to i64
%len70 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom68, i32 3
%8 = load i32, ptr %len70, align 8, !tbaa !22
%sub71 = sub nsw i32 %sub3, %8
%cmp72 = icmp sgt i32 %sub71, -1
br i1 %cmp72, label %land.lhs.true74, label %while.cond62.backedge
land.lhs.true74: ; preds = %while.cond62
%idxprom80 = zext i32 %sub71 to i64
%arrayidx81 = getelementptr inbounds [100010 x i8], ptr @S, i64 0, i64 %idxprom80
%9 = load i8, ptr %arrayidx81, align 1, !tbaa !16
%cmp84 = icmp eq i8 %9, %0
br i1 %cmp84, label %if.then86, label %while.cond62.backedge
while.cond62.backedge: ; preds = %land.lhs.true74, %while.cond62
br label %while.cond62
if.then86: ; preds = %land.lhs.true74
%arrayidx91 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom68, i32 1, i64 %sub
%10 = load i32, ptr %arrayidx91, align 4, !tbaa !24
%suffix_link94 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45, i32 2
store i32 %10, ptr %suffix_link94, align 4, !tbaa !20
br label %cleanup
cleanup: ; preds = %if.then58, %if.then86, %if.then27
ret void
}
; Function Attrs: nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
store ptr @S, ptr @ss, align 8, !tbaa !5
%.pre264 = load ptr, ptr @stdin, align 8, !tbaa !5
br label %do.body.i
do.body.i: ; preds = %getchar_unlocked.exit.i, %entry
%0 = phi ptr [ %.pre264, %entry ], [ %4, %getchar_unlocked.exit.i ]
%s.addr.0.i = phi ptr [ @S, %entry ], [ %incdec.ptr.i, %getchar_unlocked.exit.i ]
%_IO_read_ptr.i.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 1
%1 = load ptr, ptr %_IO_read_ptr.i.i, align 8, !tbaa !9
%_IO_read_end.i.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 2
%2 = load ptr, ptr %_IO_read_end.i.i, align 8, !tbaa !14
%cmp.not.i.i = icmp ult ptr %1, %2
br i1 %cmp.not.i.i, label %cond.false.i.i, label %cond.true.i.i, !prof !15
cond.true.i.i: ; preds = %do.body.i
%call.i.i = tail call i32 @__uflow(ptr noundef nonnull %0) #6
%.pre = load ptr, ptr @stdin, align 8, !tbaa !5
br label %getchar_unlocked.exit.i
cond.false.i.i: ; preds = %do.body.i
%incdec.ptr.i.i = getelementptr inbounds i8, ptr %1, i64 1
store ptr %incdec.ptr.i.i, ptr %_IO_read_ptr.i.i, align 8, !tbaa !9
%3 = load i8, ptr %1, align 1, !tbaa !16
%conv3.i.i = zext i8 %3 to i32
br label %getchar_unlocked.exit.i
getchar_unlocked.exit.i: ; preds = %cond.false.i.i, %cond.true.i.i
%4 = phi ptr [ %.pre, %cond.true.i.i ], [ %0, %cond.false.i.i ]
%cond.i.i = phi i32 [ %call.i.i, %cond.true.i.i ], [ %conv3.i.i, %cond.false.i.i ]
%conv.i = trunc i32 %cond.i.i to i8
store i8 %conv.i, ptr %s.addr.0.i, align 1, !tbaa !16
%incdec.ptr.i = getelementptr inbounds i8, ptr %s.addr.0.i, i64 1
%cmp.i = icmp sgt i8 %conv.i, 32
br i1 %cmp.i, label %do.body.i, label %ins.exit, !llvm.loop !17
ins.exit: ; preds = %getchar_unlocked.exit.i
store i8 0, ptr %s.addr.0.i, align 1, !tbaa !16
%sub.ptr.lhs.cast.i = ptrtoint ptr %s.addr.0.i to i64
%5 = trunc i64 %sub.ptr.lhs.cast.i to i32
%conv4.i = sub i32 %5, ptrtoint (ptr @S to i32)
store i32 %conv4.i, ptr @ws, align 4, !tbaa !24
%idxprom = sext i32 %conv4.i to i64
%arrayidx = getelementptr inbounds [100010 x i8], ptr @S, i64 0, i64 %idxprom
store i8 62, ptr %arrayidx, align 1, !tbaa !16
%add = add nsw i32 %conv4.i, 1
%idxprom1 = sext i32 %add to i64
%arrayidx2 = getelementptr inbounds [100010 x i8], ptr @S, i64 0, i64 %idxprom1
store i8 64, ptr %arrayidx2, align 1, !tbaa !16
%6 = load ptr, ptr @ss, align 8, !tbaa !5
%add.ptr = getelementptr inbounds i8, ptr %6, i64 %idxprom
%add.ptr3 = getelementptr inbounds i8, ptr %add.ptr, i64 2
store ptr %add.ptr3, ptr @tt, align 8, !tbaa !5
br label %do.body.i64
do.body.i64: ; preds = %getchar_unlocked.exit.i71, %ins.exit
%s.addr.0.i65 = phi ptr [ %add.ptr3, %ins.exit ], [ %incdec.ptr.i74, %getchar_unlocked.exit.i71 ]
%7 = load ptr, ptr @stdin, align 8, !tbaa !5
%_IO_read_ptr.i.i66 = getelementptr inbounds %struct._IO_FILE, ptr %7, i64 0, i32 1
%8 = load ptr, ptr %_IO_read_ptr.i.i66, align 8, !tbaa !9
%_IO_read_end.i.i67 = getelementptr inbounds %struct._IO_FILE, ptr %7, i64 0, i32 2
%9 = load ptr, ptr %_IO_read_end.i.i67, align 8, !tbaa !14
%cmp.not.i.i68 = icmp ult ptr %8, %9
br i1 %cmp.not.i.i68, label %cond.false.i.i79, label %cond.true.i.i69, !prof !15
cond.true.i.i69: ; preds = %do.body.i64
%call.i.i70 = tail call i32 @__uflow(ptr noundef nonnull %7) #6
br label %getchar_unlocked.exit.i71
cond.false.i.i79: ; preds = %do.body.i64
%incdec.ptr.i.i80 = getelementptr inbounds i8, ptr %8, i64 1
store ptr %incdec.ptr.i.i80, ptr %_IO_read_ptr.i.i66, align 8, !tbaa !9
%10 = load i8, ptr %8, align 1, !tbaa !16
%conv3.i.i81 = zext i8 %10 to i32
br label %getchar_unlocked.exit.i71
getchar_unlocked.exit.i71: ; preds = %cond.false.i.i79, %cond.true.i.i69
%cond.i.i72 = phi i32 [ %call.i.i70, %cond.true.i.i69 ], [ %conv3.i.i81, %cond.false.i.i79 ]
%conv.i73 = trunc i32 %cond.i.i72 to i8
store i8 %conv.i73, ptr %s.addr.0.i65, align 1, !tbaa !16
%incdec.ptr.i74 = getelementptr inbounds i8, ptr %s.addr.0.i65, i64 1
%cmp.i75 = icmp sgt i8 %conv.i73, 32
br i1 %cmp.i75, label %do.body.i64, label %ins.exit82, !llvm.loop !17
ins.exit82: ; preds = %getchar_unlocked.exit.i71
store i8 0, ptr %s.addr.0.i65, align 1, !tbaa !16
%sub.ptr.lhs.cast.i76 = ptrtoint ptr %s.addr.0.i65 to i64
%sub.ptr.rhs.cast.i = ptrtoint ptr %add.ptr3 to i64
%sub.ptr.sub.i77 = sub i64 %sub.ptr.lhs.cast.i76, %sub.ptr.rhs.cast.i
%conv4.i78 = trunc i64 %sub.ptr.sub.i77 to i32
store i32 %conv4.i78, ptr @wt, align 4, !tbaa !24
%11 = load i32, ptr @ws, align 4, !tbaa !24
%add5 = add i32 %conv4.i78, 2
%add6 = add i32 %add5, %11
store i32 %add6, ptr @W, align 4, !tbaa !24
br label %for.body.i
for.body.i: ; preds = %for.body.i, %ins.exit82
%indvars.iv.i = phi i64 [ 0, %ins.exit82 ], [ %indvars.iv.next.i.4, %for.body.i ]
%arrayidx.i = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %indvars.iv.i
%indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(124) %arrayidx.i, i8 -1, i64 124, i1 false)
%arrayidx.i.1 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %indvars.iv.next.i
%indvars.iv.next.i.1 = add nuw nsw i64 %indvars.iv.i, 2
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(124) %arrayidx.i.1, i8 -1, i64 124, i1 false)
%arrayidx.i.2 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %indvars.iv.next.i.1
%indvars.iv.next.i.2 = add nuw nsw i64 %indvars.iv.i, 3
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(124) %arrayidx.i.2, i8 -1, i64 124, i1 false)
%arrayidx.i.3 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %indvars.iv.next.i.2
%indvars.iv.next.i.3 = add nuw nsw i64 %indvars.iv.i, 4
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(124) %arrayidx.i.3, i8 -1, i64 124, i1 false)
%arrayidx.i.4 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %indvars.iv.next.i.3
%indvars.iv.next.i.4 = add nuw nsw i64 %indvars.iv.i, 5
%exitcond.not.i.4 = icmp eq i64 %indvars.iv.next.i.4, 100010
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(124) %arrayidx.i.4, i8 -1, i64 124, i1 false)
br i1 %exitcond.not.i.4, label %init_palindromic_tree.exit, label %for.body.i, !llvm.loop !19
init_palindromic_tree.exit: ; preds = %for.body.i
store i32 -1, ptr getelementptr inbounds ([100010 x %struct.NODE], ptr @node, i64 0, i64 0, i32 2), align 4, !tbaa !20
store i32 -1, ptr getelementptr inbounds ([100010 x %struct.NODE], ptr @node, i64 0, i64 0, i32 3), align 16, !tbaa !22
store i32 0, ptr getelementptr inbounds ([100010 x %struct.NODE], ptr @node, i64 0, i64 1), align 8, !tbaa !23
%sz.promoted = load i32, ptr @sz, align 4, !tbaa !24
%cmp243 = icmp sgt i32 %11, 0
br i1 %cmp243, label %for.body.preheader, label %for.end
for.body.preheader: ; preds = %init_palindromic_tree.exit
%wide.trip.count = zext i32 %11 to i64
br label %for.body
for.body: ; preds = %for.body.preheader, %add_palindromic_tree.exit
%indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %add_palindromic_tree.exit ]
%inc36.i242244 = phi i32 [ %sz.promoted, %for.body.preheader ], [ %inc36.i241, %add_palindromic_tree.exit ]
%arrayidx.i83 = getelementptr inbounds [100010 x i8], ptr @S, i64 0, i64 %indvars.iv
%12 = load i8, ptr %arrayidx.i83, align 1, !tbaa !16
%13 = trunc i64 %indvars.iv to i32
%14 = add i32 %13, -1
br label %while.cond.i
while.cond.i: ; preds = %if.end.i, %for.body
%t.0.in.i = phi ptr [ @last, %for.body ], [ %suffix_link.i, %if.end.i ]
%t.0.i = load i32, ptr %t.0.in.i, align 4, !tbaa !24
%idxprom4.i = sext i32 %t.0.i to i64
%len.i = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom4.i, i32 3
%15 = load i32, ptr %len.i, align 8, !tbaa !22
%sub6.i = sub nsw i32 %14, %15
%cmp.i85 = icmp sgt i32 %sub6.i, -1
br i1 %cmp.i85, label %land.lhs.true.i, label %if.end.i
land.lhs.true.i: ; preds = %while.cond.i
%idxprom13.i = zext i32 %sub6.i to i64
%arrayidx14.i = getelementptr inbounds [100010 x i8], ptr @S, i64 0, i64 %idxprom13.i
%16 = load i8, ptr %arrayidx14.i, align 1, !tbaa !16
%cmp17.i = icmp eq i8 %16, %12
br i1 %cmp17.i, label %while.end.i, label %if.end.i
if.end.i: ; preds = %land.lhs.true.i, %while.cond.i
%suffix_link.i = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom4.i, i32 2
br label %while.cond.i
while.end.i: ; preds = %land.lhs.true.i
%conv.i84 = sext i8 %12 to i64
%sub.i = add nsw i64 %conv.i84, -62
%arrayidx24.i = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom4.i, i32 1, i64 %sub.i
%17 = load i32, ptr %arrayidx24.i, align 4, !tbaa !24
%cmp25.i = icmp sgt i32 %17, 0
br i1 %cmp25.i, label %if.then27.i, label %if.end35.i
if.then27.i: ; preds = %while.end.i
store i32 %17, ptr @last, align 4, !tbaa !24
%idxprom33.i = zext i32 %17 to i64
%cnt.i = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom33.i, i32 4
%18 = load i32, ptr %cnt.i, align 4, !tbaa !25
%inc.i = add nsw i32 %18, 1
store i32 %inc.i, ptr %cnt.i, align 4, !tbaa !25
%.pre265 = zext i32 %17 to i64
br label %add_palindromic_tree.exit
if.end35.i: ; preds = %while.end.i
%inc36.i = add nsw i32 %inc36.i242244, 1
store i32 %inc36.i, ptr @sz, align 4, !tbaa !24
store i32 %inc36.i242244, ptr @last, align 4, !tbaa !24
store i32 %inc36.i242244, ptr %arrayidx24.i, align 4, !tbaa !24
%19 = load i32, ptr %len.i, align 8, !tbaa !22
%add.i = add nsw i32 %19, 2
%idxprom45.i = sext i32 %inc36.i242244 to i64
%len47.i = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i, i32 3
store i32 %add.i, ptr %len47.i, align 8, !tbaa !22
%arrayidx49.i = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i
store i32 %t.0.i, ptr %arrayidx49.i, align 8, !tbaa !23
%cnt52.i = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i, i32 4
store i32 1, ptr %cnt52.i, align 4, !tbaa !25
%cmp56.i = icmp eq i32 %add.i, 1
br i1 %cmp56.i, label %if.then58.i, label %while.cond62.i
if.then58.i: ; preds = %if.end35.i
%suffix_link61.i = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i, i32 2
store i32 1, ptr %suffix_link61.i, align 4, !tbaa !20
br label %add_palindromic_tree.exit
while.cond62.i: ; preds = %if.end35.i, %while.cond62.i.backedge
%t.1.i = phi i32 [ %20, %while.cond62.i.backedge ], [ %t.0.i, %if.end35.i ]
%idxprom64.i = sext i32 %t.1.i to i64
%suffix_link66.i = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom64.i, i32 2
%20 = load i32, ptr %suffix_link66.i, align 4, !tbaa !20
%idxprom68.i = sext i32 %20 to i64
%len70.i = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom68.i, i32 3
%21 = load i32, ptr %len70.i, align 8, !tbaa !22
%sub71.i = sub nsw i32 %14, %21
%cmp72.i = icmp sgt i32 %sub71.i, -1
br i1 %cmp72.i, label %land.lhs.true74.i, label %while.cond62.i.backedge
land.lhs.true74.i: ; preds = %while.cond62.i
%idxprom80.i = zext i32 %sub71.i to i64
%arrayidx81.i = getelementptr inbounds [100010 x i8], ptr @S, i64 0, i64 %idxprom80.i
%22 = load i8, ptr %arrayidx81.i, align 1, !tbaa !16
%cmp84.i = icmp eq i8 %22, %12
br i1 %cmp84.i, label %if.then86.i, label %while.cond62.i.backedge
while.cond62.i.backedge: ; preds = %land.lhs.true74.i, %while.cond62.i
br label %while.cond62.i
if.then86.i: ; preds = %land.lhs.true74.i
%arrayidx91.i = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom68.i, i32 1, i64 %sub.i
%23 = load i32, ptr %arrayidx91.i, align 4, !tbaa !24
%suffix_link94.i = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i, i32 2
store i32 %23, ptr %suffix_link94.i, align 4, !tbaa !20
br label %add_palindromic_tree.exit
add_palindromic_tree.exit: ; preds = %if.then27.i, %if.then58.i, %if.then86.i
%idxprom7.pre-phi = phi i64 [ %.pre265, %if.then27.i ], [ %idxprom45.i, %if.then58.i ], [ %idxprom45.i, %if.then86.i ]
%inc36.i241 = phi i32 [ %inc36.i242244, %if.then27.i ], [ %inc36.i, %if.then58.i ], [ %inc36.i, %if.then86.i ]
%arrayidx8 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %idxprom7.pre-phi
%24 = load i32, ptr %arrayidx8, align 4, !tbaa !24
%inc = add nsw i32 %24, 1
store i32 %inc, ptr %arrayidx8, align 4, !tbaa !24
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !26
for.end: ; preds = %add_palindromic_tree.exit, %init_palindromic_tree.exit
%25 = phi i32 [ %sz.promoted, %init_palindromic_tree.exit ], [ %inc36.i241, %add_palindromic_tree.exit ]
%i.0.lcssa = phi i32 [ 0, %init_palindromic_tree.exit ], [ %11, %add_palindromic_tree.exit ]
%idxprom.i86 = zext i32 %i.0.lcssa to i64
%arrayidx.i87 = getelementptr inbounds [100010 x i8], ptr @S, i64 0, i64 %idxprom.i86
%26 = load i8, ptr %arrayidx.i87, align 1, !tbaa !16
%sub3.i89 = add nsw i32 %i.0.lcssa, -1
br label %while.cond.i90
while.cond.i90: ; preds = %if.end.i97, %for.end
%t.0.in.i91 = phi ptr [ @last, %for.end ], [ %suffix_link.i98, %if.end.i97 ]
%t.0.i92 = load i32, ptr %t.0.in.i91, align 4, !tbaa !24
%idxprom4.i93 = sext i32 %t.0.i92 to i64
%len.i94 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom4.i93, i32 3
%27 = load i32, ptr %len.i94, align 8, !tbaa !22
%sub6.i95 = sub nsw i32 %sub3.i89, %27
%cmp.i96 = icmp sgt i32 %sub6.i95, -1
br i1 %cmp.i96, label %land.lhs.true.i99, label %if.end.i97
land.lhs.true.i99: ; preds = %while.cond.i90
%idxprom13.i100 = zext i32 %sub6.i95 to i64
%arrayidx14.i101 = getelementptr inbounds [100010 x i8], ptr @S, i64 0, i64 %idxprom13.i100
%28 = load i8, ptr %arrayidx14.i101, align 1, !tbaa !16
%cmp17.i102 = icmp eq i8 %28, %26
br i1 %cmp17.i102, label %while.end.i103, label %if.end.i97
if.end.i97: ; preds = %land.lhs.true.i99, %while.cond.i90
%suffix_link.i98 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom4.i93, i32 2
br label %while.cond.i90
while.end.i103: ; preds = %land.lhs.true.i99
%inc10 = add nuw nsw i32 %i.0.lcssa, 1
%conv.i88 = sext i8 %26 to i64
%sub.i104 = add nsw i64 %conv.i88, -62
%arrayidx24.i105 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom4.i93, i32 1, i64 %sub.i104
%29 = load i32, ptr %arrayidx24.i105, align 4, !tbaa !24
%cmp25.i106 = icmp sgt i32 %29, 0
br i1 %cmp25.i106, label %if.then27.i133, label %if.end35.i107
if.then27.i133: ; preds = %while.end.i103
%idxprom33.i134 = zext i32 %29 to i64
%cnt.i135 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom33.i134, i32 4
%30 = load i32, ptr %cnt.i135, align 4, !tbaa !25
%inc.i136 = add nsw i32 %30, 1
store i32 %inc.i136, ptr %cnt.i135, align 4, !tbaa !25
br label %add_palindromic_tree.exit137
if.end35.i107: ; preds = %while.end.i103
%inc36.i108 = add nsw i32 %25, 1
store i32 %inc36.i108, ptr @sz, align 4, !tbaa !24
store i32 %25, ptr %arrayidx24.i105, align 4, !tbaa !24
%31 = load i32, ptr %len.i94, align 8, !tbaa !22
%add.i109 = add nsw i32 %31, 2
%idxprom45.i110 = sext i32 %25 to i64
%len47.i111 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i110, i32 3
store i32 %add.i109, ptr %len47.i111, align 8, !tbaa !22
%arrayidx49.i112 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i110
store i32 %t.0.i92, ptr %arrayidx49.i112, align 8, !tbaa !23
%cnt52.i113 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i110, i32 4
store i32 1, ptr %cnt52.i113, align 4, !tbaa !25
%cmp56.i114 = icmp eq i32 %add.i109, 1
br i1 %cmp56.i114, label %if.then58.i131, label %while.cond62.i115
if.then58.i131: ; preds = %if.end35.i107
%suffix_link61.i132 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i110, i32 2
store i32 1, ptr %suffix_link61.i132, align 4, !tbaa !20
br label %add_palindromic_tree.exit137
while.cond62.i115: ; preds = %if.end35.i107, %while.cond62.i115.backedge
%t.1.i116 = phi i32 [ %32, %while.cond62.i115.backedge ], [ %t.0.i92, %if.end35.i107 ]
%idxprom64.i117 = sext i32 %t.1.i116 to i64
%suffix_link66.i118 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom64.i117, i32 2
%32 = load i32, ptr %suffix_link66.i118, align 4, !tbaa !20
%idxprom68.i119 = sext i32 %32 to i64
%len70.i120 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom68.i119, i32 3
%33 = load i32, ptr %len70.i120, align 8, !tbaa !22
%sub71.i121 = sub nsw i32 %sub3.i89, %33
%cmp72.i122 = icmp sgt i32 %sub71.i121, -1
br i1 %cmp72.i122, label %land.lhs.true74.i124, label %while.cond62.i115.backedge
land.lhs.true74.i124: ; preds = %while.cond62.i115
%idxprom80.i125 = zext i32 %sub71.i121 to i64
%arrayidx81.i126 = getelementptr inbounds [100010 x i8], ptr @S, i64 0, i64 %idxprom80.i125
%34 = load i8, ptr %arrayidx81.i126, align 1, !tbaa !16
%cmp84.i127 = icmp eq i8 %34, %26
br i1 %cmp84.i127, label %if.then86.i128, label %while.cond62.i115.backedge
while.cond62.i115.backedge: ; preds = %land.lhs.true74.i124, %while.cond62.i115
br label %while.cond62.i115
if.then86.i128: ; preds = %land.lhs.true74.i124
%arrayidx91.i129 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom68.i119, i32 1, i64 %sub.i104
%35 = load i32, ptr %arrayidx91.i129, align 4, !tbaa !24
%suffix_link94.i130 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i110, i32 2
store i32 %35, ptr %suffix_link94.i130, align 4, !tbaa !20
br label %add_palindromic_tree.exit137
add_palindromic_tree.exit137: ; preds = %if.then27.i133, %if.then58.i131, %if.then86.i128
%36 = phi i32 [ %25, %if.then27.i133 ], [ %inc36.i108, %if.then58.i131 ], [ %inc36.i108, %if.then86.i128 ]
%t.0.i143267 = phi i32 [ %29, %if.then27.i133 ], [ %25, %if.then58.i131 ], [ %25, %if.then86.i128 ]
%idxprom.i138 = zext i32 %inc10 to i64
%arrayidx.i139 = getelementptr inbounds [100010 x i8], ptr @S, i64 0, i64 %idxprom.i138
%37 = load i8, ptr %arrayidx.i139, align 1, !tbaa !16
br label %while.cond.i141
while.cond.i141: ; preds = %if.end.i148, %add_palindromic_tree.exit137
%t.0.i143 = phi i32 [ %t.0.i143267, %add_palindromic_tree.exit137 ], [ %t.0.i143.pre, %if.end.i148 ]
%idxprom4.i144 = sext i32 %t.0.i143 to i64
%len.i145 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom4.i144, i32 3
%38 = load i32, ptr %len.i145, align 8, !tbaa !22
%sub6.i146 = sub nsw i32 %i.0.lcssa, %38
%cmp.i147 = icmp sgt i32 %sub6.i146, -1
br i1 %cmp.i147, label %land.lhs.true.i150, label %if.end.i148
land.lhs.true.i150: ; preds = %while.cond.i141
%idxprom13.i151 = zext i32 %sub6.i146 to i64
%arrayidx14.i152 = getelementptr inbounds [100010 x i8], ptr @S, i64 0, i64 %idxprom13.i151
%39 = load i8, ptr %arrayidx14.i152, align 1, !tbaa !16
%cmp17.i153 = icmp eq i8 %39, %37
br i1 %cmp17.i153, label %while.end.i154, label %if.end.i148
if.end.i148: ; preds = %land.lhs.true.i150, %while.cond.i141
%suffix_link.i149 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom4.i144, i32 2
%t.0.i143.pre = load i32, ptr %suffix_link.i149, align 4, !tbaa !24
br label %while.cond.i141
while.end.i154: ; preds = %land.lhs.true.i150
%inc11 = add nuw nsw i32 %i.0.lcssa, 2
%conv.i140 = sext i8 %37 to i64
%sub.i155 = add nsw i64 %conv.i140, -62
%arrayidx24.i156 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom4.i144, i32 1, i64 %sub.i155
%40 = load i32, ptr %arrayidx24.i156, align 4, !tbaa !24
%cmp25.i157 = icmp sgt i32 %40, 0
br i1 %cmp25.i157, label %if.then27.i184, label %if.end35.i158
if.then27.i184: ; preds = %while.end.i154
store i32 %40, ptr @last, align 4, !tbaa !24
%idxprom33.i185 = zext i32 %40 to i64
%cnt.i186 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom33.i185, i32 4
%41 = load i32, ptr %cnt.i186, align 4, !tbaa !25
%inc.i187 = add nsw i32 %41, 1
store i32 %inc.i187, ptr %cnt.i186, align 4, !tbaa !25
br label %add_palindromic_tree.exit188
if.end35.i158: ; preds = %while.end.i154
%inc36.i159 = add nsw i32 %36, 1
store i32 %inc36.i159, ptr @sz, align 4, !tbaa !24
store i32 %36, ptr @last, align 4, !tbaa !24
store i32 %36, ptr %arrayidx24.i156, align 4, !tbaa !24
%42 = load i32, ptr %len.i145, align 8, !tbaa !22
%add.i160 = add nsw i32 %42, 2
%idxprom45.i161 = sext i32 %36 to i64
%len47.i162 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i161, i32 3
store i32 %add.i160, ptr %len47.i162, align 8, !tbaa !22
%arrayidx49.i163 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i161
store i32 %t.0.i143, ptr %arrayidx49.i163, align 8, !tbaa !23
%cnt52.i164 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i161, i32 4
store i32 1, ptr %cnt52.i164, align 4, !tbaa !25
%cmp56.i165 = icmp eq i32 %add.i160, 1
br i1 %cmp56.i165, label %if.then58.i182, label %while.cond62.i166
if.then58.i182: ; preds = %if.end35.i158
%suffix_link61.i183 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i161, i32 2
store i32 1, ptr %suffix_link61.i183, align 4, !tbaa !20
br label %add_palindromic_tree.exit188
while.cond62.i166: ; preds = %if.end35.i158, %while.cond62.i166.backedge
%t.1.i167 = phi i32 [ %43, %while.cond62.i166.backedge ], [ %t.0.i143, %if.end35.i158 ]
%idxprom64.i168 = sext i32 %t.1.i167 to i64
%suffix_link66.i169 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom64.i168, i32 2
%43 = load i32, ptr %suffix_link66.i169, align 4, !tbaa !20
%idxprom68.i170 = sext i32 %43 to i64
%len70.i171 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom68.i170, i32 3
%44 = load i32, ptr %len70.i171, align 8, !tbaa !22
%sub71.i172 = sub nsw i32 %i.0.lcssa, %44
%cmp72.i173 = icmp sgt i32 %sub71.i172, -1
br i1 %cmp72.i173, label %land.lhs.true74.i175, label %while.cond62.i166.backedge
land.lhs.true74.i175: ; preds = %while.cond62.i166
%idxprom80.i176 = zext i32 %sub71.i172 to i64
%arrayidx81.i177 = getelementptr inbounds [100010 x i8], ptr @S, i64 0, i64 %idxprom80.i176
%45 = load i8, ptr %arrayidx81.i177, align 1, !tbaa !16
%cmp84.i178 = icmp eq i8 %45, %37
br i1 %cmp84.i178, label %if.then86.i179, label %while.cond62.i166.backedge
while.cond62.i166.backedge: ; preds = %land.lhs.true74.i175, %while.cond62.i166
br label %while.cond62.i166
if.then86.i179: ; preds = %land.lhs.true74.i175
%arrayidx91.i180 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom68.i170, i32 1, i64 %sub.i155
%46 = load i32, ptr %arrayidx91.i180, align 4, !tbaa !24
%suffix_link94.i181 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i161, i32 2
store i32 %46, ptr %suffix_link94.i181, align 4, !tbaa !20
br label %add_palindromic_tree.exit188
add_palindromic_tree.exit188: ; preds = %if.then27.i184, %if.then58.i182, %if.then86.i179
%t.0.i195271 = phi i32 [ %40, %if.then27.i184 ], [ %36, %if.then58.i182 ], [ %36, %if.then86.i179 ]
%sz.promoted246 = phi i32 [ %36, %if.then27.i184 ], [ %inc36.i159, %if.then58.i182 ], [ %inc36.i159, %if.then86.i179 ]
%cmp13249 = icmp slt i32 %inc11, %add6
br i1 %cmp13249, label %for.body14.preheader, label %for.end20
for.body14.preheader: ; preds = %add_palindromic_tree.exit188
%47 = add nuw nsw i64 %idxprom.i86, 2
br label %for.body14
for.body14: ; preds = %for.body14.preheader, %add_palindromic_tree.exit240
%t.0.i195270 = phi i32 [ %t.0.i195271, %for.body14.preheader ], [ %59, %add_palindromic_tree.exit240 ]
%indvars.iv258 = phi i64 [ %47, %for.body14.preheader ], [ %indvars.iv.next259, %add_palindromic_tree.exit240 ]
%inc36.i211248250 = phi i32 [ %sz.promoted246, %for.body14.preheader ], [ %inc36.i211247, %add_palindromic_tree.exit240 ]
%arrayidx.i190 = getelementptr inbounds [100010 x i8], ptr @S, i64 0, i64 %indvars.iv258
%48 = load i8, ptr %arrayidx.i190, align 1, !tbaa !16
%49 = trunc i64 %indvars.iv258 to i32
%sub3.i192 = add nsw i32 %49, -1
br label %while.cond.i193
while.cond.i193: ; preds = %if.end.i200, %for.body14
%t.0.i195 = phi i32 [ %t.0.i195270, %for.body14 ], [ %t.0.i195.pre, %if.end.i200 ]
%idxprom4.i196 = sext i32 %t.0.i195 to i64
%len.i197 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom4.i196, i32 3
%50 = load i32, ptr %len.i197, align 8, !tbaa !22
%sub6.i198 = sub nsw i32 %sub3.i192, %50
%cmp.i199 = icmp sgt i32 %sub6.i198, -1
br i1 %cmp.i199, label %land.lhs.true.i202, label %if.end.i200
land.lhs.true.i202: ; preds = %while.cond.i193
%idxprom13.i203 = zext i32 %sub6.i198 to i64
%arrayidx14.i204 = getelementptr inbounds [100010 x i8], ptr @S, i64 0, i64 %idxprom13.i203
%51 = load i8, ptr %arrayidx14.i204, align 1, !tbaa !16
%cmp17.i205 = icmp eq i8 %51, %48
br i1 %cmp17.i205, label %while.end.i206, label %if.end.i200
if.end.i200: ; preds = %land.lhs.true.i202, %while.cond.i193
%suffix_link.i201 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom4.i196, i32 2
%t.0.i195.pre = load i32, ptr %suffix_link.i201, align 4, !tbaa !24
br label %while.cond.i193
while.end.i206: ; preds = %land.lhs.true.i202
%conv.i191 = sext i8 %48 to i64
%sub.i207 = add nsw i64 %conv.i191, -62
%arrayidx24.i208 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom4.i196, i32 1, i64 %sub.i207
%52 = load i32, ptr %arrayidx24.i208, align 4, !tbaa !24
%cmp25.i209 = icmp sgt i32 %52, 0
br i1 %cmp25.i209, label %if.then27.i236, label %if.end35.i210
if.then27.i236: ; preds = %while.end.i206
store i32 %52, ptr @last, align 4, !tbaa !24
%idxprom33.i237 = zext i32 %52 to i64
%cnt.i238 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom33.i237, i32 4
%53 = load i32, ptr %cnt.i238, align 4, !tbaa !25
%inc.i239 = add nsw i32 %53, 1
store i32 %inc.i239, ptr %cnt.i238, align 4, !tbaa !25
%.pre272 = zext i32 %52 to i64
br label %add_palindromic_tree.exit240
if.end35.i210: ; preds = %while.end.i206
%inc36.i211 = add nsw i32 %inc36.i211248250, 1
store i32 %inc36.i211, ptr @sz, align 4, !tbaa !24
store i32 %inc36.i211248250, ptr @last, align 4, !tbaa !24
store i32 %inc36.i211248250, ptr %arrayidx24.i208, align 4, !tbaa !24
%54 = load i32, ptr %len.i197, align 8, !tbaa !22
%add.i212 = add nsw i32 %54, 2
%idxprom45.i213 = sext i32 %inc36.i211248250 to i64
%len47.i214 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i213, i32 3
store i32 %add.i212, ptr %len47.i214, align 8, !tbaa !22
%arrayidx49.i215 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i213
store i32 %t.0.i195, ptr %arrayidx49.i215, align 8, !tbaa !23
%cnt52.i216 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i213, i32 4
store i32 1, ptr %cnt52.i216, align 4, !tbaa !25
%cmp56.i217 = icmp eq i32 %add.i212, 1
br i1 %cmp56.i217, label %if.then58.i234, label %while.cond62.i218
if.then58.i234: ; preds = %if.end35.i210
%suffix_link61.i235 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i213, i32 2
store i32 1, ptr %suffix_link61.i235, align 4, !tbaa !20
br label %add_palindromic_tree.exit240
while.cond62.i218: ; preds = %if.end35.i210, %while.cond62.i218.backedge
%t.1.i219 = phi i32 [ %55, %while.cond62.i218.backedge ], [ %t.0.i195, %if.end35.i210 ]
%idxprom64.i220 = sext i32 %t.1.i219 to i64
%suffix_link66.i221 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom64.i220, i32 2
%55 = load i32, ptr %suffix_link66.i221, align 4, !tbaa !20
%idxprom68.i222 = sext i32 %55 to i64
%len70.i223 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom68.i222, i32 3
%56 = load i32, ptr %len70.i223, align 8, !tbaa !22
%sub71.i224 = sub nsw i32 %sub3.i192, %56
%cmp72.i225 = icmp sgt i32 %sub71.i224, -1
br i1 %cmp72.i225, label %land.lhs.true74.i227, label %while.cond62.i218.backedge
land.lhs.true74.i227: ; preds = %while.cond62.i218
%idxprom80.i228 = zext i32 %sub71.i224 to i64
%arrayidx81.i229 = getelementptr inbounds [100010 x i8], ptr @S, i64 0, i64 %idxprom80.i228
%57 = load i8, ptr %arrayidx81.i229, align 1, !tbaa !16
%cmp84.i230 = icmp eq i8 %57, %48
br i1 %cmp84.i230, label %if.then86.i231, label %while.cond62.i218.backedge
while.cond62.i218.backedge: ; preds = %land.lhs.true74.i227, %while.cond62.i218
br label %while.cond62.i218
if.then86.i231: ; preds = %land.lhs.true74.i227
%arrayidx91.i232 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom68.i222, i32 1, i64 %sub.i207
%58 = load i32, ptr %arrayidx91.i232, align 4, !tbaa !24
%suffix_link94.i233 = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom45.i213, i32 2
store i32 %58, ptr %suffix_link94.i233, align 4, !tbaa !20
br label %add_palindromic_tree.exit240
add_palindromic_tree.exit240: ; preds = %if.then27.i236, %if.then58.i234, %if.then86.i231
%idxprom15.pre-phi = phi i64 [ %.pre272, %if.then27.i236 ], [ %idxprom45.i213, %if.then58.i234 ], [ %idxprom45.i213, %if.then86.i231 ]
%59 = phi i32 [ %52, %if.then27.i236 ], [ %inc36.i211248250, %if.then58.i234 ], [ %inc36.i211248250, %if.then86.i231 ]
%inc36.i211247 = phi i32 [ %inc36.i211248250, %if.then27.i236 ], [ %inc36.i211, %if.then58.i234 ], [ %inc36.i211, %if.then86.i231 ]
%arrayidx16 = getelementptr inbounds [2 x [100010 x i32]], ptr @f, i64 0, i64 1, i64 %idxprom15.pre-phi
%60 = load i32, ptr %arrayidx16, align 4, !tbaa !24
%inc17 = add nsw i32 %60, 1
store i32 %inc17, ptr %arrayidx16, align 4, !tbaa !24
%indvars.iv.next259 = add nuw nsw i64 %indvars.iv258, 1
%61 = trunc i64 %indvars.iv.next259 to i32
%cmp13 = icmp sgt i32 %add6, %61
br i1 %cmp13, label %for.body14, label %for.end20, !llvm.loop !27
for.end20: ; preds = %add_palindromic_tree.exit240, %add_palindromic_tree.exit188
%62 = phi i32 [ %sz.promoted246, %add_palindromic_tree.exit188 ], [ %inc36.i211247, %add_palindromic_tree.exit240 ]
%cmp22252 = icmp sgt i32 %62, 2
br i1 %cmp22252, label %for.body23.preheader, label %for.end46
for.body23.preheader: ; preds = %for.end20
%63 = zext i32 %62 to i64
br label %for.body23
for.body23: ; preds = %for.body23.preheader, %for.body23
%indvars.iv261 = phi i64 [ %63, %for.body23.preheader ], [ %indvars.iv.next262, %for.body23 ]
%ans.0254 = phi i64 [ 0, %for.body23.preheader ], [ %add29, %for.body23 ]
%indvars.iv.next262 = add nsw i64 %indvars.iv261, -1
%idxprom24 = and i64 %indvars.iv.next262, 4294967295
%arrayidx25 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %idxprom24
%64 = load i32, ptr %arrayidx25, align 4, !tbaa !24
%conv = sext i32 %64 to i64
%arrayidx27 = getelementptr inbounds [2 x [100010 x i32]], ptr @f, i64 0, i64 1, i64 %idxprom24
%65 = load i32, ptr %arrayidx27, align 4, !tbaa !24
%conv28 = sext i32 %65 to i64
%mul = mul nsw i64 %conv28, %conv
%add29 = add nsw i64 %mul, %ans.0254
%suffix_link = getelementptr inbounds [100010 x %struct.NODE], ptr @node, i64 0, i64 %idxprom24, i32 2
%66 = load i32, ptr %suffix_link, align 4, !tbaa !20
%idxprom34 = sext i32 %66 to i64
%arrayidx35 = getelementptr inbounds [100010 x i32], ptr @f, i64 0, i64 %idxprom34
%67 = load i32, ptr %arrayidx35, align 4, !tbaa !24
%add36 = add nsw i32 %67, %64
store i32 %add36, ptr %arrayidx35, align 4, !tbaa !24
%68 = load i32, ptr %arrayidx27, align 4, !tbaa !24
%arrayidx43 = getelementptr inbounds [2 x [100010 x i32]], ptr @f, i64 0, i64 1, i64 %idxprom34
%69 = load i32, ptr %arrayidx43, align 4, !tbaa !24
%add44 = add nsw i32 %69, %68
store i32 %add44, ptr %arrayidx43, align 4, !tbaa !24
%cmp22 = icmp ugt i64 %indvars.iv261, 3
br i1 %cmp22, label %for.body23, label %for.end46, !llvm.loop !28
for.end46: ; preds = %for.body23, %for.end20
%ans.0.lcssa = phi i64 [ 0, %for.end20 ], [ %add29, %for.body23 ]
%call47 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %ans.0.lcssa)
ret i32 0
}
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4
declare i32 @__uflow(ptr noundef) local_unnamed_addr #5
attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nosync nounwind memory(write, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nofree norecurse nosync nounwind memory(readwrite, argmem: read, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_IO_FILE", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !11, i64 112, !11, i64 116, !12, i64 120, !13, i64 128, !7, i64 130, !7, i64 131, !6, i64 136, !12, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !12, i64 184, !11, i64 192, !7, i64 196}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!10, !6, i64 16}
!15 = !{!"branch_weights", i32 2000, i32 1}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = !{!21, !11, i64 124}
!21 = !{!"", !11, i64 0, !7, i64 4, !11, i64 124, !11, i64 128, !11, i64 132}
!22 = !{!21, !11, i64 128}
!23 = !{!21, !11, i64 0}
!24 = !{!11, !11, i64 0}
!25 = !{!21, !11, i64 132}
!26 = distinct !{!26, !18}
!27 = distinct !{!27, !18}
!28 = distinct !{!28, !18}
|
#include <stdio.h>
#include<string.h>
char O[28]="A""B""C""D""E""F""G""H""I""J""K""L""M""N""O""P""Q""R""S""T""U""V""W""X""Y""Z";
char o[28]="a""b""c""d""e""f""g""h""i""j""k""l""m""n""o""p""q""r""s""t""u""v""w""x""y""z";
void trade(char a[]){
int i=0,n;
while(1){
if(a[i]==o[28])break;
for(n=0;n<28;n++){
if(a[i]==o[n])a[i]=O[n];
}
i++;
}
}
int main(void){
char W[11];
char T[1001];
int c=0;
int i;
scanf("%s",W);
trade(W);
while(1){
scanf("%s",T);
if(strcmp(T,"end_of_text")!=0)trade(T);
if(strcmp(W,T)==0)c++;
if(strcmp(T,"END_OF_TEXT")==0)break;
}
printf("%d\n",c);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130344/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130344/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@O = dso_local local_unnamed_addr global [28 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZ\00\00", align 16
@o = dso_local local_unnamed_addr global [28 x i8] c"abcdefghijklmnopqrstuvwxyz\00\00", align 16
@.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1
@.str.1 = private unnamed_addr constant [12 x i8] c"end_of_text\00", align 1
@.str.2 = private unnamed_addr constant [12 x i8] c"END_OF_TEXT\00", align 1
@.str.3 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable
define dso_local void @trade(ptr nocapture noundef %a) local_unnamed_addr #0 {
entry:
%0 = load i8, ptr %a, align 1, !tbaa !5
%1 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 1, i64 0), align 4, !tbaa !5
%cmp29 = icmp eq i8 %0, %1
br i1 %cmp29, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.inc.27
%arrayidx.promoted = phi i8 [ %85, %for.inc.27 ], [ %0, %entry ]
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc.27 ], [ 0, %entry ]
%arrayidx31 = phi ptr [ %arrayidx, %for.inc.27 ], [ %a, %entry ]
%2 = load i8, ptr @o, align 16, !tbaa !5
%cmp11 = icmp eq i8 %arrayidx.promoted, %2
br i1 %cmp11, label %if.then13, label %for.inc
if.then13: ; preds = %for.cond.preheader
%3 = load i8, ptr @O, align 16, !tbaa !5
store i8 %3, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc
for.inc: ; preds = %for.cond.preheader, %if.then13
%4 = phi i8 [ %arrayidx.promoted, %for.cond.preheader ], [ %3, %if.then13 ]
%5 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 1), align 1, !tbaa !5
%cmp11.1 = icmp eq i8 %4, %5
br i1 %cmp11.1, label %if.then13.1, label %for.inc.1
if.then13.1: ; preds = %for.inc
%6 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 1), align 1, !tbaa !5
store i8 %6, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.1
for.inc.1: ; preds = %if.then13.1, %for.inc
%7 = phi i8 [ %4, %for.inc ], [ %6, %if.then13.1 ]
%8 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 2), align 2, !tbaa !5
%cmp11.2 = icmp eq i8 %7, %8
br i1 %cmp11.2, label %if.then13.2, label %for.inc.2
if.then13.2: ; preds = %for.inc.1
%9 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 2), align 2, !tbaa !5
store i8 %9, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.2
for.inc.2: ; preds = %if.then13.2, %for.inc.1
%10 = phi i8 [ %7, %for.inc.1 ], [ %9, %if.then13.2 ]
%11 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 3), align 1, !tbaa !5
%cmp11.3 = icmp eq i8 %10, %11
br i1 %cmp11.3, label %if.then13.3, label %for.inc.3
if.then13.3: ; preds = %for.inc.2
%12 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 3), align 1, !tbaa !5
store i8 %12, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.3
for.inc.3: ; preds = %if.then13.3, %for.inc.2
%13 = phi i8 [ %10, %for.inc.2 ], [ %12, %if.then13.3 ]
%14 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 4), align 4, !tbaa !5
%cmp11.4 = icmp eq i8 %13, %14
br i1 %cmp11.4, label %if.then13.4, label %for.inc.4
if.then13.4: ; preds = %for.inc.3
%15 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 4), align 4, !tbaa !5
store i8 %15, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.4
for.inc.4: ; preds = %if.then13.4, %for.inc.3
%16 = phi i8 [ %13, %for.inc.3 ], [ %15, %if.then13.4 ]
%17 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 5), align 1, !tbaa !5
%cmp11.5 = icmp eq i8 %16, %17
br i1 %cmp11.5, label %if.then13.5, label %for.inc.5
if.then13.5: ; preds = %for.inc.4
%18 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 5), align 1, !tbaa !5
store i8 %18, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.5
for.inc.5: ; preds = %if.then13.5, %for.inc.4
%19 = phi i8 [ %16, %for.inc.4 ], [ %18, %if.then13.5 ]
%20 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 6), align 2, !tbaa !5
%cmp11.6 = icmp eq i8 %19, %20
br i1 %cmp11.6, label %if.then13.6, label %for.inc.6
if.then13.6: ; preds = %for.inc.5
%21 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 6), align 2, !tbaa !5
store i8 %21, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.6
for.inc.6: ; preds = %if.then13.6, %for.inc.5
%22 = phi i8 [ %19, %for.inc.5 ], [ %21, %if.then13.6 ]
%23 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 7), align 1, !tbaa !5
%cmp11.7 = icmp eq i8 %22, %23
br i1 %cmp11.7, label %if.then13.7, label %for.inc.7
if.then13.7: ; preds = %for.inc.6
%24 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 7), align 1, !tbaa !5
store i8 %24, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.7
for.inc.7: ; preds = %if.then13.7, %for.inc.6
%25 = phi i8 [ %22, %for.inc.6 ], [ %24, %if.then13.7 ]
%26 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 8), align 8, !tbaa !5
%cmp11.8 = icmp eq i8 %25, %26
br i1 %cmp11.8, label %if.then13.8, label %for.inc.8
if.then13.8: ; preds = %for.inc.7
%27 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 8), align 8, !tbaa !5
store i8 %27, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.8
for.inc.8: ; preds = %if.then13.8, %for.inc.7
%28 = phi i8 [ %25, %for.inc.7 ], [ %27, %if.then13.8 ]
%29 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 9), align 1, !tbaa !5
%cmp11.9 = icmp eq i8 %28, %29
br i1 %cmp11.9, label %if.then13.9, label %for.inc.9
if.then13.9: ; preds = %for.inc.8
%30 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 9), align 1, !tbaa !5
store i8 %30, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.9
for.inc.9: ; preds = %if.then13.9, %for.inc.8
%31 = phi i8 [ %28, %for.inc.8 ], [ %30, %if.then13.9 ]
%32 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 10), align 2, !tbaa !5
%cmp11.10 = icmp eq i8 %31, %32
br i1 %cmp11.10, label %if.then13.10, label %for.inc.10
if.then13.10: ; preds = %for.inc.9
%33 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 10), align 2, !tbaa !5
store i8 %33, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.10
for.inc.10: ; preds = %if.then13.10, %for.inc.9
%34 = phi i8 [ %31, %for.inc.9 ], [ %33, %if.then13.10 ]
%35 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 11), align 1, !tbaa !5
%cmp11.11 = icmp eq i8 %34, %35
br i1 %cmp11.11, label %if.then13.11, label %for.inc.11
if.then13.11: ; preds = %for.inc.10
%36 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 11), align 1, !tbaa !5
store i8 %36, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.11
for.inc.11: ; preds = %if.then13.11, %for.inc.10
%37 = phi i8 [ %34, %for.inc.10 ], [ %36, %if.then13.11 ]
%38 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 12), align 4, !tbaa !5
%cmp11.12 = icmp eq i8 %37, %38
br i1 %cmp11.12, label %if.then13.12, label %for.inc.12
if.then13.12: ; preds = %for.inc.11
%39 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 12), align 4, !tbaa !5
store i8 %39, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.12
for.inc.12: ; preds = %if.then13.12, %for.inc.11
%40 = phi i8 [ %37, %for.inc.11 ], [ %39, %if.then13.12 ]
%41 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 13), align 1, !tbaa !5
%cmp11.13 = icmp eq i8 %40, %41
br i1 %cmp11.13, label %if.then13.13, label %for.inc.13
if.then13.13: ; preds = %for.inc.12
%42 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 13), align 1, !tbaa !5
store i8 %42, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.13
for.inc.13: ; preds = %if.then13.13, %for.inc.12
%43 = phi i8 [ %40, %for.inc.12 ], [ %42, %if.then13.13 ]
%44 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 14), align 2, !tbaa !5
%cmp11.14 = icmp eq i8 %43, %44
br i1 %cmp11.14, label %if.then13.14, label %for.inc.14
if.then13.14: ; preds = %for.inc.13
%45 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 14), align 2, !tbaa !5
store i8 %45, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.14
for.inc.14: ; preds = %if.then13.14, %for.inc.13
%46 = phi i8 [ %43, %for.inc.13 ], [ %45, %if.then13.14 ]
%47 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 15), align 1, !tbaa !5
%cmp11.15 = icmp eq i8 %46, %47
br i1 %cmp11.15, label %if.then13.15, label %for.inc.15
if.then13.15: ; preds = %for.inc.14
%48 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 15), align 1, !tbaa !5
store i8 %48, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.15
for.inc.15: ; preds = %if.then13.15, %for.inc.14
%49 = phi i8 [ %46, %for.inc.14 ], [ %48, %if.then13.15 ]
%50 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 16), align 16, !tbaa !5
%cmp11.16 = icmp eq i8 %49, %50
br i1 %cmp11.16, label %if.then13.16, label %for.inc.16
if.then13.16: ; preds = %for.inc.15
%51 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 16), align 16, !tbaa !5
store i8 %51, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.16
for.inc.16: ; preds = %if.then13.16, %for.inc.15
%52 = phi i8 [ %49, %for.inc.15 ], [ %51, %if.then13.16 ]
%53 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 17), align 1, !tbaa !5
%cmp11.17 = icmp eq i8 %52, %53
br i1 %cmp11.17, label %if.then13.17, label %for.inc.17
if.then13.17: ; preds = %for.inc.16
%54 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 17), align 1, !tbaa !5
store i8 %54, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.17
for.inc.17: ; preds = %if.then13.17, %for.inc.16
%55 = phi i8 [ %52, %for.inc.16 ], [ %54, %if.then13.17 ]
%56 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 18), align 2, !tbaa !5
%cmp11.18 = icmp eq i8 %55, %56
br i1 %cmp11.18, label %if.then13.18, label %for.inc.18
if.then13.18: ; preds = %for.inc.17
%57 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 18), align 2, !tbaa !5
store i8 %57, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.18
for.inc.18: ; preds = %if.then13.18, %for.inc.17
%58 = phi i8 [ %55, %for.inc.17 ], [ %57, %if.then13.18 ]
%59 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 19), align 1, !tbaa !5
%cmp11.19 = icmp eq i8 %58, %59
br i1 %cmp11.19, label %if.then13.19, label %for.inc.19
if.then13.19: ; preds = %for.inc.18
%60 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 19), align 1, !tbaa !5
store i8 %60, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.19
for.inc.19: ; preds = %if.then13.19, %for.inc.18
%61 = phi i8 [ %58, %for.inc.18 ], [ %60, %if.then13.19 ]
%62 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 20), align 4, !tbaa !5
%cmp11.20 = icmp eq i8 %61, %62
br i1 %cmp11.20, label %if.then13.20, label %for.inc.20
if.then13.20: ; preds = %for.inc.19
%63 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 20), align 4, !tbaa !5
store i8 %63, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.20
for.inc.20: ; preds = %if.then13.20, %for.inc.19
%64 = phi i8 [ %61, %for.inc.19 ], [ %63, %if.then13.20 ]
%65 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 21), align 1, !tbaa !5
%cmp11.21 = icmp eq i8 %64, %65
br i1 %cmp11.21, label %if.then13.21, label %for.inc.21
if.then13.21: ; preds = %for.inc.20
%66 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 21), align 1, !tbaa !5
store i8 %66, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.21
for.inc.21: ; preds = %if.then13.21, %for.inc.20
%67 = phi i8 [ %64, %for.inc.20 ], [ %66, %if.then13.21 ]
%68 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 22), align 2, !tbaa !5
%cmp11.22 = icmp eq i8 %67, %68
br i1 %cmp11.22, label %if.then13.22, label %for.inc.22
if.then13.22: ; preds = %for.inc.21
%69 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 22), align 2, !tbaa !5
store i8 %69, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.22
for.inc.22: ; preds = %if.then13.22, %for.inc.21
%70 = phi i8 [ %67, %for.inc.21 ], [ %69, %if.then13.22 ]
%71 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 23), align 1, !tbaa !5
%cmp11.23 = icmp eq i8 %70, %71
br i1 %cmp11.23, label %if.then13.23, label %for.inc.23
if.then13.23: ; preds = %for.inc.22
%72 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 23), align 1, !tbaa !5
store i8 %72, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.23
for.inc.23: ; preds = %if.then13.23, %for.inc.22
%73 = phi i8 [ %70, %for.inc.22 ], [ %72, %if.then13.23 ]
%74 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 24), align 8, !tbaa !5
%cmp11.24 = icmp eq i8 %73, %74
br i1 %cmp11.24, label %if.then13.24, label %for.inc.24
if.then13.24: ; preds = %for.inc.23
%75 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 24), align 8, !tbaa !5
store i8 %75, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.24
for.inc.24: ; preds = %if.then13.24, %for.inc.23
%76 = phi i8 [ %73, %for.inc.23 ], [ %75, %if.then13.24 ]
%77 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 25), align 1, !tbaa !5
%cmp11.25 = icmp eq i8 %76, %77
br i1 %cmp11.25, label %if.then13.25, label %for.inc.25
if.then13.25: ; preds = %for.inc.24
%78 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 25), align 1, !tbaa !5
store i8 %78, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.25
for.inc.25: ; preds = %if.then13.25, %for.inc.24
%79 = phi i8 [ %76, %for.inc.24 ], [ %78, %if.then13.25 ]
%80 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 26), align 2, !tbaa !5
%cmp11.26 = icmp eq i8 %79, %80
br i1 %cmp11.26, label %if.then13.26, label %for.inc.26
if.then13.26: ; preds = %for.inc.25
%81 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 26), align 2, !tbaa !5
store i8 %81, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.26
for.inc.26: ; preds = %if.then13.26, %for.inc.25
%82 = phi i8 [ %79, %for.inc.25 ], [ %81, %if.then13.26 ]
%83 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 0, i64 27), align 1, !tbaa !5
%cmp11.27 = icmp eq i8 %82, %83
br i1 %cmp11.27, label %if.then13.27, label %for.inc.27
if.then13.27: ; preds = %for.inc.26
%84 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @O, i64 0, i64 27), align 1, !tbaa !5
store i8 %84, ptr %arrayidx31, align 1, !tbaa !5
br label %for.inc.27
for.inc.27: ; preds = %if.then13.27, %for.inc.26
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%arrayidx = getelementptr inbounds i8, ptr %a, i64 %indvars.iv.next
%85 = load i8, ptr %arrayidx, align 1, !tbaa !5
%86 = load i8, ptr getelementptr inbounds ([28 x i8], ptr @o, i64 1, i64 0), align 4, !tbaa !5
%cmp = icmp eq i8 %85, %86
br i1 %cmp, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.inc.27, %entry
ret void
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #2 {
entry:
%W = alloca [11 x i8], align 1
%T = alloca [1001 x i8], align 16
call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %W) #6
call void @llvm.lifetime.start.p0(i64 1001, ptr nonnull %T) #6
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %W)
call void @trade(ptr noundef nonnull %W)
br label %while.cond
while.cond: ; preds = %if.end, %entry
%c.0 = phi i32 [ 0, %entry ], [ %spec.select, %if.end ]
%call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %T)
%bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(12) %T, ptr noundef nonnull dereferenceable(12) @.str.1, i64 12)
%cmp.not = icmp eq i32 %bcmp, 0
br i1 %cmp.not, label %if.end, label %if.then
if.then: ; preds = %while.cond
call void @trade(ptr noundef nonnull %T)
br label %if.end
if.end: ; preds = %if.then, %while.cond
%call9 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %W, ptr noundef nonnull dereferenceable(1) %T) #7
%cmp10 = icmp eq i32 %call9, 0
%inc = zext i1 %cmp10 to i32
%spec.select = add nuw nsw i32 %c.0, %inc
%bcmp20 = call i32 @bcmp(ptr noundef nonnull dereferenceable(12) %T, ptr noundef nonnull dereferenceable(12) @.str.2, i64 12)
%cmp15 = icmp eq i32 %bcmp20, 0
br i1 %cmp15, label %while.end, label %while.cond
while.end: ; preds = %if.end
%call18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %spec.select)
call void @llvm.lifetime.end.p0(i64 1001, ptr nonnull %T) #6
call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %W) #6
ret i32 0
}
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #4
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #5
attributes #0 = { nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nofree nounwind willreturn memory(argmem: read) }
attributes #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
#include <string.h>
int main(void)
{
char W[11];
char T[1001];
int i;
int wcounter = 0;
scanf("%s", W);
for (i = 0; W[i] != '\0'; i++){
if ('A' <= W[i] && W[i] <= 'Z'){
W[i] += 32;
}
}
scanf("%s", T);
while (strcmp(T, "END_OF_TEXT") != 0){
for (i = 0; T[i] != '\0'; i++){
if ('A' <= T[i] && T[i] <= 'Z'){
T[i] += 32;
}
}
if (strcmp(T, W) == 0){
wcounter++;
}
scanf("%s", T);
}
printf("%d\n", wcounter);
return (0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130388/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130388/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [12 x i8] c"END_OF_TEXT\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:
%W = alloca [11 x i8], align 1
%T = alloca [1001 x i8], align 16
call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %W) #5
call void @llvm.lifetime.start.p0(i64 1001, ptr nonnull %T) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %W)
%0 = load i8, ptr %W, align 1, !tbaa !5
%cmp.not72 = icmp eq i8 %0, 0
br i1 %cmp.not72, label %for.end, label %for.body
for.body: ; preds = %entry, %for.inc
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
%1 = phi i8 [ %3, %for.inc ], [ %0, %entry ]
%arrayidx74 = phi ptr [ %arrayidx, %for.inc ], [ %W, %entry ]
%2 = add i8 %1, -65
%or.cond = icmp ult i8 %2, 26
br i1 %or.cond, label %if.then, label %for.inc
if.then: ; preds = %for.body
%add = add nuw nsw i8 %1, 32
store i8 %add, ptr %arrayidx74, align 1, !tbaa !5
br label %for.inc
for.inc: ; preds = %for.body, %if.then
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%arrayidx = getelementptr inbounds [11 x i8], ptr %W, i64 0, i64 %indvars.iv.next
%3 = load i8, ptr %arrayidx, align 1, !tbaa !5
%cmp.not = icmp eq i8 %3, 0
br i1 %cmp.not, label %for.end, label %for.body, !llvm.loop !8
for.end: ; preds = %for.inc, %entry
%call17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %T)
%bcmp78 = call i32 @bcmp(ptr noundef nonnull dereferenceable(12) %T, ptr noundef nonnull dereferenceable(12) @.str.1, i64 12)
%cmp20.not79 = icmp eq i32 %bcmp78, 0
br i1 %cmp20.not79, label %while.end, label %for.cond22.preheader
for.cond22.preheader: ; preds = %for.end, %for.end49
%wcounter.080 = phi i32 [ %spec.select, %for.end49 ], [ 0, %for.end ]
%4 = load i8, ptr %T, align 16, !tbaa !5
%cmp26.not75 = icmp eq i8 %4, 0
br i1 %cmp26.not75, label %for.end49, label %for.body28
for.body28: ; preds = %for.cond22.preheader, %for.inc47
%indvars.iv81 = phi i64 [ %indvars.iv.next82, %for.inc47 ], [ 0, %for.cond22.preheader ]
%5 = phi i8 [ %7, %for.inc47 ], [ %4, %for.cond22.preheader ]
%arrayidx2477 = phi ptr [ %arrayidx24, %for.inc47 ], [ %T, %for.cond22.preheader ]
%6 = add i8 %5, -65
%or.cond71 = icmp ult i8 %6, 26
br i1 %or.cond71, label %if.then40, label %for.inc47
if.then40: ; preds = %for.body28
%add44 = add nuw nsw i8 %5, 32
store i8 %add44, ptr %arrayidx2477, align 1, !tbaa !5
br label %for.inc47
for.inc47: ; preds = %for.body28, %if.then40
%indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
%arrayidx24 = getelementptr inbounds [1001 x i8], ptr %T, i64 0, i64 %indvars.iv.next82
%7 = load i8, ptr %arrayidx24, align 1, !tbaa !5
%cmp26.not = icmp eq i8 %7, 0
br i1 %cmp26.not, label %for.end49, label %for.body28, !llvm.loop !10
for.end49: ; preds = %for.inc47, %for.cond22.preheader
%call52 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %T, ptr noundef nonnull dereferenceable(1) %W) #6
%cmp53 = icmp eq i32 %call52, 0
%inc56 = zext i1 %cmp53 to i32
%spec.select = add nuw nsw i32 %wcounter.080, %inc56
%call59 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %T)
%bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(12) %T, ptr noundef nonnull dereferenceable(12) @.str.1, i64 12)
%cmp20.not = icmp eq i32 %bcmp, 0
br i1 %cmp20.not, label %while.end, label %for.cond22.preheader, !llvm.loop !11
while.end: ; preds = %for.end49, %for.end
%wcounter.0.lcssa = phi i32 [ 0, %for.end ], [ %spec.select, %for.end49 ]
%call60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %wcounter.0.lcssa)
call void @llvm.lifetime.end.p0(i64 1001, ptr nonnull %T) #5
call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %W) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind willreturn memory(argmem: read) }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}
!11 = distinct !{!11, !9}
|
#include<stdio.h>
int main()
{
long long int d1,d2,d3,min=0;
scanf("%I64d %I64d %I64d",&d1,&d2,&d3);
if(d1>d2){
min=d2;
if(d1+d2>d3)min+=d3;
else min+=d1+d2;
if(d3+d2>d1)min+=d1;
else min+=d3+d2;
}
else{
min=d1;
if(d1+d2>d3)min+=d3;
else min+=d1+d2;
if(d3+d1>d2)min+=d2;
else min+=d3+d1;
}
printf("%I64d",min);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13046/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13046/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [18 x i8] c"%I64d %I64d %I64d\00", align 1
@.str.1 = private unnamed_addr constant [6 x i8] c"%I64d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%d1 = alloca i64, align 8
%d2 = alloca i64, align 8
%d3 = alloca i64, align 8
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %d1) #4
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %d2) #4
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %d3) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %d1, ptr noundef nonnull %d2, ptr noundef nonnull %d3)
%0 = load i64, ptr %d1, align 8, !tbaa !5
%1 = load i64, ptr %d2, align 8, !tbaa !5
%cmp = icmp sgt i64 %0, %1
%add = add nsw i64 %1, %0
%2 = load i64, ptr %d3, align 8, !tbaa !5
%.add = call i64 @llvm.smin.i64(i64 %add, i64 %2)
br i1 %cmp, label %if.then, label %if.else14
if.then: ; preds = %entry
%min.0 = add nsw i64 %.add, %1
%add6 = add nsw i64 %2, %1
%cmp7 = icmp sgt i64 %add6, %0
br i1 %cmp7, label %if.then8, label %if.else10
if.then8: ; preds = %if.then
%add9 = add nsw i64 %min.0, %0
br label %if.end31
if.else10: ; preds = %if.then
%add12 = add nsw i64 %min.0, %add6
br label %if.end31
if.else14: ; preds = %entry
%min.1 = add nsw i64 %.add, %0
%add23 = add nsw i64 %2, %0
%cmp24 = icmp sgt i64 %add23, %1
br i1 %cmp24, label %if.then25, label %if.else27
if.then25: ; preds = %if.else14
%add26 = add nsw i64 %min.1, %1
br label %if.end31
if.else27: ; preds = %if.else14
%add29 = add nsw i64 %min.1, %add23
br label %if.end31
if.end31: ; preds = %if.then25, %if.else27, %if.then8, %if.else10
%min.2 = phi i64 [ %add9, %if.then8 ], [ %add12, %if.else10 ], [ %add26, %if.then25 ], [ %add29, %if.else27 ]
%call32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %min.2)
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %d3) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %d2) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %d1) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main()
{
long long int a,b,c,i,j,k;
int s[5];
scanf("%lld %lld %lld",&a,&b,&c);
s[0]=(a+a)+(b+b);
s[1]=a+b+c;
s[2]=(a+a)+(c+c);
s[3]=(b+b)+(c+c);
j=s[0];
for(i=0;i<4;i++){
if(s[i]<j) j=s[i];
}
printf("%lld",j);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13051/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13051/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [15 x i8] c"%lld %lld %lld\00", align 1
@.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i64, align 8
%b = alloca i64, align 8
%c = alloca i64, align 8
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #4
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %c) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c)
%0 = load i64, ptr %a, align 8, !tbaa !5
%1 = load i64, ptr %b, align 8, !tbaa !5
%add31 = add i64 %1, %0
%add31.tr = trunc i64 %add31 to i32
%conv = shl i32 %add31.tr, 1
%2 = load i64, ptr %c, align 8, !tbaa !5
%add4 = add nsw i64 %2, %add31
%add732 = add i64 %2, %0
%add732.tr = trunc i64 %add732 to i32
%conv10 = shl i32 %add732.tr, 1
%add1233 = add i64 %2, %1
%add1233.tr = trunc i64 %add1233 to i32
%conv15 = shl i32 %add1233.tr, 1
%conv18 = sext i32 %conv to i64
%sext = shl i64 %add4, 32
%conv21.1 = ashr exact i64 %sext, 32
%spec.select.1 = call i64 @llvm.smin.i64(i64 %conv18, i64 %conv21.1)
%conv21.2 = sext i32 %conv10 to i64
%spec.select.2 = call i64 @llvm.smin.i64(i64 %spec.select.1, i64 %conv21.2)
%conv21.3 = sext i32 %conv15 to i64
%spec.select.3 = call i64 @llvm.smin.i64(i64 %spec.select.2, i64 %conv21.3)
%call26 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %spec.select.3)
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %c) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !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==2 || b==2){
printf ("No");
}
else {
if (a==4 || a==6 || a==9 || a==11){
if (b==4 || b==6 || b==9 || b==11){
printf ("Yes");
}
else {printf ("No");}
}
else{
if(b==4 || b==6 || b==9 || b==11){
printf ("No");
}
else{
printf ("Yes");
}
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130553/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130553/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"No\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
@switch.table.main = private unnamed_addr constant [8 x ptr] [ptr @.str.2, ptr @.str.1, ptr @.str.2, ptr @.str.1, ptr @.str.1, ptr @.str.2, ptr @.str.1, ptr @.str.2], align 8
@switch.table.main.3 = private unnamed_addr constant [8 x ptr] [ptr @.str.1, ptr @.str.2, ptr @.str.1, ptr @.str.2, ptr @.str.2, ptr @.str.1, ptr @.str.2, ptr @.str.1], align 8
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4
%cmp = icmp eq i32 %0, 2
%1 = load i32, ptr %b, align 4
%cmp1 = icmp eq i32 %1, 2
%or.cond = select i1 %cmp, i1 true, i1 %cmp1
br i1 %or.cond, label %if.end36, label %if.else
if.else: ; preds = %entry
switch i32 %0, label %if.else22 [
i32 11, label %if.then10
i32 9, label %if.then10
i32 6, label %if.then10
i32 4, label %if.then10
]
if.then10: ; preds = %if.else, %if.else, %if.else, %if.else
%switch.tableidx = add i32 %1, -4
%2 = icmp ult i32 %switch.tableidx, 8
br i1 %2, label %switch.lookup, label %if.end36
if.else22: ; preds = %if.else
%switch.tableidx48 = add i32 %1, -4
%3 = icmp ult i32 %switch.tableidx48, 8
br i1 %3, label %switch.lookup47, label %if.end36
switch.lookup: ; preds = %if.then10
%4 = sext i32 %switch.tableidx to i64
%switch.gep = getelementptr inbounds [8 x ptr], ptr @switch.table.main, i64 0, i64 %4
br label %if.end36.sink.split
switch.lookup47: ; preds = %if.else22
%5 = sext i32 %switch.tableidx48 to i64
%switch.gep49 = getelementptr inbounds [8 x ptr], ptr @switch.table.main.3, i64 0, i64 %5
br label %if.end36.sink.split
if.end36.sink.split: ; preds = %switch.lookup, %switch.lookup47
%switch.gep49.sink = phi ptr [ %switch.gep49, %switch.lookup47 ], [ %switch.gep, %switch.lookup ]
%switch.load50 = load ptr, ptr %switch.gep49.sink, align 8
br label %if.end36
if.end36: ; preds = %if.end36.sink.split, %if.else22, %if.then10, %entry
%.str.1.sink = phi ptr [ @.str.1, %entry ], [ @.str.1, %if.then10 ], [ @.str.2, %if.else22 ], [ %switch.load50, %if.end36.sink.split ]
%call21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
|
#include <stdio.h>
int main() {
int x, y;
int flag = 0;
scanf("%d %d", &x, &y);
int group[12] = {1, 3, 5, 7, 8, 10, 12, 4, 6, 9, 11, 2};
int group2[12] = {0};
for (int i = 0; i < 12; i++){
if (x == group[i]){
group2[i]++;
}
if (y == group[i]){
group2[i]++;
}
}
for (int i = 0; i < 12; i++){
if (i == 7 || i == 11){
flag = 0;
}
flag += group2[i];
if (flag == 2){
printf("Yes\n");
return 0;
}
}
printf("No\n");
return 0;
}; | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130597/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130597/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [4 x i8] c"Yes\00", align 1
@str.3 = private unnamed_addr constant [3 x i8] c"No\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%x = alloca i32, align 4
%y = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y)
%0 = load i32, ptr %x, align 4, !tbaa !5
%1 = load i32, ptr %y, align 4, !tbaa !5
%cmp1 = icmp eq i32 %0, 1
%cmp6 = icmp eq i32 %1, 1
%cmp1.2 = icmp eq i32 %0, 5
%group2.sroa.13.0 = zext i1 %cmp1.2 to i32
%cmp6.2 = icmp eq i32 %1, 5
%inc10.2 = select i1 %cmp1.2, i32 2, i32 1
%group2.sroa.13.1 = select i1 %cmp6.2, i32 %inc10.2, i32 %group2.sroa.13.0
%cmp1.3 = icmp eq i32 %0, 7
%group2.sroa.18.0 = zext i1 %cmp1.3 to i32
%cmp6.3 = icmp eq i32 %1, 7
%inc10.3 = select i1 %cmp1.3, i32 2, i32 1
%group2.sroa.18.1 = select i1 %cmp6.3, i32 %inc10.3, i32 %group2.sroa.18.0
%cmp1.4 = icmp eq i32 %0, 8
%group2.sroa.23.0 = zext i1 %cmp1.4 to i32
%cmp6.4 = icmp eq i32 %1, 8
%inc10.4 = select i1 %cmp1.4, i32 2, i32 1
%group2.sroa.23.1 = select i1 %cmp6.4, i32 %inc10.4, i32 %group2.sroa.23.0
%cmp1.5 = icmp eq i32 %0, 10
%group2.sroa.28.0 = zext i1 %cmp1.5 to i32
%cmp6.5 = icmp eq i32 %1, 10
%inc10.5 = select i1 %cmp1.5, i32 2, i32 1
%group2.sroa.28.1 = select i1 %cmp6.5, i32 %inc10.5, i32 %group2.sroa.28.0
%cmp1.6 = icmp eq i32 %0, 12
%group2.sroa.33.0 = zext i1 %cmp1.6 to i32
%cmp6.6 = icmp eq i32 %1, 12
%inc10.6 = select i1 %cmp1.6, i32 2, i32 1
%group2.sroa.33.1 = select i1 %cmp6.6, i32 %inc10.6, i32 %group2.sroa.33.0
%cmp1.7 = icmp eq i32 %0, 4
%group2.sroa.38.0 = zext i1 %cmp1.7 to i32
%cmp6.7 = icmp eq i32 %1, 4
%inc10.7 = select i1 %cmp1.7, i32 2, i32 1
%group2.sroa.38.1 = select i1 %cmp6.7, i32 %inc10.7, i32 %group2.sroa.38.0
%cmp1.8 = icmp eq i32 %0, 6
%group2.sroa.43.0 = zext i1 %cmp1.8 to i32
%cmp6.8 = icmp eq i32 %1, 6
%inc10.8 = select i1 %cmp1.8, i32 2, i32 1
%group2.sroa.43.1 = select i1 %cmp6.8, i32 %inc10.8, i32 %group2.sroa.43.0
%cmp1.9 = icmp eq i32 %0, 9
%group2.sroa.48.0 = zext i1 %cmp1.9 to i32
%cmp6.9 = icmp eq i32 %1, 9
%inc10.9 = select i1 %cmp1.9, i32 2, i32 1
%group2.sroa.48.1 = select i1 %cmp6.9, i32 %inc10.9, i32 %group2.sroa.48.0
%cmp1.10 = icmp eq i32 %0, 11
%group2.sroa.53.0 = zext i1 %cmp1.10 to i32
%cmp6.10 = icmp eq i32 %1, 11
%inc10.10 = select i1 %cmp1.10, i32 2, i32 1
%group2.sroa.53.1 = select i1 %cmp6.10, i32 %inc10.10, i32 %group2.sroa.53.0
%cmp1.11 = icmp eq i32 %0, 2
%cmp6.11 = icmp eq i32 %1, 2
%group2.sroa.58.1 = select i1 %cmp6.11, i1 %cmp1.11, i1 false
%cmp24 = select i1 %cmp6, i1 %cmp1, i1 false
br i1 %cmp24, label %if.then25, label %if.end21.1
if.end21.1: ; preds = %entry
%inc10 = select i1 %cmp1, i32 2, i32 1
%spec.select = zext i1 %cmp1 to i32
%group2.sroa.0.1 = select i1 %cmp6, i32 %inc10, i32 %spec.select
%cmp6.1 = icmp eq i32 %1, 3
%cmp1.1 = icmp eq i32 %0, 3
%inc10.1 = select i1 %cmp1.1, i32 2, i32 1
%group2.sroa.8.0 = zext i1 %cmp1.1 to i32
%group2.sroa.8.1 = select i1 %cmp6.1, i32 %inc10.1, i32 %group2.sroa.8.0
%add.1 = add nuw nsw i32 %group2.sroa.8.1, %group2.sroa.0.1
%cmp24.1 = icmp eq i32 %add.1, 2
br i1 %cmp24.1, label %if.then25, label %if.end21.2
if.end21.2: ; preds = %if.end21.1
%add.2 = add nuw nsw i32 %group2.sroa.13.1, %add.1
%cmp24.2 = icmp eq i32 %add.2, 2
br i1 %cmp24.2, label %if.then25, label %if.end21.3
if.end21.3: ; preds = %if.end21.2
%add.3 = add nuw nsw i32 %group2.sroa.18.1, %add.2
%cmp24.3 = icmp eq i32 %add.3, 2
br i1 %cmp24.3, label %if.then25, label %if.end21.4
if.end21.4: ; preds = %if.end21.3
%add.4 = add nuw nsw i32 %group2.sroa.23.1, %add.3
%cmp24.4 = icmp eq i32 %add.4, 2
br i1 %cmp24.4, label %if.then25, label %if.end21.5
if.end21.5: ; preds = %if.end21.4
%add.5 = add nuw nsw i32 %group2.sroa.28.1, %add.4
%cmp24.5 = icmp eq i32 %add.5, 2
%add.6 = add nuw nsw i32 %group2.sroa.33.1, %add.5
%cmp24.6 = icmp eq i32 %add.6, 2
%or.cond = select i1 %cmp24.5, i1 true, i1 %cmp24.6
%cmp24.7 = select i1 %cmp6.7, i1 %cmp1.7, i1 false
%or.cond99 = select i1 %or.cond, i1 true, i1 %cmp24.7
br i1 %or.cond99, label %if.then25, label %if.end21.8
if.end21.8: ; preds = %if.end21.5
%add.8 = add nuw nsw i32 %group2.sroa.43.1, %group2.sroa.38.1
%cmp24.8 = icmp eq i32 %add.8, 2
br i1 %cmp24.8, label %if.then25, label %if.end21.9
if.end21.9: ; preds = %if.end21.8
%add.9 = add nuw nsw i32 %group2.sroa.48.1, %add.8
%cmp24.9 = icmp eq i32 %add.9, 2
%add.10 = add nuw nsw i32 %group2.sroa.53.1, %add.9
%cmp24.10 = icmp eq i32 %add.10, 2
%or.cond100 = select i1 %cmp24.9, i1 true, i1 %cmp24.10
%brmerge = select i1 %or.cond100, i1 true, i1 %group2.sroa.58.1
br i1 %brmerge, label %if.then25, label %cleanup32
if.then25: ; preds = %if.end21.9, %if.end21.8, %if.end21.5, %if.end21.4, %if.end21.3, %if.end21.2, %if.end21.1, %entry
br label %cleanup32
cleanup32: ; preds = %if.end21.9, %if.then25
%str.sink = phi ptr [ @str, %if.then25 ], [ @str.3, %if.end21.9 ]
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
#include <stdlib.h>
int main()
{
int d1,d2,d3,min;
scanf("%d %d %d",&d1,&d2,&d3);
min=2*d1+2*d2;
if (d1+d2+d3<min)
min=d1+d2+d3;
if (2*d1+2*d3<min)
min=2*d1+2*d3;
if (2*d2+2*d3<min)
min=2*d2+2*d3;
printf("%d",min);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13064/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13064/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%d1 = alloca i32, align 4
%d2 = alloca i32, align 4
%d3 = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d1) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d2) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d3) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %d1, ptr noundef nonnull %d2, ptr noundef nonnull %d3)
%0 = load i32, ptr %d1, align 4, !tbaa !5
%1 = load i32, ptr %d2, align 4, !tbaa !5
%mul28 = add i32 %1, %0
%add = shl i32 %mul28, 1
%2 = load i32, ptr %d3, align 4, !tbaa !5
%add3 = add nsw i32 %mul28, %2
%spec.select = call i32 @llvm.smin.i32(i32 %add3, i32 %add)
%mul629 = add i32 %2, %0
%add8 = shl i32 %mul629, 1
%min.1 = call i32 @llvm.smin.i32(i32 %add8, i32 %spec.select)
%mul1530 = add i32 %2, %1
%add17 = shl i32 %mul1530, 1
%min.2 = call i32 @llvm.smin.i32(i32 %add17, i32 %min.1)
%call24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %min.2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d3) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d2) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d1) #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(void){
// Here your code !
int x,y;
scanf("%d %d", &x, &y);
if(( (x == 1 || x == 3 || x == 5 || x == 7 || x == 8 || x == 10 ) && (y == 3 || y == 5 || y == 7 || y == 8 || y == 10 || y == 12) )||
((x == 4 || x == 6 || x == 9 ) && (y == 6 || y == 9 || y ==11) )){
printf("Yes\n");
}else{
printf("No\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130683/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130683/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@str = private unnamed_addr constant [3 x i8] c"No\00", align 1
@str.3 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
@reltable.main = private unnamed_addr constant [6 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32)], align 4
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%x = alloca i32, align 4
%y = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y)
%0 = load i32, ptr %x, align 4
switch i32 %0, label %if.end [
i32 10, label %land.lhs.true
i32 8, label %land.lhs.true
i32 7, label %land.lhs.true
i32 5, label %land.lhs.true
i32 3, label %land.lhs.true
i32 1, label %land.lhs.true
i32 9, label %land.lhs.true27thread-pre-split
i32 6, label %land.lhs.true27thread-pre-split
i32 4, label %land.lhs.true27thread-pre-split
]
land.lhs.true: ; preds = %entry, %entry, %entry, %entry, %entry, %entry
%1 = load i32, ptr %y, align 4
%switch.tableidx = add i32 %1, -3
%2 = icmp ult i32 %switch.tableidx, 10
br i1 %2, label %switch.hole_check, label %lor.lhs.false21
lor.lhs.false21: ; preds = %switch.hole_check, %land.lhs.true
switch i32 %0, label %if.end [
i32 9, label %land.lhs.true27
i32 6, label %land.lhs.true27
i32 4, label %land.lhs.true27
]
land.lhs.true27thread-pre-split: ; preds = %entry, %entry, %entry
%.pr = load i32, ptr %y, align 4
br label %land.lhs.true27
land.lhs.true27: ; preds = %land.lhs.true27thread-pre-split, %lor.lhs.false21, %lor.lhs.false21, %lor.lhs.false21
%3 = phi i32 [ %.pr, %land.lhs.true27thread-pre-split ], [ %1, %lor.lhs.false21 ], [ %1, %lor.lhs.false21 ], [ %1, %lor.lhs.false21 ]
%switch.tableidx50 = add i32 %3, -6
%4 = icmp ult i32 %switch.tableidx50, 6
br i1 %4, label %switch.lookup49, label %if.end
switch.hole_check: ; preds = %land.lhs.true
%switch.maskindex = trunc i32 %switch.tableidx to i16
%switch.shifted = lshr i16 693, %switch.maskindex
%5 = and i16 %switch.shifted, 1
%switch.lobit.not = icmp eq i16 %5, 0
br i1 %switch.lobit.not, label %lor.lhs.false21, label %if.end
switch.lookup49: ; preds = %land.lhs.true27
%6 = sext i32 %switch.tableidx50 to i64
%reltable.shift = shl i64 %6, 2
%reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift)
br label %if.end
if.end: ; preds = %switch.hole_check, %lor.lhs.false21, %entry, %land.lhs.true27, %switch.lookup49
%str.sink = phi ptr [ %reltable.intrinsic, %switch.lookup49 ], [ @str, %land.lhs.true27 ], [ @str, %entry ], [ @str, %lor.lhs.false21 ], [ @str.3, %switch.hole_check ]
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read)
declare ptr @llvm.load.relative.i64(ptr, i64) #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
|
#include<stdio.h>
int main(void)
{
double f;
int a, b, d, r;
scanf("%d %d", &a, &b);
d = a / b;
r = a % b;
f = (double)a / b;
printf("%d %d %lf\n", d, r, f);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130726/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130726/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main()
{
long long d1, d2, d3, i, j, x, gjhg = 100000000000007456;
scanf("%I64d %I64d %I64d", &d1, &d2, &d3);
x = ((d1 + d2)*2);
if(x <= gjhg){
gjhg = x;
}
x = ((d1 + d3)*2);
if(x <= gjhg){
gjhg = x;
}
x = ((d3 + d2)*2);
if(x <= gjhg){
gjhg = x;
}
x = (d1 + d2 + d3);
if(x <= gjhg){
gjhg = x;
}
printf("%I64d\n", gjhg);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13077/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13077/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [18 x i8] c"%I64d %I64d %I64d\00", align 1
@.str.1 = private unnamed_addr constant [7 x i8] c"%I64d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%d1 = alloca i64, align 8
%d2 = alloca i64, align 8
%d3 = alloca i64, align 8
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %d1) #4
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %d2) #4
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %d3) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %d1, ptr noundef nonnull %d2, ptr noundef nonnull %d3)
%0 = load i64, ptr %d1, align 8, !tbaa !5
%1 = load i64, ptr %d2, align 8, !tbaa !5
%add = add nsw i64 %1, %0
%cmp = icmp slt i64 %add, 50000000000003729
%mul = shl nsw i64 %add, 1
%spec.select = select i1 %cmp, i64 %mul, i64 100000000000007456
%2 = load i64, ptr %d3, align 8, !tbaa !5
%add1 = add nsw i64 %2, %0
%mul2 = shl nsw i64 %add1, 1
%gjhg.1 = call i64 @llvm.smin.i64(i64 %mul2, i64 %spec.select)
%add6 = add nsw i64 %2, %1
%mul7 = shl nsw i64 %add6, 1
%gjhg.2 = call i64 @llvm.smin.i64(i64 %mul7, i64 %gjhg.1)
%add12 = add nsw i64 %add, %2
%gjhg.3 = call i64 @llvm.smin.i64(i64 %add12, i64 %gjhg.2)
%call16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %gjhg.3)
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %d3) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %d2) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %d1) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include "stdio.h"
int main(void){
int a,b;
scanf("%d %d",&a,&b);
printf("%d %d %f\n",a/b,a%b,(double)a/b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130812/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130812/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void)
{
int a,b,c,d;
double e;
scanf("%d %d",&a,&b);
c = a / b;
d = a % b;
e = (double)a / b;
printf("%d %d %.5f",c,d,e);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130856/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130856/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %.5f\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(){
int i,j,k,n,t,a[200000];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&a[i]);
}
for(i=n-1;i>=0;i--){
if(a[i]^a[i-1]==1){
printf("%d",i);
break;
}
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1309/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1309/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
%a = alloca [200000 x i32], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3
call void @llvm.lifetime.start.p0(i64 800000, ptr nonnull %a) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp22 = icmp sgt i32 %0, 0
br i1 %cmp22, label %for.body, label %entry.for.cond2.preheader_crit_edge
entry.for.cond2.preheader_crit_edge: ; preds = %entry
%.pre = sext i32 %0 to i64
br label %for.cond2.preheader
for.body: ; preds = %entry, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
%arrayidx = getelementptr inbounds [200000 x i32], ptr %a, i64 0, i64 %indvars.iv
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%1 = load i32, ptr %n, align 4, !tbaa !5
%2 = sext i32 %1 to i64
%cmp = icmp slt i64 %indvars.iv.next, %2
br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !9
for.cond2.preheader: ; preds = %for.body, %entry.for.cond2.preheader_crit_edge
%indvars.iv26.ph = phi i64 [ %.pre, %entry.for.cond2.preheader_crit_edge ], [ %2, %for.body ]
br label %for.cond2
for.cond2: ; preds = %for.cond2.preheader, %for.body4
%indvars.iv26 = phi i64 [ %indvars.iv.next27, %for.body4 ], [ %indvars.iv26.ph, %for.cond2.preheader ]
%cmp3 = icmp sgt i64 %indvars.iv26, 0
br i1 %cmp3, label %for.body4, label %for.end13
for.body4: ; preds = %for.cond2
%indvars.iv.next27 = add nsw i64 %indvars.iv26, -1
%idxprom5 = and i64 %indvars.iv.next27, 4294967295
%arrayidx6 = getelementptr inbounds [200000 x i32], ptr %a, i64 0, i64 %idxprom5
%3 = load i32, ptr %arrayidx6, align 4, !tbaa !5
%4 = add nsw i64 %indvars.iv26, -2
%arrayidx9 = getelementptr inbounds [200000 x i32], ptr %a, i64 0, i64 %4
%5 = load i32, ptr %arrayidx9, align 4, !tbaa !5
%cmp10 = icmp eq i32 %5, 1
%conv = zext i1 %cmp10 to i32
%tobool.not = icmp eq i32 %3, %conv
br i1 %tobool.not, label %for.cond2, label %if.then, !llvm.loop !11
if.then: ; preds = %for.body4
%6 = trunc i64 %indvars.iv.next27 to i32
%call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %6)
br label %for.end13
for.end13: ; preds = %for.cond2, %if.then
call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %a) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include<stdio.h>
int main()
{
int a,b;
int d,r;
double f;
scanf("%d %d",&a,&b);
d=a/b;
r=a%b;
f=(double)a/(double)b;
printf("%d %d %lf\n",d,r,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130942/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130942/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(){
int a,b;
int d,r;
double f;
scanf("%d %d",&a,&b);
d=a/b;
r=a%b;
f=(double)a/b;
printf("%d %d %lf\n",d,r,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130986/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130986/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(){
int a,b,d,r;
double f;
scanf("%d %d\n",&a,&b);
d = a/b;
r = a%b;
f = (double)a/(double)b;
printf("%d %d %lf\n",d,r,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131035/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131035/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main (void)
{
int a,b,d=0,r=0;
double f=0;
scanf("%d %d",&a,&b);
d=a/b;
r=a%b;
f=(double)a/b;
printf("%d %d %lf\n",d,r,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131079/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131079/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void)
{
int a,b,d,r;
double f;
// scanf("%d,%d",&a,&b);
scanf("%d",&a);
scanf("%d",&b);
d=a/b;
r=a%b;
f=(double)a/b;
printf("%d %d %lf\n",d,r,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131129/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131129/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv2 = sitofp i32 %1 to double
%div3 = fdiv double %conv, %conv2
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void) {
int a, b, d, r;
double f;
scanf("%d %d", &a, &b);
d = a/b;
r = a%b;
printf("%d %d %f\n", d, r, (double)a/b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131172/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131172/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main() {
int a,b;
double f;
scanf("%d %d",&a,&b);
f=(double)a/b;
printf("%d %d %f\n",a/b,a%b,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131215/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131215/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%conv = sitofp i32 %0 to double
%1 = load i32, ptr %b, align 4, !tbaa !5
%conv1 = sitofp i32 %1 to double
%div = fdiv double %conv, %conv1
%div2 = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div2, i32 noundef %rem, double noundef %div)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void){
int a, b;
scanf("%d %d", &a, &b);
printf("%d %d %lf", a/b, a%b, (double)a/b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131259/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131259/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %lf\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main() {
int a, b;
int d, r;
double f;
scanf("%d %d", &a, &b);
d = a/b;
r = a%b;
f = (double)a/b;
printf("%d %d %.5lf\n", d, r, f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131301/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131301/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [13 x i8] c"%d %d %.5lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void){
int a, b;
scanf("%d %d", &a, &b);
printf("%d %d %lf\n", a/b, a%b, (double)a/b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131345/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131345/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int a,b;
scanf("%d",&a);
scanf("%d",&b);
printf("%d %d %lf\n",a/b,a%b,(double)a/b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131389/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131389/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv2 = sitofp i32 %1 to double
%div3 = fdiv double %conv, %conv2
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div3)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void)
{
int a,b,d=0,r=0;
double f=0;
scanf("%d %d",&a,&b);
d=a/b;
r=a%b;
f=(double)a/(double)b;
printf("%d %d %lf\n",d,r,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131453/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131453/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void){
int a,b;
int d,r;
double f;
scanf("%d %d",&a,&b);
d=a/b;
r=a%b;
f=(double)a/(double)b;
printf("%d %d %lf\n",d,r,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131510/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131510/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int
main (
int argc,
char *argv[ ]
)
{
int a, b;
scanf ( "%d%d", &a, &b );
printf ( "%d %d %.5f\n", a / b, a % b, (double)a / b );
return ( 0 );
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131554/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131554/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@.str.1 = private unnamed_addr constant [12 x i8] c"%d %d %.5f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(){
int a,b;
double f;
scanf("%d %d", &a, &b);
f = (double)a / (double)b;
printf("%d %d %f\n", a/b, a%b, f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131611/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131611/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%conv = sitofp i32 %0 to double
%1 = load i32, ptr %b, align 4, !tbaa !5
%conv1 = sitofp i32 %1 to double
%div = fdiv double %conv, %conv1
%div2 = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div2, i32 noundef %rem, double noundef %div)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
#include<stdlib.h>
void main()
{
int n,i,j,k,x,u,l;k=0;u=0;
scanf("%d",&n);
int d[n];
for(l=0;l<n;l++)
{
scanf("%d",&x);
for(i=0;i<=x/7;i++)
for(j=0;j<=x/3;j++)
if(7*i+3*j==x){
k=1;i=x;break;}
if(k==1){
d[u]=1;u++;k=0;}
else{
d[u]=0;u++;}
}
for(i=0;i<u;i++){
if(d[i]==1)
printf("YES\n");
else
printf("NO\n");
}
exit(0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13167/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13167/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@str = private unnamed_addr constant [3 x i8] c"NO\00", align 1
@str.3 = private unnamed_addr constant [4 x i8] c"YES\00", align 1
; Function Attrs: noreturn nounwind uwtable
define dso_local void @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
%x = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #6
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i32, ptr %n, align 4, !tbaa !5
%1 = zext i32 %0 to i64
%vla = alloca i32, i64 %1, align 16
%cmp59 = icmp sgt i32 %0, 0
br i1 %cmp59, label %for.body, label %for.end37
for.cond24.preheader: ; preds = %for.inc21
%cmp2563.not = icmp eq i32 %indvars, 0
br i1 %cmp2563.not, label %for.end37, label %for.body26.preheader
for.body26.preheader: ; preds = %for.cond24.preheader
%wide.trip.count = and i64 %indvars.iv.next, 4294967295
br label %for.body26
for.body: ; preds = %entry, %for.inc21
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc21 ], [ 0, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x)
%2 = load i32, ptr %x, align 4, !tbaa !5
%div = sdiv i32 %2, 7
%cmp7.not51 = icmp slt i32 %2, -2
br i1 %cmp7.not51, label %if.else, label %for.cond5.preheader.preheader
for.cond5.preheader.preheader: ; preds = %for.body
%div6 = sdiv i32 %2, 3
%3 = mul i32 %2, -1431655765
br label %for.cond5.preheader
for.cond5.preheader: ; preds = %for.cond5.preheader.preheader, %for.inc11
%i.058 = phi i32 [ %inc12, %for.inc11 ], [ 0, %for.cond5.preheader.preheader ]
%k.157 = phi i32 [ %k.2, %for.inc11 ], [ 0, %for.cond5.preheader.preheader ]
%4 = mul i32 %i.058, 1431655763
%5 = add i32 %3, %4
%umin = call i32 @llvm.umin.i32(i32 %div6, i32 %5)
%6 = add i32 %umin, 1
%min.iters.check = icmp ult i32 %6, 17
br i1 %min.iters.check, label %for.body8.preheader, label %vector.ph
vector.ph: ; preds = %for.cond5.preheader
%n.mod.vf = and i32 %6, 15
%7 = icmp eq i32 %n.mod.vf, 0
%8 = select i1 %7, i32 16, i32 %n.mod.vf
%n.vec = sub i32 %6, %8
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%index.next = add nuw i32 %index, 16
%9 = icmp eq i32 %index.next, %n.vec
br i1 %9, label %for.body8.preheader, label %vector.body, !llvm.loop !9
for.body8.preheader: ; preds = %vector.body, %for.cond5.preheader
%j.052.ph = phi i32 [ 0, %for.cond5.preheader ], [ %n.vec, %vector.body ]
br label %for.body8
for.cond5: ; preds = %for.body8
%inc = add nuw nsw i32 %j.052, 1
%exitcond66.not = icmp eq i32 %j.052, %div6
br i1 %exitcond66.not, label %for.inc11, label %for.body8, !llvm.loop !13
for.body8: ; preds = %for.body8.preheader, %for.cond5
%j.052 = phi i32 [ %inc, %for.cond5 ], [ %j.052.ph, %for.body8.preheader ]
%exitcond = icmp eq i32 %j.052, %5
br i1 %exitcond, label %for.inc11, label %for.cond5
for.inc11: ; preds = %for.cond5, %for.body8
%k.2 = phi i32 [ 1, %for.body8 ], [ %k.157, %for.cond5 ]
%i.1 = phi i32 [ %2, %for.body8 ], [ %i.058, %for.cond5 ]
%inc12 = add nsw i32 %i.1, 1
%cmp3.not.not = icmp slt i32 %i.1, %div
br i1 %cmp3.not.not, label %for.cond5.preheader, label %for.end13, !llvm.loop !14
for.end13: ; preds = %for.inc11
%cmp14 = icmp eq i32 %k.2, 1
br i1 %cmp14, label %for.inc21, label %if.else
if.else: ; preds = %for.body, %for.end13
br label %for.inc21
for.inc21: ; preds = %for.end13, %if.else
%.sink = phi i32 [ 0, %if.else ], [ 1, %for.end13 ]
%10 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv
store i32 %.sink, ptr %10, align 4
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%indvars = trunc i64 %indvars.iv.next to i32
%11 = load i32, ptr %n, align 4, !tbaa !5
%cmp = icmp sgt i32 %11, %indvars
br i1 %cmp, label %for.body, label %for.cond24.preheader, !llvm.loop !15
for.body26: ; preds = %for.body26.preheader, %for.body26
%indvars.iv70 = phi i64 [ 0, %for.body26.preheader ], [ %indvars.iv.next71, %for.body26 ]
%arrayidx28 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv70
%12 = load i32, ptr %arrayidx28, align 4, !tbaa !5
%cmp29 = icmp eq i32 %12, 1
%str.3.str = select i1 %cmp29, ptr @str.3, ptr @str
%puts50 = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str)
%indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
%exitcond74.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count
br i1 %exitcond74.not, label %for.end37, label %for.body26, !llvm.loop !16
for.end37: ; preds = %for.body26, %entry, %for.cond24.preheader
call void @exit(i32 noundef 0) #7
unreachable
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.i32(i32, i32) #5
attributes #0 = { noreturn nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { noreturn nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !12, !11}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
|
#include <stdio.h>
int main(void){
int a,b,c;
scanf("%d %d \n",&a,&b);
printf("%d %d %f",a/b,a%b,1.0 * a / b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131734/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131734/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [8 x i8] c"%d %d \0A\00", align 1
@.str.1 = private unnamed_addr constant [9 x i8] c"%d %d %f\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void)
{
int a, b;
int d, r;
double f;
scanf("%d %d", &a, &b);
printf("%d %d %f\n", a / b, a % b, (double)a / (double)b);
return (0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131778/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131778/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main()
{
int a,b,d,r;
double ax,bx,f;
scanf("%d%d",&a,&b);
ax=a;
bx=b;
f=ax/bx;
d=a/b;
r=a%b;
printf("%d %d %f",d,r,f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131820/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131820/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@.str.1 = private unnamed_addr constant [9 x i8] c"%d %d %f\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%conv = sitofp i32 %0 to double
%1 = load i32, ptr %b, align 4, !tbaa !5
%conv1 = sitofp i32 %1 to double
%div = fdiv double %conv, %conv1
%div2 = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div2, i32 noundef %rem, double noundef %div)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(){
double f;
int a,b,d,r;
a=b=f=d=r=0;
scanf("%d %d",&a,&b);
d=a/b;
r=a%b;
f=(double) a/(double) b;
printf("%d ",d);
printf("%d ",r);
printf("%lf\n",f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131871/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131871/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"%d \00", align 1
@.str.2 = private unnamed_addr constant [5 x i8] c"%lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
store i32 0, ptr %b, align 4, !tbaa !5
store i32 0, ptr %a, 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
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div)
%call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %rem)
%call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main() {
int a,b;
scanf("%d %d", &a, &b);
double ans = (double) a / (double) b;
printf("%d %d %f\n", a/b, a%b, ans);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131914/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131914/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%conv = sitofp i32 %0 to double
%1 = load i32, ptr %b, align 4, !tbaa !5
%conv1 = sitofp i32 %1 to double
%div = fdiv double %conv, %conv1
%div2 = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div2, i32 noundef %rem, double noundef %div)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main()
{
int a,b,d,r;
double f;
scanf("%d %d",&a,&b);
d=a/b;
r=a%b;
f=(double)a/(double)b;
printf("%d %d %.5lf\n",d,r,f);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131958/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131958/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [13 x i8] c"%d %d %.5lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int chunk(int x){
if(x%3 == 0 || x%7 == 0 )
return 1;
if(x>7)
return chunk(x-7);
else
return 0;
}
int main(){
int t;
scanf("%d",&t);
while(t--){
int x;
scanf("%d",&x);
int c = chunk(x);
if(c)
printf("YES\n");
else
printf("NO\n");
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13200/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13200/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@str = private unnamed_addr constant [3 x i8] c"NO\00", align 1
@str.3 = private unnamed_addr constant [4 x i8] c"YES\00", align 1
; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable
define dso_local i32 @chunk(i32 noundef %x) local_unnamed_addr #0 {
entry:
%rem8 = srem i32 %x, 3
%cmp9 = icmp eq i32 %rem8, 0
%rem110 = srem i32 %x, 7
%cmp211 = icmp eq i32 %rem110, 0
%or.cond12 = or i1 %cmp9, %cmp211
br i1 %or.cond12, label %return, label %if.end
tailrecurse: ; preds = %if.end
%sub = add nsw i32 %x.tr13, -7
%rem15 = urem i32 %sub, 3
%cmp = icmp eq i32 %rem15, 0
%rem116 = urem i32 %sub, 7
%cmp2 = icmp eq i32 %rem116, 0
%or.cond = or i1 %cmp, %cmp2
br i1 %or.cond, label %return, label %if.end
if.end: ; preds = %entry, %tailrecurse
%x.tr13 = phi i32 [ %sub, %tailrecurse ], [ %x, %entry ]
%cmp3 = icmp sgt i32 %x.tr13, 7
br i1 %cmp3, label %tailrecurse, label %return
return: ; preds = %tailrecurse, %if.end, %entry
%retval.0 = phi i32 [ 1, %entry ], [ 0, %if.end ], [ 1, %tailrecurse ]
ret i32 %retval.0
}
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #1 {
entry:
%t = alloca i32, align 4
%x = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t)
%0 = load i32, ptr %t, align 4, !tbaa !5
%dec9 = add nsw i32 %0, -1
store i32 %dec9, ptr %t, align 4, !tbaa !5
%tobool.not10 = icmp eq i32 %0, 0
br i1 %tobool.not10, label %while.end, label %while.body
while.body: ; preds = %entry, %if.end
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #5
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x)
%1 = load i32, ptr %x, align 4, !tbaa !5
%rem8.i = srem i32 %1, 3
%cmp9.i = icmp eq i32 %rem8.i, 0
%rem110.i = srem i32 %1, 7
%cmp211.i = icmp eq i32 %rem110.i, 0
%or.cond12.i = or i1 %cmp9.i, %cmp211.i
br i1 %or.cond12.i, label %if.end, label %if.end.i
tailrecurse.i: ; preds = %if.end.i
%sub.i = add nsw i32 %x.tr13.i, -7
%rem15.i = urem i32 %sub.i, 3
%cmp.i = icmp eq i32 %rem15.i, 0
%rem116.i = urem i32 %sub.i, 7
%cmp2.i = icmp eq i32 %rem116.i, 0
%or.cond.i = or i1 %cmp.i, %cmp2.i
br i1 %or.cond.i, label %if.end, label %if.end.i
if.end.i: ; preds = %while.body, %tailrecurse.i
%x.tr13.i = phi i32 [ %sub.i, %tailrecurse.i ], [ %1, %while.body ]
%cmp3.i = icmp sgt i32 %x.tr13.i, 7
br i1 %cmp3.i, label %tailrecurse.i, label %if.end
if.end: ; preds = %if.end.i, %tailrecurse.i, %while.body
%str.sink = phi ptr [ @str.3, %while.body ], [ @str.3, %tailrecurse.i ], [ @str, %if.end.i ]
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #5
%2 = load i32, ptr %t, align 4, !tbaa !5
%dec = add nsw i32 %2, -1
store i32 %dec, ptr %t, align 4, !tbaa !5
%tobool.not = icmp eq i32 %2, 0
br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !9
while.end: ; preds = %if.end, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4
attributes #0 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
|
#include<stdio.h>
int main(void) {
int a, b, d, r;
double f;
scanf("%d %d", &a, &b);
d = a / b;
r = a%b;
f = 1.0 * a / b;
printf("%d %d %.5lf\n", d, r, f);
return(0);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132043/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132043/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [13 x i8] c"%d %d %.5lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main()
{
int a,b,s,r;
double f;
scanf("%d%d",&a,&b);
s=a/b;
r=a%b;
f=(double)a/b;
printf("%d %d %f\n",s,r,f);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132087/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132087/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
int main() {
int size;
scanf("%d",&size);
int temp;
for (int i = 0; i < size; i++) {
scanf("%d",&temp);
if( temp < 3 || temp == 5 || temp == 8 || temp == 4 || temp == 11) {
printf("NO\n");
}else
printf("YES\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13213/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13213/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@str = private unnamed_addr constant [4 x i8] c"YES\00", align 1
@str.3 = private unnamed_addr constant [3 x i8] c"NO\00", align 1
@reltable.main = private unnamed_addr constant [8 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32)], align 4
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%size = alloca i32, align 4
%temp = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %size) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %size)
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %temp) #5
%0 = load i32, ptr %size, align 4, !tbaa !5
%cmp17 = icmp sgt i32 %0, 0
br i1 %cmp17, label %for.body, label %for.cond.cleanup
for.cond.cleanup: ; preds = %for.inc, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %temp) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %size) #5
ret i32 0
for.body: ; preds = %entry, %for.inc
%i.018 = phi i32 [ %inc, %for.inc ], [ 0, %entry ]
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %temp)
%1 = load i32, ptr %temp, align 4
%.fr = freeze i32 %1
%cmp2 = icmp slt i32 %.fr, 3
br i1 %cmp2, label %for.inc, label %switch.early.test
switch.early.test: ; preds = %for.body
%switch.tableidx = add i32 %.fr, -4
%2 = icmp ult i32 %switch.tableidx, 8
br i1 %2, label %switch.lookup, label %for.inc
switch.lookup: ; preds = %switch.early.test
%3 = sext i32 %switch.tableidx to i64
%reltable.shift = shl i64 %3, 2
%reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift)
br label %for.inc
for.inc: ; preds = %switch.early.test, %switch.lookup, %for.body
%str.3.sink = phi ptr [ @str.3, %for.body ], [ %reltable.intrinsic, %switch.lookup ], [ @str, %switch.early.test ]
%puts16 = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.sink)
%inc = add nuw nsw i32 %i.018, 1
%4 = load i32, ptr %size, align 4, !tbaa !5
%cmp = icmp slt i32 %inc, %4
br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !9
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read)
declare ptr @llvm.load.relative.i64(ptr, i64) #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
|
#include<stdio.h>
int main(void){
int a, b, c, d;
double a2, b2, e;
scanf("%d%d", &a, &b);
c = a / b;
d = a % b;
a2 = a;
b2 = b;
e = a2 / b2;
printf("%d %d %f\n", c, d, e);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132173/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132173/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void) {
char buf[31];
int a, b, n;
fgets(buf, sizeof(buf), stdin);
n = sscanf(buf, "%d %d", &a, &b);
printf("%d %d %.5f\n", a/b, a%b, (double)a/b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132223/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132223/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@stdin = external local_unnamed_addr global ptr, align 8
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [12 x i8] c"%d %d %.5f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%buf = alloca [31 x i8], align 16
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 31, ptr nonnull %buf) #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
%0 = load ptr, ptr @stdin, align 8, !tbaa !5
%call = call ptr @fgets(ptr noundef nonnull %buf, i32 noundef 31, ptr noundef %0)
%call2 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %buf, ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) #3
%1 = load i32, ptr %a, align 4, !tbaa !9
%2 = load i32, ptr %b, align 4, !tbaa !9
%div = sdiv i32 %1, %2
%rem = srem i32 %1, %2
%conv = sitofp i32 %1 to double
%conv3 = sitofp i32 %2 to double
%div4 = fdiv double %conv, %conv3
%call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div4)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.end.p0(i64 31, ptr nonnull %buf) #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 ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
|
#include <stdio.h>
int main(void) {
int a, b;
scanf("%d %d",&a,&b);
printf("%d %d %lf\n",a/b,a%b,(double)a/b);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132267/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132267/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(){
int t;
scanf("%d",&t);
while(t--){
int n;
scanf("%d",&n);
int m = n;
if(n >= 3){
while(n % 3 != 0 && n >= 0)
n = n-7;
if(n % 3 == 0 && n >= 0){
printf("YES\n");
continue;
}
while(m % 7 != 0 && m >= 0)
m = m - 3;
if(m % 7 == 0 && m >= 0){
printf("YES\n");
continue;
}
}
printf("NO\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13231/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13231/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@str = private unnamed_addr constant [3 x i8] c"NO\00", align 1
@str.4 = private unnamed_addr constant [4 x i8] c"YES\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%t = alloca i32, align 4
%n = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t)
%0 = load i32, ptr %t, align 4, !tbaa !5
%dec45 = add nsw i32 %0, -1
store i32 %dec45, ptr %t, align 4, !tbaa !5
%tobool.not46 = icmp eq i32 %0, 0
br i1 %tobool.not46, label %while.end30, label %while.body
while.body: ; preds = %entry, %cleanup
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%1 = load i32, ptr %n, align 4
%cmp = icmp sgt i32 %1, 2
br i1 %cmp, label %while.cond2.preheader, label %if.end27
while.cond2.preheader: ; preds = %while.body
%rem4049 = urem i32 %1, 3
%cmp341.not = icmp eq i32 %rem4049, 0
br i1 %cmp341.not, label %while.end, label %while.body5
while.body5: ; preds = %while.cond2.preheader, %while.body5
%sub3943 = phi i32 [ %sub, %while.body5 ], [ %1, %while.cond2.preheader ]
%sub = add nsw i32 %sub3943, -7
%rem = srem i32 %sub, 3
%cmp3 = icmp ne i32 %rem, 0
%cmp4 = icmp ugt i32 %sub3943, 6
%2 = and i1 %cmp4, %cmp3
br i1 %2, label %while.body5, label %while.cond2.while.end_crit_edge, !llvm.loop !9
while.cond2.while.end_crit_edge: ; preds = %while.body5
store i32 %sub, ptr %n, align 4, !tbaa !5
br label %while.end
while.end: ; preds = %while.cond2.while.end_crit_edge, %while.cond2.preheader
%rem.lcssa = phi i32 [ %rem, %while.cond2.while.end_crit_edge ], [ 0, %while.cond2.preheader ]
%cmp4.lcssa = phi i1 [ %cmp4, %while.cond2.while.end_crit_edge ], [ true, %while.cond2.preheader ]
%cmp7 = icmp eq i32 %rem.lcssa, 0
%or.cond = and i1 %cmp4.lcssa, %cmp7
br i1 %or.cond, label %cleanup, label %while.cond11, !llvm.loop !11
while.cond11: ; preds = %while.end, %while.cond11
%m.0 = phi i32 [ %sub18, %while.cond11 ], [ %1, %while.end ]
%rem12 = srem i32 %m.0, 7
%cmp13 = icmp ne i32 %rem12, 0
%cmp15 = icmp sgt i32 %m.0, -1
%3 = and i1 %cmp15, %cmp13
%sub18 = add nsw i32 %m.0, -3
br i1 %3, label %while.cond11, label %while.end19, !llvm.loop !12
while.end19: ; preds = %while.cond11
%cmp21 = icmp eq i32 %rem12, 0
%or.cond32 = and i1 %cmp15, %cmp21
br i1 %or.cond32, label %cleanup, label %if.end27, !llvm.loop !11
if.end27: ; preds = %while.end19, %while.body
br label %cleanup
cleanup: ; preds = %while.end19, %while.end, %if.end27
%str.sink = phi ptr [ @str, %if.end27 ], [ @str.4, %while.end ], [ @str.4, %while.end19 ]
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4
%4 = load i32, ptr %t, align 4, !tbaa !5
%dec = add nsw i32 %4, -1
store i32 %dec, ptr %t, align 4, !tbaa !5
%tobool.not = icmp eq i32 %4, 0
br i1 %tobool.not, label %while.end30, label %while.body
while.end30: ; preds = %cleanup, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include<stdio.h>
int main(void){
int a, b;
scanf("%d %d", &a, &b);
printf("%d %d %.5f", a / b, a % b, (double)a / b);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132353/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132353/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %.5f\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main()
{
int a,b;
scanf("%d%d",&a,&b);
printf("%d %d %f\n",a/b,a%b,a*1./b);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132397/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132397/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(int argc, const char * argv[]) {
int a,b;
int d,remainder;
double function;
scanf("%d %d", &a,&b);
function = (double)a/b;
d = (int)function;
remainder = a%b;
printf("%d %d %f\n",d,remainder,function);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132483/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132483/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%conv = sitofp i32 %0 to double
%1 = load i32, ptr %b, align 4, !tbaa !5
%conv1 = sitofp i32 %1 to double
%div = fdiv double %conv, %conv1
%conv2 = fptosi double %div to i32
%rem = srem i32 %0, %1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv2, i32 noundef %rem, double noundef %div)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main()
{
int a, b, d, r;
double f;
scanf("%d %d", &a, &b);
d=a/b;
r=a%b;
f=1.00000*a/b;
printf("%d %d %f\n",d,r,f);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132526/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132526/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
#define MAX 207
int main()
{
int n, i, j, a[26], count = 0, ans = 0;
char str[MAX];
for(i=0;i<26;++i)
{
a[i] = 0;
}
scanf("%d", &n);
scanf("%s", str);
for(i=0;i<n;++i)
{
if(str[i] >= 97 && a[str[i] - 97] == 0)
{
++count;
a[str[i] - 97] = 1;
}
else if(str[i] <= 90)
{
ans = count > ans ? count : ans;
count = 0;
for(j=0;j<26;++j)
{
a[j] = 0;
}
}
}
ans = count > ans ? count : ans;
count = 0;
printf("%d\n", ans);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13257/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13257/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%n = alloca i32, align 4
%a = alloca [26 x i32], align 16
%str = alloca [207 x i8], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5
call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %a) #5
call void @llvm.lifetime.start.p0(i64 207, ptr nonnull %str) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(104) %a, i8 0, i64 104, i1 false), !tbaa !5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %str)
%0 = load i32, ptr %n, align 4, !tbaa !5
%cmp372 = icmp sgt i32 %0, 0
br i1 %cmp372, label %for.body4.preheader, label %for.end43
for.body4.preheader: ; preds = %entry
%wide.trip.count = zext i32 %0 to i64
br label %for.body4
for.body4: ; preds = %for.body4.preheader, %for.inc41
%indvars.iv = phi i64 [ 0, %for.body4.preheader ], [ %indvars.iv.next, %for.inc41 ]
%ans.075 = phi i32 [ 0, %for.body4.preheader ], [ %ans.1, %for.inc41 ]
%count.074 = phi i32 [ 0, %for.body4.preheader ], [ %count.1, %for.inc41 ]
%arrayidx6 = getelementptr inbounds [207 x i8], ptr %str, i64 0, i64 %indvars.iv
%1 = load i8, ptr %arrayidx6, align 1, !tbaa !9
%cmp7 = icmp sgt i8 %1, 96
br i1 %cmp7, label %land.lhs.true, label %if.else
land.lhs.true: ; preds = %for.body4
%conv = zext i8 %1 to i64
%sub = add nuw nsw i64 %conv, 4294967199
%idxprom12 = and i64 %sub, 4294967295
%arrayidx13 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 %idxprom12
%2 = load i32, ptr %arrayidx13, align 4, !tbaa !5
%cmp14 = icmp eq i32 %2, 0
br i1 %cmp14, label %if.then, label %for.inc41
if.then: ; preds = %land.lhs.true
%inc16 = add nsw i32 %count.074, 1
store i32 1, ptr %arrayidx13, align 4, !tbaa !5
br label %for.inc41
if.else: ; preds = %for.body4
%cmp26 = icmp slt i8 %1, 91
br i1 %cmp26, label %if.then28, label %for.inc41
if.then28: ; preds = %if.else
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(104) %a, i8 0, i64 104, i1 false), !tbaa !5
%cond = call i32 @llvm.smax.i32(i32 %count.074, i32 %ans.075)
br label %for.inc41
for.inc41: ; preds = %if.then28, %land.lhs.true, %if.then, %if.else
%count.1 = phi i32 [ %inc16, %if.then ], [ %count.074, %if.else ], [ %count.074, %land.lhs.true ], [ 0, %if.then28 ]
%ans.1 = phi i32 [ %ans.075, %if.then ], [ %ans.075, %if.else ], [ %ans.075, %land.lhs.true ], [ %cond, %if.then28 ]
%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.end43, label %for.body4, !llvm.loop !10
for.end43: ; preds = %for.inc41, %entry
%count.0.lcssa = phi i32 [ 0, %entry ], [ %count.1, %for.inc41 ]
%ans.0.lcssa = phi i32 [ 0, %entry ], [ %ans.1, %for.inc41 ]
%cond49 = call i32 @llvm.smax.i32(i32 %count.0.lcssa, i32 %ans.0.lcssa)
%call50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %cond49)
call void @llvm.lifetime.end.p0(i64 207, ptr nonnull %str) #5
call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %a) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #3
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
|
#include <stdio.h>
int main(void)
{
int a,b;
int d,r;
double f;
scanf("%d %d",&a,&b);
d = a/b;
r = a%b;
f = (double)a/b;
printf("%d %d %.5f\n",d,r,f);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132612/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132612/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [12 x i8] c"%d %d %.5f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include <stdio.h>
int main(void) {
int a, b;
int d, r;
double f;
scanf("%d %d", &a, &b);
d = a / b;
r = a % b;
f = (double)a / (double)b;
printf("%d %d %f\n", d, r, f);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132663/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132663/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
int main(void)
{
int a,b,d,r;
double x,y,f;
scanf("%d%d",&a,&b);
d=a/b;
r=a%b;
x=a;y=b;
f=x/y;
printf("%d %d %lf\n",d,r,f);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132706/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132706/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lf\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i32, ptr %a, align 4, !tbaa !5
%1 = load i32, ptr %b, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%rem = srem i32 %0, %1
%conv = sitofp i32 %0 to double
%conv1 = sitofp i32 %1 to double
%div2 = fdiv double %conv, %conv1
%call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
|
#include<stdio.h>
long long int as[1001][1001];
int main(void)
{
long long int a,b,x[1001],s[1001],A=9223372036854775800,min=9223372036854775800,i,j;
scanf("%lld %lld",&a,&b);
for(i=1;i<=a;i++){
scanf("%lld",&x[i]);
}
for(i=1;i<=b;i++){
scanf("%lld",&s[i]);
}
for(i=0;i<=b;i++){
for(j=0;j<=a;j++){
as[i][j]=A;
}
}
as[0][0]=0;
for(i=0;i<b;i++){
for(j=0;j<=a;j++){
if(as[i][j]!=A){
if(as[i+1][j]>as[i][j]){
as[i+1][j]=as[i][j];
}
if(as[i+1][j+1]>as[i][j]+x[j+1]*s[i+1]){
as[i+1][j+1]=as[i][j]+x[j+1]*s[i+1];
}
}
}
}
/* for(i=0;i<=b;i++){
for(j=0;j<=a;j++) printf("%d ",as[i][j]);
printf("\n");
}*/
for(i=0;i<=b;i++){
if(as[i][a]<min){
min=as[i][a];
}
}
printf("%lld\n",min);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132757/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132757/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [10 x i8] c"%lld %lld\00", align 1
@.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1
@as = dso_local local_unnamed_addr global [1001 x [1001 x i64]] zeroinitializer, align 16
@.str.2 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i64, align 8
%b = alloca i64, align 8
%x = alloca [1001 x i64], align 16
%s = alloca [1001 x i64], align 16
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #4
call void @llvm.lifetime.start.p0(i64 8008, ptr nonnull %x) #4
call void @llvm.lifetime.start.p0(i64 8008, ptr nonnull %s) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b)
%0 = load i64, ptr %a, align 8, !tbaa !5
%cmp.not134 = icmp slt i64 %0, 1
br i1 %cmp.not134, label %for.cond2.preheader, label %for.body
for.cond2.preheader: ; preds = %for.body, %entry
%1 = load i64, ptr %b, align 8, !tbaa !5
%cmp3.not136 = icmp slt i64 %1, 1
br i1 %cmp3.not136, label %for.cond10.preheader, label %for.body4
for.body: ; preds = %entry, %for.body
%i.0135 = phi i64 [ %inc, %for.body ], [ 1, %entry ]
%arrayidx = getelementptr inbounds [1001 x i64], ptr %x, i64 0, i64 %i.0135
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx)
%inc = add nuw nsw i64 %i.0135, 1
%2 = load i64, ptr %a, align 8, !tbaa !5
%cmp.not.not = icmp slt i64 %i.0135, %2
br i1 %cmp.not.not, label %for.body, label %for.cond2.preheader, !llvm.loop !9
for.cond10.preheader: ; preds = %for.body4, %for.cond2.preheader
%.lcssa = phi i64 [ %1, %for.cond2.preheader ], [ %5, %for.body4 ]
%cmp11.not140 = icmp slt i64 %.lcssa, 0
br i1 %cmp11.not140, label %for.cond77.preheader.thread, label %for.cond13.preheader.lr.ph
for.cond77.preheader.thread: ; preds = %for.cond10.preheader
store i64 0, ptr @as, align 16, !tbaa !5
br label %for.end89
for.cond13.preheader.lr.ph: ; preds = %for.cond10.preheader
%3 = load i64, ptr %a, align 8, !tbaa !5
%cmp14.not138 = icmp slt i64 %3, 0
br i1 %cmp14.not138, label %for.end23, label %for.cond13.preheader.preheader
for.cond13.preheader.preheader: ; preds = %for.cond13.preheader.lr.ph
%4 = add i64 %3, 1
%min.iters.check = icmp ult i64 %4, 4
%n.vec = and i64 %4, -4
%cmp.n = icmp eq i64 %4, %n.vec
br label %for.cond13.preheader
for.body4: ; preds = %for.cond2.preheader, %for.body4
%i.1137 = phi i64 [ %inc8, %for.body4 ], [ 1, %for.cond2.preheader ]
%arrayidx5 = getelementptr inbounds [1001 x i64], ptr %s, i64 0, i64 %i.1137
%call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx5)
%inc8 = add nuw nsw i64 %i.1137, 1
%5 = load i64, ptr %b, align 8, !tbaa !5
%cmp3.not.not = icmp slt i64 %i.1137, %5
br i1 %cmp3.not.not, label %for.body4, label %for.cond10.preheader, !llvm.loop !11
for.cond13.preheader: ; preds = %for.cond13.preheader.preheader, %for.cond13.for.inc21_crit_edge
%i.2141 = phi i64 [ %inc22, %for.cond13.for.inc21_crit_edge ], [ 0, %for.cond13.preheader.preheader ]
br i1 %min.iters.check, label %for.body15.preheader, label %vector.body
vector.body: ; preds = %for.cond13.preheader, %vector.body
%index = phi i64 [ %index.next, %vector.body ], [ 0, %for.cond13.preheader ]
%6 = getelementptr inbounds [1001 x [1001 x i64]], ptr @as, i64 0, i64 %i.2141, i64 %index
store <2 x i64> <i64 9223372036854775800, i64 9223372036854775800>, ptr %6, align 8, !tbaa !5
%7 = getelementptr inbounds i64, ptr %6, i64 2
store <2 x i64> <i64 9223372036854775800, i64 9223372036854775800>, ptr %7, align 8, !tbaa !5
%index.next = add nuw i64 %index, 4
%8 = icmp eq i64 %index.next, %n.vec
br i1 %8, label %middle.block, label %vector.body, !llvm.loop !12
middle.block: ; preds = %vector.body
br i1 %cmp.n, label %for.cond13.for.inc21_crit_edge, label %for.body15.preheader
for.body15.preheader: ; preds = %for.cond13.preheader, %middle.block
%j.0139.ph = phi i64 [ 0, %for.cond13.preheader ], [ %n.vec, %middle.block ]
br label %for.body15
for.body15: ; preds = %for.body15.preheader, %for.body15
%j.0139 = phi i64 [ %inc19, %for.body15 ], [ %j.0139.ph, %for.body15.preheader ]
%arrayidx17 = getelementptr inbounds [1001 x [1001 x i64]], ptr @as, i64 0, i64 %i.2141, i64 %j.0139
store i64 9223372036854775800, ptr %arrayidx17, align 8, !tbaa !5
%inc19 = add nuw i64 %j.0139, 1
%exitcond.not = icmp eq i64 %j.0139, %3
br i1 %exitcond.not, label %for.cond13.for.inc21_crit_edge, label %for.body15, !llvm.loop !15
for.cond13.for.inc21_crit_edge: ; preds = %for.body15, %middle.block
%inc22 = add nuw i64 %i.2141, 1
%exitcond153.not = icmp eq i64 %i.2141, %.lcssa
br i1 %exitcond153.not, label %for.end23, label %for.cond13.preheader, !llvm.loop !16
for.end23: ; preds = %for.cond13.for.inc21_crit_edge, %for.cond13.preheader.lr.ph
store i64 0, ptr @as, align 16, !tbaa !5
%cmp25144 = icmp sgt i64 %.lcssa, 0
br i1 %cmp25144, label %for.cond27.preheader.lr.ph, label %for.cond77.preheader
for.cond27.preheader.lr.ph: ; preds = %for.end23
%9 = load i64, ptr %a, align 8, !tbaa !5
%cmp28.not142 = icmp slt i64 %9, 0
br i1 %cmp28.not142, label %for.body79.lr.ph, label %for.cond27.preheader.preheader
for.cond27.preheader.preheader: ; preds = %for.cond27.preheader.lr.ph
%10 = add nuw i64 %9, 1
br label %for.cond27.preheader
for.cond27.preheader: ; preds = %for.cond27.preheader.preheader, %for.cond27.for.inc74_crit_edge
%i.3145 = phi i64 [ %add, %for.cond27.for.inc74_crit_edge ], [ 0, %for.cond27.preheader.preheader ]
%add = add nuw nsw i64 %i.3145, 1
%arrayidx53 = getelementptr inbounds [1001 x i64], ptr %s, i64 0, i64 %add
br label %for.body29
for.cond77.preheader: ; preds = %for.cond27.for.inc74_crit_edge, %for.end23
br i1 %cmp11.not140, label %for.end89, label %for.body79.lr.ph
for.body79.lr.ph: ; preds = %for.cond27.preheader.lr.ph, %for.cond77.preheader
%11 = load i64, ptr %a, align 8, !tbaa !5
%12 = add i64 %.lcssa, 1
%xtraiter = and i64 %12, 3
%13 = icmp ult i64 %.lcssa, 3
br i1 %13, label %for.end89.loopexit.unr-lcssa, label %for.body79.lr.ph.new
for.body79.lr.ph.new: ; preds = %for.body79.lr.ph
%unroll_iter = and i64 %12, -4
br label %for.body79
for.body29: ; preds = %for.cond27.preheader, %for.inc71
%j.1143 = phi i64 [ 0, %for.cond27.preheader ], [ %inc72.pre-phi, %for.inc71 ]
%arrayidx31 = getelementptr inbounds [1001 x [1001 x i64]], ptr @as, i64 0, i64 %i.3145, i64 %j.1143
%14 = load i64, ptr %arrayidx31, align 8, !tbaa !5
%cmp32.not = icmp eq i64 %14, 9223372036854775800
br i1 %cmp32.not, label %for.body29.for.inc71_crit_edge, label %if.then
for.body29.for.inc71_crit_edge: ; preds = %for.body29
%.pre = add nuw i64 %j.1143, 1
br label %for.inc71
if.then: ; preds = %for.body29
%arrayidx34 = getelementptr inbounds [1001 x [1001 x i64]], ptr @as, i64 0, i64 %add, i64 %j.1143
%15 = load i64, ptr %arrayidx34, align 8, !tbaa !5
%cmp37 = icmp sgt i64 %15, %14
br i1 %cmp37, label %if.then38, label %if.end
if.then38: ; preds = %if.then
store i64 %14, ptr %arrayidx34, align 8, !tbaa !5
br label %if.end
if.end: ; preds = %if.then38, %if.then
%add46 = add nuw i64 %j.1143, 1
%arrayidx47 = getelementptr inbounds [1001 x [1001 x i64]], ptr @as, i64 0, i64 %add, i64 %add46
%16 = load i64, ptr %arrayidx47, align 8, !tbaa !5
%arrayidx51 = getelementptr inbounds [1001 x i64], ptr %x, i64 0, i64 %add46
%17 = load i64, ptr %arrayidx51, align 8, !tbaa !5
%18 = load i64, ptr %arrayidx53, align 8, !tbaa !5
%mul = mul nsw i64 %18, %17
%add54 = add nsw i64 %mul, %14
%cmp55 = icmp sgt i64 %16, %add54
br i1 %cmp55, label %if.then56, label %for.inc71
if.then56: ; preds = %if.end
store i64 %add54, ptr %arrayidx47, align 8, !tbaa !5
br label %for.inc71
for.inc71: ; preds = %for.body29.for.inc71_crit_edge, %if.then56, %if.end
%inc72.pre-phi = phi i64 [ %.pre, %for.body29.for.inc71_crit_edge ], [ %add46, %if.then56 ], [ %add46, %if.end ]
%exitcond154.not = icmp eq i64 %inc72.pre-phi, %10
br i1 %exitcond154.not, label %for.cond27.for.inc74_crit_edge, label %for.body29, !llvm.loop !17
for.cond27.for.inc74_crit_edge: ; preds = %for.inc71
%exitcond155.not = icmp eq i64 %add, %.lcssa
br i1 %exitcond155.not, label %for.cond77.preheader, label %for.cond27.preheader, !llvm.loop !18
for.body79: ; preds = %for.body79, %for.body79.lr.ph.new
%i.4148 = phi i64 [ 0, %for.body79.lr.ph.new ], [ %inc88.3, %for.body79 ]
%min.0147 = phi i64 [ 9223372036854775800, %for.body79.lr.ph.new ], [ %spec.select.3, %for.body79 ]
%niter = phi i64 [ 0, %for.body79.lr.ph.new ], [ %niter.next.3, %for.body79 ]
%arrayidx81 = getelementptr inbounds [1001 x [1001 x i64]], ptr @as, i64 0, i64 %i.4148, i64 %11
%19 = load i64, ptr %arrayidx81, align 8, !tbaa !5
%spec.select = call i64 @llvm.smin.i64(i64 %19, i64 %min.0147)
%inc88 = or i64 %i.4148, 1
%arrayidx81.1 = getelementptr inbounds [1001 x [1001 x i64]], ptr @as, i64 0, i64 %inc88, i64 %11
%20 = load i64, ptr %arrayidx81.1, align 8, !tbaa !5
%spec.select.1 = call i64 @llvm.smin.i64(i64 %20, i64 %spec.select)
%inc88.1 = or i64 %i.4148, 2
%arrayidx81.2 = getelementptr inbounds [1001 x [1001 x i64]], ptr @as, i64 0, i64 %inc88.1, i64 %11
%21 = load i64, ptr %arrayidx81.2, align 8, !tbaa !5
%spec.select.2 = call i64 @llvm.smin.i64(i64 %21, i64 %spec.select.1)
%inc88.2 = or i64 %i.4148, 3
%arrayidx81.3 = getelementptr inbounds [1001 x [1001 x i64]], ptr @as, i64 0, i64 %inc88.2, i64 %11
%22 = load i64, ptr %arrayidx81.3, align 8, !tbaa !5
%spec.select.3 = call i64 @llvm.smin.i64(i64 %22, i64 %spec.select.2)
%inc88.3 = add nuw i64 %i.4148, 4
%niter.next.3 = add i64 %niter, 4
%niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
br i1 %niter.ncmp.3, label %for.end89.loopexit.unr-lcssa, label %for.body79, !llvm.loop !19
for.end89.loopexit.unr-lcssa: ; preds = %for.body79, %for.body79.lr.ph
%spec.select.lcssa.ph = phi i64 [ undef, %for.body79.lr.ph ], [ %spec.select.3, %for.body79 ]
%i.4148.unr = phi i64 [ 0, %for.body79.lr.ph ], [ %inc88.3, %for.body79 ]
%min.0147.unr = phi i64 [ 9223372036854775800, %for.body79.lr.ph ], [ %spec.select.3, %for.body79 ]
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.end89, label %for.body79.epil
for.body79.epil: ; preds = %for.end89.loopexit.unr-lcssa, %for.body79.epil
%i.4148.epil = phi i64 [ %inc88.epil, %for.body79.epil ], [ %i.4148.unr, %for.end89.loopexit.unr-lcssa ]
%min.0147.epil = phi i64 [ %spec.select.epil, %for.body79.epil ], [ %min.0147.unr, %for.end89.loopexit.unr-lcssa ]
%epil.iter = phi i64 [ %epil.iter.next, %for.body79.epil ], [ 0, %for.end89.loopexit.unr-lcssa ]
%arrayidx81.epil = getelementptr inbounds [1001 x [1001 x i64]], ptr @as, i64 0, i64 %i.4148.epil, i64 %11
%23 = load i64, ptr %arrayidx81.epil, align 8, !tbaa !5
%spec.select.epil = call i64 @llvm.smin.i64(i64 %23, i64 %min.0147.epil)
%inc88.epil = add nuw i64 %i.4148.epil, 1
%epil.iter.next = add i64 %epil.iter, 1
%epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
br i1 %epil.iter.cmp.not, label %for.end89, label %for.body79.epil, !llvm.loop !20
for.end89: ; preds = %for.end89.loopexit.unr-lcssa, %for.body79.epil, %for.cond77.preheader.thread, %for.cond77.preheader
%min.0.lcssa = phi i64 [ 9223372036854775800, %for.cond77.preheader ], [ 9223372036854775800, %for.cond77.preheader.thread ], [ %spec.select.lcssa.ph, %for.end89.loopexit.unr-lcssa ], [ %spec.select.epil, %for.body79.epil ]
%call90 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %min.0.lcssa)
call void @llvm.lifetime.end.p0(i64 8008, ptr nonnull %s) #4
call void @llvm.lifetime.end.p0(i64 8008, ptr nonnull %x) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10, !13, !14}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !10, !14, !13}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.unroll.disable"}
|
#include<stdio.h>
int main()
{
int m,i,c=0;
scanf("%d",&m);
int arr[5];
for(i=1;i<=500005;i++)
{
int x=i;
int ans =0;
while(x>0)
{
ans+=x/5;
x/=5;
}
if(ans==m)
{
arr[c]=i;
++c;
}
}
printf("%d\n",c);
if(c>0)
for(i=0;i<5;++i)
printf("%d ",arr[i]);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13280/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13280/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"%d \00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%m = alloca i32, align 4
%arr = alloca [5 x i32], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %m)
call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %arr) #3
%0 = load i32, ptr %m, align 4, !tbaa !5
br label %while.cond.preheader
while.cond.preheader: ; preds = %entry, %if.end
%c.033 = phi i32 [ 0, %entry ], [ %c.1, %if.end ]
%i.032 = phi i32 [ 1, %entry ], [ %inc4, %if.end ]
br label %while.body
while.body: ; preds = %while.cond.preheader, %while.body
%ans.031 = phi i32 [ 0, %while.cond.preheader ], [ %add, %while.body ]
%x.030 = phi i32 [ %i.032, %while.cond.preheader ], [ %div, %while.body ]
%div = udiv i32 %x.030, 5
%add = add nuw nsw i32 %ans.031, %div
%cmp1.not = icmp ult i32 %x.030, 5
br i1 %cmp1.not, label %while.end, label %while.body, !llvm.loop !9
while.end: ; preds = %while.body
%cmp3 = icmp eq i32 %add, %0
br i1 %cmp3, label %if.then, label %if.end
if.then: ; preds = %while.end
%idxprom = sext i32 %c.033 to i64
%arrayidx = getelementptr inbounds [5 x i32], ptr %arr, i64 0, i64 %idxprom
store i32 %i.032, ptr %arrayidx, align 4, !tbaa !5
%inc = add nsw i32 %c.033, 1
br label %if.end
if.end: ; preds = %if.then, %while.end
%c.1 = phi i32 [ %inc, %if.then ], [ %c.033, %while.end ]
%inc4 = add nuw nsw i32 %i.032, 1
%exitcond.not = icmp eq i32 %inc4, 500006
br i1 %exitcond.not, label %for.end, label %while.cond.preheader, !llvm.loop !11
for.end: ; preds = %if.end
%call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %c.1)
%cmp6 = icmp sgt i32 %c.1, 0
br i1 %cmp6, label %for.body10.preheader, label %if.end17
for.body10.preheader: ; preds = %for.end
%1 = load i32, ptr %arr, align 16, !tbaa !5
%call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %1)
%arrayidx12.1 = getelementptr inbounds [5 x i32], ptr %arr, i64 0, i64 1
%2 = load i32, ptr %arrayidx12.1, align 4, !tbaa !5
%call13.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %2)
%arrayidx12.2 = getelementptr inbounds [5 x i32], ptr %arr, i64 0, i64 2
%3 = load i32, ptr %arrayidx12.2, align 8, !tbaa !5
%call13.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %3)
%arrayidx12.3 = getelementptr inbounds [5 x i32], ptr %arr, i64 0, i64 3
%4 = load i32, ptr %arrayidx12.3, align 4, !tbaa !5
%call13.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %4)
%arrayidx12.4 = getelementptr inbounds [5 x i32], ptr %arr, i64 0, i64 4
%5 = load i32, ptr %arrayidx12.4, align 16, !tbaa !5
%call13.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %5)
br label %if.end17
if.end17: ; preds = %for.body10.preheader, %for.end
call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %arr) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~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}
|
/*
cat <<EOF >mistaken-paste
*/
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <time.h>
#define BIG 2000000007
#define VERYBIG 2000000000000007LL
#define MOD 1000000007
#define FOD 998244353
typedef uint64_t ull;
typedef int64_t sll;
#define N_MAX 1000000
#define M_MAX 200000
#ifdef __cplusplus
#include <queue>
#include <stack>
#include <tuple>
#include <set>
#include <map>
#include <string>
#include <algorithm>
#include <functional>
#include <array>
using std::queue;
using std::priority_queue;
using std::stack;
using std::tuple;
using std::set;
using std::map;
using std::vector;
using std::greater;
using std::pair;
using std::string;
#endif
typedef struct {
int32_t a;
int32_t b;
} hw;
typedef struct {
sll a;
sll b;
} hwll;
typedef struct {
sll a;
sll b;
sll c;
} hwllc;
typedef struct {
hwll a;
hwll b;
} linell;
ull n, m;
ull h, w;
ull k;
ull q;
sll va, vb, vc, vd, ve, vf;
ull ua, ub, uc, ud, ue, uf;
long double vra, vrb, vrc;
double vda, vdb, vdc;
char ch, dh;
ull umin (ull x, ull y) {
return (x < y) ? x : y;
}
ull umax (ull x, ull y) {
return (x > y) ? x : y;
}
sll smin (sll x, sll y) {
return (x < y) ? x : y;
}
sll smax (sll x, sll y) {
return (x > y) ? x : y;
}
ull gcd (ull x, ull y) {
if (x < y) {
return gcd(y, x);
} else if (y == 0) {
return x;
} else {
return gcd(y, x % y);
}
}
ull bitpow (ull a, ull x, ull modulo) {
ull result = 1;
while (x) {
if (x & 1) {
result *= a;
result %= modulo;
}
x /= 2;
a = (a * a) % modulo;
}
return result;
}
ull divide (ull a, ull b, ull modulo) {
return (a * bitpow(b, modulo - 2, modulo)) % modulo;
}
ull udiff (ull a, ull b) {
if (a >= b) {
return a - b;
} else {
return b - a;
}
}
sll sdiff (sll a, sll b) {
if (a >= b) {
return a - b;
} else {
return b - a;
}
}
int bitcount (ull n) {
int result = 0;
while (n) {
if (n & 1) result++;
n /= 2;
}
return result;
}
// double distance (sll x1, sll y1, sll x2, sll y2) {
// double xdist2, ydist2, origindist, dist;
// xdist2 = (x1 - x2) * (x1 - x2);
// ydist2 = (y1 - y2) * (y1 - y2);
// return sqrt(xdist2 + ydist2);
// }
int32_t pullcomp (const void *left, const void *right) {
ull l = *(ull*)left;
ull r = *(ull*)right;
if (l < r) {
return -1;
}
if (l > r) {
return +1;
}
return 0;
}
int32_t psllcomp (const void *left, const void *right) {
sll l = *(sll*)left;
sll r = *(sll*)right;
if (l < r) {
return -1;
}
if (l > r) {
return +1;
}
return 0;
}
int32_t pcharcomp (const void *left, const void *right) {
char l = *(char*)left;
char r = *(char*)right;
if (l < r) {
return -1;
}
if (l > r) {
return +1;
}
return 0;
}
int32_t pdoublecomp (const void *left, const void *right) {
double l = *(double*)left;
double r = *(double*)right;
if (l < r) {
return -1;
}
if (l > r) {
return +1;
}
return 0;
}
int32_t pstrcomp (const void *left, const void *right) {
char* l = *(char**)left;
char* r = *(char**)right;
return strcmp(l, r);
}
int32_t phwllABcomp (const void *left, const void *right) {
hwll l = *(hwll*)left;
hwll r = *(hwll*)right;
if (l.a < r.a) {
return -1;
}
if (l.a > r.a) {
return +1;
}
if (l.b < r.b) {
return -1;
}
if (l.b > r.b) {
return +1;
}
return 0;
}
int32_t phwllREVcomp (const void *left, const void *right) {
hwll l = *(hwll*)left;
hwll r = *(hwll*)right;
if (l.b < r.b) {
return -1;
}
if (l.b > r.b) {
return +1;
}
if (l.a < r.a) {
return -1;
}
if (l.a > r.a) {
return +1;
}
return 0;
}
int32_t ptriplecomp (const void *left, const void *right) {
hwllc l = *(hwllc*)left;
hwllc r = *(hwllc*)right;
if (l.a < r.a) {
return -1;
}
if (l.a > r.a) {
return +1;
}
if (l.b < r.b) {
return -1;
}
if (l.b > r.b) {
return +1;
}
if (l.c < r.c) {
return -1;
}
if (l.c > r.c) {
return +1;
}
return 0;
}
bool isinrange (sll left, sll x, sll right) {
return (left <= x && x <= right);
}
bool isinrange_soft (sll left, sll x, sll right) {
return (left <= x && x <= right) || (left >= x && x >= right);
}
sll a[N_MAX];
// sll a[3001][3001];
sll b[N_MAX];
// sll b[3001][3001];
sll c[N_MAX];
// sll d[N_MAX];
// sll e[N_MAX];
char s[N_MAX + 1];
// char s[3010][3010];
char t[N_MAX + 1];
// char t[3010][3010];
// hwll xy[N_MAX];
// sll table[1000][1000];
ull push (ull x, ull y, ull z) {
a[m] = x;
b[m] = y;
c[m] = z;
return m++;
}
ull solve () {
sll i, j, ki, li;
ull result = 0;
// sll result = 0;
double dresult = 0;
// ull maybe = 0;
sll maybe = 0;
// ull sum = 0;
sll sum = 0;
sll item;
ull *dpcell;
n = 0;
while ((1LL << n) <= k) n++;
m = 0;
for (i = n - 1; i > 0; i--) {
push(i, i - 1, 0);
push(i, i - 1, 1LL << (i - 1));
}
for (i = n - 2; i >= 0; i--) {
if ((1LL << i) & k) {
push(n - 1, i, (k >> (i + 1)) << (i + 1));
}
}
printf("%llu %llu\n", n, m);
for (i = 0; i < m; i++) {
printf("%llu %llu %llu\n", n - a[i], n - b[i], c[i]);
}
// printf("%lld\n", result);
// printf("%.15lf\n", dresult);
// puts(s);
return 0;
success:
// puts("YES");
puts("Yes");
// printf("%llu\n", result);
// puts("0");
// puts("Yay!");
return 0;
fail:
// puts("NO");
puts("No");
// puts("0");
// puts("-1");
// puts("-1 -1 -1");
// puts(":(");
return 1;
}
int32_t main (void) {
int32_t i, j;
int32_t x, y;
// scanf("%llu%llu", &n, &m);
scanf("%llu", &k, &n, &m);
// scanf("%llu%llu", &h, &w);
// scanf("%lld", &va, &vb, &vc, &vd);
// scanf("%llu%llu", &ua, &ub, &uc, &ud);
// scanf("%llu", &q);
// scanf("%s", s);
// scanf("%s", t);
// for (i = 0; i < n; i++) {
// // scanf("%lld%lld", &xy[i].a, &xy[i].b);
// scanf("%lld", &a[i]);
// // scanf("%lld", &b[i]);
// // scanf("%lld", &c[i]);
// // scanf("%lld", &d[i]);
// // a[i]--;
// // b[i]--;
// // c[i]--;
// }
// scanf("%llu", &m, &k);
// scanf("%llu", &q);
// for (i = 0; i < n; i++) {
// scanf("%lld", &b[i]);
// }
// for (i = 0; i < n; i++) {
// for (j = 0; j < n; j++) {
// scanf("%llu", &table[i][j]);
// }
// }
// for (i = 0; i < h; i++) {
// scanf("%s", &s[i]);
// }
solve();
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132850/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132850/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@a = dso_local local_unnamed_addr global [1000000 x i64] zeroinitializer, align 16
@m = dso_local global i64 0, align 8
@b = dso_local local_unnamed_addr global [1000000 x i64] zeroinitializer, align 16
@c = dso_local local_unnamed_addr global [1000000 x i64] zeroinitializer, align 16
@n = dso_local global i64 0, align 8
@k = dso_local global i64 0, align 8
@.str = private unnamed_addr constant [11 x i8] c"%llu %llu\0A\00", align 1
@.str.1 = private unnamed_addr constant [16 x i8] c"%llu %llu %llu\0A\00", align 1
@.str.4 = private unnamed_addr constant [5 x i8] c"%llu\00", align 1
@h = dso_local local_unnamed_addr global i64 0, align 8
@w = dso_local local_unnamed_addr global i64 0, align 8
@q = dso_local local_unnamed_addr global i64 0, align 8
@va = dso_local local_unnamed_addr global i64 0, align 8
@vb = dso_local local_unnamed_addr global i64 0, align 8
@vc = dso_local local_unnamed_addr global i64 0, align 8
@vd = dso_local local_unnamed_addr global i64 0, align 8
@ve = dso_local local_unnamed_addr global i64 0, align 8
@vf = dso_local local_unnamed_addr global i64 0, align 8
@ua = dso_local local_unnamed_addr global i64 0, align 8
@ub = dso_local local_unnamed_addr global i64 0, align 8
@uc = dso_local local_unnamed_addr global i64 0, align 8
@ud = dso_local local_unnamed_addr global i64 0, align 8
@ue = dso_local local_unnamed_addr global i64 0, align 8
@uf = dso_local local_unnamed_addr global i64 0, align 8
@vra = dso_local local_unnamed_addr global x86_fp80 0xK00000000000000000000, align 16
@vrb = dso_local local_unnamed_addr global x86_fp80 0xK00000000000000000000, align 16
@vrc = dso_local local_unnamed_addr global x86_fp80 0xK00000000000000000000, align 16
@vda = dso_local local_unnamed_addr global double 0.000000e+00, align 8
@vdb = dso_local local_unnamed_addr global double 0.000000e+00, align 8
@vdc = dso_local local_unnamed_addr global double 0.000000e+00, align 8
@ch = dso_local local_unnamed_addr global i8 0, align 1
@dh = dso_local local_unnamed_addr global i8 0, align 1
@s = dso_local local_unnamed_addr global [1000001 x i8] zeroinitializer, align 16
@t = dso_local local_unnamed_addr global [1000001 x i8] zeroinitializer, align 16
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
define dso_local i64 @umin(i64 noundef %x, i64 noundef %y) local_unnamed_addr #0 {
entry:
%cond = tail call i64 @llvm.umin.i64(i64 %x, i64 %y)
ret i64 %cond
}
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
define dso_local i64 @umax(i64 noundef %x, i64 noundef %y) local_unnamed_addr #0 {
entry:
%cond = tail call i64 @llvm.umax.i64(i64 %x, i64 %y)
ret i64 %cond
}
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
define dso_local i64 @smin(i64 noundef %x, i64 noundef %y) local_unnamed_addr #0 {
entry:
%cond = tail call i64 @llvm.smin.i64(i64 %x, i64 %y)
ret i64 %cond
}
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
define dso_local i64 @smax(i64 noundef %x, i64 noundef %y) local_unnamed_addr #0 {
entry:
%cond = tail call i64 @llvm.smax.i64(i64 %x, i64 %y)
ret i64 %cond
}
; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable
define dso_local i64 @gcd(i64 noundef %x, i64 noundef %y) local_unnamed_addr #1 {
entry:
br label %tailrecurse
tailrecurse: ; preds = %tailrecurse.backedge, %entry
%x.tr = phi i64 [ %x, %entry ], [ %y.tr, %tailrecurse.backedge ]
%y.tr = phi i64 [ %y, %entry ], [ %y.tr.be, %tailrecurse.backedge ]
%cmp = icmp ult i64 %x.tr, %y.tr
br i1 %cmp, label %tailrecurse.backedge, label %if.else
if.else: ; preds = %tailrecurse
%cmp1 = icmp eq i64 %y.tr, 0
br i1 %cmp1, label %return, label %if.else3
if.else3: ; preds = %if.else
%rem = urem i64 %x.tr, %y.tr
br label %tailrecurse.backedge
tailrecurse.backedge: ; preds = %if.else3, %tailrecurse
%y.tr.be = phi i64 [ %rem, %if.else3 ], [ %x.tr, %tailrecurse ]
br label %tailrecurse
return: ; preds = %if.else
ret i64 %x.tr
}
; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable
define dso_local i64 @bitpow(i64 noundef %a, i64 noundef %x, i64 noundef %modulo) local_unnamed_addr #1 {
entry:
%tobool.not12 = icmp eq i64 %x, 0
br i1 %tobool.not12, label %while.end, label %while.body
while.body: ; preds = %entry, %if.end
%result.015 = phi i64 [ %result.1, %if.end ], [ 1, %entry ]
%a.addr.014 = phi i64 [ %rem3, %if.end ], [ %a, %entry ]
%x.addr.013 = phi i64 [ %div11, %if.end ], [ %x, %entry ]
%and = and i64 %x.addr.013, 1
%tobool1.not = icmp eq i64 %and, 0
br i1 %tobool1.not, label %if.end, label %if.then
if.then: ; preds = %while.body
%mul = mul i64 %result.015, %a.addr.014
%rem = urem i64 %mul, %modulo
br label %if.end
if.end: ; preds = %if.then, %while.body
%result.1 = phi i64 [ %rem, %if.then ], [ %result.015, %while.body ]
%div11 = lshr i64 %x.addr.013, 1
%mul2 = mul i64 %a.addr.014, %a.addr.014
%rem3 = urem i64 %mul2, %modulo
%tobool.not = icmp ult i64 %x.addr.013, 2
br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !5
while.end: ; preds = %if.end, %entry
%result.0.lcssa = phi i64 [ 1, %entry ], [ %result.1, %if.end ]
ret i64 %result.0.lcssa
}
; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable
define dso_local i64 @divide(i64 noundef %a, i64 noundef %b, i64 noundef %modulo) local_unnamed_addr #1 {
entry:
%sub = add i64 %modulo, -2
%tobool.not12.i = icmp eq i64 %sub, 0
br i1 %tobool.not12.i, label %bitpow.exit, label %while.body.i
while.body.i: ; preds = %entry, %if.end.i
%result.015.i = phi i64 [ %result.1.i, %if.end.i ], [ 1, %entry ]
%a.addr.014.i = phi i64 [ %rem3.i, %if.end.i ], [ %b, %entry ]
%x.addr.013.i = phi i64 [ %div11.i, %if.end.i ], [ %sub, %entry ]
%and.i = and i64 %x.addr.013.i, 1
%tobool1.not.i = icmp eq i64 %and.i, 0
br i1 %tobool1.not.i, label %if.end.i, label %if.then.i
if.then.i: ; preds = %while.body.i
%mul.i = mul i64 %a.addr.014.i, %result.015.i
%rem.i = urem i64 %mul.i, %modulo
br label %if.end.i
if.end.i: ; preds = %if.then.i, %while.body.i
%result.1.i = phi i64 [ %rem.i, %if.then.i ], [ %result.015.i, %while.body.i ]
%div11.i = lshr i64 %x.addr.013.i, 1
%mul2.i = mul i64 %a.addr.014.i, %a.addr.014.i
%rem3.i = urem i64 %mul2.i, %modulo
%tobool.not.i = icmp ult i64 %x.addr.013.i, 2
br i1 %tobool.not.i, label %bitpow.exit, label %while.body.i, !llvm.loop !5
bitpow.exit: ; preds = %if.end.i, %entry
%result.0.lcssa.i = phi i64 [ 1, %entry ], [ %result.1.i, %if.end.i ]
%mul = mul i64 %result.0.lcssa.i, %a
%rem = urem i64 %mul, %modulo
ret i64 %rem
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
define dso_local i64 @udiff(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 {
entry:
%cmp.not = icmp ult i64 %a, %b
%sub = sub i64 %a, %b
%sub1 = sub i64 %b, %a
%retval.0 = select i1 %cmp.not, i64 %sub1, i64 %sub
ret i64 %retval.0
}
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
define dso_local i64 @sdiff(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 {
entry:
%sub = sub nsw i64 %a, %b
%retval.0 = tail call i64 @llvm.abs.i64(i64 %sub, i1 true)
ret i64 %retval.0
}
; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable
define dso_local i32 @bitcount(i64 noundef %n) local_unnamed_addr #1 {
entry:
%tobool.not6 = icmp eq i64 %n, 0
br i1 %tobool.not6, label %while.end, label %while.body
while.body: ; preds = %entry, %while.body
%result.08 = phi i32 [ %spec.select, %while.body ], [ 0, %entry ]
%n.addr.07 = phi i64 [ %div5, %while.body ], [ %n, %entry ]
%0 = trunc i64 %n.addr.07 to i32
%1 = and i32 %0, 1
%spec.select = add i32 %1, %result.08
%div5 = lshr i64 %n.addr.07, 1
%tobool.not = icmp ult i64 %n.addr.07, 2
br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !7
while.end: ; preds = %while.body, %entry
%result.0.lcssa = phi i32 [ 0, %entry ], [ %spec.select, %while.body ]
ret i32 %result.0.lcssa
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @pullcomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #3 {
entry:
%0 = load i64, ptr %left, align 8, !tbaa !8
%1 = load i64, ptr %right, align 8, !tbaa !8
%cmp = icmp ult i64 %0, %1
%cmp1 = icmp ugt i64 %0, %1
%. = zext i1 %cmp1 to i32
%retval.0 = select i1 %cmp, i32 -1, i32 %.
ret i32 %retval.0
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @psllcomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #3 {
entry:
%0 = load i64, ptr %left, align 8, !tbaa !8
%1 = load i64, ptr %right, align 8, !tbaa !8
%cmp = icmp slt i64 %0, %1
%cmp1 = icmp sgt i64 %0, %1
%. = zext i1 %cmp1 to i32
%retval.0 = select i1 %cmp, i32 -1, i32 %.
ret i32 %retval.0
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @pcharcomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #3 {
entry:
%0 = load i8, ptr %left, align 1, !tbaa !12
%1 = load i8, ptr %right, align 1, !tbaa !12
%cmp = icmp slt i8 %0, %1
%cmp5 = icmp sgt i8 %0, %1
%. = zext i1 %cmp5 to i32
%retval.0 = select i1 %cmp, i32 -1, i32 %.
ret i32 %retval.0
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @pdoublecomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #3 {
entry:
%0 = load double, ptr %left, align 8, !tbaa !13
%1 = load double, ptr %right, align 8, !tbaa !13
%cmp = fcmp olt double %0, %1
%cmp1 = fcmp ogt double %0, %1
%. = zext i1 %cmp1 to i32
%retval.0 = select i1 %cmp, i32 -1, i32 %.
ret i32 %retval.0
}
; Function Attrs: mustprogress nofree nounwind willreturn memory(read, inaccessiblemem: none) uwtable
define dso_local i32 @pstrcomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #4 {
entry:
%0 = load ptr, ptr %left, align 8, !tbaa !15
%1 = load ptr, ptr %right, align 8, !tbaa !15
%call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) %1) #10
ret i32 %call
}
; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #5
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @phwllABcomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #3 {
entry:
%l.sroa.0.0.copyload = load i64, ptr %left, align 8, !tbaa.struct !17
%l.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %left, i64 8
%l.sroa.5.0.copyload = load i64, ptr %l.sroa.5.0..sroa_idx, align 8, !tbaa.struct !18
%r.sroa.0.0.copyload = load i64, ptr %right, align 8, !tbaa.struct !17
%r.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %right, i64 8
%r.sroa.5.0.copyload = load i64, ptr %r.sroa.5.0..sroa_idx, align 8, !tbaa.struct !18
%cmp = icmp slt i64 %l.sroa.0.0.copyload, %r.sroa.0.0.copyload
br i1 %cmp, label %cleanup, label %if.end
if.end: ; preds = %entry
%cmp4 = icmp sgt i64 %l.sroa.0.0.copyload, %r.sroa.0.0.copyload
br i1 %cmp4, label %cleanup, label %if.end6
if.end6: ; preds = %if.end
%cmp8 = icmp slt i64 %l.sroa.5.0.copyload, %r.sroa.5.0.copyload
br i1 %cmp8, label %cleanup, label %if.end10
if.end10: ; preds = %if.end6
%cmp13 = icmp sgt i64 %l.sroa.5.0.copyload, %r.sroa.5.0.copyload
%. = zext i1 %cmp13 to i32
br label %cleanup
cleanup: ; preds = %if.end10, %if.end6, %if.end, %entry
%retval.0 = phi i32 [ -1, %entry ], [ 1, %if.end ], [ -1, %if.end6 ], [ %., %if.end10 ]
ret i32 %retval.0
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @phwllREVcomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #3 {
entry:
%l.sroa.0.0.copyload = load i64, ptr %left, align 8, !tbaa.struct !17
%l.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %left, i64 8
%l.sroa.5.0.copyload = load i64, ptr %l.sroa.5.0..sroa_idx, align 8, !tbaa.struct !18
%r.sroa.0.0.copyload = load i64, ptr %right, align 8, !tbaa.struct !17
%r.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %right, i64 8
%r.sroa.5.0.copyload = load i64, ptr %r.sroa.5.0..sroa_idx, align 8, !tbaa.struct !18
%cmp = icmp slt i64 %l.sroa.5.0.copyload, %r.sroa.5.0.copyload
br i1 %cmp, label %cleanup, label %if.end
if.end: ; preds = %entry
%cmp4 = icmp sgt i64 %l.sroa.5.0.copyload, %r.sroa.5.0.copyload
br i1 %cmp4, label %cleanup, label %if.end6
if.end6: ; preds = %if.end
%cmp8 = icmp slt i64 %l.sroa.0.0.copyload, %r.sroa.0.0.copyload
br i1 %cmp8, label %cleanup, label %if.end10
if.end10: ; preds = %if.end6
%cmp13 = icmp sgt i64 %l.sroa.0.0.copyload, %r.sroa.0.0.copyload
%. = zext i1 %cmp13 to i32
br label %cleanup
cleanup: ; preds = %if.end10, %if.end6, %if.end, %entry
%retval.0 = phi i32 [ -1, %entry ], [ 1, %if.end ], [ -1, %if.end6 ], [ %., %if.end10 ]
ret i32 %retval.0
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @ptriplecomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #3 {
entry:
%l.sroa.0.0.copyload = load i64, ptr %left, align 8, !tbaa.struct !19
%l.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %left, i64 8
%l.sroa.5.0.copyload = load i64, ptr %l.sroa.5.0..sroa_idx, align 8, !tbaa.struct !17
%l.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %left, i64 16
%l.sroa.7.0.copyload = load i64, ptr %l.sroa.7.0..sroa_idx, align 8, !tbaa.struct !18
%r.sroa.0.0.copyload = load i64, ptr %right, align 8, !tbaa.struct !19
%r.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %right, i64 8
%r.sroa.5.0.copyload = load i64, ptr %r.sroa.5.0..sroa_idx, align 8, !tbaa.struct !17
%r.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %right, i64 16
%r.sroa.7.0.copyload = load i64, ptr %r.sroa.7.0..sroa_idx, align 8, !tbaa.struct !18
%cmp = icmp slt i64 %l.sroa.0.0.copyload, %r.sroa.0.0.copyload
br i1 %cmp, label %cleanup, label %if.end
if.end: ; preds = %entry
%cmp4 = icmp sgt i64 %l.sroa.0.0.copyload, %r.sroa.0.0.copyload
br i1 %cmp4, label %cleanup, label %if.end6
if.end6: ; preds = %if.end
%cmp8 = icmp slt i64 %l.sroa.5.0.copyload, %r.sroa.5.0.copyload
br i1 %cmp8, label %cleanup, label %if.end10
if.end10: ; preds = %if.end6
%cmp13 = icmp sgt i64 %l.sroa.5.0.copyload, %r.sroa.5.0.copyload
br i1 %cmp13, label %cleanup, label %if.end15
if.end15: ; preds = %if.end10
%cmp17 = icmp slt i64 %l.sroa.7.0.copyload, %r.sroa.7.0.copyload
br i1 %cmp17, label %cleanup, label %if.end19
if.end19: ; preds = %if.end15
%cmp22 = icmp sgt i64 %l.sroa.7.0.copyload, %r.sroa.7.0.copyload
%. = zext i1 %cmp22 to i32
br label %cleanup
cleanup: ; preds = %if.end19, %if.end15, %if.end10, %if.end6, %if.end, %entry
%retval.0 = phi i32 [ -1, %entry ], [ 1, %if.end ], [ -1, %if.end6 ], [ 1, %if.end10 ], [ -1, %if.end15 ], [ %., %if.end19 ]
ret i32 %retval.0
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
define dso_local zeroext i1 @isinrange(i64 noundef %left, i64 noundef %x, i64 noundef %right) local_unnamed_addr #2 {
entry:
%cmp = icmp sle i64 %left, %x
%cmp1 = icmp sle i64 %x, %right
%0 = and i1 %cmp, %cmp1
ret i1 %0
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
define dso_local zeroext i1 @isinrange_soft(i64 noundef %left, i64 noundef %x, i64 noundef %right) local_unnamed_addr #2 {
entry:
%cmp.not = icmp sgt i64 %left, %x
%cmp1.not = icmp sgt i64 %x, %right
%or.cond = or i1 %cmp.not, %cmp1.not
br i1 %or.cond, label %lor.rhs, label %lor.end
lor.rhs: ; preds = %entry
%cmp2 = icmp sge i64 %left, %x
%cmp3 = icmp sge i64 %x, %right
%0 = and i1 %cmp2, %cmp3
br label %lor.end
lor.end: ; preds = %entry, %lor.rhs
%1 = phi i1 [ %0, %lor.rhs ], [ true, %entry ]
ret i1 %1
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable
define dso_local i64 @push(i64 noundef %x, i64 noundef %y, i64 noundef %z) local_unnamed_addr #6 {
entry:
%0 = load i64, ptr @m, align 8, !tbaa !8
%arrayidx = getelementptr inbounds [1000000 x i64], ptr @a, i64 0, i64 %0
store i64 %x, ptr %arrayidx, align 8, !tbaa !8
%arrayidx1 = getelementptr inbounds [1000000 x i64], ptr @b, i64 0, i64 %0
store i64 %y, ptr %arrayidx1, align 8, !tbaa !8
%arrayidx2 = getelementptr inbounds [1000000 x i64], ptr @c, i64 0, i64 %0
store i64 %z, ptr %arrayidx2, align 8, !tbaa !8
%inc = add i64 %0, 1
store i64 %inc, ptr @m, align 8, !tbaa !8
ret i64 %0
}
; Function Attrs: nofree nounwind uwtable
define dso_local i64 @solve() local_unnamed_addr #7 {
entry:
%0 = load i64, ptr @k, align 8, !tbaa !8
br label %while.cond
while.cond: ; preds = %while.cond, %entry
%storemerge = phi i64 [ 0, %entry ], [ %inc, %while.cond ]
%.highbits = lshr i64 %0, %storemerge
%cmp.not = icmp eq i64 %.highbits, 0
%inc = add i64 %storemerge, 1
br i1 %cmp.not, label %for.cond.preheader, label %while.cond, !llvm.loop !20
for.cond.preheader: ; preds = %while.cond
store i64 %storemerge, ptr @n, align 8, !tbaa !8
%i.069 = add i64 %storemerge, -1
%cmp170 = icmp sgt i64 %i.069, 0
br i1 %cmp170, label %for.body, label %for.end
for.body: ; preds = %for.cond.preheader, %for.body
%i.073 = phi i64 [ %i.0, %for.body ], [ %i.069, %for.cond.preheader ]
%i.0.in72 = phi i64 [ %i.073, %for.body ], [ %storemerge, %for.cond.preheader ]
%storemerge6771 = phi i64 [ %inc.i62, %for.body ], [ 0, %for.cond.preheader ]
%sub2 = add i64 %i.0.in72, -2
%arrayidx.i = getelementptr inbounds [1000000 x i64], ptr @a, i64 0, i64 %storemerge6771
store i64 %i.073, ptr %arrayidx.i, align 16, !tbaa !8
%arrayidx1.i = getelementptr inbounds [1000000 x i64], ptr @b, i64 0, i64 %storemerge6771
store i64 %sub2, ptr %arrayidx1.i, align 16, !tbaa !8
%arrayidx2.i = getelementptr inbounds [1000000 x i64], ptr @c, i64 0, i64 %storemerge6771
store i64 0, ptr %arrayidx2.i, align 16, !tbaa !8
%inc.i = or i64 %storemerge6771, 1
%shl5 = shl nuw i64 1, %sub2
%arrayidx.i59 = getelementptr inbounds [1000000 x i64], ptr @a, i64 0, i64 %inc.i
store i64 %i.073, ptr %arrayidx.i59, align 8, !tbaa !8
%arrayidx1.i60 = getelementptr inbounds [1000000 x i64], ptr @b, i64 0, i64 %inc.i
store i64 %sub2, ptr %arrayidx1.i60, align 8, !tbaa !8
%arrayidx2.i61 = getelementptr inbounds [1000000 x i64], ptr @c, i64 0, i64 %inc.i
store i64 %shl5, ptr %arrayidx2.i61, align 8, !tbaa !8
%inc.i62 = add i64 %storemerge6771, 2
%i.0 = add nsw i64 %i.073, -1
%cmp1 = icmp ugt i64 %i.073, 1
br i1 %cmp1, label %for.body, label %for.end, !llvm.loop !21
for.end: ; preds = %for.body, %for.cond.preheader
%m.promoted = phi i64 [ 0, %for.cond.preheader ], [ %inc.i62, %for.body ]
store i64 %m.promoted, ptr @m, align 8, !tbaa !8
%sub7 = add i64 %storemerge, -2
%cmp976 = icmp sgt i64 %sub7, -1
br i1 %cmp976, label %for.body10, label %for.end18
for.body10: ; preds = %for.end, %for.inc16
%i.178 = phi i64 [ %dec17, %for.inc16 ], [ %sub7, %for.end ]
%inc.i667577 = phi i64 [ %inc.i6674, %for.inc16 ], [ %m.promoted, %for.end ]
%shl11 = shl nuw i64 1, %i.178
%and = and i64 %shl11, %0
%tobool.not = icmp eq i64 %and, 0
br i1 %tobool.not, label %for.inc16, label %if.then
if.then: ; preds = %for.body10
%1 = shl i64 -2, %i.178
%shl14 = and i64 %1, %0
%arrayidx.i63 = getelementptr inbounds [1000000 x i64], ptr @a, i64 0, i64 %inc.i667577
store i64 %i.069, ptr %arrayidx.i63, align 8, !tbaa !8
%arrayidx1.i64 = getelementptr inbounds [1000000 x i64], ptr @b, i64 0, i64 %inc.i667577
store i64 %i.178, ptr %arrayidx1.i64, align 8, !tbaa !8
%arrayidx2.i65 = getelementptr inbounds [1000000 x i64], ptr @c, i64 0, i64 %inc.i667577
store i64 %shl14, ptr %arrayidx2.i65, align 8, !tbaa !8
%inc.i66 = add i64 %inc.i667577, 1
store i64 %inc.i66, ptr @m, align 8, !tbaa !8
br label %for.inc16
for.inc16: ; preds = %for.body10, %if.then
%inc.i6674 = phi i64 [ %inc.i667577, %for.body10 ], [ %inc.i66, %if.then ]
%dec17 = add nsw i64 %i.178, -1
%cmp9 = icmp sgt i64 %i.178, 0
br i1 %cmp9, label %for.body10, label %for.end18, !llvm.loop !22
for.end18: ; preds = %for.inc16, %for.end
%2 = phi i64 [ %m.promoted, %for.end ], [ %inc.i6674, %for.inc16 ]
%call19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %storemerge, i64 noundef %2)
%3 = load i64, ptr @m, align 8, !tbaa !8
%cmp2179.not = icmp eq i64 %3, 0
br i1 %cmp2179.not, label %for.end30, label %for.body22
for.body22: ; preds = %for.end18, %for.body22
%i.280 = phi i64 [ %inc29, %for.body22 ], [ 0, %for.end18 ]
%4 = load i64, ptr @n, align 8, !tbaa !8
%arrayidx = getelementptr inbounds [1000000 x i64], ptr @a, i64 0, i64 %i.280
%5 = load i64, ptr %arrayidx, align 8, !tbaa !8
%sub23 = sub i64 %4, %5
%arrayidx24 = getelementptr inbounds [1000000 x i64], ptr @b, i64 0, i64 %i.280
%6 = load i64, ptr %arrayidx24, align 8, !tbaa !8
%sub25 = sub i64 %4, %6
%arrayidx26 = getelementptr inbounds [1000000 x i64], ptr @c, i64 0, i64 %i.280
%7 = load i64, ptr %arrayidx26, align 8, !tbaa !8
%call27 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %sub23, i64 noundef %sub25, i64 noundef %7)
%inc29 = add nuw nsw i64 %i.280, 1
%8 = load i64, ptr @m, align 8, !tbaa !8
%cmp21 = icmp ult i64 %inc29, %8
br i1 %cmp21, label %for.body22, label %for.end30, !llvm.loop !23
for.end30: ; preds = %for.body22, %for.end18
ret i64 0
}
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #8
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #7 {
entry:
%call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull @k, ptr noundef nonnull @n, ptr noundef nonnull @m)
%call1 = tail call i64 @solve()
ret i32 0
}
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #8
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #9
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #9
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #9
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #9
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.abs.i64(i64, i1 immarg) #9
attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress nofree nounwind willreturn memory(read, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { nounwind willreturn memory(read) }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = !{!9, !9, i64 0}
!9 = !{!"long", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C/C++ TBAA"}
!12 = !{!10, !10, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !10, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !10, i64 0}
!17 = !{i64 0, i64 8, !8, i64 8, i64 8, !8}
!18 = !{i64 0, i64 8, !8}
!19 = !{i64 0, i64 8, !8, i64 8, i64 8, !8, i64 16, i64 8, !8}
!20 = distinct !{!20, !6}
!21 = distinct !{!21, !6}
!22 = distinct !{!22, !6}
!23 = distinct !{!23, !6}
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define MOD1 1000000007
#define MOD2 998244353
#define LIMIT1 200002
#define LIMIT2 500002
typedef long long ll;
typedef long double ld;
typedef const void cv;
#define rep(i,n) for((i)=0;(i)<(n);(i)++)
#define per(i,n) for((i)=(n)-1;(i)>=0;(i)--)
#define max(a,b) ((a)>(b) ? (a) : (b))
#define min(a,b) ((a)<(b) ? (a) : (b))
#define zt(a,b) (max((a),(b))-min((a),(b)))
#define absl(v) labs((v))
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll nPr(int n,int r){ll i,result=1;rep(i,r){result*=(ll)(n-i);}return result;}
ll nCr(int n,int r){ll i,result=1;if(n<r) return 0;rep(i,min(r,n-r)){result*=(ll)(n-i);result/=(ll)(i+1);}return result;}
#define nHr(n,r) nCr((int)((n)+(r)+1),(int)(r))
#define sankaku(x) (((x)*((x)+1))/2)
int dx[8]={1,0,-1,0,1,-1,-1,1},dy[8]={0,1,0,-1,1,1,-1,-1};
int upint(cv *a, cv *b) { return *(int *)a < *(int *)b ? -1 : *(int *)a > *(int *)b ? 1 : 0; }
int downint(cv *a, cv *b) { return *(int *)a < *(int *)b ? 1 : *(int *)a > *(int *)b ? -1 : 0; }
int upchar(cv *left, cv *right) {return strcmp((char *)left,(char *)right);}
int downchar(cv *left, cv *right) {return strcmp((char *)right,(char *)left);}
void tmpInit(int *c,ll m) {ll i;rep(i,m) c[i]=i;}
ll modpow(ll a, ll n, ll mod) {
ll res = 1;
while (n > 0) {
if (n & 1){
res *= a; if(mod>=1) res %= mod;
}
a *= a; if(mod>=1) a %= mod;
n >>= 1;
}
return res;
}
void initialize(){
}
int main(void){
initialize();
ll n,m,i,j,k,result=0,sum=0,tmp=0;
int a[LIMIT2]={0};
ll b[LIMIT1]={0},c[LIMIT1]={0};
char s[LIMIT1];
scanf("%lld",&n);
rep(i,n+1) scanf("%d",&a[i]);
tmp=1;
sum=0;
rep(i,n+1) sum+=(ll)a[i];
rep(i,n+1){
if(tmp<(ll)a[i]){
result = -1;
break;
}
c[i]=tmp;
tmp -= (ll)a[i];
tmp *= 2;
sum -= (ll)a[i];
tmp = min(tmp,sum);
}
if(a[n]>c[n]) result=-1;
if(result!=-1){
b[n]=a[n];
per(i,n){
b[i]=b[i+1]+(ll)a[i];
}
result = 0;
rep(i,n+1){
result += min(b[i],c[i]);
}
if(result<=0) result=-1;
}
printf("%lld",result);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132894/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132894/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@dx = dso_local local_unnamed_addr global [8 x i32] [i32 1, i32 0, i32 -1, i32 0, i32 1, i32 -1, i32 -1, i32 1], align 16
@dy = dso_local local_unnamed_addr global [8 x i32] [i32 0, i32 1, i32 0, i32 -1, i32 1, i32 1, i32 -1, i32 -1], align 16
@.str = private unnamed_addr constant [5 x i8] c"%lld\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1
; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable
define dso_local i64 @gcd(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 {
entry:
%tobool.not4 = icmp eq i64 %b, 0
br i1 %tobool.not4, label %cond.end, label %cond.true
cond.true: ; preds = %entry, %cond.true
%b.tr6 = phi i64 [ %rem, %cond.true ], [ %b, %entry ]
%a.tr5 = phi i64 [ %b.tr6, %cond.true ], [ %a, %entry ]
%rem = srem i64 %a.tr5, %b.tr6
%tobool.not = icmp eq i64 %rem, 0
br i1 %tobool.not, label %cond.end, label %cond.true
cond.end: ; preds = %cond.true, %entry
%a.tr.lcssa = phi i64 [ %a, %entry ], [ %b.tr6, %cond.true ]
ret i64 %a.tr.lcssa
}
; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable
define dso_local i64 @nPr(i32 noundef %n, i32 noundef %r) local_unnamed_addr #0 {
entry:
%conv = sext i32 %r to i64
%cmp6 = icmp sgt i32 %r, 0
br i1 %cmp6, label %for.body.lr.ph, label %for.end
for.body.lr.ph: ; preds = %entry
%conv2 = sext i32 %n to i64
%xtraiter = and i64 %conv, 7
%0 = icmp ult i32 %r, 8
br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.lr.ph.new
for.body.lr.ph.new: ; preds = %for.body.lr.ph
%unroll_iter = and i64 %conv, -8
br label %for.body
for.body: ; preds = %for.body, %for.body.lr.ph.new
%result.08 = phi i64 [ 1, %for.body.lr.ph.new ], [ %mul.7, %for.body ]
%i.07 = phi i64 [ 0, %for.body.lr.ph.new ], [ %inc.7, %for.body ]
%niter = phi i64 [ 0, %for.body.lr.ph.new ], [ %niter.next.7, %for.body ]
%sub = sub nsw i64 %conv2, %i.07
%mul = mul nsw i64 %result.08, %sub
%inc.neg = xor i64 %i.07, -1
%sub.1 = add i64 %inc.neg, %conv2
%mul.1 = mul nsw i64 %mul, %sub.1
%inc.1 = or i64 %i.07, 2
%sub.2 = sub nsw i64 %conv2, %inc.1
%mul.2 = mul nsw i64 %mul.1, %sub.2
%inc.2 = or i64 %i.07, 3
%sub.3 = sub nsw i64 %conv2, %inc.2
%mul.3 = mul nsw i64 %mul.2, %sub.3
%inc.3 = or i64 %i.07, 4
%sub.4 = sub nsw i64 %conv2, %inc.3
%mul.4 = mul nsw i64 %mul.3, %sub.4
%inc.4 = or i64 %i.07, 5
%sub.5 = sub nsw i64 %conv2, %inc.4
%mul.5 = mul nsw i64 %mul.4, %sub.5
%inc.5 = or i64 %i.07, 6
%sub.6 = sub nsw i64 %conv2, %inc.5
%mul.6 = mul nsw i64 %mul.5, %sub.6
%inc.6 = or i64 %i.07, 7
%sub.7 = sub nsw i64 %conv2, %inc.6
%mul.7 = mul nsw i64 %mul.6, %sub.7
%inc.7 = add nuw nsw i64 %i.07, 8
%niter.next.7 = add i64 %niter, 8
%niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
br i1 %niter.ncmp.7, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !5
for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph
%mul.lcssa.ph = phi i64 [ undef, %for.body.lr.ph ], [ %mul.7, %for.body ]
%result.08.unr = phi i64 [ 1, %for.body.lr.ph ], [ %mul.7, %for.body ]
%i.07.unr = phi i64 [ 0, %for.body.lr.ph ], [ %inc.7, %for.body ]
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.end, label %for.body.epil
for.body.epil: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil
%result.08.epil = phi i64 [ %mul.epil, %for.body.epil ], [ %result.08.unr, %for.end.loopexit.unr-lcssa ]
%i.07.epil = phi i64 [ %inc.epil, %for.body.epil ], [ %i.07.unr, %for.end.loopexit.unr-lcssa ]
%epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.end.loopexit.unr-lcssa ]
%sub.epil = sub nsw i64 %conv2, %i.07.epil
%mul.epil = mul nsw i64 %result.08.epil, %sub.epil
%inc.epil = add nuw nsw i64 %i.07.epil, 1
%epil.iter.next = add i64 %epil.iter, 1
%epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
br i1 %epil.iter.cmp.not, label %for.end, label %for.body.epil, !llvm.loop !7
for.end: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil, %entry
%result.0.lcssa = phi i64 [ 1, %entry ], [ %mul.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ]
ret i64 %result.0.lcssa
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nosync nounwind memory(none) uwtable
define dso_local i64 @nCr(i32 noundef %n, i32 noundef %r) local_unnamed_addr #2 {
entry:
%cmp = icmp slt i32 %n, %r
br i1 %cmp, label %cleanup, label %for.cond.preheader
for.cond.preheader: ; preds = %entry
%sub = sub nsw i32 %n, %r
%cond = tail call i32 @llvm.smin.i32(i32 %sub, i32 %r)
%conv = sext i32 %cond to i64
%cmp320 = icmp sgt i32 %cond, 0
br i1 %cmp320, label %for.body.lr.ph, label %cleanup
for.body.lr.ph: ; preds = %for.cond.preheader
%conv5 = sext i32 %n to i64
%xtraiter = and i64 %conv, 1
%0 = icmp eq i32 %cond, 1
br i1 %0, label %cleanup.loopexit.unr-lcssa, label %for.body.lr.ph.new
for.body.lr.ph.new: ; preds = %for.body.lr.ph
%unroll_iter = and i64 %conv, -2
br label %for.body
for.body: ; preds = %for.body, %for.body.lr.ph.new
%result.022 = phi i64 [ 1, %for.body.lr.ph.new ], [ %div.1, %for.body ]
%i.021 = phi i64 [ 0, %for.body.lr.ph.new ], [ %add.1, %for.body ]
%niter = phi i64 [ 0, %for.body.lr.ph.new ], [ %niter.next.1, %for.body ]
%sub6 = sub nsw i64 %conv5, %i.021
%mul = mul nsw i64 %result.022, %sub6
%add = or i64 %i.021, 1
%div = sdiv i64 %mul, %add
%sub6.1 = sub nsw i64 %conv5, %add
%mul.1 = mul nsw i64 %div, %sub6.1
%add.1 = add nuw nsw i64 %i.021, 2
%div.1 = sdiv i64 %mul.1, %add.1
%niter.next.1 = add i64 %niter, 2
%niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
br i1 %niter.ncmp.1, label %cleanup.loopexit.unr-lcssa, label %for.body, !llvm.loop !9
cleanup.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph
%div.lcssa.ph = phi i64 [ undef, %for.body.lr.ph ], [ %div.1, %for.body ]
%result.022.unr = phi i64 [ 1, %for.body.lr.ph ], [ %div.1, %for.body ]
%i.021.unr = phi i64 [ 0, %for.body.lr.ph ], [ %add.1, %for.body ]
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %cleanup, label %for.body.epil
for.body.epil: ; preds = %cleanup.loopexit.unr-lcssa
%sub6.epil = sub nsw i64 %conv5, %i.021.unr
%mul.epil = mul nsw i64 %result.022.unr, %sub6.epil
%add.epil = add nuw nsw i64 %i.021.unr, 1
%div.epil = sdiv i64 %mul.epil, %add.epil
br label %cleanup
cleanup: ; preds = %for.body.epil, %cleanup.loopexit.unr-lcssa, %for.cond.preheader, %entry
%retval.0 = phi i64 [ 0, %entry ], [ 1, %for.cond.preheader ], [ %div.lcssa.ph, %cleanup.loopexit.unr-lcssa ], [ %div.epil, %for.body.epil ]
ret i64 %retval.0
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @upint(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #3 {
entry:
%0 = load i32, ptr %a, align 4, !tbaa !10
%1 = load i32, ptr %b, align 4, !tbaa !10
%cmp = icmp slt i32 %0, %1
%cmp1 = icmp sgt i32 %0, %1
%cond = zext i1 %cmp1 to i32
%cond2 = select i1 %cmp, i32 -1, i32 %cond
ret i32 %cond2
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @downint(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #3 {
entry:
%0 = load i32, ptr %a, align 4, !tbaa !10
%1 = load i32, ptr %b, align 4, !tbaa !10
%cmp = icmp slt i32 %0, %1
%cmp1 = icmp sgt i32 %0, %1
%cond = sext i1 %cmp1 to i32
%cond2 = select i1 %cmp, i32 1, i32 %cond
ret i32 %cond2
}
; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @upchar(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #4 {
entry:
%call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %left, ptr noundef nonnull dereferenceable(1) %right) #12
ret i32 %call
}
; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #5
; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @downchar(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #4 {
entry:
%call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %right, ptr noundef nonnull dereferenceable(1) %left) #12
ret i32 %call
}
; Function Attrs: nofree norecurse nosync nounwind memory(argmem: write) uwtable
define dso_local void @tmpInit(ptr nocapture noundef writeonly %c, i64 noundef %m) local_unnamed_addr #6 {
entry:
%cmp4 = icmp sgt i64 %m, 0
br i1 %cmp4, label %for.body.preheader, label %for.end
for.body.preheader: ; preds = %entry
%min.iters.check = icmp ult i64 %m, 8
br i1 %min.iters.check, label %for.body.preheader7, label %vector.ph
vector.ph: ; preds = %for.body.preheader
%n.vec = and i64 %m, -8
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
%step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
%0 = getelementptr inbounds i32, ptr %c, i64 %index
store <4 x i32> %vec.ind, ptr %0, align 4, !tbaa !10
%1 = getelementptr inbounds i32, ptr %0, i64 4
store <4 x i32> %step.add, ptr %1, align 4, !tbaa !10
%index.next = add nuw i64 %index, 8
%vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
%2 = icmp eq i64 %index.next, %n.vec
br i1 %2, label %middle.block, label %vector.body, !llvm.loop !14
middle.block: ; preds = %vector.body
%cmp.n = icmp eq i64 %n.vec, %m
br i1 %cmp.n, label %for.end, label %for.body.preheader7
for.body.preheader7: ; preds = %for.body.preheader, %middle.block
%i.05.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ]
br label %for.body
for.body: ; preds = %for.body.preheader7, %for.body
%i.05 = phi i64 [ %inc, %for.body ], [ %i.05.ph, %for.body.preheader7 ]
%conv = trunc i64 %i.05 to i32
%arrayidx = getelementptr inbounds i32, ptr %c, i64 %i.05
store i32 %conv, ptr %arrayidx, align 4, !tbaa !10
%inc = add nuw nsw i64 %i.05, 1
%exitcond.not = icmp eq i64 %inc, %m
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !17
for.end: ; preds = %for.body, %middle.block, %entry
ret void
}
; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable
define dso_local i64 @modpow(i64 noundef %a, i64 noundef %n, i64 noundef %mod) local_unnamed_addr #0 {
entry:
%cmp29 = icmp sgt i64 %n, 0
br i1 %cmp29, label %while.body.lr.ph, label %while.end
while.body.lr.ph: ; preds = %entry
%cmp1 = icmp sgt i64 %mod, 0
br i1 %cmp1, label %while.body.us.us, label %while.body
while.body.us.us: ; preds = %while.body.lr.ph, %if.then6.us.us
%res.032.us.us = phi i64 [ %res.123.us.us, %if.then6.us.us ], [ 1, %while.body.lr.ph ]
%a.addr.031.us.us = phi i64 [ %rem7.us.us, %if.then6.us.us ], [ %a, %while.body.lr.ph ]
%n.addr.030.us.us = phi i64 [ %shr.us.us, %if.then6.us.us ], [ %n, %while.body.lr.ph ]
%and.us.us = and i64 %n.addr.030.us.us, 1
%tobool.not.us.us = icmp eq i64 %and.us.us, 0
br i1 %tobool.not.us.us, label %if.then6.us.us, label %if.then.us.us
if.then.us.us: ; preds = %while.body.us.us
%mul.us.us = mul nsw i64 %res.032.us.us, %a.addr.031.us.us
%rem.us.us = srem i64 %mul.us.us, %mod
br label %if.then6.us.us
if.then6.us.us: ; preds = %while.body.us.us, %if.then.us.us
%res.123.us.us = phi i64 [ %rem.us.us, %if.then.us.us ], [ %res.032.us.us, %while.body.us.us ]
%mul424.us.us = mul nsw i64 %a.addr.031.us.us, %a.addr.031.us.us
%rem7.us.us = srem i64 %mul424.us.us, %mod
%shr.us.us = lshr i64 %n.addr.030.us.us, 1
%cmp.us.us.not = icmp ult i64 %n.addr.030.us.us, 2
br i1 %cmp.us.us.not, label %while.end, label %while.body.us.us, !llvm.loop !18
while.body: ; preds = %while.body.lr.ph, %while.body
%res.032 = phi i64 [ %spec.select, %while.body ], [ 1, %while.body.lr.ph ]
%a.addr.031 = phi i64 [ %a.addr.1, %while.body ], [ %a, %while.body.lr.ph ]
%n.addr.030 = phi i64 [ %shr, %while.body ], [ %n, %while.body.lr.ph ]
%and = and i64 %n.addr.030, 1
%tobool.not = icmp eq i64 %and, 0
%mul = select i1 %tobool.not, i64 1, i64 %a.addr.031
%spec.select = mul nsw i64 %res.032, %mul
%a.addr.1 = mul nsw i64 %a.addr.031, %a.addr.031
%shr = lshr i64 %n.addr.030, 1
%cmp.not = icmp ult i64 %n.addr.030, 2
br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !18
while.end: ; preds = %while.body, %if.then6.us.us, %entry
%res.0.lcssa = phi i64 [ 1, %entry ], [ %res.123.us.us, %if.then6.us.us ], [ %spec.select, %while.body ]
ret i64 %res.0.lcssa
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
define dso_local void @initialize() local_unnamed_addr #7 {
entry:
ret void
}
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #8 {
entry:
%n = alloca i64, align 8
%a = alloca [500002 x i32], align 16
%b = alloca [200002 x i64], align 16
%c = alloca [200002 x i64], align 16
call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #13
call void @llvm.lifetime.start.p0(i64 2000008, ptr nonnull %a) #13
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2000008) %a, i8 0, i64 2000008, i1 false)
call void @llvm.lifetime.start.p0(i64 1600016, ptr nonnull %b) #13
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1600016) %b, i8 0, i64 1600016, i1 false)
call void @llvm.lifetime.start.p0(i64 1600016, ptr nonnull %c) #13
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1600016) %c, i8 0, i64 1600016, i1 false)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
%0 = load i64, ptr %n, align 8, !tbaa !19
%cmp.not117 = icmp slt i64 %0, 0
br i1 %cmp.not117, label %for.end30, label %for.body
for.cond2.preheader: ; preds = %for.body
%cmp4.not119 = icmp slt i64 %10, 0
br i1 %cmp4.not119, label %for.end30, label %for.body5.preheader
for.body5.preheader: ; preds = %for.cond2.preheader
%1 = add i64 %10, 1
%min.iters.check = icmp ult i64 %1, 4
br i1 %min.iters.check, label %for.body5.preheader162, label %vector.ph
vector.ph: ; preds = %for.body5.preheader
%n.vec = and i64 %1, -4
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %6, %vector.body ]
%vec.phi159 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %7, %vector.body ]
%2 = getelementptr inbounds [500002 x i32], ptr %a, i64 0, i64 %index
%wide.load = load <2 x i32>, ptr %2, align 16, !tbaa !10
%3 = getelementptr inbounds i32, ptr %2, i64 2
%wide.load160 = load <2 x i32>, ptr %3, align 8, !tbaa !10
%4 = sext <2 x i32> %wide.load to <2 x i64>
%5 = sext <2 x i32> %wide.load160 to <2 x i64>
%6 = add <2 x i64> %vec.phi, %4
%7 = add <2 x i64> %vec.phi159, %5
%index.next = add nuw i64 %index, 4
%8 = icmp eq i64 %index.next, %n.vec
br i1 %8, label %middle.block, label %vector.body, !llvm.loop !21
middle.block: ; preds = %vector.body
%bin.rdx = add <2 x i64> %7, %6
%9 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
%cmp.n = icmp eq i64 %1, %n.vec
br i1 %cmp.n, label %for.cond11.preheader, label %for.body5.preheader162
for.body5.preheader162: ; preds = %for.body5.preheader, %middle.block
%i.1121.ph = phi i64 [ 0, %for.body5.preheader ], [ %n.vec, %middle.block ]
%sum.0120.ph = phi i64 [ 0, %for.body5.preheader ], [ %9, %middle.block ]
br label %for.body5
for.body: ; preds = %entry, %for.body
%i.0118 = phi i64 [ %inc, %for.body ], [ 0, %entry ]
%arrayidx = getelementptr inbounds [500002 x i32], ptr %a, i64 0, i64 %i.0118
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx)
%inc = add nuw nsw i64 %i.0118, 1
%10 = load i64, ptr %n, align 8, !tbaa !19
%cmp.not.not = icmp slt i64 %i.0118, %10
br i1 %cmp.not.not, label %for.body, label %for.cond2.preheader, !llvm.loop !22
for.cond11.preheader: ; preds = %for.body5, %middle.block
%add7.lcssa = phi i64 [ %9, %middle.block ], [ %add7, %for.body5 ]
%cmp13.not123 = icmp sgt i64 %10, -1
br i1 %cmp13.not123, label %for.body15.preheader, label %for.end30
for.body15.preheader: ; preds = %for.cond11.preheader
%11 = load i32, ptr %a, align 16, !tbaa !10
%cmp18153 = icmp sgt i32 %11, 1
br i1 %cmp18153, label %for.end30, label %if.end.lr.ph
if.end.lr.ph: ; preds = %for.body15.preheader
%conv17152 = sext i32 %11 to i64
br label %if.end
for.body5: ; preds = %for.body5.preheader162, %for.body5
%i.1121 = phi i64 [ %inc9, %for.body5 ], [ %i.1121.ph, %for.body5.preheader162 ]
%sum.0120 = phi i64 [ %add7, %for.body5 ], [ %sum.0120.ph, %for.body5.preheader162 ]
%arrayidx6 = getelementptr inbounds [500002 x i32], ptr %a, i64 0, i64 %i.1121
%12 = load i32, ptr %arrayidx6, align 4, !tbaa !10
%conv = sext i32 %12 to i64
%add7 = add nsw i64 %sum.0120, %conv
%inc9 = add nuw i64 %i.1121, 1
%exitcond.not = icmp eq i64 %i.1121, %10
br i1 %exitcond.not, label %for.cond11.preheader, label %for.body5, !llvm.loop !23
for.body15: ; preds = %if.end
%sub25 = sub nsw i64 %sum.1124156, %conv17157
%sub = sub nsw i64 %tmp.0125155, %conv17157
%mul = shl nsw i64 %sub, 1
%cond = call i64 @llvm.smin.i64(i64 %mul, i64 %sub25)
%inc29 = add nuw i64 %i.2126154, 1
%arrayidx16 = getelementptr inbounds [500002 x i32], ptr %a, i64 0, i64 %inc29
%13 = load i32, ptr %arrayidx16, align 4, !tbaa !10
%conv17 = sext i32 %13 to i64
%cmp18 = icmp slt i64 %cond, %conv17
br i1 %cmp18, label %for.end30.loopexit, label %if.end, !llvm.loop !24
if.end: ; preds = %if.end.lr.ph, %for.body15
%conv17157 = phi i64 [ %conv17152, %if.end.lr.ph ], [ %conv17, %for.body15 ]
%sum.1124156 = phi i64 [ %add7.lcssa, %if.end.lr.ph ], [ %sub25, %for.body15 ]
%tmp.0125155 = phi i64 [ 1, %if.end.lr.ph ], [ %cond, %for.body15 ]
%i.2126154 = phi i64 [ 0, %if.end.lr.ph ], [ %inc29, %for.body15 ]
%arrayidx20 = getelementptr inbounds [200002 x i64], ptr %c, i64 0, i64 %i.2126154
store i64 %tmp.0125155, ptr %arrayidx20, align 8, !tbaa !19
%exitcond137.not = icmp eq i64 %i.2126154, %10
br i1 %exitcond137.not, label %for.end30.loopexit, label %for.body15, !llvm.loop !24
for.end30.loopexit: ; preds = %if.end, %for.body15
%cmp13.not.le = icmp slt i64 %i.2126154, %10
br label %for.end30
for.end30: ; preds = %for.end30.loopexit, %for.body15.preheader, %entry, %for.cond2.preheader, %for.cond11.preheader
%.lcssa141148 = phi i64 [ %10, %for.cond11.preheader ], [ %10, %for.cond2.preheader ], [ %0, %entry ], [ %10, %for.body15.preheader ], [ %10, %for.end30.loopexit ]
%cmp4.not119142147 = phi i1 [ %cmp4.not119, %for.cond11.preheader ], [ true, %for.cond2.preheader ], [ true, %entry ], [ %cmp4.not119, %for.body15.preheader ], [ %cmp4.not119, %for.end30.loopexit ]
%cmp13.not.lcssa = phi i1 [ false, %for.cond11.preheader ], [ false, %for.cond2.preheader ], [ false, %entry ], [ true, %for.body15.preheader ], [ %cmp13.not.le, %for.end30.loopexit ]
%arrayidx31 = getelementptr inbounds [500002 x i32], ptr %a, i64 0, i64 %.lcssa141148
%14 = load i32, ptr %arrayidx31, align 4, !tbaa !10
%conv32 = sext i32 %14 to i64
%arrayidx33 = getelementptr inbounds [200002 x i64], ptr %c, i64 0, i64 %.lcssa141148
%15 = load i64, ptr %arrayidx33, align 8, !tbaa !19
%cmp34 = icmp slt i64 %15, %conv32
%cmp38.not = or i1 %cmp13.not.lcssa, %cmp34
br i1 %cmp38.not, label %if.end80, label %if.then40
if.then40: ; preds = %for.end30
%arrayidx43 = getelementptr inbounds [200002 x i64], ptr %b, i64 0, i64 %.lcssa141148
store i64 %conv32, ptr %arrayidx43, align 8, !tbaa !19
%cmp46130 = icmp sgt i64 %.lcssa141148, 0
br i1 %cmp46130, label %for.body48.preheader, label %for.cond57.preheader
for.body48.preheader: ; preds = %if.then40
%xtraiter = and i64 %.lcssa141148, 3
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.body48.prol.loopexit, label %for.body48.prol
for.body48.prol: ; preds = %for.body48.preheader, %for.body48.prol
%16 = phi i64 [ %add53.prol, %for.body48.prol ], [ %conv32, %for.body48.preheader ]
%i.3.in131.prol = phi i64 [ %i.3.prol, %for.body48.prol ], [ %.lcssa141148, %for.body48.preheader ]
%prol.iter = phi i64 [ %prol.iter.next, %for.body48.prol ], [ 0, %for.body48.preheader ]
%i.3.prol = add nsw i64 %i.3.in131.prol, -1
%arrayidx51.prol = getelementptr inbounds [500002 x i32], ptr %a, i64 0, i64 %i.3.prol
%17 = load i32, ptr %arrayidx51.prol, align 4, !tbaa !10
%conv52.prol = sext i32 %17 to i64
%add53.prol = add nsw i64 %16, %conv52.prol
%arrayidx54.prol = getelementptr inbounds [200002 x i64], ptr %b, i64 0, i64 %i.3.prol
store i64 %add53.prol, ptr %arrayidx54.prol, align 8, !tbaa !19
%prol.iter.next = add i64 %prol.iter, 1
%prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
br i1 %prol.iter.cmp.not, label %for.body48.prol.loopexit, label %for.body48.prol, !llvm.loop !25
for.body48.prol.loopexit: ; preds = %for.body48.prol, %for.body48.preheader
%.unr = phi i64 [ %conv32, %for.body48.preheader ], [ %add53.prol, %for.body48.prol ]
%i.3.in131.unr = phi i64 [ %.lcssa141148, %for.body48.preheader ], [ %i.3.prol, %for.body48.prol ]
%18 = icmp ult i64 %.lcssa141148, 4
br i1 %18, label %for.cond57.preheader, label %for.body48
for.cond57.preheader: ; preds = %for.body48.prol.loopexit, %for.body48, %if.then40
br i1 %cmp4.not119142147, label %for.end75.thread, label %for.body61.preheader
for.body61.preheader: ; preds = %for.cond57.preheader
%19 = add i64 %.lcssa141148, 1
%xtraiter166 = and i64 %19, 3
%20 = icmp ult i64 %.lcssa141148, 3
br i1 %20, label %for.end75.unr-lcssa, label %for.body61.preheader.new
for.body61.preheader.new: ; preds = %for.body61.preheader
%unroll_iter = and i64 %19, -4
br label %for.body61
for.body48: ; preds = %for.body48.prol.loopexit, %for.body48
%21 = phi i64 [ %add53.3, %for.body48 ], [ %.unr, %for.body48.prol.loopexit ]
%i.3.in131 = phi i64 [ %i.3.3, %for.body48 ], [ %i.3.in131.unr, %for.body48.prol.loopexit ]
%i.3 = add nsw i64 %i.3.in131, -1
%arrayidx51 = getelementptr inbounds [500002 x i32], ptr %a, i64 0, i64 %i.3
%22 = load i32, ptr %arrayidx51, align 4, !tbaa !10
%conv52 = sext i32 %22 to i64
%add53 = add nsw i64 %21, %conv52
%arrayidx54 = getelementptr inbounds [200002 x i64], ptr %b, i64 0, i64 %i.3
store i64 %add53, ptr %arrayidx54, align 8, !tbaa !19
%i.3.1 = add nsw i64 %i.3.in131, -2
%arrayidx51.1 = getelementptr inbounds [500002 x i32], ptr %a, i64 0, i64 %i.3.1
%23 = load i32, ptr %arrayidx51.1, align 4, !tbaa !10
%conv52.1 = sext i32 %23 to i64
%add53.1 = add nsw i64 %add53, %conv52.1
%arrayidx54.1 = getelementptr inbounds [200002 x i64], ptr %b, i64 0, i64 %i.3.1
store i64 %add53.1, ptr %arrayidx54.1, align 8, !tbaa !19
%i.3.2 = add nsw i64 %i.3.in131, -3
%arrayidx51.2 = getelementptr inbounds [500002 x i32], ptr %a, i64 0, i64 %i.3.2
%24 = load i32, ptr %arrayidx51.2, align 4, !tbaa !10
%conv52.2 = sext i32 %24 to i64
%add53.2 = add nsw i64 %add53.1, %conv52.2
%arrayidx54.2 = getelementptr inbounds [200002 x i64], ptr %b, i64 0, i64 %i.3.2
store i64 %add53.2, ptr %arrayidx54.2, align 8, !tbaa !19
%i.3.3 = add nsw i64 %i.3.in131, -4
%arrayidx51.3 = getelementptr inbounds [500002 x i32], ptr %a, i64 0, i64 %i.3.3
%25 = load i32, ptr %arrayidx51.3, align 4, !tbaa !10
%conv52.3 = sext i32 %25 to i64
%add53.3 = add nsw i64 %add53.2, %conv52.3
%arrayidx54.3 = getelementptr inbounds [200002 x i64], ptr %b, i64 0, i64 %i.3.3
store i64 %add53.3, ptr %arrayidx54.3, align 8, !tbaa !19
%cmp46.3 = icmp ugt i64 %i.3.2, 1
br i1 %cmp46.3, label %for.body48, label %for.cond57.preheader, !llvm.loop !26
for.body61: ; preds = %for.body61, %for.body61.preheader.new
%i.4134 = phi i64 [ 0, %for.body61.preheader.new ], [ %inc74.3, %for.body61 ]
%result.2133 = phi i64 [ 0, %for.body61.preheader.new ], [ %add72.3, %for.body61 ]
%niter = phi i64 [ 0, %for.body61.preheader.new ], [ %niter.next.3, %for.body61 ]
%arrayidx62 = getelementptr inbounds [200002 x i64], ptr %b, i64 0, i64 %i.4134
%26 = load i64, ptr %arrayidx62, align 16, !tbaa !19
%arrayidx63 = getelementptr inbounds [200002 x i64], ptr %c, i64 0, i64 %i.4134
%27 = load i64, ptr %arrayidx63, align 16, !tbaa !19
%. = call i64 @llvm.smin.i64(i64 %26, i64 %27)
%..fr = freeze i64 %.
%add72 = add i64 %..fr, %result.2133
%inc74 = or i64 %i.4134, 1
%arrayidx62.1 = getelementptr inbounds [200002 x i64], ptr %b, i64 0, i64 %inc74
%28 = load i64, ptr %arrayidx62.1, align 8, !tbaa !19
%arrayidx63.1 = getelementptr inbounds [200002 x i64], ptr %c, i64 0, i64 %inc74
%29 = load i64, ptr %arrayidx63.1, align 8, !tbaa !19
%..1 = call i64 @llvm.smin.i64(i64 %28, i64 %29)
%..fr.1 = freeze i64 %..1
%add72.1 = add i64 %..fr.1, %add72
%inc74.1 = or i64 %i.4134, 2
%arrayidx62.2 = getelementptr inbounds [200002 x i64], ptr %b, i64 0, i64 %inc74.1
%30 = load i64, ptr %arrayidx62.2, align 16, !tbaa !19
%arrayidx63.2 = getelementptr inbounds [200002 x i64], ptr %c, i64 0, i64 %inc74.1
%31 = load i64, ptr %arrayidx63.2, align 16, !tbaa !19
%..2 = call i64 @llvm.smin.i64(i64 %30, i64 %31)
%..fr.2 = freeze i64 %..2
%add72.2 = add i64 %..fr.2, %add72.1
%inc74.2 = or i64 %i.4134, 3
%arrayidx62.3 = getelementptr inbounds [200002 x i64], ptr %b, i64 0, i64 %inc74.2
%32 = load i64, ptr %arrayidx62.3, align 8, !tbaa !19
%arrayidx63.3 = getelementptr inbounds [200002 x i64], ptr %c, i64 0, i64 %inc74.2
%33 = load i64, ptr %arrayidx63.3, align 8, !tbaa !19
%..3 = call i64 @llvm.smin.i64(i64 %32, i64 %33)
%..fr.3 = freeze i64 %..3
%add72.3 = add i64 %..fr.3, %add72.2
%inc74.3 = add nuw i64 %i.4134, 4
%niter.next.3 = add i64 %niter, 4
%niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
br i1 %niter.ncmp.3, label %for.end75.unr-lcssa, label %for.body61, !llvm.loop !27
for.end75.unr-lcssa: ; preds = %for.body61, %for.body61.preheader
%add72.lcssa.ph = phi i64 [ undef, %for.body61.preheader ], [ %add72.3, %for.body61 ]
%i.4134.unr = phi i64 [ 0, %for.body61.preheader ], [ %inc74.3, %for.body61 ]
%result.2133.unr = phi i64 [ 0, %for.body61.preheader ], [ %add72.3, %for.body61 ]
%lcmp.mod167.not = icmp eq i64 %xtraiter166, 0
br i1 %lcmp.mod167.not, label %for.end75, label %for.body61.epil
for.body61.epil: ; preds = %for.end75.unr-lcssa, %for.body61.epil
%i.4134.epil = phi i64 [ %inc74.epil, %for.body61.epil ], [ %i.4134.unr, %for.end75.unr-lcssa ]
%result.2133.epil = phi i64 [ %add72.epil, %for.body61.epil ], [ %result.2133.unr, %for.end75.unr-lcssa ]
%epil.iter = phi i64 [ %epil.iter.next, %for.body61.epil ], [ 0, %for.end75.unr-lcssa ]
%arrayidx62.epil = getelementptr inbounds [200002 x i64], ptr %b, i64 0, i64 %i.4134.epil
%34 = load i64, ptr %arrayidx62.epil, align 8, !tbaa !19
%arrayidx63.epil = getelementptr inbounds [200002 x i64], ptr %c, i64 0, i64 %i.4134.epil
%35 = load i64, ptr %arrayidx63.epil, align 8, !tbaa !19
%..epil = call i64 @llvm.smin.i64(i64 %34, i64 %35)
%..fr.epil = freeze i64 %..epil
%add72.epil = add i64 %..fr.epil, %result.2133.epil
%inc74.epil = add nuw i64 %i.4134.epil, 1
%epil.iter.next = add i64 %epil.iter, 1
%epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter166
br i1 %epil.iter.cmp.not, label %for.end75, label %for.body61.epil, !llvm.loop !28
for.end75: ; preds = %for.body61.epil, %for.end75.unr-lcssa
%add72.lcssa = phi i64 [ %add72.lcssa.ph, %for.end75.unr-lcssa ], [ %add72.epil, %for.body61.epil ]
%cmp76 = icmp slt i64 %add72.lcssa, 1
br i1 %cmp76, label %for.end75.thread, label %if.end80
for.end75.thread: ; preds = %for.cond57.preheader, %for.end75
br label %if.end80
if.end80: ; preds = %for.end75.thread, %for.end75, %for.end30
%result.3 = phi i64 [ -1, %for.end30 ], [ -1, %for.end75.thread ], [ %add72.lcssa, %for.end75 ]
%call81 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %result.3)
call void @llvm.lifetime.end.p0(i64 1600016, ptr nonnull %c) #13
call void @llvm.lifetime.end.p0(i64 1600016, ptr nonnull %b) #13
call void @llvm.lifetime.end.p0(i64 2000008, ptr nonnull %a) #13
call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #13
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #9
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #10
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #10
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #11
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #11
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #11
attributes #0 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress nofree 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 #5 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nofree norecurse nosync nounwind memory(argmem: write) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #10 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #11 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #12 = { nounwind willreturn memory(read) }
attributes #13 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !8}
!8 = !{!"llvm.loop.unroll.disable"}
!9 = distinct !{!9, !6}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C/C++ TBAA"}
!14 = distinct !{!14, !6, !15, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !6, !16, !15}
!18 = distinct !{!18, !6}
!19 = !{!20, !20, i64 0}
!20 = !{!"long long", !12, i64 0}
!21 = distinct !{!21, !6, !15, !16}
!22 = distinct !{!22, !6}
!23 = distinct !{!23, !6, !16, !15}
!24 = distinct !{!24, !6}
!25 = distinct !{!25, !8}
!26 = distinct !{!26, !6}
!27 = distinct !{!27, !6}
!28 = distinct !{!28, !8}
|
#include <stdio.h>
#define LIMIT 100
int main(void){
int row,col,i,j,rowjudge[LIMIT]={0},coljudge[LIMIT]={0};
char matrix[LIMIT][LIMIT];
scanf("%d %d",&row,&col);
// 初期化
for(i=0; i<LIMIT; i++){
for(j=0; j<LIMIT; j++){
matrix[i][j]='\0';
}
}
// 入力
for(i=0; i<row; i++){
for(j=0; j<col; j++){
scanf(" %c",&matrix[i][j]);
}
}
// 各行、各列に黒が1つでもあるかを判別
for(i=0; i<row; i++){
for(j=0; j<col; j++){
if(matrix[i][j]=='#'){
rowjudge[i]=1;
}
}
}
for(j=0; j<col; j++){
for(i=0; i<row; i++){
if(matrix[i][j]=='#'){
coljudge[j]=1;
}
}
}
// 黒が1つでもある行と列の重なる要素のみを出力
for(i=0; i<row; i++){
for(j=0; j<col; j++){
if(rowjudge[i]==1 && coljudge[j]==1){
printf("%c",matrix[i][j]);
}
}
if(rowjudge[i]==1){
printf("\n");
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132944/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132944/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c" %c\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%row = alloca i32, align 4
%col = alloca i32, align 4
%rowjudge = alloca [100 x i32], align 16
%coljudge = alloca [100 x i32], align 16
%matrix = alloca [100 x [100 x i8]], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %row) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %col) #5
call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %rowjudge) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) %rowjudge, i8 0, i64 400, i1 false)
call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %coljudge) #5
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) %coljudge, i8 0, i64 400, i1 false)
call void @llvm.lifetime.start.p0(i64 10000, ptr nonnull %matrix) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %row, ptr noundef nonnull %col)
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(10000) %matrix, i8 0, i64 10000, i1 false), !tbaa !5
%0 = load i32, ptr %row, align 4, !tbaa !8
%cmp10146 = icmp sgt i32 %0, 0
br i1 %cmp10146, label %for.cond12.preheader.lr.ph, label %for.end107
for.cond12.preheader.lr.ph: ; preds = %entry
%.pre195.pre = load i32, ptr %col, align 4, !tbaa !8
%1 = icmp sgt i32 %.pre195.pre, 0
br i1 %1, label %for.cond12.preheader, label %for.cond75.preheader.preheader
for.cond12.preheader: ; preds = %for.cond12.preheader.lr.ph, %for.inc23
%2 = phi i32 [ %29, %for.inc23 ], [ %0, %for.cond12.preheader.lr.ph ]
%3 = phi i32 [ %30, %for.inc23 ], [ %.pre195.pre, %for.cond12.preheader.lr.ph ]
%indvars.iv168 = phi i64 [ %indvars.iv.next169, %for.inc23 ], [ 0, %for.cond12.preheader.lr.ph ]
%cmp13144 = icmp sgt i32 %3, 0
br i1 %cmp13144, label %for.body14, label %for.inc23
for.cond26.preheader: ; preds = %for.inc23
%cmp27150 = icmp sgt i32 %29, 0
br i1 %cmp27150, label %for.cond29.preheader.lr.ph, label %for.cond46.preheader
for.cond29.preheader.lr.ph: ; preds = %for.cond26.preheader
%cmp30148 = icmp sgt i32 %30, 0
br i1 %cmp30148, label %for.cond29.preheader.us.preheader, label %for.cond75.preheader.preheader
for.cond29.preheader.us.preheader: ; preds = %for.cond29.preheader.lr.ph
%wide.trip.count177 = zext i32 %29 to i64
%wide.trip.count = zext i32 %30 to i64
%min.iters.check = icmp ult i32 %30, 8
%n.vec = and i64 %wide.trip.count, 4294967288
%cmp.n = icmp eq i64 %n.vec, %wide.trip.count
br label %for.cond29.preheader.us
for.cond29.preheader.us: ; preds = %for.cond29.preheader.us.preheader, %for.cond29.for.inc43_crit_edge.us
%indvars.iv174 = phi i64 [ 0, %for.cond29.preheader.us.preheader ], [ %indvars.iv.next175, %for.cond29.for.inc43_crit_edge.us ]
%arrayidx39.us = getelementptr inbounds [100 x i32], ptr %rowjudge, i64 0, i64 %indvars.iv174
br i1 %min.iters.check, label %for.body31.us.preheader, label %vector.body
vector.body: ; preds = %for.cond29.preheader.us, %24
%index = phi i64 [ %index.next, %24 ], [ 0, %for.cond29.preheader.us ]
%4 = getelementptr inbounds [100 x [100 x i8]], ptr %matrix, i64 0, i64 %indvars.iv174, i64 %index
%wide.load = load <4 x i8>, ptr %4, align 4, !tbaa !5
%5 = getelementptr inbounds i8, ptr %4, i64 4
%wide.load235 = load <4 x i8>, ptr %5, align 4, !tbaa !5
%6 = icmp eq <4 x i8> %wide.load, <i8 35, i8 35, i8 35, i8 35>
%7 = icmp eq <4 x i8> %wide.load235, <i8 35, i8 35, i8 35, i8 35>
%8 = extractelement <4 x i1> %6, i64 0
%9 = extractelement <4 x i1> %6, i64 1
%10 = or i1 %8, %9
%11 = extractelement <4 x i1> %6, i64 2
%12 = or i1 %10, %11
%13 = extractelement <4 x i1> %6, i64 3
%14 = or i1 %12, %13
%15 = extractelement <4 x i1> %7, i64 0
%16 = or i1 %14, %15
%17 = extractelement <4 x i1> %7, i64 1
%18 = or i1 %16, %17
%19 = extractelement <4 x i1> %7, i64 2
%20 = or i1 %18, %19
%21 = extractelement <4 x i1> %7, i64 3
%22 = or i1 %20, %21
br i1 %22, label %23, label %24
23: ; preds = %vector.body
store i32 1, ptr %arrayidx39.us, align 4, !tbaa !8
br label %24
24: ; preds = %vector.body, %23
%index.next = add nuw i64 %index, 8
%25 = icmp eq i64 %index.next, %n.vec
br i1 %25, label %middle.block, label %vector.body, !llvm.loop !10
middle.block: ; preds = %24
br i1 %cmp.n, label %for.cond29.for.inc43_crit_edge.us, label %for.body31.us.preheader
for.body31.us.preheader: ; preds = %for.cond29.preheader.us, %middle.block
%indvars.iv171.ph = phi i64 [ 0, %for.cond29.preheader.us ], [ %n.vec, %middle.block ]
br label %for.body31.us
for.body31.us: ; preds = %for.body31.us.preheader, %for.inc40.us
%indvars.iv171 = phi i64 [ %indvars.iv.next172, %for.inc40.us ], [ %indvars.iv171.ph, %for.body31.us.preheader ]
%arrayidx35.us = getelementptr inbounds [100 x [100 x i8]], ptr %matrix, i64 0, i64 %indvars.iv174, i64 %indvars.iv171
%26 = load i8, ptr %arrayidx35.us, align 1, !tbaa !5
%cmp36.us = icmp eq i8 %26, 35
br i1 %cmp36.us, label %if.then.us, label %for.inc40.us
if.then.us: ; preds = %for.body31.us
store i32 1, ptr %arrayidx39.us, align 4, !tbaa !8
br label %for.inc40.us
for.inc40.us: ; preds = %if.then.us, %for.body31.us
%indvars.iv.next172 = add nuw nsw i64 %indvars.iv171, 1
%exitcond.not = icmp eq i64 %indvars.iv.next172, %wide.trip.count
br i1 %exitcond.not, label %for.cond29.for.inc43_crit_edge.us, label %for.body31.us, !llvm.loop !14
for.cond29.for.inc43_crit_edge.us: ; preds = %for.inc40.us, %middle.block
%indvars.iv.next175 = add nuw nsw i64 %indvars.iv174, 1
%exitcond178.not = icmp eq i64 %indvars.iv.next175, %wide.trip.count177
br i1 %exitcond178.not, label %for.cond46.preheader, label %for.cond29.preheader.us, !llvm.loop !15
for.body14: ; preds = %for.cond12.preheader, %for.body14
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body14 ], [ 0, %for.cond12.preheader ]
%arrayidx18 = getelementptr inbounds [100 x [100 x i8]], ptr %matrix, i64 0, i64 %indvars.iv168, i64 %indvars.iv
%call19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx18)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%27 = load i32, ptr %col, align 4, !tbaa !8
%28 = sext i32 %27 to i64
%cmp13 = icmp slt i64 %indvars.iv.next, %28
br i1 %cmp13, label %for.body14, label %for.inc23.loopexit, !llvm.loop !16
for.inc23.loopexit: ; preds = %for.body14
%.pre = load i32, ptr %row, align 4, !tbaa !8
br label %for.inc23
for.inc23: ; preds = %for.inc23.loopexit, %for.cond12.preheader
%29 = phi i32 [ %.pre, %for.inc23.loopexit ], [ %2, %for.cond12.preheader ]
%30 = phi i32 [ %27, %for.inc23.loopexit ], [ %3, %for.cond12.preheader ]
%indvars.iv.next169 = add nuw nsw i64 %indvars.iv168, 1
%31 = sext i32 %29 to i64
%cmp10 = icmp slt i64 %indvars.iv.next169, %31
br i1 %cmp10, label %for.cond12.preheader, label %for.cond26.preheader, !llvm.loop !17
for.cond46.preheader: ; preds = %for.cond29.for.inc43_crit_edge.us, %for.cond26.preheader
%cmp47154 = icmp sgt i32 %30, 0
br i1 %cmp47154, label %for.cond50.preheader.lr.ph, label %for.cond71.preheader
for.cond50.preheader.lr.ph: ; preds = %for.cond46.preheader
br i1 %cmp27150, label %for.cond50.preheader.us.preheader, label %for.end107
for.cond50.preheader.us.preheader: ; preds = %for.cond50.preheader.lr.ph
%wide.trip.count187 = zext i32 %30 to i64
%wide.trip.count182 = zext i32 %29 to i64
%xtraiter = and i64 %wide.trip.count182, 1
%32 = icmp eq i32 %29, 1
%unroll_iter = and i64 %wide.trip.count182, 4294967294
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br label %for.cond50.preheader.us
for.cond50.preheader.us: ; preds = %for.cond50.preheader.us.preheader, %for.cond50.for.inc68_crit_edge.us
%indvars.iv184 = phi i64 [ 0, %for.cond50.preheader.us.preheader ], [ %indvars.iv.next185, %for.cond50.for.inc68_crit_edge.us ]
%arrayidx63.us = getelementptr inbounds [100 x i32], ptr %coljudge, i64 0, i64 %indvars.iv184
br i1 %32, label %for.cond50.for.inc68_crit_edge.us.unr-lcssa, label %for.body53.us
for.body53.us: ; preds = %for.cond50.preheader.us, %for.inc65.us.1
%indvars.iv179 = phi i64 [ %indvars.iv.next180.1, %for.inc65.us.1 ], [ 0, %for.cond50.preheader.us ]
%niter = phi i64 [ %niter.next.1, %for.inc65.us.1 ], [ 0, %for.cond50.preheader.us ]
%arrayidx57.us = getelementptr inbounds [100 x [100 x i8]], ptr %matrix, i64 0, i64 %indvars.iv179, i64 %indvars.iv184
%33 = load i8, ptr %arrayidx57.us, align 1, !tbaa !5
%cmp59.us = icmp eq i8 %33, 35
br i1 %cmp59.us, label %if.then61.us, label %for.inc65.us
if.then61.us: ; preds = %for.body53.us
store i32 1, ptr %arrayidx63.us, align 4, !tbaa !8
br label %for.inc65.us
for.inc65.us: ; preds = %if.then61.us, %for.body53.us
%indvars.iv.next180 = or i64 %indvars.iv179, 1
%arrayidx57.us.1 = getelementptr inbounds [100 x [100 x i8]], ptr %matrix, i64 0, i64 %indvars.iv.next180, i64 %indvars.iv184
%34 = load i8, ptr %arrayidx57.us.1, align 1, !tbaa !5
%cmp59.us.1 = icmp eq i8 %34, 35
br i1 %cmp59.us.1, label %if.then61.us.1, label %for.inc65.us.1
if.then61.us.1: ; preds = %for.inc65.us
store i32 1, ptr %arrayidx63.us, align 4, !tbaa !8
br label %for.inc65.us.1
for.inc65.us.1: ; preds = %if.then61.us.1, %for.inc65.us
%indvars.iv.next180.1 = add nuw nsw i64 %indvars.iv179, 2
%niter.next.1 = add i64 %niter, 2
%niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
br i1 %niter.ncmp.1, label %for.cond50.for.inc68_crit_edge.us.unr-lcssa, label %for.body53.us, !llvm.loop !19
for.cond50.for.inc68_crit_edge.us.unr-lcssa: ; preds = %for.inc65.us.1, %for.cond50.preheader.us
%indvars.iv179.unr = phi i64 [ 0, %for.cond50.preheader.us ], [ %indvars.iv.next180.1, %for.inc65.us.1 ]
br i1 %lcmp.mod.not, label %for.cond50.for.inc68_crit_edge.us, label %for.body53.us.epil
for.body53.us.epil: ; preds = %for.cond50.for.inc68_crit_edge.us.unr-lcssa
%arrayidx57.us.epil = getelementptr inbounds [100 x [100 x i8]], ptr %matrix, i64 0, i64 %indvars.iv179.unr, i64 %indvars.iv184
%35 = load i8, ptr %arrayidx57.us.epil, align 1, !tbaa !5
%cmp59.us.epil = icmp eq i8 %35, 35
br i1 %cmp59.us.epil, label %if.then61.us.epil, label %for.cond50.for.inc68_crit_edge.us
if.then61.us.epil: ; preds = %for.body53.us.epil
store i32 1, ptr %arrayidx63.us, align 4, !tbaa !8
br label %for.cond50.for.inc68_crit_edge.us
for.cond50.for.inc68_crit_edge.us: ; preds = %for.body53.us.epil, %if.then61.us.epil, %for.cond50.for.inc68_crit_edge.us.unr-lcssa
%indvars.iv.next185 = add nuw nsw i64 %indvars.iv184, 1
%exitcond188.not = icmp eq i64 %indvars.iv.next185, %wide.trip.count187
br i1 %exitcond188.not, label %for.cond71.preheader, label %for.cond50.preheader.us, !llvm.loop !20
for.cond71.preheader: ; preds = %for.cond50.for.inc68_crit_edge.us, %for.cond46.preheader
br i1 %cmp27150, label %for.cond75.preheader.preheader, label %for.end107
for.cond75.preheader.preheader: ; preds = %for.cond29.preheader.lr.ph, %for.cond12.preheader.lr.ph, %for.cond71.preheader
br label %for.cond75.preheader
for.cond75.preheader: ; preds = %for.cond75.preheader.preheader, %for.inc105
%indvars.iv192 = phi i64 [ %indvars.iv.next193, %for.inc105 ], [ 0, %for.cond75.preheader.preheader ]
%36 = load i32, ptr %col, align 4, !tbaa !8
%cmp76156 = icmp sgt i32 %36, 0
%arrayidx80 = getelementptr inbounds [100 x i32], ptr %rowjudge, i64 0, i64 %indvars.iv192
%37 = load i32, ptr %arrayidx80, align 4, !tbaa !8
%cmp81 = icmp eq i32 %37, 1
br i1 %cmp76156, label %for.body78.lr.ph, label %for.end97
for.body78.lr.ph: ; preds = %for.cond75.preheader
br i1 %cmp81, label %for.body78.us, label %for.inc105
for.body78.us: ; preds = %for.body78.lr.ph, %for.inc95.us
%38 = phi i32 [ %41, %for.inc95.us ], [ %36, %for.body78.lr.ph ]
%indvars.iv189 = phi i64 [ %indvars.iv.next190, %for.inc95.us ], [ 0, %for.body78.lr.ph ]
%arrayidx84.us = getelementptr inbounds [100 x i32], ptr %coljudge, i64 0, i64 %indvars.iv189
%39 = load i32, ptr %arrayidx84.us, align 4, !tbaa !8
%cmp85.us = icmp eq i32 %39, 1
br i1 %cmp85.us, label %if.then87.us, label %for.inc95.us
if.then87.us: ; preds = %for.body78.us
%arrayidx91.us = getelementptr inbounds [100 x [100 x i8]], ptr %matrix, i64 0, i64 %indvars.iv192, i64 %indvars.iv189
%40 = load i8, ptr %arrayidx91.us, align 1, !tbaa !5
%conv92.us = sext i8 %40 to i32
%putchar141.us = call i32 @putchar(i32 %conv92.us)
%.pre196 = load i32, ptr %col, align 4, !tbaa !8
br label %for.inc95.us
for.inc95.us: ; preds = %if.then87.us, %for.body78.us
%41 = phi i32 [ %.pre196, %if.then87.us ], [ %38, %for.body78.us ]
%indvars.iv.next190 = add nuw nsw i64 %indvars.iv189, 1
%42 = sext i32 %41 to i64
%cmp76.us = icmp slt i64 %indvars.iv.next190, %42
br i1 %cmp76.us, label %for.body78.us, label %if.then102, !llvm.loop !21
for.end97: ; preds = %for.cond75.preheader
br i1 %cmp81, label %if.then102, label %for.inc105
if.then102: ; preds = %for.inc95.us, %for.end97
%putchar = call i32 @putchar(i32 10)
br label %for.inc105
for.inc105: ; preds = %for.body78.lr.ph, %for.end97, %if.then102
%indvars.iv.next193 = add nuw nsw i64 %indvars.iv192, 1
%43 = load i32, ptr %row, align 4, !tbaa !8
%44 = sext i32 %43 to i64
%cmp72 = icmp slt i64 %indvars.iv.next193, %44
br i1 %cmp72, label %for.cond75.preheader, label %for.end107, !llvm.loop !22
for.end107: ; preds = %for.inc105, %entry, %for.cond50.preheader.lr.ph, %for.cond71.preheader
call void @llvm.lifetime.end.p0(i64 10000, ptr nonnull %matrix) #5
call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %coljudge) #5
call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %rowjudge) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %col) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %row) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11, !12, !13}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !11, !13, !12}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11, !18}
!18 = !{!"llvm.loop.unswitch.partial.disable"}
!19 = distinct !{!19, !11}
!20 = distinct !{!20, !11}
!21 = distinct !{!21, !11}
!22 = distinct !{!22, !11}
|
/* ex7_3
Y_Aizaki */
#include <stdio.h>
#include <stdlib.h>
int main(void){
int row, col;
// 行数、列数
char **matrix;
// マス目入力を受け取る配列(動的)
scanf("%d%d", &row, &col);
// マス目入力を受け取る配列(動的)
matrix = (char**)calloc(row, sizeof(char*));
if (matrix == NULL){
exit(1);
}
for (int i = 0; i < row; i++){
matrix[i] = (char*)calloc(col, sizeof(char));
if (matrix[i] == NULL){
exit(1);
}
}
int answer[row][col];
// VLA
// matrixの要素を標準出力するか、判断する
// answerの初期化
for (int i = 0; i < row; i++){
for (int j = 0; j < col; j++){
answer[i][j] = 0;
}
}
for (int i = 0; i < row; i++){
for (int j = 0; j < col; j++){
// matrixに'.','#'を入力するループ
scanf(" %c", &matrix[i][j]);
}
}
for (int i = 0; i < row; i++){
// 列ごとに見るループ
for (int j = 0; j < col; j++){
if (matrix[i][j] == '#'){
break;
}
if (j == col-1){
for (int x = 0; x < col; x++){
answer[i][x] = 1;
}
}
}
}
for (int j = 0; j < col; j++){
// 行ごとに見るループ
for (int i = 0; i < row; i++){
if (matrix[i][j] == '#'){
break;
}
if (i == row-1){
for (int x = 0; x < row; x++){
answer[x][j] = 1;
}
}
}
}
for (int i = 0; i < row; i++){
int newline = 0;
// 改行判定
for (int j = 0; j < col; j++){
// 出力するループ
if (answer[i][j] == 0){
printf("%c", matrix[i][j]);
newline = 1;
}
if (j == col-1 && newline == 1){
putchar('\n');
}
}
}
for (int i = 0; i < row; i++){
free(matrix[i]);
}
free(matrix);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132988/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132988/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c" %c\00", align 1
@stdout = external local_unnamed_addr global ptr, align 8
; Function Attrs: nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%row = alloca i32, align 4
%col = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %row) #8
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %col) #8
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %row, ptr noundef nonnull %col)
%0 = load i32, ptr %row, align 4, !tbaa !5
%conv = sext i32 %0 to i64
%call1 = call noalias ptr @calloc(i64 noundef %conv, i64 noundef 8) #9
%cmp = icmp eq ptr %call1, null
br i1 %cmp, label %if.then, label %for.cond.preheader
for.cond.preheader: ; preds = %entry
%cmp3254 = icmp sgt i32 %0, 0
%.pre = load i32, ptr %col, align 4, !tbaa !5
br i1 %cmp3254, label %for.body.lr.ph, label %for.cond.preheader.for.cond.cleanup_crit_edge
for.cond.preheader.for.cond.cleanup_crit_edge: ; preds = %for.cond.preheader
%.pre347 = zext i32 %0 to i64
br label %for.cond.cleanup
for.body.lr.ph: ; preds = %for.cond.preheader
%conv5 = sext i32 %.pre to i64
%wide.trip.count = zext i32 %0 to i64
br label %for.body
if.then: ; preds = %entry
call void @exit(i32 noundef 1) #10
unreachable
for.cond: ; preds = %for.body
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !9
for.cond.cleanup: ; preds = %for.cond, %for.cond.preheader.for.cond.cleanup_crit_edge
%.pre-phi = phi i64 [ %.pre347, %for.cond.preheader.for.cond.cleanup_crit_edge ], [ %wide.trip.count, %for.cond ]
%1 = zext i32 %.pre to i64
%2 = call ptr @llvm.stacksave.p0()
%3 = mul nuw i64 %.pre-phi, %1
%vla = alloca i32, i64 %3, align 16
%4 = load i32, ptr %row, align 4, !tbaa !5
%cmp15258 = icmp sgt i32 %4, 0
%.pre342.pre.pre = load i32, ptr %col, align 4, !tbaa !5
br i1 %cmp15258, label %for.cond19.preheader.lr.ph, label %for.cond102.preheader
for.cond19.preheader.lr.ph: ; preds = %for.cond.cleanup
%cmp20256 = icmp sgt i32 %.pre342.pre.pre, 0
br i1 %cmp20256, label %for.cond19.preheader.us.preheader, label %for.body196.preheader
for.cond19.preheader.us.preheader: ; preds = %for.cond19.preheader.lr.ph
%5 = shl nuw nsw i64 %1, 2
%6 = zext i32 %.pre342.pre.pre to i64
%7 = shl nuw nsw i64 %6, 2
%wide.trip.count294 = zext i32 %4 to i64
%xtraiter = and i64 %wide.trip.count294, 7
%8 = icmp ult i32 %4, 8
br i1 %8, label %for.cond35.preheader.unr-lcssa, label %for.cond19.preheader.us.preheader.new
for.cond19.preheader.us.preheader.new: ; preds = %for.cond19.preheader.us.preheader
%unroll_iter = and i64 %wide.trip.count294, 4294967288
br label %for.cond19.preheader.us
for.cond19.preheader.us: ; preds = %for.cond19.preheader.us, %for.cond19.preheader.us.preheader.new
%indvar = phi i64 [ 0, %for.cond19.preheader.us.preheader.new ], [ %indvar.next.7, %for.cond19.preheader.us ]
%niter = phi i64 [ 0, %for.cond19.preheader.us.preheader.new ], [ %niter.next.7, %for.cond19.preheader.us ]
%9 = mul nuw nsw i64 %5, %indvar
%scevgep = getelementptr i8, ptr %vla, i64 %9
call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %7, i1 false), !tbaa !5
%indvar.next = or i64 %indvar, 1
%10 = mul nuw nsw i64 %5, %indvar.next
%scevgep.1 = getelementptr i8, ptr %vla, i64 %10
call void @llvm.memset.p0.i64(ptr align 4 %scevgep.1, i8 0, i64 %7, i1 false), !tbaa !5
%indvar.next.1 = or i64 %indvar, 2
%11 = mul nuw nsw i64 %5, %indvar.next.1
%scevgep.2 = getelementptr i8, ptr %vla, i64 %11
call void @llvm.memset.p0.i64(ptr align 8 %scevgep.2, i8 0, i64 %7, i1 false), !tbaa !5
%indvar.next.2 = or i64 %indvar, 3
%12 = mul nuw nsw i64 %5, %indvar.next.2
%scevgep.3 = getelementptr i8, ptr %vla, i64 %12
call void @llvm.memset.p0.i64(ptr align 4 %scevgep.3, i8 0, i64 %7, i1 false), !tbaa !5
%indvar.next.3 = or i64 %indvar, 4
%13 = mul nuw nsw i64 %5, %indvar.next.3
%scevgep.4 = getelementptr i8, ptr %vla, i64 %13
call void @llvm.memset.p0.i64(ptr align 16 %scevgep.4, i8 0, i64 %7, i1 false), !tbaa !5
%indvar.next.4 = or i64 %indvar, 5
%14 = mul nuw nsw i64 %5, %indvar.next.4
%scevgep.5 = getelementptr i8, ptr %vla, i64 %14
call void @llvm.memset.p0.i64(ptr align 4 %scevgep.5, i8 0, i64 %7, i1 false), !tbaa !5
%indvar.next.5 = or i64 %indvar, 6
%15 = mul nuw nsw i64 %5, %indvar.next.5
%scevgep.6 = getelementptr i8, ptr %vla, i64 %15
call void @llvm.memset.p0.i64(ptr align 8 %scevgep.6, i8 0, i64 %7, i1 false), !tbaa !5
%indvar.next.6 = or i64 %indvar, 7
%16 = mul nuw nsw i64 %5, %indvar.next.6
%scevgep.7 = getelementptr i8, ptr %vla, i64 %16
call void @llvm.memset.p0.i64(ptr align 4 %scevgep.7, i8 0, i64 %7, i1 false), !tbaa !5
%indvar.next.7 = add nuw nsw i64 %indvar, 8
%niter.next.7 = add i64 %niter, 8
%niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
br i1 %niter.ncmp.7, label %for.cond35.preheader.unr-lcssa, label %for.cond19.preheader.us, !llvm.loop !11
for.body: ; preds = %for.body.lr.ph, %for.cond
%indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.cond ]
%call6 = call noalias ptr @calloc(i64 noundef %conv5, i64 noundef 1) #9
%arrayidx = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv
store ptr %call6, ptr %arrayidx, align 8, !tbaa !12
%cmp9 = icmp eq ptr %call6, null
br i1 %cmp9, label %if.then11, label %for.cond
if.then11: ; preds = %for.body
call void @exit(i32 noundef 1) #10
unreachable
for.cond35.preheader.unr-lcssa: ; preds = %for.cond19.preheader.us, %for.cond19.preheader.us.preheader
%indvar.unr = phi i64 [ 0, %for.cond19.preheader.us.preheader ], [ %indvar.next.7, %for.cond19.preheader.us ]
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.cond35.preheader, label %for.cond19.preheader.us.epil
for.cond19.preheader.us.epil: ; preds = %for.cond35.preheader.unr-lcssa, %for.cond19.preheader.us.epil
%indvar.epil = phi i64 [ %indvar.next.epil, %for.cond19.preheader.us.epil ], [ %indvar.unr, %for.cond35.preheader.unr-lcssa ]
%epil.iter = phi i64 [ %epil.iter.next, %for.cond19.preheader.us.epil ], [ 0, %for.cond35.preheader.unr-lcssa ]
%17 = mul nuw nsw i64 %5, %indvar.epil
%scevgep.epil = getelementptr i8, ptr %vla, i64 %17
call void @llvm.memset.p0.i64(ptr align 4 %scevgep.epil, i8 0, i64 %7, i1 false), !tbaa !5
%indvar.next.epil = add nuw nsw i64 %indvar.epil, 1
%epil.iter.next = add i64 %epil.iter, 1
%epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
br i1 %epil.iter.cmp.not, label %for.cond35.preheader, label %for.cond19.preheader.us.epil, !llvm.loop !14
for.cond35.preheader: ; preds = %for.cond19.preheader.us.epil, %for.cond35.preheader.unr-lcssa
br i1 %cmp15258, label %for.cond41.preheader.lr.ph, label %for.cond102.preheader
for.cond41.preheader.lr.ph: ; preds = %for.cond35.preheader
%18 = icmp sgt i32 %.pre342.pre.pre, 0
br i1 %18, label %for.cond41.preheader, label %for.body196.preheader
for.cond41.preheader: ; preds = %for.cond41.preheader.lr.ph, %for.cond.cleanup44
%19 = phi i32 [ %29, %for.cond.cleanup44 ], [ %4, %for.cond41.preheader.lr.ph ]
%20 = phi i32 [ %30, %for.cond.cleanup44 ], [ %.pre342.pre.pre, %for.cond41.preheader.lr.ph ]
%indvars.iv299 = phi i64 [ %indvars.iv.next300, %for.cond.cleanup44 ], [ 0, %for.cond41.preheader.lr.ph ]
%cmp42260 = icmp sgt i32 %20, 0
br i1 %cmp42260, label %for.body45.lr.ph, label %for.cond.cleanup44
for.body45.lr.ph: ; preds = %for.cond41.preheader
%arrayidx47 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv299
%21 = load ptr, ptr %arrayidx47, align 8, !tbaa !12
br label %for.body45
for.cond58.preheader: ; preds = %for.cond.cleanup44
%cmp59268 = icmp sgt i32 %29, 0
br i1 %cmp59268, label %for.cond64.preheader.lr.ph, label %for.cond102.preheader
for.cond64.preheader.lr.ph: ; preds = %for.cond58.preheader
%cmp65266 = icmp sgt i32 %30, 0
br i1 %cmp65266, label %for.cond64.preheader.us.preheader, label %for.body196.preheader
for.cond64.preheader.us.preheader: ; preds = %for.cond64.preheader.lr.ph
%sub = add nsw i32 %30, -1
%22 = zext i32 %sub to i64
%wide.trip.count315 = zext i32 %29 to i64
%wide.trip.count310 = zext i32 %30 to i64
%min.iters.check = icmp ult i32 %30, 8
%n.vec = and i64 %wide.trip.count310, 4294967288
%cmp.n = icmp eq i64 %n.vec, %wide.trip.count310
br label %for.cond64.preheader.us
for.cond64.preheader.us: ; preds = %for.cond64.preheader.us.preheader, %cleanup.us
%indvars.iv312 = phi i64 [ 0, %for.cond64.preheader.us.preheader ], [ %indvars.iv.next313, %cleanup.us ]
%arrayidx70.us = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv312
%23 = load ptr, ptr %arrayidx70.us, align 8, !tbaa !12
%24 = mul nuw nsw i64 %indvars.iv312, %1
%arrayidx87.us = getelementptr inbounds i32, ptr %vla, i64 %24
br label %for.body68.us.us
cleanup.us: ; preds = %for.inc94.us.us, %for.body68.us.us
%indvars.iv.next313 = add nuw nsw i64 %indvars.iv312, 1
%exitcond316.not = icmp eq i64 %indvars.iv.next313, %wide.trip.count315
br i1 %exitcond316.not, label %for.cond102.preheader, label %for.cond64.preheader.us, !llvm.loop !16
for.body68.us.us: ; preds = %for.inc94.us.us, %for.cond64.preheader.us
%indvars.iv307 = phi i64 [ %indvars.iv.next308, %for.inc94.us.us ], [ 0, %for.cond64.preheader.us ]
%arrayidx72.us.us = getelementptr inbounds i8, ptr %23, i64 %indvars.iv307
%25 = load i8, ptr %arrayidx72.us.us, align 1, !tbaa !17
%cmp74.us.us = icmp eq i8 %25, 35
br i1 %cmp74.us.us, label %cleanup.us, label %if.end77.us.us
if.end77.us.us: ; preds = %for.body68.us.us
%cmp78.us.us = icmp eq i64 %indvars.iv307, %22
br i1 %cmp78.us.us, label %for.body85.us.us.preheader, label %for.inc94.us.us
for.body85.us.us.preheader: ; preds = %if.end77.us.us
br i1 %min.iters.check, label %for.body85.us.us.preheader394, label %vector.body
vector.body: ; preds = %for.body85.us.us.preheader, %vector.body
%index = phi i64 [ %index.next, %vector.body ], [ 0, %for.body85.us.us.preheader ]
%26 = getelementptr inbounds i32, ptr %arrayidx87.us, i64 %index
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %26, align 4, !tbaa !5
%27 = getelementptr inbounds i32, ptr %26, i64 4
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %27, align 4, !tbaa !5
%index.next = add nuw i64 %index, 8
%28 = icmp eq i64 %index.next, %n.vec
br i1 %28, label %middle.block, label %vector.body, !llvm.loop !18
middle.block: ; preds = %vector.body
br i1 %cmp.n, label %for.inc94.us.us, label %for.body85.us.us.preheader394
for.body85.us.us.preheader394: ; preds = %for.body85.us.us.preheader, %middle.block
%indvars.iv302.ph = phi i64 [ 0, %for.body85.us.us.preheader ], [ %n.vec, %middle.block ]
br label %for.body85.us.us
for.inc94.us.us: ; preds = %for.body85.us.us, %middle.block, %if.end77.us.us
%indvars.iv.next308 = add nuw nsw i64 %indvars.iv307, 1
%exitcond311.not = icmp eq i64 %indvars.iv.next308, %wide.trip.count310
br i1 %exitcond311.not, label %cleanup.us, label %for.body68.us.us, !llvm.loop !21
for.body85.us.us: ; preds = %for.body85.us.us.preheader394, %for.body85.us.us
%indvars.iv302 = phi i64 [ %indvars.iv.next303, %for.body85.us.us ], [ %indvars.iv302.ph, %for.body85.us.us.preheader394 ]
%arrayidx89.us.us = getelementptr inbounds i32, ptr %arrayidx87.us, i64 %indvars.iv302
store i32 1, ptr %arrayidx89.us.us, align 4, !tbaa !5
%indvars.iv.next303 = add nuw nsw i64 %indvars.iv302, 1
%exitcond306.not = icmp eq i64 %indvars.iv.next303, %wide.trip.count310
br i1 %exitcond306.not, label %for.inc94.us.us, label %for.body85.us.us, !llvm.loop !22
for.cond.cleanup44.loopexit: ; preds = %for.body45
%.pre341 = load i32, ptr %row, align 4, !tbaa !5
br label %for.cond.cleanup44
for.cond.cleanup44: ; preds = %for.cond.cleanup44.loopexit, %for.cond41.preheader
%29 = phi i32 [ %.pre341, %for.cond.cleanup44.loopexit ], [ %19, %for.cond41.preheader ]
%30 = phi i32 [ %32, %for.cond.cleanup44.loopexit ], [ %20, %for.cond41.preheader ]
%indvars.iv.next300 = add nuw nsw i64 %indvars.iv299, 1
%31 = sext i32 %29 to i64
%cmp36 = icmp slt i64 %indvars.iv.next300, %31
br i1 %cmp36, label %for.cond41.preheader, label %for.cond58.preheader, !llvm.loop !23
for.body45: ; preds = %for.body45.lr.ph, %for.body45
%indvars.iv296 = phi i64 [ 0, %for.body45.lr.ph ], [ %indvars.iv.next297, %for.body45 ]
%arrayidx49 = getelementptr inbounds i8, ptr %21, i64 %indvars.iv296
%call50 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef %arrayidx49)
%indvars.iv.next297 = add nuw nsw i64 %indvars.iv296, 1
%32 = load i32, ptr %col, align 4, !tbaa !5
%33 = sext i32 %32 to i64
%cmp42 = icmp slt i64 %indvars.iv.next297, %33
br i1 %cmp42, label %for.body45, label %for.cond.cleanup44.loopexit, !llvm.loop !25
for.cond102.preheader: ; preds = %cleanup.us, %for.cond.cleanup, %for.cond35.preheader, %for.cond58.preheader
%cmp59268353 = phi i1 [ false, %for.cond58.preheader ], [ false, %for.cond35.preheader ], [ false, %for.cond.cleanup ], [ true, %cleanup.us ]
%34 = phi i32 [ %29, %for.cond58.preheader ], [ %4, %for.cond35.preheader ], [ %4, %for.cond.cleanup ], [ %29, %cleanup.us ]
%.pre342351 = phi i32 [ %30, %for.cond58.preheader ], [ %.pre342.pre.pre, %for.cond35.preheader ], [ %.pre342.pre.pre, %for.cond.cleanup ], [ %30, %cleanup.us ]
%cmp103274 = icmp sgt i32 %.pre342351, 0
br i1 %cmp103274, label %for.cond108.preheader.lr.ph, label %for.cond150.preheader
for.cond108.preheader.lr.ph: ; preds = %for.cond102.preheader
br i1 %cmp59268353, label %for.cond108.preheader.us.preheader, label %for.cond192.preheader
for.cond108.preheader.us.preheader: ; preds = %for.cond108.preheader.lr.ph
%sub122 = add nsw i32 %34, -1
%35 = zext i32 %sub122 to i64
%wide.trip.count330 = zext i32 %.pre342351 to i64
%wide.trip.count325 = zext i32 %34 to i64
%36 = add nsw i64 %wide.trip.count325, -1
%xtraiter398 = and i64 %wide.trip.count325, 3
%37 = icmp ult i64 %36, 3
%unroll_iter401 = and i64 %wide.trip.count325, 4294967292
%lcmp.mod400.not = icmp eq i64 %xtraiter398, 0
br label %for.cond108.preheader.us
for.cond108.preheader.us: ; preds = %for.cond108.preheader.us.preheader, %cleanup143.us
%indvars.iv327 = phi i64 [ 0, %for.cond108.preheader.us.preheader ], [ %indvars.iv.next328, %cleanup143.us ]
%invariant.gep.us = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv327
br label %for.body112.us.us
cleanup143.us: ; preds = %for.inc141.us.us, %for.body112.us.us
%indvars.iv.next328 = add nuw nsw i64 %indvars.iv327, 1
%exitcond331.not = icmp eq i64 %indvars.iv.next328, %wide.trip.count330
br i1 %exitcond331.not, label %for.cond150.preheader, label %for.cond108.preheader.us, !llvm.loop !26
for.body112.us.us: ; preds = %for.inc141.us.us, %for.cond108.preheader.us
%indvars.iv322 = phi i64 [ %indvars.iv.next323, %for.inc141.us.us ], [ 0, %for.cond108.preheader.us ]
%arrayidx114.us.us = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv322
%38 = load ptr, ptr %arrayidx114.us.us, align 8, !tbaa !12
%arrayidx116.us.us = getelementptr inbounds i8, ptr %38, i64 %indvars.iv327
%39 = load i8, ptr %arrayidx116.us.us, align 1, !tbaa !17
%cmp118.us.us = icmp eq i8 %39, 35
br i1 %cmp118.us.us, label %cleanup143.us, label %if.end121.us.us
if.end121.us.us: ; preds = %for.body112.us.us
%cmp123.us.us = icmp eq i64 %indvars.iv322, %35
br i1 %cmp123.us.us, label %for.body131.us.us.preheader, label %for.inc141.us.us
for.body131.us.us.preheader: ; preds = %if.end121.us.us
br i1 %37, label %for.inc141.us.us.loopexit.unr-lcssa, label %for.body131.us.us
for.inc141.us.us.loopexit.unr-lcssa: ; preds = %for.body131.us.us, %for.body131.us.us.preheader
%indvars.iv317.unr = phi i64 [ 0, %for.body131.us.us.preheader ], [ %indvars.iv.next318.3, %for.body131.us.us ]
br i1 %lcmp.mod400.not, label %for.inc141.us.us, label %for.body131.us.us.epil
for.body131.us.us.epil: ; preds = %for.inc141.us.us.loopexit.unr-lcssa, %for.body131.us.us.epil
%indvars.iv317.epil = phi i64 [ %indvars.iv.next318.epil, %for.body131.us.us.epil ], [ %indvars.iv317.unr, %for.inc141.us.us.loopexit.unr-lcssa ]
%epil.iter399 = phi i64 [ %epil.iter399.next, %for.body131.us.us.epil ], [ 0, %for.inc141.us.us.loopexit.unr-lcssa ]
%40 = mul nuw nsw i64 %indvars.iv317.epil, %1
%gep.us.us.epil = getelementptr inbounds i32, ptr %invariant.gep.us, i64 %40
store i32 1, ptr %gep.us.us.epil, align 4, !tbaa !5
%indvars.iv.next318.epil = add nuw nsw i64 %indvars.iv317.epil, 1
%epil.iter399.next = add i64 %epil.iter399, 1
%epil.iter399.cmp.not = icmp eq i64 %epil.iter399.next, %xtraiter398
br i1 %epil.iter399.cmp.not, label %for.inc141.us.us, label %for.body131.us.us.epil, !llvm.loop !27
for.inc141.us.us: ; preds = %for.inc141.us.us.loopexit.unr-lcssa, %for.body131.us.us.epil, %if.end121.us.us
%indvars.iv.next323 = add nuw nsw i64 %indvars.iv322, 1
%exitcond326.not = icmp eq i64 %indvars.iv.next323, %wide.trip.count325
br i1 %exitcond326.not, label %cleanup143.us, label %for.body112.us.us, !llvm.loop !28
for.body131.us.us: ; preds = %for.body131.us.us.preheader, %for.body131.us.us
%indvars.iv317 = phi i64 [ %indvars.iv.next318.3, %for.body131.us.us ], [ 0, %for.body131.us.us.preheader ]
%niter402 = phi i64 [ %niter402.next.3, %for.body131.us.us ], [ 0, %for.body131.us.us.preheader ]
%41 = mul nuw nsw i64 %indvars.iv317, %1
%gep.us.us = getelementptr inbounds i32, ptr %invariant.gep.us, i64 %41
store i32 1, ptr %gep.us.us, align 4, !tbaa !5
%indvars.iv.next318 = or i64 %indvars.iv317, 1
%42 = mul nuw nsw i64 %indvars.iv.next318, %1
%gep.us.us.1 = getelementptr inbounds i32, ptr %invariant.gep.us, i64 %42
store i32 1, ptr %gep.us.us.1, align 4, !tbaa !5
%indvars.iv.next318.1 = or i64 %indvars.iv317, 2
%43 = mul nuw nsw i64 %indvars.iv.next318.1, %1
%gep.us.us.2 = getelementptr inbounds i32, ptr %invariant.gep.us, i64 %43
store i32 1, ptr %gep.us.us.2, align 4, !tbaa !5
%indvars.iv.next318.2 = or i64 %indvars.iv317, 3
%44 = mul nuw nsw i64 %indvars.iv.next318.2, %1
%gep.us.us.3 = getelementptr inbounds i32, ptr %invariant.gep.us, i64 %44
store i32 1, ptr %gep.us.us.3, align 4, !tbaa !5
%indvars.iv.next318.3 = add nuw nsw i64 %indvars.iv317, 4
%niter402.next.3 = add i64 %niter402, 4
%niter402.ncmp.3 = icmp eq i64 %niter402.next.3, %unroll_iter401
br i1 %niter402.ncmp.3, label %for.inc141.us.us.loopexit.unr-lcssa, label %for.body131.us.us, !llvm.loop !29
for.cond150.preheader: ; preds = %cleanup143.us, %for.cond102.preheader
%cmp103274369 = phi i1 [ false, %for.cond102.preheader ], [ %cmp103274, %cleanup143.us ]
%brmerge.demorgan = and i1 %cmp59268353, %cmp103274369
br i1 %brmerge.demorgan, label %for.cond156.preheader, label %for.cond192.preheader
for.cond156.preheader: ; preds = %for.cond150.preheader, %for.cond.cleanup159
%45 = phi i32 [ %50, %for.cond.cleanup159 ], [ %34, %for.cond150.preheader ]
%46 = phi i32 [ %51, %for.cond.cleanup159 ], [ %.pre342351, %for.cond150.preheader ]
%47 = phi i32 [ %52, %for.cond.cleanup159 ], [ %.pre342351, %for.cond150.preheader ]
%indvars.iv335 = phi i64 [ %indvars.iv.next336, %for.cond.cleanup159 ], [ 0, %for.cond150.preheader ]
%cmp157276 = icmp sgt i32 %47, 0
br i1 %cmp157276, label %for.body160.lr.ph, label %for.cond.cleanup159
for.body160.lr.ph: ; preds = %for.cond156.preheader
%48 = mul nuw nsw i64 %indvars.iv335, %1
%arrayidx162 = getelementptr inbounds i32, ptr %vla, i64 %48
%arrayidx169 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv335
br label %for.body160
for.cond192.preheader: ; preds = %for.cond.cleanup159, %for.cond150.preheader, %for.cond108.preheader.lr.ph
%49 = phi i32 [ %34, %for.cond150.preheader ], [ %34, %for.cond108.preheader.lr.ph ], [ %50, %for.cond.cleanup159 ]
%cmp193281 = icmp sgt i32 %49, 0
br i1 %cmp193281, label %for.body196.preheader, label %for.cond.cleanup195
for.body196.preheader: ; preds = %for.cond19.preheader.lr.ph, %for.cond41.preheader.lr.ph, %for.cond64.preheader.lr.ph, %for.cond192.preheader
br label %for.body196
for.cond.cleanup159.loopexit: ; preds = %for.inc183
%.pre345 = load i32, ptr %row, align 4, !tbaa !5
br label %for.cond.cleanup159
for.cond.cleanup159: ; preds = %for.cond.cleanup159.loopexit, %for.cond156.preheader
%50 = phi i32 [ %.pre345, %for.cond.cleanup159.loopexit ], [ %45, %for.cond156.preheader ]
%51 = phi i32 [ %64, %for.cond.cleanup159.loopexit ], [ %46, %for.cond156.preheader ]
%52 = phi i32 [ %64, %for.cond.cleanup159.loopexit ], [ %47, %for.cond156.preheader ]
%indvars.iv.next336 = add nuw nsw i64 %indvars.iv335, 1
%53 = sext i32 %50 to i64
%cmp151 = icmp slt i64 %indvars.iv.next336, %53
br i1 %cmp151, label %for.cond156.preheader, label %for.cond192.preheader, !llvm.loop !30
for.body160: ; preds = %for.body160.lr.ph, %for.inc183
%54 = phi i32 [ %46, %for.body160.lr.ph ], [ %64, %for.inc183 ]
%55 = phi i32 [ %47, %for.body160.lr.ph ], [ %64, %for.inc183 ]
%indvars.iv332 = phi i64 [ 0, %for.body160.lr.ph ], [ %indvars.iv.next333, %for.inc183 ]
%newline.0277 = phi i32 [ 0, %for.body160.lr.ph ], [ %newline.1, %for.inc183 ]
%arrayidx164 = getelementptr inbounds i32, ptr %arrayidx162, i64 %indvars.iv332
%56 = load i32, ptr %arrayidx164, align 4, !tbaa !5
%cmp165 = icmp eq i32 %56, 0
br i1 %cmp165, label %if.then167, label %if.end174
if.then167: ; preds = %for.body160
%57 = load ptr, ptr %arrayidx169, align 8, !tbaa !12
%arrayidx171 = getelementptr inbounds i8, ptr %57, i64 %indvars.iv332
%58 = load i8, ptr %arrayidx171, align 1, !tbaa !17
%conv172 = sext i8 %58 to i32
%59 = load ptr, ptr @stdout, align 8, !tbaa !12
%call.i = call noundef i32 @putc(i32 noundef %conv172, ptr noundef %59)
%.pre343 = load i32, ptr %col, align 4, !tbaa !5
br label %if.end174
if.end174: ; preds = %if.then167, %for.body160
%60 = phi i32 [ %.pre343, %if.then167 ], [ %54, %for.body160 ]
%61 = phi i32 [ %.pre343, %if.then167 ], [ %55, %for.body160 ]
%newline.1 = phi i32 [ 1, %if.then167 ], [ %newline.0277, %for.body160 ]
%sub175 = add nsw i32 %61, -1
%62 = zext i32 %sub175 to i64
%cmp176 = icmp eq i64 %indvars.iv332, %62
%cmp178 = icmp eq i32 %newline.1, 1
%or.cond = select i1 %cmp176, i1 %cmp178, i1 false
br i1 %or.cond, label %if.then180, label %for.inc183
if.then180: ; preds = %if.end174
%63 = load ptr, ptr @stdout, align 8, !tbaa !12
%call.i253 = call noundef i32 @putc(i32 noundef 10, ptr noundef %63)
%.pre344 = load i32, ptr %col, align 4, !tbaa !5
br label %for.inc183
for.inc183: ; preds = %if.end174, %if.then180
%64 = phi i32 [ %60, %if.end174 ], [ %.pre344, %if.then180 ]
%indvars.iv.next333 = add nuw nsw i64 %indvars.iv332, 1
%65 = sext i32 %64 to i64
%cmp157 = icmp slt i64 %indvars.iv.next333, %65
br i1 %cmp157, label %for.body160, label %for.cond.cleanup159.loopexit, !llvm.loop !31
for.cond.cleanup195: ; preds = %for.body196, %for.cond192.preheader
call void @free(ptr noundef %call1) #8
call void @llvm.stackrestore.p0(ptr %2)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %col) #8
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %row) #8
ret i32 0
for.body196: ; preds = %for.body196.preheader, %for.body196
%indvars.iv338 = phi i64 [ %indvars.iv.next339, %for.body196 ], [ 0, %for.body196.preheader ]
%arrayidx198 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv338
%66 = load ptr, ptr %arrayidx198, align 8, !tbaa !12
call void @free(ptr noundef %66) #8
%indvars.iv.next339 = add nuw nsw i64 %indvars.iv338, 1
%67 = load i32, ptr %row, align 4, !tbaa !5
%68 = sext i32 %67 to i64
%cmp193 = icmp slt i64 %indvars.iv.next339, %68
br i1 %cmp193, label %for.body196, label %for.cond.cleanup195, !llvm.loop !32
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #3
; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #5
; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #6
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #5
; Function Attrs: nofree nounwind
declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7
attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #6 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0,1) }
attributes #10 = { noreturn nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !10}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !10, !19, !20}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10, !20, !19}
!23 = distinct !{!23, !10, !24}
!24 = !{!"llvm.loop.unswitch.partial.disable"}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !15}
!28 = distinct !{!28, !10}
!29 = distinct !{!29, !10}
!30 = distinct !{!30, !10, !24}
!31 = distinct !{!31, !10}
!32 = distinct !{!32, !10}
|
#include <stdio.h>
int main()
{
int a;
int b;
int c;
int p=0;
scanf("%d %d %d",&a,&b,&c);
int d=c/a;
int i=0;
while (i<=d)
{
int e;
e=(c-(i*a))%b;
if (e==0)
{
p++;
}
else{}
i++;
}
if (p!=0)
{
printf("Yes");
}
else
{
printf("No");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13303/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13303/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
@.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
%c = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c)
%0 = load i32, ptr %c, align 4, !tbaa !5
%1 = load i32, ptr %a, align 4, !tbaa !5
%div = sdiv i32 %0, %1
%cmp.not12 = icmp slt i32 %div, 0
br i1 %cmp.not12, label %if.else6, label %while.body.lr.ph
while.body.lr.ph: ; preds = %entry
%2 = load i32, ptr %b, align 4, !tbaa !5
%3 = add i32 %div, 1
%xtraiter = and i32 %3, 1
%4 = icmp eq i32 %div, 0
br i1 %4, label %while.end.unr-lcssa, label %while.body.lr.ph.new
while.body.lr.ph.new: ; preds = %while.body.lr.ph
%unroll_iter = and i32 %3, -2
br label %while.body
while.body: ; preds = %while.body, %while.body.lr.ph.new
%p.014 = phi i32 [ 0, %while.body.lr.ph.new ], [ %spec.select.1, %while.body ]
%i.013 = phi i32 [ 0, %while.body.lr.ph.new ], [ %inc2.1, %while.body ]
%niter = phi i32 [ 0, %while.body.lr.ph.new ], [ %niter.next.1, %while.body ]
%mul = mul nsw i32 %i.013, %1
%sub = sub nsw i32 %0, %mul
%rem = srem i32 %sub, %2
%cmp1 = icmp eq i32 %rem, 0
%inc = zext i1 %cmp1 to i32
%spec.select = add nuw nsw i32 %p.014, %inc
%inc2.neg = xor i32 %i.013, -1
%mul.1.neg = mul i32 %1, %inc2.neg
%sub.1 = add i32 %mul.1.neg, %0
%rem.1 = srem i32 %sub.1, %2
%cmp1.1 = icmp eq i32 %rem.1, 0
%inc.1 = zext i1 %cmp1.1 to i32
%spec.select.1 = add nuw nsw i32 %spec.select, %inc.1
%inc2.1 = add nuw i32 %i.013, 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 %while.end.unr-lcssa, label %while.body, !llvm.loop !9
while.end.unr-lcssa: ; preds = %while.body, %while.body.lr.ph
%spec.select.lcssa.ph = phi i32 [ undef, %while.body.lr.ph ], [ %spec.select.1, %while.body ]
%p.014.unr = phi i32 [ 0, %while.body.lr.ph ], [ %spec.select.1, %while.body ]
%i.013.unr = phi i32 [ 0, %while.body.lr.ph ], [ %inc2.1, %while.body ]
%lcmp.mod.not = icmp eq i32 %xtraiter, 0
br i1 %lcmp.mod.not, label %while.end, label %while.body.epil
while.body.epil: ; preds = %while.end.unr-lcssa
%mul.epil = mul nsw i32 %i.013.unr, %1
%sub.epil = sub nsw i32 %0, %mul.epil
%rem.epil = srem i32 %sub.epil, %2
%cmp1.epil = icmp eq i32 %rem.epil, 0
%inc.epil = zext i1 %cmp1.epil to i32
%spec.select.epil = add nuw nsw i32 %p.014.unr, %inc.epil
br label %while.end
while.end: ; preds = %while.end.unr-lcssa, %while.body.epil
%spec.select.lcssa = phi i32 [ %spec.select.lcssa.ph, %while.end.unr-lcssa ], [ %spec.select.epil, %while.body.epil ]
%5 = icmp eq i32 %spec.select.lcssa, 0
br i1 %5, label %if.else6, label %if.end8
if.else6: ; preds = %entry, %while.end
br label %if.end8
if.end8: ; preds = %while.end, %if.else6
%.str.2.sink = phi ptr [ @.str.2, %if.else6 ], [ @.str.1, %while.end ]
%call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~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"}
|
/* h-ex7_3
Ohshima */
#include <stdio.h>
#include <stdlib.h>
int main(void){
int height, width, i, j, k, cnt = 0;
char **array;
scanf("%d %d", &height, &width);
//各行の配列へのポインタ分のメモリ領域を確保
array = (char**)malloc(sizeof(char*) * height);
if(array == NULL) exit(1);
//各行の要素分のメモリ領域を確保
for(i = 0; i < height; i++){
array[i] = (char*)malloc(sizeof(char) * (width + 1));
if(array[i] == NULL) exit(1);
}
//
for(i = 0; i < height; i++){
//for(j = 0; j < width; j++){
scanf("%s", &array[i][0]);
//}
}
//行について
for(i = 0; i < height; i++){
for(j = 0; j < width; j++){
if(array[i][j] == '#'){
break;
}
if(j == width - 1){
for(k = 0; k < width; k++){
array[i][k] = ' ';
}
}
}
}
//列について
for(j = 0; j < width; j++){
for(i = 0; i < height; i++){
if(array[i][j] == '#'){
break;
}
if(i == height - 1){
for(k = 0; k < height; k++){
array[k][j] = ' ';
}
}
}
}
//
for(i = 0; i < height; i++){
cnt = 0;
for(j = 0; j < width; j++){
if(array[i][j] != ' '){
putchar(array[i][j]);
cnt++;
}
}
if(cnt == 0){
continue;
}
printf("\n");
}
//
for(i = 0; i < height; i++){
free(array[i]);
}
free(array);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133080/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133080/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1
@stdout = external local_unnamed_addr global ptr, align 8
; Function Attrs: nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%height = alloca i32, align 4
%width = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %height) #6
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %width) #6
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %height, ptr noundef nonnull %width)
%0 = load i32, ptr %height, align 4
%conv = sext i32 %0 to i64
%mul = shl nsw i64 %conv, 3
%call1 = call noalias ptr @malloc(i64 noundef %mul) #7
%cmp = icmp eq ptr %call1, null
br i1 %cmp, label %if.then, label %for.cond.preheader
for.cond.preheader: ; preds = %entry
%cmp3197 = icmp sgt i32 %0, 0
br i1 %cmp3197, label %for.body.lr.ph, label %for.cond25.preheader.thread
for.body.lr.ph: ; preds = %for.cond.preheader
%1 = load i32, ptr %width, align 4, !tbaa !5
%add = add nsw i32 %1, 1
%conv5 = sext i32 %add to i64
%wide.trip.count = zext i32 %0 to i64
br label %for.body
if.then: ; preds = %entry
call void @exit(i32 noundef 1) #8
unreachable
for.cond: ; preds = %for.body
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
br i1 %exitcond.not, label %for.cond14.preheader, label %for.body, !llvm.loop !9
for.cond14.preheader: ; preds = %for.cond
br i1 %cmp3197, label %for.body17, label %for.cond25.preheader.thread
for.body: ; preds = %for.body.lr.ph, %for.cond
%indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.cond ]
%call7 = call noalias ptr @malloc(i64 noundef %conv5) #7
%arrayidx = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv
store ptr %call7, ptr %arrayidx, align 8, !tbaa !11
%cmp10 = icmp eq ptr %call7, null
br i1 %cmp10, label %if.then12, label %for.cond
if.then12: ; preds = %for.body
call void @exit(i32 noundef 1) #8
unreachable
for.cond25.preheader.thread: ; preds = %for.cond14.preheader, %for.cond.preheader
%.pre254261 = load i32, ptr %width, align 4
br label %for.cond63.preheader
for.cond25.preheader: ; preds = %for.body17
%cmp26205 = icmp sgt i32 %4, 0
%.pre254 = load i32, ptr %width, align 4
br i1 %cmp26205, label %for.cond29.preheader.lr.ph, label %for.cond63.preheader
for.cond29.preheader.lr.ph: ; preds = %for.cond25.preheader
%2 = icmp sgt i32 %.pre254, 0
br i1 %2, label %for.cond29.preheader, label %for.cond106.preheader.preheader
for.body17: ; preds = %for.cond14.preheader, %for.body17
%indvars.iv224 = phi i64 [ %indvars.iv.next225, %for.body17 ], [ 0, %for.cond14.preheader ]
%arrayidx19 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv224
%3 = load ptr, ptr %arrayidx19, align 8, !tbaa !11
%call21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef %3)
%indvars.iv.next225 = add nuw nsw i64 %indvars.iv224, 1
%4 = load i32, ptr %height, align 4
%5 = sext i32 %4 to i64
%cmp15 = icmp slt i64 %indvars.iv.next225, %5
br i1 %cmp15, label %for.body17, label %for.cond25.preheader, !llvm.loop !13
for.cond29.preheader: ; preds = %for.cond29.preheader.lr.ph, %for.inc60
%6 = phi i32 [ %22, %for.inc60 ], [ %4, %for.cond29.preheader.lr.ph ]
%7 = phi i32 [ %23, %for.inc60 ], [ %.pre254, %for.cond29.preheader.lr.ph ]
%8 = phi i32 [ %24, %for.inc60 ], [ %.pre254, %for.cond29.preheader.lr.ph ]
%indvars.iv233 = phi i64 [ %indvars.iv.next234, %for.inc60 ], [ 0, %for.cond29.preheader.lr.ph ]
%cmp30203 = icmp sgt i32 %8, 0
br i1 %cmp30203, label %for.body32.lr.ph, label %for.inc60
for.body32.lr.ph: ; preds = %for.cond29.preheader
%arrayidx34 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv233
%9 = load ptr, ptr %arrayidx34, align 8, !tbaa !11
br label %for.body32
for.cond63.preheader: ; preds = %for.inc60, %for.cond25.preheader.thread, %for.cond25.preheader
%10 = phi i32 [ %4, %for.cond25.preheader ], [ %0, %for.cond25.preheader.thread ], [ %22, %for.inc60 ]
%11 = phi i32 [ %.pre254, %for.cond25.preheader ], [ %.pre254261, %for.cond25.preheader.thread ], [ %23, %for.inc60 ]
%cmp64211 = icmp sgt i32 %11, 0
br i1 %cmp64211, label %for.cond67.preheader.lr.ph, label %for.cond102.preheader
for.cond67.preheader.lr.ph: ; preds = %for.cond63.preheader
%12 = icmp sgt i32 %10, 0
br i1 %12, label %for.cond67.preheader, label %for.end145
for.body32: ; preds = %for.body32.lr.ph, %for.inc57
%13 = phi i32 [ %7, %for.body32.lr.ph ], [ %19, %for.inc57 ]
%14 = phi i32 [ %8, %for.body32.lr.ph ], [ %19, %for.inc57 ]
%indvars.iv230 = phi i64 [ 0, %for.body32.lr.ph ], [ %indvars.iv.next231, %for.inc57 ]
%arrayidx36 = getelementptr inbounds i8, ptr %9, i64 %indvars.iv230
%15 = load i8, ptr %arrayidx36, align 1, !tbaa !14
%cmp38 = icmp eq i8 %15, 35
br i1 %cmp38, label %for.inc60.loopexit, label %if.end41
if.end41: ; preds = %for.body32
%sub = add nsw i32 %14, -1
%16 = zext i32 %sub to i64
%cmp42 = icmp eq i64 %indvars.iv230, %16
%cmp46201 = icmp sgt i32 %14, 0
%or.cond = select i1 %cmp42, i1 %cmp46201, i1 false
br i1 %or.cond, label %for.body48, label %if.end41.for.inc57_crit_edge
if.end41.for.inc57_crit_edge: ; preds = %if.end41
%.pre258 = sext i32 %13 to i64
br label %for.inc57
for.body48: ; preds = %if.end41, %for.body48
%indvars.iv227 = phi i64 [ %indvars.iv.next228, %for.body48 ], [ 0, %if.end41 ]
%arrayidx52 = getelementptr inbounds i8, ptr %9, i64 %indvars.iv227
store i8 32, ptr %arrayidx52, align 1, !tbaa !14
%indvars.iv.next228 = add nuw nsw i64 %indvars.iv227, 1
%17 = load i32, ptr %width, align 4
%18 = sext i32 %17 to i64
%cmp46 = icmp slt i64 %indvars.iv.next228, %18
br i1 %cmp46, label %for.body48, label %for.inc57, !llvm.loop !15
for.inc57: ; preds = %for.body48, %if.end41.for.inc57_crit_edge
%.pre-phi259 = phi i64 [ %.pre258, %if.end41.for.inc57_crit_edge ], [ %18, %for.body48 ]
%19 = phi i32 [ %13, %if.end41.for.inc57_crit_edge ], [ %17, %for.body48 ]
%indvars.iv.next231 = add nuw nsw i64 %indvars.iv230, 1
%cmp30 = icmp slt i64 %indvars.iv.next231, %.pre-phi259
br i1 %cmp30, label %for.body32, label %for.inc60.loopexit, !llvm.loop !16
for.inc60.loopexit: ; preds = %for.inc57, %for.body32
%20 = phi i32 [ %19, %for.inc57 ], [ %13, %for.body32 ]
%21 = phi i32 [ %19, %for.inc57 ], [ %14, %for.body32 ]
%.pre = load i32, ptr %height, align 4
br label %for.inc60
for.inc60: ; preds = %for.inc60.loopexit, %for.cond29.preheader
%22 = phi i32 [ %.pre, %for.inc60.loopexit ], [ %6, %for.cond29.preheader ]
%23 = phi i32 [ %20, %for.inc60.loopexit ], [ %7, %for.cond29.preheader ]
%24 = phi i32 [ %21, %for.inc60.loopexit ], [ %8, %for.cond29.preheader ]
%indvars.iv.next234 = add nuw nsw i64 %indvars.iv233, 1
%25 = sext i32 %22 to i64
%cmp26 = icmp slt i64 %indvars.iv.next234, %25
br i1 %cmp26, label %for.cond29.preheader, label %for.cond63.preheader, !llvm.loop !17
for.cond67.preheader: ; preds = %for.cond67.preheader.lr.ph, %for.inc99
%26 = phi i32 [ %41, %for.inc99 ], [ %11, %for.cond67.preheader.lr.ph ]
%27 = phi i32 [ %42, %for.inc99 ], [ %10, %for.cond67.preheader.lr.ph ]
%28 = phi i32 [ %43, %for.inc99 ], [ %10, %for.cond67.preheader.lr.ph ]
%indvars.iv242 = phi i64 [ %indvars.iv.next243, %for.inc99 ], [ 0, %for.cond67.preheader.lr.ph ]
%cmp68209 = icmp sgt i32 %28, 0
br i1 %cmp68209, label %for.body70, label %for.inc99
for.cond102.preheader: ; preds = %for.inc99, %for.cond63.preheader
%29 = phi i32 [ %10, %for.cond63.preheader ], [ %42, %for.inc99 ]
%cmp103216 = icmp sgt i32 %29, 0
br i1 %cmp103216, label %for.cond106.preheader.preheader, label %for.end145
for.cond106.preheader.preheader: ; preds = %for.cond29.preheader.lr.ph, %for.cond102.preheader
br label %for.cond106.preheader
for.body70: ; preds = %for.cond67.preheader, %for.inc96
%30 = phi i32 [ %38, %for.inc96 ], [ %27, %for.cond67.preheader ]
%31 = phi i32 [ %38, %for.inc96 ], [ %28, %for.cond67.preheader ]
%indvars.iv239 = phi i64 [ %indvars.iv.next240, %for.inc96 ], [ 0, %for.cond67.preheader ]
%arrayidx72 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv239
%32 = load ptr, ptr %arrayidx72, align 8, !tbaa !11
%arrayidx74 = getelementptr inbounds i8, ptr %32, i64 %indvars.iv242
%33 = load i8, ptr %arrayidx74, align 1, !tbaa !14
%cmp76 = icmp eq i8 %33, 35
br i1 %cmp76, label %for.inc99.loopexit, label %if.end79
if.end79: ; preds = %for.body70
%sub80 = add nsw i32 %31, -1
%34 = zext i32 %sub80 to i64
%cmp81 = icmp eq i64 %indvars.iv239, %34
%cmp85207 = icmp sgt i32 %31, 0
%or.cond220 = select i1 %cmp81, i1 %cmp85207, i1 false
br i1 %or.cond220, label %for.body87, label %if.end79.for.inc96_crit_edge
if.end79.for.inc96_crit_edge: ; preds = %if.end79
%.pre257 = sext i32 %30 to i64
br label %for.inc96
for.body87: ; preds = %if.end79, %for.body87
%indvars.iv236 = phi i64 [ %indvars.iv.next237, %for.body87 ], [ 0, %if.end79 ]
%arrayidx89 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv236
%35 = load ptr, ptr %arrayidx89, align 8, !tbaa !11
%arrayidx91 = getelementptr inbounds i8, ptr %35, i64 %indvars.iv242
store i8 32, ptr %arrayidx91, align 1, !tbaa !14
%indvars.iv.next237 = add nuw nsw i64 %indvars.iv236, 1
%36 = load i32, ptr %height, align 4
%37 = sext i32 %36 to i64
%cmp85 = icmp slt i64 %indvars.iv.next237, %37
br i1 %cmp85, label %for.body87, label %for.inc96, !llvm.loop !19
for.inc96: ; preds = %for.body87, %if.end79.for.inc96_crit_edge
%.pre-phi = phi i64 [ %.pre257, %if.end79.for.inc96_crit_edge ], [ %37, %for.body87 ]
%38 = phi i32 [ %30, %if.end79.for.inc96_crit_edge ], [ %36, %for.body87 ]
%indvars.iv.next240 = add nuw nsw i64 %indvars.iv239, 1
%cmp68 = icmp slt i64 %indvars.iv.next240, %.pre-phi
br i1 %cmp68, label %for.body70, label %for.inc99.loopexit, !llvm.loop !20
for.inc99.loopexit: ; preds = %for.inc96, %for.body70
%39 = phi i32 [ %38, %for.inc96 ], [ %30, %for.body70 ]
%40 = phi i32 [ %38, %for.inc96 ], [ %31, %for.body70 ]
%.pre255 = load i32, ptr %width, align 4, !tbaa !5
br label %for.inc99
for.inc99: ; preds = %for.inc99.loopexit, %for.cond67.preheader
%41 = phi i32 [ %.pre255, %for.inc99.loopexit ], [ %26, %for.cond67.preheader ]
%42 = phi i32 [ %39, %for.inc99.loopexit ], [ %27, %for.cond67.preheader ]
%43 = phi i32 [ %40, %for.inc99.loopexit ], [ %28, %for.cond67.preheader ]
%indvars.iv.next243 = add nuw nsw i64 %indvars.iv242, 1
%44 = sext i32 %41 to i64
%cmp64 = icmp slt i64 %indvars.iv.next243, %44
br i1 %cmp64, label %for.cond67.preheader, label %for.cond102.preheader, !llvm.loop !21
for.cond106.preheader: ; preds = %for.cond106.preheader.preheader, %for.inc134
%indvars.iv248 = phi i64 [ %indvars.iv.next249, %for.inc134 ], [ 0, %for.cond106.preheader.preheader ]
%45 = load i32, ptr %width, align 4, !tbaa !5
%cmp107213 = icmp sgt i32 %45, 0
br i1 %cmp107213, label %for.body109.lr.ph, label %for.inc134
for.body109.lr.ph: ; preds = %for.cond106.preheader
%arrayidx111 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv248
%46 = load ptr, ptr %arrayidx111, align 8, !tbaa !11
br label %for.body109
for.cond137.preheader: ; preds = %for.inc134
%47 = icmp sgt i32 %54, 0
br i1 %47, label %for.body140, label %for.end145
for.body109: ; preds = %for.body109.lr.ph, %for.inc126
%48 = phi i32 [ %45, %for.body109.lr.ph ], [ %51, %for.inc126 ]
%indvars.iv245 = phi i64 [ 0, %for.body109.lr.ph ], [ %indvars.iv.next246, %for.inc126 ]
%cnt.0215 = phi i32 [ 0, %for.body109.lr.ph ], [ %cnt.1, %for.inc126 ]
%arrayidx113 = getelementptr inbounds i8, ptr %46, i64 %indvars.iv245
%49 = load i8, ptr %arrayidx113, align 1, !tbaa !14
%cmp115.not = icmp eq i8 %49, 32
br i1 %cmp115.not, label %for.inc126, label %if.then117
if.then117: ; preds = %for.body109
%conv114 = sext i8 %49 to i32
%50 = load ptr, ptr @stdout, align 8, !tbaa !11
%call.i = call noundef i32 @putc(i32 noundef %conv114, ptr noundef %50)
%inc124 = add nsw i32 %cnt.0215, 1
%.pre256 = load i32, ptr %width, align 4, !tbaa !5
br label %for.inc126
for.inc126: ; preds = %for.body109, %if.then117
%51 = phi i32 [ %.pre256, %if.then117 ], [ %48, %for.body109 ]
%cnt.1 = phi i32 [ %inc124, %if.then117 ], [ %cnt.0215, %for.body109 ]
%indvars.iv.next246 = add nuw nsw i64 %indvars.iv245, 1
%52 = sext i32 %51 to i64
%cmp107 = icmp slt i64 %indvars.iv.next246, %52
br i1 %cmp107, label %for.body109, label %for.end128, !llvm.loop !22
for.end128: ; preds = %for.inc126
%cmp129 = icmp eq i32 %cnt.1, 0
br i1 %cmp129, label %for.inc134, label %if.end132
if.end132: ; preds = %for.end128
%53 = load ptr, ptr @stdout, align 8, !tbaa !11
%call.i196 = call noundef i32 @putc(i32 noundef 10, ptr noundef %53)
br label %for.inc134
for.inc134: ; preds = %for.cond106.preheader, %for.end128, %if.end132
%indvars.iv.next249 = add nuw nsw i64 %indvars.iv248, 1
%54 = load i32, ptr %height, align 4, !tbaa !5
%55 = sext i32 %54 to i64
%cmp103 = icmp slt i64 %indvars.iv.next249, %55
br i1 %cmp103, label %for.cond106.preheader, label %for.cond137.preheader, !llvm.loop !23
for.body140: ; preds = %for.cond137.preheader, %for.body140
%indvars.iv251 = phi i64 [ %indvars.iv.next252, %for.body140 ], [ 0, %for.cond137.preheader ]
%arrayidx142 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv251
%56 = load ptr, ptr %arrayidx142, align 8, !tbaa !11
call void @free(ptr noundef %56) #6
%indvars.iv.next252 = add nuw nsw i64 %indvars.iv251, 1
%57 = load i32, ptr %height, align 4, !tbaa !5
%58 = sext i32 %57 to i64
%cmp138 = icmp slt i64 %indvars.iv.next252, %58
br i1 %cmp138, label %for.body140, label %for.end145, !llvm.loop !24
for.end145: ; preds = %for.body140, %for.cond67.preheader.lr.ph, %for.cond102.preheader, %for.cond137.preheader
call void @free(ptr noundef %call1) #6
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %width) #6
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %height) #6
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3
; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4
; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2
attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { noreturn nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10, !18}
!18 = !{!"llvm.loop.unswitch.partial.disable"}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10, !18}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
|
/* ex5_3
UMAboogie */
#include<stdio.h>
int main(void){
int height,width;
scanf("%d %d",&height,&width); //マスのたての数、横の数を入力
char grid[height][width]; //マス目の配色を入れる配列
int row_exist[height]; //その行のマスに黒があるかの真偽値を入れる配列
int col_exist[width]; //その列のマスに黒があるかの真偽値を入れる配列
for(int i = 0;i < height;i++){
for(int j = 0;j < width;j++){
scanf(" %c",&grid[i][j]); //(i,j)の配色を入力
if(grid[i][j] == '#'){ //もし黒であれば、各真偽値を1とする
row_exist[i]=1;
col_exist[j]=1;
}
}
}
for(int i = 0;i < height;i++){
if(row_exist[i] == 1 ){ //まず黒がある行について
for(int j = 0;j < width;j++){
if(col_exist[j] == 1){ //黒がある列であれば
printf("%c",grid[i][j]); //配色を出力
}
}
printf("\n"); //行ごとに改行
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133123/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133123/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c" %c\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%height = alloca i32, align 4
%width = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %height) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %width) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %height, ptr noundef nonnull %width)
%0 = load i32, ptr %height, align 4, !tbaa !5
%1 = zext i32 %0 to i64
%2 = load i32, ptr %width, align 4, !tbaa !5
%3 = zext i32 %2 to i64
%4 = call ptr @llvm.stacksave.p0()
%5 = mul nuw i64 %3, %1
%vla = alloca i8, i64 %5, align 16
%6 = load i32, ptr %height, align 4, !tbaa !5
%7 = zext i32 %6 to i64
%vla1 = alloca i32, i64 %7, align 16
%8 = load i32, ptr %width, align 4, !tbaa !5
%9 = zext i32 %8 to i64
%vla2 = alloca i32, i64 %9, align 16
%cmp77 = icmp sgt i32 %6, 0
br i1 %cmp77, label %for.cond3.preheader.lr.ph, label %for.cond.cleanup27
for.cond3.preheader.lr.ph: ; preds = %entry
%10 = icmp sgt i32 %8, 0
br i1 %10, label %for.cond3.preheader, label %for.body28.preheader
for.cond3.preheader: ; preds = %for.cond3.preheader.lr.ph, %for.cond.cleanup5
%11 = phi i32 [ %14, %for.cond.cleanup5 ], [ %6, %for.cond3.preheader.lr.ph ]
%12 = phi i32 [ %15, %for.cond.cleanup5 ], [ %8, %for.cond3.preheader.lr.ph ]
%indvars.iv85 = phi i64 [ %indvars.iv.next86, %for.cond.cleanup5 ], [ 0, %for.cond3.preheader.lr.ph ]
%cmp475 = icmp sgt i32 %12, 0
br i1 %cmp475, label %for.body6.lr.ph, label %for.cond.cleanup5
for.body6.lr.ph: ; preds = %for.cond3.preheader
%13 = mul nuw nsw i64 %indvars.iv85, %3
%arrayidx = getelementptr inbounds i8, ptr %vla, i64 %13
%arrayidx17 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv85
br label %for.body6
for.cond24.preheader: ; preds = %for.cond.cleanup5
%cmp2581 = icmp sgt i32 %14, 0
br i1 %cmp2581, label %for.body28.preheader, label %for.cond.cleanup27
for.body28.preheader: ; preds = %for.cond3.preheader.lr.ph, %for.cond24.preheader
%.ph = phi i32 [ %6, %for.cond3.preheader.lr.ph ], [ %14, %for.cond24.preheader ]
br label %for.body28
for.cond.cleanup5.loopexit: ; preds = %for.inc
%.pre = load i32, ptr %height, align 4, !tbaa !5
br label %for.cond.cleanup5
for.cond.cleanup5: ; preds = %for.cond.cleanup5.loopexit, %for.cond3.preheader
%14 = phi i32 [ %.pre, %for.cond.cleanup5.loopexit ], [ %11, %for.cond3.preheader ]
%15 = phi i32 [ %18, %for.cond.cleanup5.loopexit ], [ %12, %for.cond3.preheader ]
%indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
%16 = sext i32 %14 to i64
%cmp = icmp slt i64 %indvars.iv.next86, %16
br i1 %cmp, label %for.cond3.preheader, label %for.cond24.preheader, !llvm.loop !9
for.body6: ; preds = %for.body6.lr.ph, %for.inc
%indvars.iv = phi i64 [ 0, %for.body6.lr.ph ], [ %indvars.iv.next, %for.inc ]
%arrayidx8 = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv
%call9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx8)
%17 = load i8, ptr %arrayidx8, align 1, !tbaa !12
%cmp14 = icmp eq i8 %17, 35
br i1 %cmp14, label %if.then, label %for.inc
if.then: ; preds = %for.body6
store i32 1, ptr %arrayidx17, align 4, !tbaa !5
%arrayidx19 = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv
store i32 1, ptr %arrayidx19, align 4, !tbaa !5
br label %for.inc
for.inc: ; preds = %for.body6, %if.then
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%18 = load i32, ptr %width, align 4, !tbaa !5
%19 = sext i32 %18 to i64
%cmp4 = icmp slt i64 %indvars.iv.next, %19
br i1 %cmp4, label %for.body6, label %for.cond.cleanup5.loopexit, !llvm.loop !13
for.cond.cleanup27: ; preds = %for.inc57, %entry, %for.cond24.preheader
call void @llvm.stackrestore.p0(ptr %4)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %width) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %height) #5
ret i32 0
for.body28: ; preds = %for.body28.preheader, %for.inc57
%20 = phi i32 [ %29, %for.inc57 ], [ %.ph, %for.body28.preheader ]
%indvars.iv91 = phi i64 [ %indvars.iv.next92, %for.inc57 ], [ 0, %for.body28.preheader ]
%arrayidx30 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv91
%21 = load i32, ptr %arrayidx30, align 4, !tbaa !5
%cmp31 = icmp eq i32 %21, 1
br i1 %cmp31, label %for.cond35.preheader, label %for.inc57
for.cond35.preheader: ; preds = %for.body28
%22 = load i32, ptr %width, align 4, !tbaa !5
%cmp3679 = icmp sgt i32 %22, 0
br i1 %cmp3679, label %for.body39.lr.ph, label %for.cond.cleanup38
for.body39.lr.ph: ; preds = %for.cond35.preheader
%23 = mul nuw nsw i64 %indvars.iv91, %3
%arrayidx46 = getelementptr inbounds i8, ptr %vla, i64 %23
br label %for.body39
for.cond.cleanup38: ; preds = %for.inc52, %for.cond35.preheader
%putchar = call i32 @putchar(i32 10)
%.pre95 = load i32, ptr %height, align 4, !tbaa !5
br label %for.inc57
for.body39: ; preds = %for.body39.lr.ph, %for.inc52
%24 = phi i32 [ %22, %for.body39.lr.ph ], [ %27, %for.inc52 ]
%indvars.iv88 = phi i64 [ 0, %for.body39.lr.ph ], [ %indvars.iv.next89, %for.inc52 ]
%arrayidx41 = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv88
%25 = load i32, ptr %arrayidx41, align 4, !tbaa !5
%cmp42 = icmp eq i32 %25, 1
br i1 %cmp42, label %if.then44, label %for.inc52
if.then44: ; preds = %for.body39
%arrayidx48 = getelementptr inbounds i8, ptr %arrayidx46, i64 %indvars.iv88
%26 = load i8, ptr %arrayidx48, align 1, !tbaa !12
%conv49 = sext i8 %26 to i32
%putchar74 = call i32 @putchar(i32 %conv49)
%.pre94 = load i32, ptr %width, align 4, !tbaa !5
br label %for.inc52
for.inc52: ; preds = %for.body39, %if.then44
%27 = phi i32 [ %24, %for.body39 ], [ %.pre94, %if.then44 ]
%indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
%28 = sext i32 %27 to i64
%cmp36 = icmp slt i64 %indvars.iv.next89, %28
br i1 %cmp36, label %for.body39, label %for.cond.cleanup38, !llvm.loop !14
for.inc57: ; preds = %for.body28, %for.cond.cleanup38
%29 = phi i32 [ %20, %for.body28 ], [ %.pre95, %for.cond.cleanup38 ]
%indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
%30 = sext i32 %29 to i64
%cmp25 = icmp slt i64 %indvars.iv.next92, %30
br i1 %cmp25, label %for.body28, label %for.cond.cleanup27, !llvm.loop !15
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #4 = { nofree nounwind }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unswitch.partial.disable"}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
|
/* ex5_3
YSK722 */
#include <stdio.h>
int main(void){
int height, width;
char box[3][100][100];
scanf("%d %d", &height, &width);
// 白黒を読み取る
for (int i = 0; i < height; i++){
for (int j = 0; j < width; j++){
scanf(" %c", &box[0][i][j]);
}
}
/* i行の要素が全て白のとき、2つめのboxのi行目の
要素をすべて"n"にし、それ以外の時はすべて"y"にする */
for (int i = 0; i < height; i++){
for (int j = 0; j < width; j++){
if (box[0][i][j] == '#'){
for (int k = 0; k < width; k++){
box[1][i][k] = 'y';
}
break;
}
box[1][i][j] = 'n';
}
}
/* j列の要素が全て白のとき、3つめのboxのj列目の
要素をすべて"n"にし、それ以外の時はすべて"y"にする */
for (int j = 0; j < width; j++){
for (int i = 0; i < height; i++){
if (box[0][i][j] == '#'){
for (int k = 0; k < height; k++){
box[2][k][j] = 'y';
}
break;
}
box[2][i][j] = 'n';
}
}
/* 2つめ、3つめのboxの対応する要素がどちらとも"y"のときだけ
boxの要素を出力する */
for (int i = 0; i < height; i++){
for (int j = 0; j < width; j++){
if (box[1][i][j] == 'y' && box[2][i][j] == 'y'){
printf("%c", box[0][i][j]);
}
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133167/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133167/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [4 x i8] c" %c\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%height = alloca i32, align 4
%width = alloca i32, align 4
%box = alloca [3 x [100 x [100 x i8]]], align 16
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %height) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %width) #5
call void @llvm.lifetime.start.p0(i64 30000, ptr nonnull %box) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %height, ptr noundef nonnull %width)
%0 = load i32, ptr %height, align 4, !tbaa !5
%cmp189 = icmp sgt i32 %0, 0
br i1 %cmp189, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup108
for.cond1.preheader.lr.ph: ; preds = %entry
%.pre249.pre = load i32, ptr %width, align 4, !tbaa !5
%1 = icmp sgt i32 %.pre249.pre, 0
br i1 %1, label %for.cond1.preheader, label %for.cond111.preheader.preheader
for.cond1.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.cond.cleanup3
%2 = phi i32 [ %7, %for.cond.cleanup3 ], [ %0, %for.cond1.preheader.lr.ph ]
%3 = phi i32 [ %8, %for.cond.cleanup3 ], [ %.pre249.pre, %for.cond1.preheader.lr.ph ]
%indvars.iv216 = phi i64 [ %indvars.iv.next217, %for.cond.cleanup3 ], [ 0, %for.cond1.preheader.lr.ph ]
%cmp2187 = icmp sgt i32 %3, 0
br i1 %cmp2187, label %for.body4, label %for.cond.cleanup3
for.cond13.preheader: ; preds = %for.cond.cleanup3
%cmp14195 = icmp sgt i32 %7, 0
br i1 %cmp14195, label %for.cond18.preheader.lr.ph, label %for.cond55.preheader
for.cond18.preheader.lr.ph: ; preds = %for.cond13.preheader
%cmp19191 = icmp sgt i32 %8, 0
br i1 %cmp19191, label %for.cond18.preheader.us.preheader, label %for.cond111.preheader.preheader
for.cond18.preheader.us.preheader: ; preds = %for.cond18.preheader.lr.ph
%4 = zext i32 %8 to i64
%wide.trip.count226 = zext i32 %7 to i64
%invariant.gep = getelementptr inbounds i8, ptr %box, i64 10000
br label %for.cond18.preheader.us
for.cond18.preheader.us: ; preds = %for.cond18.preheader.us.preheader, %cleanup.us
%indvar = phi i64 [ 0, %for.cond18.preheader.us.preheader ], [ %indvar.next, %cleanup.us ]
%5 = mul nuw nsw i64 %indvar, 100
%gep = getelementptr i8, ptr %invariant.gep, i64 %5
br label %for.body21.us
for.body21.us: ; preds = %for.cond18.preheader.us, %if.end.us
%indvars.iv219 = phi i64 [ 0, %for.cond18.preheader.us ], [ %indvars.iv.next220, %if.end.us ]
%arrayidx26.us = getelementptr inbounds [100 x [100 x i8]], ptr %box, i64 0, i64 %indvar, i64 %indvars.iv219
%6 = load i8, ptr %arrayidx26.us, align 1, !tbaa !9
%cmp27.us = icmp eq i8 %6, 35
br i1 %cmp27.us, label %for.body33.us.preheader, label %if.end.us
if.end.us: ; preds = %for.body21.us
%arrayidx46.us = getelementptr inbounds [3 x [100 x [100 x i8]]], ptr %box, i64 0, i64 1, i64 %indvar, i64 %indvars.iv219
store i8 110, ptr %arrayidx46.us, align 1, !tbaa !9
%indvars.iv.next220 = add nuw nsw i64 %indvars.iv219, 1
%exitcond.not = icmp eq i64 %indvars.iv.next220, %4
br i1 %exitcond.not, label %cleanup.us, label %for.body21.us, !llvm.loop !10
cleanup.us: ; preds = %if.end.us, %for.body33.us.preheader
%indvar.next = add nuw nsw i64 %indvar, 1
%exitcond227.not = icmp eq i64 %indvar.next, %wide.trip.count226
br i1 %exitcond227.not, label %for.cond55.preheader, label %for.cond18.preheader.us, !llvm.loop !12
for.body33.us.preheader: ; preds = %for.body21.us
call void @llvm.memset.p0.i64(ptr align 4 %gep, i8 121, i64 %4, i1 false), !tbaa !9
br label %cleanup.us
for.cond.cleanup3.loopexit: ; preds = %for.body4
%.pre = load i32, ptr %height, align 4, !tbaa !5
br label %for.cond.cleanup3
for.cond.cleanup3: ; preds = %for.cond.cleanup3.loopexit, %for.cond1.preheader
%7 = phi i32 [ %.pre, %for.cond.cleanup3.loopexit ], [ %2, %for.cond1.preheader ]
%8 = phi i32 [ %10, %for.cond.cleanup3.loopexit ], [ %3, %for.cond1.preheader ]
%indvars.iv.next217 = add nuw nsw i64 %indvars.iv216, 1
%9 = sext i32 %7 to i64
%cmp = icmp slt i64 %indvars.iv.next217, %9
br i1 %cmp, label %for.cond1.preheader, label %for.cond13.preheader, !llvm.loop !13
for.body4: ; preds = %for.cond1.preheader, %for.body4
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body4 ], [ 0, %for.cond1.preheader ]
%arrayidx7 = getelementptr inbounds [100 x [100 x i8]], ptr %box, i64 0, i64 %indvars.iv216, i64 %indvars.iv
%call8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx7)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%10 = load i32, ptr %width, align 4, !tbaa !5
%11 = sext i32 %10 to i64
%cmp2 = icmp slt i64 %indvars.iv.next, %11
br i1 %cmp2, label %for.body4, label %for.cond.cleanup3.loopexit, !llvm.loop !15
for.cond55.preheader: ; preds = %cleanup.us, %for.cond13.preheader
%cmp56202 = icmp sgt i32 %8, 0
br i1 %cmp56202, label %for.cond61.preheader.lr.ph, label %for.cond105.preheader
for.cond61.preheader.lr.ph: ; preds = %for.cond55.preheader
br i1 %cmp14195, label %for.cond61.preheader.us.preheader, label %for.cond.cleanup108
for.cond61.preheader.us.preheader: ; preds = %for.cond61.preheader.lr.ph
%wide.trip.count241 = zext i32 %8 to i64
%wide.trip.count231 = zext i32 %7 to i64
%xtraiter = and i64 %wide.trip.count231, 3
%12 = icmp ult i32 %7, 4
%unroll_iter = and i64 %wide.trip.count231, 4294967292
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br label %for.cond61.preheader.us
for.cond61.preheader.us: ; preds = %for.cond61.preheader.us.preheader, %cleanup98.us
%indvars.iv238 = phi i64 [ 0, %for.cond61.preheader.us.preheader ], [ %indvars.iv.next239, %cleanup98.us ]
br label %for.body65.us
for.body65.us: ; preds = %for.cond61.preheader.us, %if.end90.us
%indvars.iv228 = phi i64 [ 0, %for.cond61.preheader.us ], [ %indvars.iv.next229, %if.end90.us ]
%arrayidx70.us = getelementptr inbounds [100 x [100 x i8]], ptr %box, i64 0, i64 %indvars.iv228, i64 %indvars.iv238
%13 = load i8, ptr %arrayidx70.us, align 1, !tbaa !9
%cmp72.us = icmp eq i8 %13, 35
br i1 %cmp72.us, label %for.body80.us.preheader, label %if.end90.us
for.body80.us.preheader: ; preds = %for.body65.us
br i1 %12, label %cleanup98.us.loopexit.unr-lcssa, label %for.body80.us
if.end90.us: ; preds = %for.body65.us
%arrayidx95.us = getelementptr inbounds [3 x [100 x [100 x i8]]], ptr %box, i64 0, i64 2, i64 %indvars.iv228, i64 %indvars.iv238
store i8 110, ptr %arrayidx95.us, align 1, !tbaa !9
%indvars.iv.next229 = add nuw nsw i64 %indvars.iv228, 1
%exitcond232.not = icmp eq i64 %indvars.iv.next229, %wide.trip.count231
br i1 %exitcond232.not, label %cleanup98.us, label %for.body65.us, !llvm.loop !16
cleanup98.us.loopexit.unr-lcssa: ; preds = %for.body80.us, %for.body80.us.preheader
%indvars.iv233.unr = phi i64 [ 0, %for.body80.us.preheader ], [ %indvars.iv.next234.3, %for.body80.us ]
br i1 %lcmp.mod.not, label %cleanup98.us, label %for.body80.us.epil
for.body80.us.epil: ; preds = %cleanup98.us.loopexit.unr-lcssa, %for.body80.us.epil
%indvars.iv233.epil = phi i64 [ %indvars.iv.next234.epil, %for.body80.us.epil ], [ %indvars.iv233.unr, %cleanup98.us.loopexit.unr-lcssa ]
%epil.iter = phi i64 [ %epil.iter.next, %for.body80.us.epil ], [ 0, %cleanup98.us.loopexit.unr-lcssa ]
%arrayidx85.us.epil = getelementptr inbounds [3 x [100 x [100 x i8]]], ptr %box, i64 0, i64 2, i64 %indvars.iv233.epil, i64 %indvars.iv238
store i8 121, ptr %arrayidx85.us.epil, align 1, !tbaa !9
%indvars.iv.next234.epil = add nuw nsw i64 %indvars.iv233.epil, 1
%epil.iter.next = add i64 %epil.iter, 1
%epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
br i1 %epil.iter.cmp.not, label %cleanup98.us, label %for.body80.us.epil, !llvm.loop !17
cleanup98.us: ; preds = %if.end90.us, %cleanup98.us.loopexit.unr-lcssa, %for.body80.us.epil
%indvars.iv.next239 = add nuw nsw i64 %indvars.iv238, 1
%exitcond242.not = icmp eq i64 %indvars.iv.next239, %wide.trip.count241
br i1 %exitcond242.not, label %for.cond105.preheader, label %for.cond61.preheader.us, !llvm.loop !19
for.body80.us: ; preds = %for.body80.us.preheader, %for.body80.us
%indvars.iv233 = phi i64 [ %indvars.iv.next234.3, %for.body80.us ], [ 0, %for.body80.us.preheader ]
%niter = phi i64 [ %niter.next.3, %for.body80.us ], [ 0, %for.body80.us.preheader ]
%arrayidx85.us = getelementptr inbounds [3 x [100 x [100 x i8]]], ptr %box, i64 0, i64 2, i64 %indvars.iv233, i64 %indvars.iv238
store i8 121, ptr %arrayidx85.us, align 1, !tbaa !9
%indvars.iv.next234 = or i64 %indvars.iv233, 1
%arrayidx85.us.1 = getelementptr inbounds [3 x [100 x [100 x i8]]], ptr %box, i64 0, i64 2, i64 %indvars.iv.next234, i64 %indvars.iv238
store i8 121, ptr %arrayidx85.us.1, align 1, !tbaa !9
%indvars.iv.next234.1 = or i64 %indvars.iv233, 2
%arrayidx85.us.2 = getelementptr inbounds [3 x [100 x [100 x i8]]], ptr %box, i64 0, i64 2, i64 %indvars.iv.next234.1, i64 %indvars.iv238
store i8 121, ptr %arrayidx85.us.2, align 1, !tbaa !9
%indvars.iv.next234.2 = or i64 %indvars.iv233, 3
%arrayidx85.us.3 = getelementptr inbounds [3 x [100 x [100 x i8]]], ptr %box, i64 0, i64 2, i64 %indvars.iv.next234.2, i64 %indvars.iv238
store i8 121, ptr %arrayidx85.us.3, align 1, !tbaa !9
%indvars.iv.next234.3 = add nuw nsw i64 %indvars.iv233, 4
%niter.next.3 = add i64 %niter, 4
%niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
br i1 %niter.ncmp.3, label %cleanup98.us.loopexit.unr-lcssa, label %for.body80.us, !llvm.loop !20
for.cond105.preheader: ; preds = %cleanup98.us, %for.cond55.preheader
br i1 %cmp14195, label %for.cond111.preheader.preheader, label %for.cond.cleanup108
for.cond111.preheader.preheader: ; preds = %for.cond18.preheader.lr.ph, %for.cond1.preheader.lr.ph, %for.cond105.preheader
br label %for.cond111.preheader
for.cond111.preheader: ; preds = %for.cond111.preheader.preheader, %for.cond.cleanup114
%indvars.iv246 = phi i64 [ %indvars.iv.next247, %for.cond.cleanup114 ], [ 0, %for.cond111.preheader.preheader ]
%14 = load i32, ptr %width, align 4, !tbaa !5
%cmp112205 = icmp sgt i32 %14, 0
br i1 %cmp112205, label %for.body115, label %for.cond.cleanup114
for.cond.cleanup108: ; preds = %for.cond.cleanup114, %entry, %for.cond61.preheader.lr.ph, %for.cond105.preheader
call void @llvm.lifetime.end.p0(i64 30000, ptr nonnull %box) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %width) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %height) #5
ret i32 0
for.cond.cleanup114: ; preds = %for.inc141, %for.cond111.preheader
%putchar = call i32 @putchar(i32 10)
%indvars.iv.next247 = add nuw nsw i64 %indvars.iv246, 1
%15 = load i32, ptr %height, align 4, !tbaa !5
%16 = sext i32 %15 to i64
%cmp106 = icmp slt i64 %indvars.iv.next247, %16
br i1 %cmp106, label %for.cond111.preheader, label %for.cond.cleanup108, !llvm.loop !21
for.body115: ; preds = %for.cond111.preheader, %for.inc141
%17 = phi i32 [ %21, %for.inc141 ], [ %14, %for.cond111.preheader ]
%indvars.iv243 = phi i64 [ %indvars.iv.next244, %for.inc141 ], [ 0, %for.cond111.preheader ]
%arrayidx120 = getelementptr inbounds [3 x [100 x [100 x i8]]], ptr %box, i64 0, i64 1, i64 %indvars.iv246, i64 %indvars.iv243
%18 = load i8, ptr %arrayidx120, align 1, !tbaa !9
%cmp122 = icmp eq i8 %18, 121
br i1 %cmp122, label %land.lhs.true, label %for.inc141
land.lhs.true: ; preds = %for.body115
%arrayidx128 = getelementptr inbounds [3 x [100 x [100 x i8]]], ptr %box, i64 0, i64 2, i64 %indvars.iv246, i64 %indvars.iv243
%19 = load i8, ptr %arrayidx128, align 1, !tbaa !9
%cmp130 = icmp eq i8 %19, 121
br i1 %cmp130, label %if.then132, label %for.inc141
if.then132: ; preds = %land.lhs.true
%arrayidx137 = getelementptr inbounds [100 x [100 x i8]], ptr %box, i64 0, i64 %indvars.iv246, i64 %indvars.iv243
%20 = load i8, ptr %arrayidx137, align 1, !tbaa !9
%conv138 = sext i8 %20 to i32
%putchar183 = call i32 @putchar(i32 %conv138)
%.pre250 = load i32, ptr %width, align 4, !tbaa !5
br label %for.inc141
for.inc141: ; preds = %for.body115, %land.lhs.true, %if.then132
%21 = phi i32 [ %17, %for.body115 ], [ %17, %land.lhs.true ], [ %.pre250, %if.then132 ]
%indvars.iv.next244 = add nuw nsw i64 %indvars.iv243, 1
%22 = sext i32 %21 to i64
%cmp112 = icmp slt i64 %indvars.iv.next244, %22
br i1 %cmp112, label %for.body115, label %for.cond.cleanup114, !llvm.loop !22
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11, !14}
!14 = !{!"llvm.loop.unswitch.partial.disable"}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.unroll.disable"}
!19 = distinct !{!19, !11}
!20 = distinct !{!20, !11}
!21 = distinct !{!21, !11}
!22 = distinct !{!22, !11}
|
#include <stdio.h>
int main(void) {
int a,b,c,i,j,f=0,p=0;
scanf("%d %d %d",&a,&b,&c );
for(i=0;i<=c;i++)
{
for(j=0;j<=c;j++)
{
p=i*a+j*b;
if(p==c) f=1;
}
}
if(f)
printf("Yes\n");
else
printf("No\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13321/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13321/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1
@str = private unnamed_addr constant [3 x i8] c"No\00", align 1
@str.3 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
%c = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c)
%0 = load i32, ptr %c, align 4, !tbaa !5
%cmp.not21 = icmp slt i32 %0, 0
br i1 %cmp.not21, label %if.else, label %for.cond1.preheader.lr.ph
for.cond1.preheader.lr.ph: ; preds = %entry
%1 = load i32, ptr %a, align 4
%2 = load i32, ptr %b, align 4
%3 = add i32 %0, 1
%min.iters.check = icmp ult i32 %3, 8
%n.vec = and i32 %3, -8
%broadcast.splatinsert = insertelement <4 x i32> poison, i32 %2, i64 0
%broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
%broadcast.splatinsert31 = insertelement <4 x i32> poison, i32 %0, i64 0
%broadcast.splat32 = shufflevector <4 x i32> %broadcast.splatinsert31, <4 x i32> poison, <4 x i32> zeroinitializer
%cmp.n = icmp eq i32 %3, %n.vec
br label %for.cond1.preheader
for.cond1.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.cond1.for.inc6_crit_edge
%4 = phi <2 x i32> [ zeroinitializer, %for.cond1.preheader.lr.ph ], [ %18, %for.cond1.for.inc6_crit_edge ]
%5 = extractelement <2 x i32> %4, i64 0
%mul = mul nsw i32 %1, %5
%6 = extractelement <2 x i32> %4, i64 1
br i1 %min.iters.check, label %for.body3.preheader, label %vector.ph
vector.ph: ; preds = %for.cond1.preheader
%minmax.ident.splat = shufflevector <2 x i32> %4, <2 x i32> poison, <4 x i32> <i32 1, i32 1, i32 1, i32 1>
%broadcast.splatinsert29 = insertelement <4 x i32> poison, i32 %mul, i64 0
%broadcast.splat30 = shufflevector <4 x i32> %broadcast.splatinsert29, <4 x i32> poison, <4 x i32> zeroinitializer
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vec.phi = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %13, %vector.body ]
%vec.phi27 = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %14, %vector.body ]
%vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
%step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
%7 = mul nsw <4 x i32> %broadcast.splat, %vec.ind
%8 = mul nsw <4 x i32> %broadcast.splat, %step.add
%9 = add nsw <4 x i32> %7, %broadcast.splat30
%10 = add nsw <4 x i32> %8, %broadcast.splat30
%11 = icmp eq <4 x i32> %9, %broadcast.splat32
%12 = icmp eq <4 x i32> %10, %broadcast.splat32
%13 = select <4 x i1> %11, <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> %vec.phi
%14 = select <4 x i1> %12, <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> %vec.phi27
%index.next = add nuw i32 %index, 8
%vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
%15 = icmp eq i32 %index.next, %n.vec
br i1 %15, label %middle.block, label %vector.body, !llvm.loop !9
middle.block: ; preds = %vector.body
%rdx.select.cmp.not = icmp ne <4 x i32> %13, %minmax.ident.splat
%rdx.select.cmp3537 = icmp ne <4 x i32> %14, %minmax.ident.splat
%rdx.select.cmp35 = select <4 x i1> %rdx.select.cmp.not, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i1> %rdx.select.cmp3537
%16 = bitcast <4 x i1> %rdx.select.cmp35 to i4
%.not = icmp eq i4 %16, 0
%rdx.select36 = select i1 %.not, i32 %6, i32 1
br i1 %cmp.n, label %for.cond1.for.inc6_crit_edge, label %for.body3.preheader
for.body3.preheader: ; preds = %for.cond1.preheader, %middle.block
%f.120.ph = phi i32 [ %6, %for.cond1.preheader ], [ %rdx.select36, %middle.block ]
%j.019.ph = phi i32 [ 0, %for.cond1.preheader ], [ %n.vec, %middle.block ]
br label %for.body3
for.body3: ; preds = %for.body3.preheader, %for.body3
%f.120 = phi i32 [ %spec.select, %for.body3 ], [ %f.120.ph, %for.body3.preheader ]
%j.019 = phi i32 [ %inc, %for.body3 ], [ %j.019.ph, %for.body3.preheader ]
%mul4 = mul nsw i32 %2, %j.019
%add = add nsw i32 %mul4, %mul
%cmp5 = icmp eq i32 %add, %0
%spec.select = select i1 %cmp5, i32 1, i32 %f.120
%inc = add nuw i32 %j.019, 1
%exitcond.not = icmp eq i32 %j.019, %0
br i1 %exitcond.not, label %for.cond1.for.inc6_crit_edge, label %for.body3, !llvm.loop !13
for.cond1.for.inc6_crit_edge: ; preds = %for.body3, %middle.block
%spec.select.lcssa = phi i32 [ %rdx.select36, %middle.block ], [ %spec.select, %for.body3 ]
%inc7 = add nuw i32 %5, 1
%exitcond25.not = icmp eq i32 %5, %0
%17 = insertelement <2 x i32> poison, i32 %inc7, i64 0
%18 = insertelement <2 x i32> %17, i32 %spec.select.lcssa, i64 1
br i1 %exitcond25.not, label %for.end8, label %for.cond1.preheader, !llvm.loop !14
for.end8: ; preds = %for.cond1.for.inc6_crit_edge
%19 = icmp eq i32 %spec.select.lcssa, 0
br i1 %19, label %if.else, label %if.end12
if.else: ; preds = %entry, %for.end8
br label %if.end12
if.end12: ; preds = %for.end8, %if.else
%str.sink = phi ptr [ @str, %if.else ], [ @str.3, %for.end8 ]
%puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !12, !11}
!14 = distinct !{!14, !10}
|
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <stdbool.h>
#include <string.h>
/*以下便利なマクロを定義する。*/
#define rep(i, min, max) for(i=min; i<=max; i=i+1)
#define if_forall(i, min, max, prop)\
\
rep(i, min, max)\
{\
if(!(prop))\
{\
break;\
}\
}\
\
if(i==max+1)\
#define if_exists(i, min, max, prop)\
\
rep(i, min, max)\
{\
if(prop)\
{\
break;\
}\
}\
\
if(i<max+1)\
#define sum(i, min, max, sequence, answer)\
{\
answer=0;\
rep(i, min, max)\
{\
answer=answer+sequence;\
}\
}\
#define prod(i, min, max, sequence, answer)\
{\
answer=1;\
rep(i, min, max)\
{\
answer=answer*sequence;\
}\
}\
/*以下便利な関数を定義する。*/
void fill_int(int array[], int min, int max, int element)
{
int i=min;
rep(i, min, max)
{
array[i]=element;
}
}
void fill_char(char array[], int min, int max, char element)
{
int i=min;
rep(i, min, max)
{
array[i]=element;
}
}
void swap_int(int* x, int* y)
{
int tmp;
tmp = *x;
*x = *y;
*y = tmp;
}
void swap_int_array(int x[], int y[], int min, int max)
{
int i;
rep(i, min, max)
{
swap_int(&x[i], &y[i]);
}
}
void swap_char(char* x, char* y)
{
char tmp;
tmp = *x;
*x = *y;
*y = tmp;
}
void swap_char_array(char x[], char y[], int min, int max)
{
int i;
rep(i, min, max)
{
swap_char(&x[i], &y[i]);
}
}
void reverse_char(char array[], int min, int max)
{
int i;
rep(i, min, (min+max)/2)
{
swap_char(&array[i], &array[min+max-i]);
}
}
int max_int(int var1, int var2)
{
int answer=var1;
if(answer<var2)
{
answer=var2;
}
return answer;
}
int min_int(int var1, int var2)
{
int answer=var1;
if(answer>var2)
{
answer=var2;
}
return answer;
}
long int pow_int(int base, unsigned int exponent)
{
long int answer=1;
answer=(long int)pow((double)base, (double)exponent);
return answer;
}
long int pow_int_mod(int base, unsigned int exponent, int mod)
{
long int answer=1;
while (exponent>0)
{
if (exponent&1)
{
answer=(answer*(base%mod))%mod;
if(answer==0)
{
break;
}
}
base=(base*base)%mod;
exponent=exponent>>1;
}
return answer;
}
unsigned long int factorial(unsigned int num)
{
unsigned int i=0;
unsigned long int answer=1;
rep(i, 2, num)
{
answer=answer*i;
}
return answer;
}
unsigned long int factorial_mod(unsigned int num, int mod)
{
unsigned int i=0;
unsigned long int answer=1;
rep(i, 2, num)
{
answer=(answer*(i%mod))%mod;
if(answer==0)
{
break;
}
}
return answer;
}
unsigned long int combination(unsigned int n, unsigned int k)
{
unsigned int i=0;
unsigned long int numerator=1;
unsigned long int denominator=1;
k=min_int(k, n-k);
rep(i, 2, k)
{
numerator=numerator*(n+1-i);
denominator=denominator*i;
}
return numerator/denominator;
}
double combination_general(double alpha, unsigned int k)
{
unsigned int i;
double numerator=1;
unsigned long int denominator=1;
rep(i, 1, k)
{
numerator=numerator*(alpha+1-i);
denominator=denominator*i;
}
return numerator/denominator;
}
int gcd(int a, int b)
{
if(a<b)
{
swap_int(&a, &b);
}
int r=a%b;
while(r!=0)
{
a=b;
b=r;
r=a%b;
}
return b;
}
int lcm(int a, int b)
{
return (a/gcd(a, b))*b;
}
int order(long int num)
{
int answer=-1;
while(num!=0)
{
num=num/10;
answer=answer+1;
}
return answer;
}
long int convert_adic_int(char num[], unsigned int p_adic, unsigned int q_adic)
{
int i=0;
long int answer=0;
bool sgn=0;
long int tmp=strtol(num, NULL, p_adic);
if(tmp<0)
{
sgn=1;
tmp=-tmp;
}
while(tmp>0)
{
answer=answer+(tmp%q_adic)*pow_int(10, i);
tmp=tmp/q_adic;
i=i+1;
}
if(sgn==0)
{
return answer;
}
else
{
return -answer;
}
}
void convert_adic_char(char num[], unsigned int p_adic, unsigned int q_adic)
{
int i=0;
int mod[32]={0};
bool sgn=0;
int digit=0;
long int tmp=strtol(num, NULL, p_adic);
if(tmp<0)
{
sgn=1;
tmp=-tmp;
}
while(tmp>0)
{
mod[i]=tmp%q_adic;
digit=i;
tmp=tmp/q_adic;
i=i+1;
}
fill_char(num, 0, strlen(num)-1, '\0');
if(sgn==1)
{
num[0]='-';
}
rep(i, 0, digit)
{
if(mod[i]<10)
{
num[sgn+digit-i]='0'+mod[i];
}
else if(mod[i]<q_adic)
{
num[sgn+digit-i]='a'+(mod[i]-10);
}
}
}
int sum_digit(int num)
{
int answer=0;
num=abs(num);
while(num>0)
{
answer=answer+num%10;
num=num/10;
}
return answer;
}
int count_mod(int min, int max, int num)
{
if(min>0)
{
return max/num-(min-1)/num;
}
else if(min==0)
{
return max/num+1;
}
else
{
return -1;
}
}
void shift_char(char array[], int min, int max, int num)
{
int i;
for(i=max; i>=min; i=i-1)
{
array[i+num]=array[i];
}
rep(i, min, min+num-1)
{
array[i]='\0';
}
}
void convert_char(char array[], int min, int max, char pre, char post)
{
int i=min;
rep(i, min, max)
{
if(array[i]==pre)
{
array[i]=post;
}
}
}
void sort_asc_int(int array[], int min, int max)
{
int i, j;
rep(i, min, max)
{
rep(j, i+1, max)
{
if(array[i]>array[j])
{
swap_int(&array[i], &array[j]);
}
}
}
}
void sort_des_int(int array[], int min, int max)
{
int i, j;
rep(i, min, max)
{
rep(j, i+1, max)
{
if(array[i]<array[j])
{
swap_int(&array[i], &array[j]);
}
}
}
}
void sort_asc_char_dic(char array[], int min, int max)
{
int i, j;
rep(i, min, max)
{
rep(j, i+1, max)
{
if(strcmp(&array[i], &array[j])>0)
{
swap_char(&array[i], &array[j]);
}
}
}
}
void sort_asc_char_array_dic(int size, char array[][size], int min, int max)
{
int i, j;
rep(i, min, max)
{
rep(j, i+1, max)
{
if(strcmp(array[i], array[j])>0)
{
swap_char_array(array[i], array[j], 0, size-1);
}
}
}
}
void sort_des_char_dic(char array[], int min, int max)
{
int i, j;
rep(i, min, max)
{
rep(j, i+1, max)
{
if(strcmp(&array[i], &array[j])<0)
{
swap_char(&array[i], &array[j]);
}
}
}
}
void sort_des_char_array_dic(int size, char array[][size], int min, int max)
{
int i, j;
rep(i, min, max)
{
rep(j, i+1, max)
{
if(strcmp(array[i], array[j])<0)
{
swap_char_array(array[i], array[j], 0, size-1);
}
}
}
}
int max_int_array(int array[], int min, int max)
{
int i;
int answer;
answer=array[min];
for(i=min+1; i<=max; i=i+1)
{
answer=max_int(answer, array[i]);
}
return answer;
}
void max_int_array_num(int array[], int min, int max, int answer[])
{
int i=min;
int count=0;
int max_value=max_int_array(array, min, max);
fill_int(answer, 0, max-min, -1);
rep(i, min, max)
{
if(array[i]==max_value)
{
answer[count]=i;
count=count+1;
}
}
}
int min_int_array(int array[], int min, int max)
{
int i;
int answer;
answer=array[min];
for(i=min+1; i<=max; i=i+1)
{
answer=min_int(answer, array[i]);
}
return answer;
}
void min_int_array_num(int array[], int min, int max, int answer[])
{
int i=min;
int count=0;
int min_value=min_int_array(array, min, max);
fill_int(answer, 0, max-min, -1);
rep(i, min, max)
{
if(array[i]==min_value)
{
answer[count]=i;
count=count+1;
}
}
}
int max_char_array_dic(int size, char array[][size], int min, int max)
{
int i;
int answer=min;
rep(i, min+1, max)
{
if(strcmp(array[answer], array[i])<0)
{
answer=i;
}
}
return answer;
}
int min_char_array_dic(int size, char array[][size], int min, int max)
{
int i;
int answer=min;
rep(i, min+1, max)
{
if(strcmp(array[answer], array[i])>0)
{
answer=i;
}
}
return answer;
}
int sum_array(int array[], int min, int max)
{
int i=min;
int answer=0;
rep(i, min, max)
{
answer=answer+array[i];
}
return answer;
}
bool detect_int(int array[], int min, int max, int element)
{
int i;
bool answer=0;
if_exists(i, min, max, array[i]==element)
{
answer=1;
}
return answer;
}
bool detect_char(char array[], int min, int max, char element)
{
int i;
bool answer=0;
if_exists(i, min, max, array[i]==element)
{
answer=1;
}
return answer;
}
bool detect_char_array(char array[], int min, int max, char element[], int start, int goal)
{
int i, j;
bool answer=0;
if(goal-start<=max-min)
{
rep(i, min, max-(goal-start))
{
if_forall(j, start, goal, array[i+j-start]==element[j])
{
answer=1;
break;
}
}
}
return answer;
}
int count_differentelement_int(int array[], int min, int max)
{
int i=min;
int pickup[max];
fill_int(pickup, 0, max, 0);
int answer=0;
rep(i, min, max)
{
if(detect_int(pickup, 0, answer-1, array[i])==0)
{
pickup[answer]=array[i];
answer=answer+1;
}
}
return answer;
}
int count_differentelement_char(char array[], int min, int max)
{
int i=min;
char pickup[max];
fill_char(pickup, 0, max, '\0');
int answer=0;
rep(i, min, max)
{
if(detect_char_array(pickup, 0, answer-1, array, i, i)==0)
{
pickup[answer]=array[i];
answer=answer+1;
}
}
return answer;
}
int count_equalelement_int(int array[], int min, int max, int element)
{
int i;
int answer=0;
rep(i, min, max)
{
if(array[i]==element)
{
answer=answer+1;
}
}
return answer;
}
int count_equalelement_char(char array[], int min, int max, char element)
{
int i;
int answer=0;
rep(i, min, max)
{
if(array[i]==element)
{
answer=answer+1;
}
}
return answer;
}
int count_equalelement_char_array(int size, char array[][size], int min, int max, char element[])
{
int i;
int answer=0;
rep(i, min, max)
{
if(strcmp(array[i], element)==0)
{
answer=answer+1;
}
}
return answer;
}
void scanf_int_array(int array[], int min, int max)
{
int i;
rep(i, min, max)
{
scanf("%d", &array[i]);
}
}
void scanf_int_array_2(int array1[], int array2[], int min, int max)
{
int i;
rep(i, min, max)
{
scanf("%d %d", &array1[i], &array2[i]);
}
}
void scanf_int_array_3(int array1[], int array2[], int array3[], int min, int max)
{
int i;
rep(i, min, max)
{
scanf("%d %d %d", &array1[i], &array2[i], &array3[i]);
}
}
void scanf_char_array(char array[], int num)
{
scanf("%s", array);
shift_char(array, 0, strlen(array)-1, num);
}
void printf_int_array(int array[], int min, int max)
{
int i;
rep(i, min, max)
{
printf("%d\n", array[i]);
}
}
void printf_char_array(char array[], int min, int max)
{
int i;
for(i=min; i<=max; i=i+1)
{
printf("%c", array[i]);
}
}
int main()
{
int i, j;
int H, W;
scanf("%d %d", &H, &W);
char a[H+1][W+2];
rep(i, 1, H)
{
scanf_char_array(a[i], 1);
}
int hol[H], ver[W];
int count_hol=0, count_ver=0;
rep(i, 1, H)
{
if_forall(j, 1, W, a[i][j]=='.')
{
hol[count_hol]=i;
count_hol=count_hol+1;
}
}
rep(j, 1, W)
{
if_forall(i, 1, H, a[i][j]=='.')
{
ver[count_ver]=j;
count_ver=count_ver+1;
}
}
rep(i, 1, H)
{
if(detect_int(hol, 0, count_hol-1, i)==1)
{
continue;
}
else
{
rep(j, 1, W)
{
if(detect_int(ver, 0, count_ver-1, j)==1)
{
continue;
}
else
{
printf("%c", a[i][j]);
}
}
}
printf("\n");
}
printf("\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133253/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133253/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [9 x i8] c"%d %d %d\00", align 1
@.str.3 = private unnamed_addr constant [3 x i8] c"%s\00", align 1
@.str.4 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
; Function Attrs: nofree norecurse nosync nounwind memory(argmem: write) uwtable
define dso_local void @fill_int(ptr nocapture noundef writeonly %array, i32 noundef %min, i32 noundef %max, i32 noundef %element) local_unnamed_addr #0 {
entry:
%cmp.not4 = icmp sgt i32 %min, %max
br i1 %cmp.not4, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %min to i64
%1 = add i32 %max, 1
%2 = sub i32 %max, %min
%3 = zext i32 %2 to i64
%4 = add nuw nsw i64 %3, 1
%min.iters.check = icmp ult i32 %2, 7
br i1 %min.iters.check, label %for.body.preheader7, label %vector.ph
vector.ph: ; preds = %for.body.preheader
%n.vec = and i64 %4, 8589934584
%ind.end = add nsw i64 %n.vec, %0
%broadcast.splatinsert = insertelement <4 x i32> poison, i32 %element, i64 0
%broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
%invariant.gep = getelementptr i32, ptr %array, i64 %0
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%gep = getelementptr i32, ptr %invariant.gep, i64 %index
store <4 x i32> %broadcast.splat, ptr %gep, align 4, !tbaa !5
%5 = getelementptr inbounds i32, ptr %gep, i64 4
store <4 x i32> %broadcast.splat, ptr %5, align 4, !tbaa !5
%index.next = add nuw i64 %index, 8
%6 = icmp eq i64 %index.next, %n.vec
br i1 %6, label %middle.block, label %vector.body, !llvm.loop !9
middle.block: ; preds = %vector.body
%cmp.n = icmp eq i64 %4, %n.vec
br i1 %cmp.n, label %for.end, label %for.body.preheader7
for.body.preheader7: ; preds = %for.body.preheader, %middle.block
%indvars.iv.ph = phi i64 [ %0, %for.body.preheader ], [ %ind.end, %middle.block ]
br label %for.body
for.body: ; preds = %for.body.preheader7, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader7 ]
%arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv
store i32 %element, ptr %arrayidx, align 4, !tbaa !5
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%lftr.wideiv = trunc i64 %indvars.iv.next to i32
%exitcond.not = icmp eq i32 %1, %lftr.wideiv
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !13
for.end: ; preds = %for.body, %middle.block, %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 nosync nounwind willreturn memory(argmem: write) uwtable
define dso_local void @fill_char(ptr nocapture noundef writeonly %array, i32 noundef %min, i32 noundef %max, i8 noundef signext %element) local_unnamed_addr #2 {
entry:
%cmp.not4 = icmp sgt i32 %min, %max
br i1 %cmp.not4, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %min to i64
%scevgep = getelementptr i8, ptr %array, i64 %0
%1 = sub i32 %max, %min
%2 = zext i32 %1 to i64
%3 = add nuw nsw i64 %2, 1
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %scevgep, i8 %element, i64 %3, i1 false), !tbaa !14
br label %for.end
for.end: ; preds = %for.body.preheader, %entry
ret void
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @swap_int(ptr nocapture noundef %x, ptr nocapture noundef %y) local_unnamed_addr #3 {
entry:
%0 = load i32, ptr %x, align 4, !tbaa !5
%1 = load i32, ptr %y, align 4, !tbaa !5
store i32 %1, ptr %x, align 4, !tbaa !5
store i32 %0, ptr %y, align 4, !tbaa !5
ret void
}
; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable
define dso_local void @swap_int_array(ptr nocapture noundef %x, ptr nocapture noundef %y, i32 noundef %min, i32 noundef %max) local_unnamed_addr #4 {
entry:
%cmp.not6 = icmp sgt i32 %min, %max
br i1 %cmp.not6, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %min to i64
%1 = add i32 %max, 1
%2 = sub i32 %max, %min
%3 = zext i32 %2 to i64
%4 = add nuw nsw i64 %3, 1
%min.iters.check = icmp ult i32 %2, 15
br i1 %min.iters.check, label %for.body.preheader15, label %vector.memcheck
vector.memcheck: ; preds = %for.body.preheader
%5 = shl nsw i64 %0, 2
%scevgep = getelementptr i8, ptr %x, i64 %5
%6 = sub i32 %max, %min
%7 = zext i32 %6 to i64
%8 = add nsw i64 %0, %7
%9 = shl nsw i64 %8, 2
%10 = add nsw i64 %9, 4
%scevgep9 = getelementptr i8, ptr %x, i64 %10
%scevgep10 = getelementptr i8, ptr %y, i64 %5
%scevgep11 = getelementptr i8, ptr %y, i64 %10
%bound0 = icmp ult ptr %scevgep, %scevgep11
%bound1 = icmp ult ptr %scevgep10, %scevgep9
%found.conflict = and i1 %bound0, %bound1
br i1 %found.conflict, label %for.body.preheader15, label %vector.ph
vector.ph: ; preds = %vector.memcheck
%n.vec = and i64 %4, 8589934584
%ind.end = add nsw i64 %n.vec, %0
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%offset.idx = add i64 %index, %0
%11 = getelementptr inbounds i32, ptr %x, i64 %offset.idx
%12 = getelementptr inbounds i32, ptr %y, i64 %offset.idx
%wide.load = load <4 x i32>, ptr %11, align 4, !tbaa !5, !alias.scope !15, !noalias !18
%13 = getelementptr inbounds i32, ptr %11, i64 4
%wide.load12 = load <4 x i32>, ptr %13, align 4, !tbaa !5, !alias.scope !15, !noalias !18
%wide.load13 = load <4 x i32>, ptr %12, align 4, !tbaa !5, !alias.scope !18
%14 = getelementptr inbounds i32, ptr %12, i64 4
%wide.load14 = load <4 x i32>, ptr %14, align 4, !tbaa !5, !alias.scope !18
store <4 x i32> %wide.load13, ptr %11, align 4, !tbaa !5, !alias.scope !15, !noalias !18
store <4 x i32> %wide.load14, ptr %13, align 4, !tbaa !5, !alias.scope !15, !noalias !18
store <4 x i32> %wide.load, ptr %12, align 4, !tbaa !5, !alias.scope !18
store <4 x i32> %wide.load12, ptr %14, align 4, !tbaa !5, !alias.scope !18
%index.next = add nuw i64 %index, 8
%15 = icmp eq i64 %index.next, %n.vec
br i1 %15, label %middle.block, label %vector.body, !llvm.loop !20
middle.block: ; preds = %vector.body
%cmp.n = icmp eq i64 %4, %n.vec
br i1 %cmp.n, label %for.end, label %for.body.preheader15
for.body.preheader15: ; preds = %vector.memcheck, %for.body.preheader, %middle.block
%indvars.iv.ph = phi i64 [ %0, %vector.memcheck ], [ %0, %for.body.preheader ], [ %ind.end, %middle.block ]
%16 = add i32 %max, 1
%17 = trunc i64 %indvars.iv.ph to i32
%18 = sub i32 %16, %17
%xtraiter = and i32 %18, 1
%lcmp.mod.not = icmp eq i32 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.body.prol.loopexit, label %for.body.prol
for.body.prol: ; preds = %for.body.preheader15
%arrayidx.prol = getelementptr inbounds i32, ptr %x, i64 %indvars.iv.ph
%arrayidx2.prol = getelementptr inbounds i32, ptr %y, i64 %indvars.iv.ph
%19 = load i32, ptr %arrayidx.prol, align 4, !tbaa !5
%20 = load i32, ptr %arrayidx2.prol, align 4, !tbaa !5
store i32 %20, ptr %arrayidx.prol, align 4, !tbaa !5
store i32 %19, ptr %arrayidx2.prol, align 4, !tbaa !5
%indvars.iv.next.prol = add nsw i64 %indvars.iv.ph, 1
br label %for.body.prol.loopexit
for.body.prol.loopexit: ; preds = %for.body.prol, %for.body.preheader15
%indvars.iv.unr = phi i64 [ %indvars.iv.ph, %for.body.preheader15 ], [ %indvars.iv.next.prol, %for.body.prol ]
%21 = icmp eq i32 %17, %max
br i1 %21, label %for.end, label %for.body
for.body: ; preds = %for.body.prol.loopexit, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next.1, %for.body ], [ %indvars.iv.unr, %for.body.prol.loopexit ]
%arrayidx = getelementptr inbounds i32, ptr %x, i64 %indvars.iv
%arrayidx2 = getelementptr inbounds i32, ptr %y, i64 %indvars.iv
%22 = load i32, ptr %arrayidx, align 4, !tbaa !5
%23 = load i32, ptr %arrayidx2, align 4, !tbaa !5
store i32 %23, ptr %arrayidx, align 4, !tbaa !5
store i32 %22, ptr %arrayidx2, align 4, !tbaa !5
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%arrayidx.1 = getelementptr inbounds i32, ptr %x, i64 %indvars.iv.next
%arrayidx2.1 = getelementptr inbounds i32, ptr %y, i64 %indvars.iv.next
%24 = load i32, ptr %arrayidx.1, align 4, !tbaa !5
%25 = load i32, ptr %arrayidx2.1, align 4, !tbaa !5
store i32 %25, ptr %arrayidx.1, align 4, !tbaa !5
store i32 %24, ptr %arrayidx2.1, align 4, !tbaa !5
%indvars.iv.next.1 = add nsw i64 %indvars.iv, 2
%lftr.wideiv.1 = trunc i64 %indvars.iv.next.1 to i32
%exitcond.not.1 = icmp eq i32 %1, %lftr.wideiv.1
br i1 %exitcond.not.1, label %for.end, label %for.body, !llvm.loop !21
for.end: ; preds = %for.body.prol.loopexit, %for.body, %middle.block, %entry
ret void
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @swap_char(ptr nocapture noundef %x, ptr nocapture noundef %y) local_unnamed_addr #3 {
entry:
%0 = load i8, ptr %x, align 1, !tbaa !14
%1 = load i8, ptr %y, align 1, !tbaa !14
store i8 %1, ptr %x, align 1, !tbaa !14
store i8 %0, ptr %y, align 1, !tbaa !14
ret void
}
; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable
define dso_local void @swap_char_array(ptr nocapture noundef %x, ptr nocapture noundef %y, i32 noundef %min, i32 noundef %max) local_unnamed_addr #4 {
entry:
%cmp.not6 = icmp sgt i32 %min, %max
br i1 %cmp.not6, label %for.end, label %iter.check
iter.check: ; preds = %entry
%0 = sext i32 %min to i64
%1 = add i32 %max, 1
%2 = sub i32 %max, %min
%3 = zext i32 %2 to i64
%4 = add nuw nsw i64 %3, 1
%min.iters.check = icmp ult i32 %2, 7
br i1 %min.iters.check, label %for.body.preheader, label %vector.memcheck
vector.memcheck: ; preds = %iter.check
%scevgep = getelementptr i8, ptr %x, i64 %0
%5 = sub i32 %max, %min
%6 = zext i32 %5 to i64
%7 = add nsw i64 %0, %6
%8 = add nsw i64 %7, 1
%scevgep9 = getelementptr i8, ptr %x, i64 %8
%scevgep10 = getelementptr i8, ptr %y, i64 %0
%scevgep11 = getelementptr i8, ptr %y, i64 %8
%bound0 = icmp ult ptr %scevgep, %scevgep11
%bound1 = icmp ult ptr %scevgep10, %scevgep9
%found.conflict = and i1 %bound0, %bound1
br i1 %found.conflict, label %for.body.preheader, label %vector.main.loop.iter.check
vector.main.loop.iter.check: ; preds = %vector.memcheck
%min.iters.check12 = icmp ult i32 %2, 31
br i1 %min.iters.check12, label %vec.epilog.ph, label %vector.ph
vector.ph: ; preds = %vector.main.loop.iter.check
%n.vec = and i64 %4, 8589934560
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%offset.idx = add i64 %index, %0
%9 = getelementptr inbounds i8, ptr %x, i64 %offset.idx
%10 = getelementptr inbounds i8, ptr %y, i64 %offset.idx
%wide.load = load <16 x i8>, ptr %9, align 1, !tbaa !14, !alias.scope !22, !noalias !25
%11 = getelementptr inbounds i8, ptr %9, i64 16
%wide.load13 = load <16 x i8>, ptr %11, align 1, !tbaa !14, !alias.scope !22, !noalias !25
%wide.load14 = load <16 x i8>, ptr %10, align 1, !tbaa !14, !alias.scope !25
%12 = getelementptr inbounds i8, ptr %10, i64 16
%wide.load15 = load <16 x i8>, ptr %12, align 1, !tbaa !14, !alias.scope !25
store <16 x i8> %wide.load14, ptr %9, align 1, !tbaa !14, !alias.scope !22, !noalias !25
store <16 x i8> %wide.load15, ptr %11, align 1, !tbaa !14, !alias.scope !22, !noalias !25
store <16 x i8> %wide.load, ptr %10, align 1, !tbaa !14, !alias.scope !25
store <16 x i8> %wide.load13, ptr %12, align 1, !tbaa !14, !alias.scope !25
%index.next = add nuw i64 %index, 32
%13 = icmp eq i64 %index.next, %n.vec
br i1 %13, label %middle.block, label %vector.body, !llvm.loop !27
middle.block: ; preds = %vector.body
%cmp.n = icmp eq i64 %4, %n.vec
br i1 %cmp.n, label %for.end, label %vec.epilog.iter.check
vec.epilog.iter.check: ; preds = %middle.block
%ind.end18 = add nsw i64 %n.vec, %0
%n.vec.remaining = and i64 %4, 24
%min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
br i1 %min.epilog.iters.check, label %for.body.preheader, label %vec.epilog.ph
vec.epilog.ph: ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
%vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
%n.vec17 = and i64 %4, 8589934584
%ind.end = add nsw i64 %n.vec17, %0
br label %vec.epilog.vector.body
vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph
%index20 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next24, %vec.epilog.vector.body ]
%offset.idx21 = add i64 %index20, %0
%14 = getelementptr inbounds i8, ptr %x, i64 %offset.idx21
%15 = getelementptr inbounds i8, ptr %y, i64 %offset.idx21
%wide.load22 = load <8 x i8>, ptr %14, align 1, !tbaa !14, !alias.scope !28, !noalias !31
%wide.load23 = load <8 x i8>, ptr %15, align 1, !tbaa !14, !alias.scope !31
store <8 x i8> %wide.load23, ptr %14, align 1, !tbaa !14, !alias.scope !28, !noalias !31
store <8 x i8> %wide.load22, ptr %15, align 1, !tbaa !14, !alias.scope !31
%index.next24 = add nuw i64 %index20, 8
%16 = icmp eq i64 %index.next24, %n.vec17
br i1 %16, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !33
vec.epilog.middle.block: ; preds = %vec.epilog.vector.body
%cmp.n19 = icmp eq i64 %4, %n.vec17
br i1 %cmp.n19, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %vector.memcheck, %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block
%indvars.iv.ph = phi i64 [ %0, %iter.check ], [ %0, %vector.memcheck ], [ %ind.end18, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ]
%17 = add i32 %max, 1
%18 = trunc i64 %indvars.iv.ph to i32
%19 = sub i32 %17, %18
%xtraiter = and i32 %19, 1
%lcmp.mod.not = icmp eq i32 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.body.prol.loopexit, label %for.body.prol
for.body.prol: ; preds = %for.body.preheader
%arrayidx.prol = getelementptr inbounds i8, ptr %x, i64 %indvars.iv.ph
%arrayidx2.prol = getelementptr inbounds i8, ptr %y, i64 %indvars.iv.ph
%20 = load i8, ptr %arrayidx.prol, align 1, !tbaa !14
%21 = load i8, ptr %arrayidx2.prol, align 1, !tbaa !14
store i8 %21, ptr %arrayidx.prol, align 1, !tbaa !14
store i8 %20, ptr %arrayidx2.prol, align 1, !tbaa !14
%indvars.iv.next.prol = add nsw i64 %indvars.iv.ph, 1
br label %for.body.prol.loopexit
for.body.prol.loopexit: ; preds = %for.body.prol, %for.body.preheader
%indvars.iv.unr = phi i64 [ %indvars.iv.ph, %for.body.preheader ], [ %indvars.iv.next.prol, %for.body.prol ]
%22 = icmp eq i32 %18, %max
br i1 %22, label %for.end, label %for.body
for.body: ; preds = %for.body.prol.loopexit, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next.1, %for.body ], [ %indvars.iv.unr, %for.body.prol.loopexit ]
%arrayidx = getelementptr inbounds i8, ptr %x, i64 %indvars.iv
%arrayidx2 = getelementptr inbounds i8, ptr %y, i64 %indvars.iv
%23 = load i8, ptr %arrayidx, align 1, !tbaa !14
%24 = load i8, ptr %arrayidx2, align 1, !tbaa !14
store i8 %24, ptr %arrayidx, align 1, !tbaa !14
store i8 %23, ptr %arrayidx2, align 1, !tbaa !14
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%arrayidx.1 = getelementptr inbounds i8, ptr %x, i64 %indvars.iv.next
%arrayidx2.1 = getelementptr inbounds i8, ptr %y, i64 %indvars.iv.next
%25 = load i8, ptr %arrayidx.1, align 1, !tbaa !14
%26 = load i8, ptr %arrayidx2.1, align 1, !tbaa !14
store i8 %26, ptr %arrayidx.1, align 1, !tbaa !14
store i8 %25, ptr %arrayidx2.1, align 1, !tbaa !14
%indvars.iv.next.1 = add nsw i64 %indvars.iv, 2
%lftr.wideiv.1 = trunc i64 %indvars.iv.next.1 to i32
%exitcond.not.1 = icmp eq i32 %1, %lftr.wideiv.1
br i1 %exitcond.not.1, label %for.end, label %for.body, !llvm.loop !34
for.end: ; preds = %for.body.prol.loopexit, %for.body, %middle.block, %vec.epilog.middle.block, %entry
ret void
}
; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable
define dso_local void @reverse_char(ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #4 {
entry:
%add = add nsw i32 %max, %min
%div = sdiv i32 %add, 2
%cmp.not12 = icmp slt i32 %div, %min
br i1 %cmp.not12, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %min to i64
%1 = sext i32 %add to i64
%2 = add nsw i32 %div, 1
%3 = add nsw i32 %div, 1
%4 = sub i32 %3, %min
%xtraiter = and i32 %4, 1
%lcmp.mod.not = icmp eq i32 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.body.prol.loopexit, label %for.body.prol
for.body.prol: ; preds = %for.body.preheader
%arrayidx.prol = getelementptr inbounds i8, ptr %array, i64 %0
%5 = sub nsw i64 %1, %0
%arrayidx3.prol = getelementptr inbounds i8, ptr %array, i64 %5
%6 = load i8, ptr %arrayidx.prol, align 1, !tbaa !14
%7 = load i8, ptr %arrayidx3.prol, align 1, !tbaa !14
store i8 %7, ptr %arrayidx.prol, align 1, !tbaa !14
store i8 %6, ptr %arrayidx3.prol, align 1, !tbaa !14
%indvars.iv.next.prol = add nsw i64 %0, 1
br label %for.body.prol.loopexit
for.body.prol.loopexit: ; preds = %for.body.prol, %for.body.preheader
%indvars.iv.unr = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next.prol, %for.body.prol ]
%8 = icmp eq i32 %div, %min
br i1 %8, label %for.end, label %for.body
for.body: ; preds = %for.body.prol.loopexit, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next.1, %for.body ], [ %indvars.iv.unr, %for.body.prol.loopexit ]
%arrayidx = getelementptr inbounds i8, ptr %array, i64 %indvars.iv
%9 = sub nsw i64 %1, %indvars.iv
%arrayidx3 = getelementptr inbounds i8, ptr %array, i64 %9
%10 = load i8, ptr %arrayidx, align 1, !tbaa !14
%11 = load i8, ptr %arrayidx3, align 1, !tbaa !14
store i8 %11, ptr %arrayidx, align 1, !tbaa !14
store i8 %10, ptr %arrayidx3, align 1, !tbaa !14
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%arrayidx.1 = getelementptr inbounds i8, ptr %array, i64 %indvars.iv.next
%12 = sub nsw i64 %1, %indvars.iv.next
%arrayidx3.1 = getelementptr inbounds i8, ptr %array, i64 %12
%13 = load i8, ptr %arrayidx.1, align 1, !tbaa !14
%14 = load i8, ptr %arrayidx3.1, align 1, !tbaa !14
store i8 %14, ptr %arrayidx.1, align 1, !tbaa !14
store i8 %13, ptr %arrayidx3.1, align 1, !tbaa !14
%indvars.iv.next.1 = add nsw i64 %indvars.iv, 2
%lftr.wideiv.1 = trunc i64 %indvars.iv.next.1 to i32
%exitcond.not.1 = icmp eq i32 %2, %lftr.wideiv.1
br i1 %exitcond.not.1, label %for.end, label %for.body, !llvm.loop !35
for.end: ; preds = %for.body.prol.loopexit, %for.body, %entry
ret void
}
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
define dso_local i32 @max_int(i32 noundef %var1, i32 noundef %var2) local_unnamed_addr #5 {
entry:
%spec.select = tail call i32 @llvm.smax.i32(i32 %var1, i32 %var2)
ret i32 %spec.select
}
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
define dso_local i32 @min_int(i32 noundef %var1, i32 noundef %var2) local_unnamed_addr #5 {
entry:
%spec.select = tail call i32 @llvm.smin.i32(i32 %var1, i32 %var2)
ret i32 %spec.select
}
; Function Attrs: mustprogress nofree nounwind willreturn memory(write) uwtable
define dso_local i64 @pow_int(i32 noundef %base, i32 noundef %exponent) local_unnamed_addr #6 {
entry:
%conv = sitofp i32 %base to double
%conv1 = uitofp i32 %exponent to double
%call = tail call double @pow(double noundef %conv, double noundef %conv1) #25
%conv2 = fptosi double %call to i64
ret i64 %conv2
}
; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @pow(double noundef, double noundef) local_unnamed_addr #7
; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable
define dso_local i64 @pow_int_mod(i32 noundef %base, i32 noundef %exponent, i32 noundef %mod) local_unnamed_addr #8 {
entry:
%cmp.not17 = icmp eq i32 %exponent, 0
br i1 %cmp.not17, label %while.end, label %while.body.lr.ph
while.body.lr.ph: ; preds = %entry
%conv1 = sext i32 %mod to i64
br label %while.body
while.body: ; preds = %while.body.lr.ph, %if.end6
%answer.020 = phi i64 [ 1, %while.body.lr.ph ], [ %answer.1, %if.end6 ]
%base.addr.019 = phi i32 [ %base, %while.body.lr.ph ], [ %rem8, %if.end6 ]
%exponent.addr.018 = phi i32 [ %exponent, %while.body.lr.ph ], [ %shr, %if.end6 ]
%and = and i32 %exponent.addr.018, 1
%tobool.not = icmp eq i32 %and, 0
br i1 %tobool.not, label %if.end6, label %if.then
if.then: ; preds = %while.body
%rem = srem i32 %base.addr.019, %mod
%conv = sext i32 %rem to i64
%mul = mul nsw i64 %answer.020, %conv
%rem2 = srem i64 %mul, %conv1
%cmp3 = icmp eq i64 %rem2, 0
br i1 %cmp3, label %while.end, label %if.end6
if.end6: ; preds = %if.then, %while.body
%answer.1 = phi i64 [ %rem2, %if.then ], [ %answer.020, %while.body ]
%mul7 = mul nsw i32 %base.addr.019, %base.addr.019
%rem8 = srem i32 %mul7, %mod
%shr = lshr i32 %exponent.addr.018, 1
%cmp.not = icmp ult i32 %exponent.addr.018, 2
br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !36
while.end: ; preds = %if.end6, %if.then, %entry
%answer.2 = phi i64 [ 1, %entry ], [ 0, %if.then ], [ %answer.1, %if.end6 ]
ret i64 %answer.2
}
; Function Attrs: nofree nosync nounwind memory(none) uwtable
define dso_local i64 @factorial(i32 noundef %num) local_unnamed_addr #9 {
entry:
%cmp.not4 = icmp ult i32 %num, 2
br i1 %cmp.not4, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = add i32 %num, 1
%umax = tail call i32 @llvm.umax.i32(i32 %0, i32 3)
%wide.trip.count = zext i32 %umax to i64
%1 = add nsw i64 %wide.trip.count, -2
%2 = add nsw i64 %wide.trip.count, -3
%xtraiter = and i64 %1, 7
%3 = icmp ult i64 %2, 7
br i1 %3, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new
for.body.preheader.new: ; preds = %for.body.preheader
%unroll_iter = and i64 %1, -8
br label %for.body
for.body: ; preds = %for.body, %for.body.preheader.new
%indvars.iv = phi i64 [ 2, %for.body.preheader.new ], [ %indvars.iv.next.7, %for.body ]
%answer.06 = phi i64 [ 1, %for.body.preheader.new ], [ %mul.7, %for.body ]
%niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.7, %for.body ]
%mul = mul i64 %answer.06, %indvars.iv
%indvars.iv.next = or i64 %indvars.iv, 1
%mul.1 = mul i64 %mul, %indvars.iv.next
%indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
%mul.2 = mul i64 %mul.1, %indvars.iv.next.1
%indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
%mul.3 = mul i64 %mul.2, %indvars.iv.next.2
%indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
%mul.4 = mul i64 %mul.3, %indvars.iv.next.3
%indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 5
%mul.5 = mul i64 %mul.4, %indvars.iv.next.4
%indvars.iv.next.5 = add nuw nsw i64 %indvars.iv, 6
%mul.6 = mul i64 %mul.5, %indvars.iv.next.5
%indvars.iv.next.6 = add nuw nsw i64 %indvars.iv, 7
%mul.7 = mul i64 %mul.6, %indvars.iv.next.6
%indvars.iv.next.7 = add nuw nsw i64 %indvars.iv, 8
%niter.next.7 = add i64 %niter, 8
%niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
br i1 %niter.ncmp.7, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !37
for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader
%mul.lcssa.ph = phi i64 [ undef, %for.body.preheader ], [ %mul.7, %for.body ]
%indvars.iv.unr = phi i64 [ 2, %for.body.preheader ], [ %indvars.iv.next.7, %for.body ]
%answer.06.unr = phi i64 [ 1, %for.body.preheader ], [ %mul.7, %for.body ]
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.end, label %for.body.epil
for.body.epil: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil
%indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %for.body.epil ], [ %indvars.iv.unr, %for.end.loopexit.unr-lcssa ]
%answer.06.epil = phi i64 [ %mul.epil, %for.body.epil ], [ %answer.06.unr, %for.end.loopexit.unr-lcssa ]
%epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.end.loopexit.unr-lcssa ]
%mul.epil = mul i64 %answer.06.epil, %indvars.iv.epil
%indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
%epil.iter.next = add i64 %epil.iter, 1
%epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
br i1 %epil.iter.cmp.not, label %for.end, label %for.body.epil, !llvm.loop !38
for.end: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil, %entry
%answer.0.lcssa = phi i64 [ 1, %entry ], [ %mul.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ]
ret i64 %answer.0.lcssa
}
; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable
define dso_local i64 @factorial_mod(i32 noundef %num, i32 noundef %mod) local_unnamed_addr #8 {
entry:
%cmp.not10 = icmp ult i32 %num, 2
br i1 %cmp.not10, label %for.end, label %for.body.lr.ph
for.body.lr.ph: ; preds = %entry
%conv1 = sext i32 %mod to i64
br label %for.body
for.cond: ; preds = %for.body
%add = add i32 %i.011, 1
%cmp.not = icmp ugt i32 %add, %num
br i1 %cmp.not, label %for.end, label %for.body, !llvm.loop !40
for.body: ; preds = %for.body.lr.ph, %for.cond
%answer.012 = phi i64 [ 1, %for.body.lr.ph ], [ %rem2, %for.cond ]
%i.011 = phi i32 [ 2, %for.body.lr.ph ], [ %add, %for.cond ]
%rem = urem i32 %i.011, %mod
%conv = zext i32 %rem to i64
%mul = mul i64 %answer.012, %conv
%rem2 = urem i64 %mul, %conv1
%cmp3 = icmp eq i64 %rem2, 0
br i1 %cmp3, label %for.end, label %for.cond
for.end: ; preds = %for.cond, %for.body, %entry
%answer.1 = phi i64 [ 1, %entry ], [ 0, %for.body ], [ %rem2, %for.cond ]
ret i64 %answer.1
}
; Function Attrs: nofree nosync nounwind memory(none) uwtable
define dso_local i64 @combination(i32 noundef %n, i32 noundef %k) local_unnamed_addr #9 {
entry:
%sub = sub i32 %n, %k
%spec.select.i = tail call i32 @llvm.smin.i32(i32 %k, i32 %sub)
%cmp.not13 = icmp ult i32 %spec.select.i, 2
br i1 %cmp.not13, label %for.end, label %for.body.lr.ph
for.body.lr.ph: ; preds = %entry
%add = add i32 %n, 1
%0 = add i32 %spec.select.i, 1
%umax = tail call i32 @llvm.umax.i32(i32 %0, i32 3)
%wide.trip.count = zext i32 %umax to i64
%1 = add nsw i64 %wide.trip.count, -2
%2 = add nsw i64 %wide.trip.count, -3
%xtraiter = and i64 %1, 3
%3 = icmp ult i64 %2, 3
br i1 %3, label %for.end.loopexit.unr-lcssa, label %for.body.lr.ph.new
for.body.lr.ph.new: ; preds = %for.body.lr.ph
%unroll_iter = and i64 %1, -4
br label %for.body
for.body: ; preds = %for.body, %for.body.lr.ph.new
%indvars.iv = phi i64 [ 2, %for.body.lr.ph.new ], [ %indvars.iv.next.3, %for.body ]
%denominator.016 = phi i64 [ 1, %for.body.lr.ph.new ], [ %mul3.3, %for.body ]
%numerator.015 = phi i64 [ 1, %for.body.lr.ph.new ], [ %mul.3, %for.body ]
%niter = phi i64 [ 0, %for.body.lr.ph.new ], [ %niter.next.3, %for.body ]
%4 = trunc i64 %indvars.iv to i32
%sub1 = sub i32 %add, %4
%conv = zext i32 %sub1 to i64
%mul = mul i64 %numerator.015, %conv
%mul3 = mul i64 %denominator.016, %indvars.iv
%indvars.iv.next = or i64 %indvars.iv, 1
%5 = trunc i64 %indvars.iv.next to i32
%sub1.1 = sub i32 %add, %5
%conv.1 = zext i32 %sub1.1 to i64
%mul.1 = mul i64 %mul, %conv.1
%mul3.1 = mul i64 %mul3, %indvars.iv.next
%indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
%6 = trunc i64 %indvars.iv.next.1 to i32
%sub1.2 = sub i32 %add, %6
%conv.2 = zext i32 %sub1.2 to i64
%mul.2 = mul i64 %mul.1, %conv.2
%mul3.2 = mul i64 %mul3.1, %indvars.iv.next.1
%indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
%7 = trunc i64 %indvars.iv.next.2 to i32
%sub1.3 = sub i32 %add, %7
%conv.3 = zext i32 %sub1.3 to i64
%mul.3 = mul i64 %mul.2, %conv.3
%mul3.3 = mul i64 %mul3.2, %indvars.iv.next.2
%indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
%niter.next.3 = add i64 %niter, 4
%niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
br i1 %niter.ncmp.3, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !41
for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph
%mul.lcssa.ph = phi i64 [ undef, %for.body.lr.ph ], [ %mul.3, %for.body ]
%mul3.lcssa.ph = phi i64 [ undef, %for.body.lr.ph ], [ %mul3.3, %for.body ]
%indvars.iv.unr = phi i64 [ 2, %for.body.lr.ph ], [ %indvars.iv.next.3, %for.body ]
%denominator.016.unr = phi i64 [ 1, %for.body.lr.ph ], [ %mul3.3, %for.body ]
%numerator.015.unr = phi i64 [ 1, %for.body.lr.ph ], [ %mul.3, %for.body ]
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.end.loopexit, label %for.body.epil
for.body.epil: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil
%indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %for.body.epil ], [ %indvars.iv.unr, %for.end.loopexit.unr-lcssa ]
%denominator.016.epil = phi i64 [ %mul3.epil, %for.body.epil ], [ %denominator.016.unr, %for.end.loopexit.unr-lcssa ]
%numerator.015.epil = phi i64 [ %mul.epil, %for.body.epil ], [ %numerator.015.unr, %for.end.loopexit.unr-lcssa ]
%epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.end.loopexit.unr-lcssa ]
%8 = trunc i64 %indvars.iv.epil to i32
%sub1.epil = sub i32 %add, %8
%conv.epil = zext i32 %sub1.epil to i64
%mul.epil = mul i64 %numerator.015.epil, %conv.epil
%mul3.epil = mul i64 %denominator.016.epil, %indvars.iv.epil
%indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
%epil.iter.next = add i64 %epil.iter, 1
%epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
br i1 %epil.iter.cmp.not, label %for.end.loopexit, label %for.body.epil, !llvm.loop !42
for.end.loopexit: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa
%mul.lcssa = phi i64 [ %mul.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ]
%mul3.lcssa = phi i64 [ %mul3.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul3.epil, %for.body.epil ]
%9 = udiv i64 %mul.lcssa, %mul3.lcssa
br label %for.end
for.end: ; preds = %for.end.loopexit, %entry
%div = phi i64 [ 1, %entry ], [ %9, %for.end.loopexit ]
ret i64 %div
}
; Function Attrs: nofree nosync nounwind memory(none) uwtable
define dso_local double @combination_general(double noundef %alpha, i32 noundef %k) local_unnamed_addr #9 {
entry:
%cmp.not10 = icmp eq i32 %k, 0
br i1 %cmp.not10, label %for.end, label %for.body.lr.ph
for.body.lr.ph: ; preds = %entry
%add = fadd double %alpha, 1.000000e+00
%0 = add i32 %k, 1
%umax = tail call i32 @llvm.umax.i32(i32 %0, i32 2)
%wide.trip.count = zext i32 %umax to i64
%1 = add nsw i64 %wide.trip.count, -1
%2 = add nsw i64 %wide.trip.count, -2
%xtraiter = and i64 %1, 3
%3 = icmp ult i64 %2, 3
br i1 %3, label %for.end.loopexit.unr-lcssa, label %for.body.lr.ph.new
for.body.lr.ph.new: ; preds = %for.body.lr.ph
%unroll_iter = and i64 %1, -4
br label %for.body
for.body: ; preds = %for.body, %for.body.lr.ph.new
%indvars.iv = phi i64 [ 1, %for.body.lr.ph.new ], [ %indvars.iv.next.3, %for.body ]
%denominator.013 = phi i64 [ 1, %for.body.lr.ph.new ], [ %mul2.3, %for.body ]
%numerator.012 = phi double [ 1.000000e+00, %for.body.lr.ph.new ], [ %mul.3, %for.body ]
%niter = phi i64 [ 0, %for.body.lr.ph.new ], [ %niter.next.3, %for.body ]
%4 = trunc i64 %indvars.iv to i32
%conv = uitofp i32 %4 to double
%sub = fsub double %add, %conv
%mul = fmul double %numerator.012, %sub
%mul2 = mul i64 %denominator.013, %indvars.iv
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%5 = trunc i64 %indvars.iv.next to i32
%conv.1 = uitofp i32 %5 to double
%sub.1 = fsub double %add, %conv.1
%mul.1 = fmul double %mul, %sub.1
%mul2.1 = mul i64 %mul2, %indvars.iv.next
%indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
%6 = trunc i64 %indvars.iv.next.1 to i32
%conv.2 = uitofp i32 %6 to double
%sub.2 = fsub double %add, %conv.2
%mul.2 = fmul double %mul.1, %sub.2
%mul2.2 = mul i64 %mul2.1, %indvars.iv.next.1
%indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
%7 = trunc i64 %indvars.iv.next.2 to i32
%conv.3 = uitofp i32 %7 to double
%sub.3 = fsub double %add, %conv.3
%mul.3 = fmul double %mul.2, %sub.3
%mul2.3 = mul i64 %mul2.2, %indvars.iv.next.2
%indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
%niter.next.3 = add i64 %niter, 4
%niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
br i1 %niter.ncmp.3, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !43
for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph
%mul.lcssa.ph = phi double [ undef, %for.body.lr.ph ], [ %mul.3, %for.body ]
%mul2.lcssa.ph = phi i64 [ undef, %for.body.lr.ph ], [ %mul2.3, %for.body ]
%indvars.iv.unr = phi i64 [ 1, %for.body.lr.ph ], [ %indvars.iv.next.3, %for.body ]
%denominator.013.unr = phi i64 [ 1, %for.body.lr.ph ], [ %mul2.3, %for.body ]
%numerator.012.unr = phi double [ 1.000000e+00, %for.body.lr.ph ], [ %mul.3, %for.body ]
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.end.loopexit, label %for.body.epil
for.body.epil: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil
%indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %for.body.epil ], [ %indvars.iv.unr, %for.end.loopexit.unr-lcssa ]
%denominator.013.epil = phi i64 [ %mul2.epil, %for.body.epil ], [ %denominator.013.unr, %for.end.loopexit.unr-lcssa ]
%numerator.012.epil = phi double [ %mul.epil, %for.body.epil ], [ %numerator.012.unr, %for.end.loopexit.unr-lcssa ]
%epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.end.loopexit.unr-lcssa ]
%8 = trunc i64 %indvars.iv.epil to i32
%conv.epil = uitofp i32 %8 to double
%sub.epil = fsub double %add, %conv.epil
%mul.epil = fmul double %numerator.012.epil, %sub.epil
%mul2.epil = mul i64 %denominator.013.epil, %indvars.iv.epil
%indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
%epil.iter.next = add i64 %epil.iter, 1
%epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
br i1 %epil.iter.cmp.not, label %for.end.loopexit, label %for.body.epil, !llvm.loop !44
for.end.loopexit: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa
%mul.lcssa = phi double [ %mul.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ]
%mul2.lcssa = phi i64 [ %mul2.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul2.epil, %for.body.epil ]
%9 = uitofp i64 %mul2.lcssa to double
%10 = fdiv double %mul.lcssa, %9
br label %for.end
for.end: ; preds = %for.end.loopexit, %entry
%div = phi double [ 1.000000e+00, %entry ], [ %10, %for.end.loopexit ]
ret double %div
}
; Function Attrs: nofree nosync nounwind memory(none) uwtable
define dso_local i32 @gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #9 {
entry:
%spec.select = tail call i32 @llvm.smax.i32(i32 %a, i32 %b)
%spec.select8 = tail call i32 @llvm.smin.i32(i32 %a, i32 %b)
%rem = srem i32 %spec.select, %spec.select8
%cmp1.not9 = icmp eq i32 %rem, 0
br i1 %cmp1.not9, label %while.end, label %while.body
while.body: ; preds = %entry, %while.body
%r.011 = phi i32 [ %rem2, %while.body ], [ %rem, %entry ]
%b.addr.110 = phi i32 [ %r.011, %while.body ], [ %spec.select8, %entry ]
%rem2 = srem i32 %b.addr.110, %r.011
%cmp1.not = icmp eq i32 %rem2, 0
br i1 %cmp1.not, label %while.end, label %while.body, !llvm.loop !45
while.end: ; preds = %while.body, %entry
%b.addr.1.lcssa = phi i32 [ %spec.select8, %entry ], [ %r.011, %while.body ]
ret i32 %b.addr.1.lcssa
}
; Function Attrs: nofree nosync nounwind memory(none) uwtable
define dso_local i32 @lcm(i32 noundef %a, i32 noundef %b) local_unnamed_addr #9 {
entry:
%spec.select.i = tail call i32 @llvm.smax.i32(i32 %a, i32 %b)
%spec.select8.i = tail call i32 @llvm.smin.i32(i32 %a, i32 %b)
%rem.i = srem i32 %spec.select.i, %spec.select8.i
%cmp1.not9.i = icmp eq i32 %rem.i, 0
br i1 %cmp1.not9.i, label %gcd.exit, label %while.body.i
while.body.i: ; preds = %entry, %while.body.i
%r.011.i = phi i32 [ %rem2.i, %while.body.i ], [ %rem.i, %entry ]
%b.addr.110.i = phi i32 [ %r.011.i, %while.body.i ], [ %spec.select8.i, %entry ]
%rem2.i = srem i32 %b.addr.110.i, %r.011.i
%cmp1.not.i = icmp eq i32 %rem2.i, 0
br i1 %cmp1.not.i, label %gcd.exit, label %while.body.i, !llvm.loop !45
gcd.exit: ; preds = %while.body.i, %entry
%b.addr.1.lcssa.i = phi i32 [ %spec.select8.i, %entry ], [ %r.011.i, %while.body.i ]
%div = sdiv i32 %a, %b.addr.1.lcssa.i
%mul = mul nsw i32 %div, %b
ret i32 %mul
}
; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable
define dso_local i32 @order(i64 noundef %num) local_unnamed_addr #8 {
entry:
%cmp.not3 = icmp eq i64 %num, 0
br i1 %cmp.not3, label %while.end, label %while.body
while.body: ; preds = %entry, %while.body
%answer.05 = phi i32 [ %add, %while.body ], [ -1, %entry ]
%num.addr.04 = phi i64 [ %div, %while.body ], [ %num, %entry ]
%div = sdiv i64 %num.addr.04, 10
%add = add nsw i32 %answer.05, 1
%num.addr.04.off = add i64 %num.addr.04, 9
%cmp.not = icmp ult i64 %num.addr.04.off, 19
br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !46
while.end: ; preds = %while.body, %entry
%answer.0.lcssa = phi i32 [ -1, %entry ], [ %add, %while.body ]
ret i32 %answer.0.lcssa
}
; Function Attrs: nofree nounwind uwtable
define dso_local i64 @convert_adic_int(ptr nocapture noundef readonly %num, i32 noundef %p_adic, i32 noundef %q_adic) local_unnamed_addr #10 {
entry:
%call = tail call i64 @strtol(ptr nocapture noundef %num, ptr noundef null, i32 noundef %p_adic) #25
%cmp122.not = icmp eq i64 %call, 0
br i1 %cmp122.not, label %while.end, label %while.body.lr.ph
while.body.lr.ph: ; preds = %entry
%spec.select = tail call i64 @llvm.abs.i64(i64 %call, i1 true)
%conv = zext i32 %q_adic to i64
br label %while.body
while.body: ; preds = %while.body.lr.ph, %while.body
%tmp.125 = phi i64 [ %spec.select, %while.body.lr.ph ], [ %div, %while.body ]
%answer.024 = phi i64 [ 0, %while.body.lr.ph ], [ %add, %while.body ]
%i.023 = phi i32 [ 0, %while.body.lr.ph ], [ %add4, %while.body ]
%rem = urem i64 %tmp.125, %conv
%conv1.i = uitofp i32 %i.023 to double
%call.i = tail call double @pow(double noundef 1.000000e+01, double noundef %conv1.i) #25
%conv2.i = fptosi double %call.i to i64
%mul = mul nsw i64 %rem, %conv2.i
%add = add nsw i64 %mul, %answer.024
%div = udiv i64 %tmp.125, %conv
%add4 = add nuw nsw i32 %i.023, 1
%cmp1.not = icmp ult i64 %tmp.125, %conv
br i1 %cmp1.not, label %while.end, label %while.body, !llvm.loop !47
while.end: ; preds = %while.body, %entry
%answer.0.lcssa = phi i64 [ 0, %entry ], [ %add, %while.body ]
%sub9 = sub nsw i64 0, %answer.0.lcssa
%cmp621 = icmp slt i64 %call, 0
%retval.0 = select i1 %cmp621, i64 %sub9, i64 %answer.0.lcssa
ret i64 %retval.0
}
; Function Attrs: mustprogress nofree nounwind willreturn
declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #11
; Function Attrs: nofree nounwind uwtable
define dso_local void @convert_adic_char(ptr nocapture noundef %num, i32 noundef %p_adic, i32 noundef %q_adic) local_unnamed_addr #10 {
entry:
%mod = alloca [32 x i32], align 16
call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %mod) #25
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) %mod, i8 0, i64 128, i1 false)
%call = tail call i64 @strtol(ptr nocapture noundef %num, ptr noundef null, i32 noundef %p_adic) #25
%cmp = icmp slt i64 %call, 0
%cmp174.not = icmp eq i64 %call, 0
br i1 %cmp174.not, label %while.end, label %while.body.lr.ph
while.body.lr.ph: ; preds = %entry
%spec.select = tail call i64 @llvm.abs.i64(i64 %call, i1 true)
%conv = zext i32 %q_adic to i64
br label %while.body
while.body: ; preds = %while.body.lr.ph, %while.body
%indvars.iv = phi i64 [ 0, %while.body.lr.ph ], [ %indvars.iv.next, %while.body ]
%tmp.176 = phi i64 [ %spec.select, %while.body.lr.ph ], [ %div, %while.body ]
%rem = urem i64 %tmp.176, %conv
%conv2 = trunc i64 %rem to i32
%arrayidx = getelementptr inbounds [32 x i32], ptr %mod, i64 0, i64 %indvars.iv
store i32 %conv2, ptr %arrayidx, align 4, !tbaa !5
%div = udiv i64 %tmp.176, %conv
%indvars.iv.next = add nuw i64 %indvars.iv, 1
%cmp1.not = icmp ult i64 %tmp.176, %conv
br i1 %cmp1.not, label %while.end.loopexit, label %while.body, !llvm.loop !48
while.end.loopexit: ; preds = %while.body
%0 = trunc i64 %indvars.iv to i32
br label %while.end
while.end: ; preds = %while.end.loopexit, %entry
%digit.0.lcssa = phi i32 [ 0, %entry ], [ %0, %while.end.loopexit ]
%call4 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %num) #26
%1 = trunc i64 %call4 to i32
%conv6 = add i32 %1, -1
%cmp.not4.i = icmp slt i32 %conv6, 0
br i1 %cmp.not4.i, label %fill_char.exit, label %for.body.preheader.i
for.body.preheader.i: ; preds = %while.end
%2 = zext i32 %conv6 to i64
%3 = add nuw nsw i64 %2, 1
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %num, i8 0, i64 %3, i1 false), !tbaa !14
br label %fill_char.exit
fill_char.exit: ; preds = %while.end, %for.body.preheader.i
%call.lobit = lshr i64 %call, 63
%conv7 = trunc i64 %call.lobit to i32
br i1 %cmp, label %if.then10, label %if.end12
if.then10: ; preds = %fill_char.exit
store i8 45, ptr %num, align 1, !tbaa !14
br label %if.end12
if.end12: ; preds = %if.then10, %fill_char.exit
%add42 = add nuw nsw i32 %digit.0.lcssa, %conv7
%4 = add i32 %digit.0.lcssa, 1
%wide.trip.count = zext i32 %4 to i64
%min.iters.check = icmp ult i32 %4, 16
br i1 %min.iters.check, label %for.body.preheader, label %vector.scevcheck
vector.scevcheck: ; preds = %if.end12
%5 = add nsw i64 %wide.trip.count, -1
%6 = add i32 %digit.0.lcssa, %conv7
%7 = trunc i64 %5 to i32
%8 = sub i32 %6, %7
%9 = icmp sgt i32 %8, %6
%10 = icmp ugt i64 %5, 4294967295
%11 = or i1 %9, %10
br i1 %11, label %for.body.preheader, label %vector.ph
vector.ph: ; preds = %vector.scevcheck
%n.vec = and i64 %wide.trip.count, 4294967292
%ind.end = sub nsw i64 0, %n.vec
%broadcast.splatinsert = insertelement <4 x i32> poison, i32 %q_adic, i64 0
%broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
br label %vector.body
vector.body: ; preds = %pred.store.continue95, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue95 ]
%12 = trunc i64 %index to i32
%13 = getelementptr inbounds [32 x i32], ptr %mod, i64 0, i64 %index
%wide.load = load <4 x i32>, ptr %13, align 16, !tbaa !5
%14 = icmp slt <4 x i32> %wide.load, <i32 10, i32 10, i32 10, i32 10>
%15 = icmp ult <4 x i32> %wide.load, %broadcast.splat
%16 = xor <4 x i1> %14, <i1 true, i1 true, i1 true, i1 true>
%17 = select <4 x i1> %16, <4 x i1> %15, <4 x i1> zeroinitializer
%predphi = select <4 x i1> %17, <4 x i8> <i8 87, i8 87, i8 87, i8 87>, <4 x i8> <i8 48, i8 48, i8 48, i8 48>
%18 = or <4 x i1> %17, %14
%19 = extractelement <4 x i1> %18, i64 0
br i1 %19, label %pred.store.if, label %pred.store.continue
pred.store.if: ; preds = %vector.body
%20 = sub i32 %add42, %12
%21 = sext i32 %20 to i64
%22 = bitcast <4 x i32> %wide.load to <16 x i8>
%23 = extractelement <16 x i8> %22, i64 0
%24 = getelementptr inbounds i8, ptr %num, i64 %21
%25 = extractelement <4 x i8> %predphi, i64 0
%26 = add i8 %25, %23
store i8 %26, ptr %24, align 1, !tbaa !14
br label %pred.store.continue
pred.store.continue: ; preds = %pred.store.if, %vector.body
%27 = extractelement <4 x i1> %18, i64 1
br i1 %27, label %pred.store.if90, label %pred.store.continue91
pred.store.if90: ; preds = %pred.store.continue
%28 = xor i32 %12, -1
%29 = add i32 %add42, %28
%30 = sext i32 %29 to i64
%31 = bitcast <4 x i32> %wide.load to <16 x i8>
%32 = extractelement <16 x i8> %31, i64 4
%33 = getelementptr inbounds i8, ptr %num, i64 %30
%34 = extractelement <4 x i8> %predphi, i64 1
%35 = add i8 %34, %32
store i8 %35, ptr %33, align 1, !tbaa !14
br label %pred.store.continue91
pred.store.continue91: ; preds = %pred.store.if90, %pred.store.continue
%36 = extractelement <4 x i1> %18, i64 2
br i1 %36, label %pred.store.if92, label %pred.store.continue93
pred.store.if92: ; preds = %pred.store.continue91
%reass.sub = sub i32 %add42, %12
%37 = add i32 %reass.sub, -2
%38 = sext i32 %37 to i64
%39 = bitcast <4 x i32> %wide.load to <16 x i8>
%40 = extractelement <16 x i8> %39, i64 8
%41 = getelementptr inbounds i8, ptr %num, i64 %38
%42 = extractelement <4 x i8> %predphi, i64 2
%43 = add i8 %42, %40
store i8 %43, ptr %41, align 1, !tbaa !14
br label %pred.store.continue93
pred.store.continue93: ; preds = %pred.store.if92, %pred.store.continue91
%44 = extractelement <4 x i1> %18, i64 3
br i1 %44, label %pred.store.if94, label %pred.store.continue95
pred.store.if94: ; preds = %pred.store.continue93
%reass.sub96 = sub i32 %add42, %12
%45 = add i32 %reass.sub96, -3
%46 = sext i32 %45 to i64
%47 = bitcast <4 x i32> %wide.load to <16 x i8>
%48 = extractelement <16 x i8> %47, i64 12
%49 = getelementptr inbounds i8, ptr %num, i64 %46
%50 = extractelement <4 x i8> %predphi, i64 3
%51 = add i8 %50, %48
store i8 %51, ptr %49, align 1, !tbaa !14
br label %pred.store.continue95
pred.store.continue95: ; preds = %pred.store.if94, %pred.store.continue93
%index.next = add nuw i64 %index, 4
%52 = icmp eq i64 %index.next, %n.vec
br i1 %52, label %middle.block, label %vector.body, !llvm.loop !49
middle.block: ; preds = %pred.store.continue95
%cmp.n = icmp eq i64 %n.vec, %wide.trip.count
br i1 %cmp.n, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %vector.scevcheck, %if.end12, %middle.block
%indvars.iv82.ph = phi i64 [ 0, %vector.scevcheck ], [ 0, %if.end12 ], [ %n.vec, %middle.block ]
%indvars.iv80.ph = phi i64 [ 0, %vector.scevcheck ], [ 0, %if.end12 ], [ %ind.end, %middle.block ]
%xtraiter = and i64 %wide.trip.count, 1
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.body.prol.loopexit, label %for.body.prol
for.body.prol: ; preds = %for.body.preheader
%arrayidx16.prol = getelementptr inbounds [32 x i32], ptr %mod, i64 0, i64 %indvars.iv82.ph
%53 = load i32, ptr %arrayidx16.prol, align 16, !tbaa !5
%cmp17.prol = icmp slt i32 %53, 10
br i1 %cmp17.prol, label %for.inc.sink.split.prol, label %if.else.prol
if.else.prol: ; preds = %for.body.prol
%cmp32.prol = icmp ult i32 %53, %q_adic
br i1 %cmp32.prol, label %for.inc.sink.split.prol, label %for.inc.prol
for.inc.sink.split.prol: ; preds = %if.else.prol, %for.body.prol
%.sink88.prol = phi i8 [ 48, %for.body.prol ], [ 87, %if.else.prol ]
%54 = trunc i32 %53 to i8
%conv23.prol = add i8 %.sink88.prol, %54
%55 = trunc i64 %indvars.iv80.ph to i32
%sub27.prol = add i32 %add42, %55
%idxprom28.prol = sext i32 %sub27.prol to i64
%arrayidx29.prol = getelementptr inbounds i8, ptr %num, i64 %idxprom28.prol
store i8 %conv23.prol, ptr %arrayidx29.prol, align 1, !tbaa !14
br label %for.inc.prol
for.inc.prol: ; preds = %for.inc.sink.split.prol, %if.else.prol
%indvars.iv.next83.prol = or i64 %indvars.iv82.ph, 1
%indvars.iv.next81.prol = add nsw i64 %indvars.iv80.ph, -1
br label %for.body.prol.loopexit
for.body.prol.loopexit: ; preds = %for.inc.prol, %for.body.preheader
%indvars.iv82.unr = phi i64 [ %indvars.iv82.ph, %for.body.preheader ], [ %indvars.iv.next83.prol, %for.inc.prol ]
%indvars.iv80.unr = phi i64 [ %indvars.iv80.ph, %for.body.preheader ], [ %indvars.iv.next81.prol, %for.inc.prol ]
%56 = sub nsw i64 0, %wide.trip.count
%57 = xor i64 %indvars.iv82.ph, %56
%58 = icmp eq i64 %57, -1
br i1 %58, label %for.end, label %for.body
for.body: ; preds = %for.body.prol.loopexit, %for.inc.1
%indvars.iv82 = phi i64 [ %indvars.iv.next83.1, %for.inc.1 ], [ %indvars.iv82.unr, %for.body.prol.loopexit ]
%indvars.iv80 = phi i64 [ %indvars.iv.next81.1, %for.inc.1 ], [ %indvars.iv80.unr, %for.body.prol.loopexit ]
%arrayidx16 = getelementptr inbounds [32 x i32], ptr %mod, i64 0, i64 %indvars.iv82
%59 = load i32, ptr %arrayidx16, align 4, !tbaa !5
%cmp17 = icmp slt i32 %59, 10
br i1 %cmp17, label %for.inc.sink.split, label %if.else
if.else: ; preds = %for.body
%cmp32 = icmp ult i32 %59, %q_adic
br i1 %cmp32, label %for.inc.sink.split, label %for.inc
for.inc.sink.split: ; preds = %if.else, %for.body
%.sink88 = phi i8 [ 48, %for.body ], [ 87, %if.else ]
%60 = trunc i32 %59 to i8
%conv23 = add i8 %.sink88, %60
%61 = trunc i64 %indvars.iv80 to i32
%sub27 = add i32 %add42, %61
%idxprom28 = sext i32 %sub27 to i64
%arrayidx29 = getelementptr inbounds i8, ptr %num, i64 %idxprom28
store i8 %conv23, ptr %arrayidx29, align 1, !tbaa !14
br label %for.inc
for.inc: ; preds = %for.inc.sink.split, %if.else
%indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
%arrayidx16.1 = getelementptr inbounds [32 x i32], ptr %mod, i64 0, i64 %indvars.iv.next83
%62 = load i32, ptr %arrayidx16.1, align 4, !tbaa !5
%cmp17.1 = icmp slt i32 %62, 10
br i1 %cmp17.1, label %for.inc.sink.split.1, label %if.else.1
if.else.1: ; preds = %for.inc
%cmp32.1 = icmp ult i32 %62, %q_adic
br i1 %cmp32.1, label %for.inc.sink.split.1, label %for.inc.1
for.inc.sink.split.1: ; preds = %if.else.1, %for.inc
%.sink88.1 = phi i8 [ 48, %for.inc ], [ 87, %if.else.1 ]
%63 = trunc i32 %62 to i8
%conv23.1 = add i8 %.sink88.1, %63
%64 = trunc i64 %indvars.iv80 to i32
%65 = add i32 %64, -1
%sub27.1 = add i32 %add42, %65
%idxprom28.1 = sext i32 %sub27.1 to i64
%arrayidx29.1 = getelementptr inbounds i8, ptr %num, i64 %idxprom28.1
store i8 %conv23.1, ptr %arrayidx29.1, align 1, !tbaa !14
br label %for.inc.1
for.inc.1: ; preds = %for.inc.sink.split.1, %if.else.1
%indvars.iv.next83.1 = add nuw nsw i64 %indvars.iv82, 2
%indvars.iv.next81.1 = add nsw i64 %indvars.iv80, -2
%exitcond.not.1 = icmp eq i64 %indvars.iv.next83.1, %wide.trip.count
br i1 %exitcond.not.1, label %for.end, label %for.body, !llvm.loop !50
for.end: ; preds = %for.body.prol.loopexit, %for.inc.1, %middle.block
call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %mod) #25
ret void
}
; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #12
; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #13
; Function Attrs: nofree nosync nounwind memory(none) uwtable
define dso_local i32 @sum_digit(i32 noundef %num) local_unnamed_addr #9 {
entry:
%cmp.not5 = icmp eq i32 %num, 0
br i1 %cmp.not5, label %while.end, label %while.body.preheader
while.body.preheader: ; preds = %entry
%0 = tail call i32 @llvm.abs.i32(i32 %num, i1 true)
br label %while.body
while.body: ; preds = %while.body.preheader, %while.body
%answer.07 = phi i32 [ %add, %while.body ], [ 0, %while.body.preheader ]
%num.addr.06 = phi i32 [ %div, %while.body ], [ %0, %while.body.preheader ]
%rem = urem i32 %num.addr.06, 10
%add = add nuw nsw i32 %answer.07, %rem
%div = udiv i32 %num.addr.06, 10
%cmp.not = icmp ult i32 %num.addr.06, 10
br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !51
while.end: ; preds = %while.body, %entry
%answer.0.lcssa = phi i32 [ 0, %entry ], [ %add, %while.body ]
ret i32 %answer.0.lcssa
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #14
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
define dso_local i32 @count_mod(i32 noundef %min, i32 noundef %max, i32 noundef %num) local_unnamed_addr #15 {
entry:
%cmp = icmp sgt i32 %min, 0
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%div = sdiv i32 %max, %num
%sub = add nsw i32 %min, -1
%div1 = sdiv i32 %sub, %num
%sub2 = sub nsw i32 %div, %div1
br label %return
if.else: ; preds = %entry
%cmp3 = icmp eq i32 %min, 0
br i1 %cmp3, label %if.then4, label %return
if.then4: ; preds = %if.else
%div5 = sdiv i32 %max, %num
%add = add nsw i32 %div5, 1
br label %return
return: ; preds = %if.else, %if.then4, %if.then
%retval.0 = phi i32 [ %sub2, %if.then ], [ %add, %if.then4 ], [ -1, %if.else ]
ret i32 %retval.0
}
; Function Attrs: nofree nosync nounwind memory(argmem: readwrite) uwtable
define dso_local void @shift_char(ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max, i32 noundef %num) local_unnamed_addr #16 {
entry:
%array39 = ptrtoint ptr %array to i64
%cmp.not24 = icmp slt i32 %max, %min
br i1 %cmp.not24, label %for.cond3.preheader, label %iter.check
iter.check: ; preds = %entry
%0 = sext i32 %max to i64
%1 = sext i32 %num to i64
%2 = sext i32 %min to i64
%invariant.gep = getelementptr i8, ptr %array, i64 %1
%3 = add nsw i64 %0, 1
%4 = sub nsw i64 %3, %2
%min.iters.check = icmp ult i64 %4, 4
br i1 %min.iters.check, label %for.body.preheader, label %vector.scevcheck
vector.scevcheck: ; preds = %iter.check
%5 = sub nsw i64 %0, %2
%6 = getelementptr i8, ptr %array, i64 %1
%scevgep34 = getelementptr i8, ptr %6, i64 %0
%7 = sub nsw i64 0, %5
%8 = getelementptr i8, ptr %scevgep34, i64 %7
%9 = icmp ugt ptr %8, %scevgep34
%scevgep35 = getelementptr i8, ptr %array, i64 %0
%10 = sub nsw i64 0, %5
%11 = getelementptr i8, ptr %scevgep35, i64 %10
%12 = icmp ugt ptr %11, %scevgep35
%13 = or i1 %9, %12
br i1 %13, label %for.body.preheader, label %vector.memcheck
vector.memcheck: ; preds = %vector.scevcheck
%14 = add i64 %array39, %0
%15 = add i64 %array39, %1
%16 = add i64 %15, %0
%17 = sub i64 %14, %16
%diff.check = icmp ult i64 %17, 16
br i1 %diff.check, label %for.body.preheader, label %vector.main.loop.iter.check
vector.main.loop.iter.check: ; preds = %vector.memcheck
%min.iters.check40 = icmp ult i64 %4, 16
br i1 %min.iters.check40, label %vec.epilog.ph, label %vector.ph
vector.ph: ; preds = %vector.main.loop.iter.check
%n.vec = and i64 %4, -16
%invariant.gep52 = getelementptr i8, ptr %array, i64 -15
%invariant.gep54 = getelementptr i8, ptr %invariant.gep, i64 -15
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%offset.idx = sub i64 %0, %index
%gep53 = getelementptr i8, ptr %invariant.gep52, i64 %offset.idx
%wide.load = load <16 x i8>, ptr %gep53, align 1, !tbaa !14
%gep55 = getelementptr i8, ptr %invariant.gep54, i64 %offset.idx
store <16 x i8> %wide.load, ptr %gep55, align 1, !tbaa !14
%index.next = add nuw i64 %index, 16
%18 = icmp eq i64 %index.next, %n.vec
br i1 %18, label %middle.block, label %vector.body, !llvm.loop !52
middle.block: ; preds = %vector.body
%cmp.n = icmp eq i64 %4, %n.vec
br i1 %cmp.n, label %for.cond3.preheader, label %vec.epilog.iter.check
vec.epilog.iter.check: ; preds = %middle.block
%ind.end44 = sub nsw i64 %0, %n.vec
%n.vec.remaining = and i64 %4, 12
%min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
br i1 %min.epilog.iters.check, label %for.body.preheader, label %vec.epilog.ph
vec.epilog.ph: ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
%vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
%n.vec43 = and i64 %4, -4
%ind.end = sub nsw i64 %0, %n.vec43
%invariant.gep56 = getelementptr i8, ptr %array, i64 -3
%invariant.gep58 = getelementptr i8, ptr %invariant.gep, i64 -3
br label %vec.epilog.vector.body
vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph
%index46 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next51, %vec.epilog.vector.body ]
%offset.idx47 = sub i64 %0, %index46
%gep57 = getelementptr i8, ptr %invariant.gep56, i64 %offset.idx47
%wide.load48 = load <4 x i8>, ptr %gep57, align 1, !tbaa !14
%gep59 = getelementptr i8, ptr %invariant.gep58, i64 %offset.idx47
store <4 x i8> %wide.load48, ptr %gep59, align 1, !tbaa !14
%index.next51 = add nuw i64 %index46, 4
%19 = icmp eq i64 %index.next51, %n.vec43
br i1 %19, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !53
vec.epilog.middle.block: ; preds = %vec.epilog.vector.body
%cmp.n45 = icmp eq i64 %4, %n.vec43
br i1 %cmp.n45, label %for.cond3.preheader, label %for.body.preheader
for.body.preheader: ; preds = %vector.memcheck, %vector.scevcheck, %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block
%indvars.iv.ph = phi i64 [ %0, %iter.check ], [ %0, %vector.memcheck ], [ %0, %vector.scevcheck ], [ %ind.end44, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ]
br label %for.body
for.cond3.preheader: ; preds = %for.body, %middle.block, %vec.epilog.middle.block, %entry
%cmp6.not.not26 = icmp sgt i32 %num, 0
br i1 %cmp6.not.not26, label %for.body7.preheader, label %for.end12
for.body7.preheader: ; preds = %for.cond3.preheader
%add4 = add i32 %num, %min
%20 = sext i32 %min to i64
%scevgep = getelementptr i8, ptr %array, i64 %20
%21 = add i32 %min, 1
%smax = tail call i32 @llvm.smax.i32(i32 %add4, i32 %21)
%22 = xor i32 %min, -1
%23 = add i32 %smax, %22
%24 = zext i32 %23 to i64
%25 = add nuw nsw i64 %24, 1
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %scevgep, i8 0, i64 %25, i1 false), !tbaa !14
br label %for.end12
for.body: ; preds = %for.body.preheader, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader ]
%arrayidx = getelementptr inbounds i8, ptr %array, i64 %indvars.iv
%26 = load i8, ptr %arrayidx, align 1, !tbaa !14
%gep = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv
store i8 %26, ptr %gep, align 1, !tbaa !14
%indvars.iv.next = add nsw i64 %indvars.iv, -1
%cmp.not.not = icmp sgt i64 %indvars.iv, %2
br i1 %cmp.not.not, label %for.body, label %for.cond3.preheader, !llvm.loop !54
for.end12: ; preds = %for.body7.preheader, %for.cond3.preheader
ret void
}
; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable
define dso_local void @convert_char(ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max, i8 noundef signext %pre, i8 noundef signext %post) local_unnamed_addr #4 {
entry:
%cmp.not11 = icmp sgt i32 %min, %max
br i1 %cmp.not11, label %for.end, label %iter.check
iter.check: ; preds = %entry
%0 = sext i32 %min to i64
%1 = add i32 %max, 1
%2 = sub i32 %max, %min
%3 = zext i32 %2 to i64
%4 = add nuw nsw i64 %3, 1
%min.iters.check = icmp ult i32 %2, 7
br i1 %min.iters.check, label %for.body.preheader, label %vector.main.loop.iter.check
vector.main.loop.iter.check: ; preds = %iter.check
%min.iters.check14 = icmp ult i32 %2, 31
br i1 %min.iters.check14, label %vec.epilog.ph, label %vector.ph
vector.ph: ; preds = %vector.main.loop.iter.check
%n.vec = and i64 %4, 8589934560
%broadcast.splatinsert = insertelement <16 x i8> poison, i8 %pre, i64 0
%broadcast.splat = shufflevector <16 x i8> %broadcast.splatinsert, <16 x i8> poison, <16 x i32> zeroinitializer
%invariant.gep = getelementptr i8, ptr %array, i64 1
%invariant.gep104 = getelementptr i8, ptr %array, i64 2
%invariant.gep106 = getelementptr i8, ptr %array, i64 3
%invariant.gep108 = getelementptr i8, ptr %array, i64 4
%invariant.gep110 = getelementptr i8, ptr %array, i64 5
%invariant.gep112 = getelementptr i8, ptr %array, i64 6
%invariant.gep114 = getelementptr i8, ptr %array, i64 7
%invariant.gep116 = getelementptr i8, ptr %array, i64 8
%invariant.gep118 = getelementptr i8, ptr %array, i64 9
%invariant.gep120 = getelementptr i8, ptr %array, i64 10
%invariant.gep122 = getelementptr i8, ptr %array, i64 11
%invariant.gep124 = getelementptr i8, ptr %array, i64 12
%invariant.gep126 = getelementptr i8, ptr %array, i64 13
%invariant.gep128 = getelementptr i8, ptr %array, i64 14
%invariant.gep130 = getelementptr i8, ptr %array, i64 15
%invariant.gep132 = getelementptr i8, ptr %array, i64 16
%invariant.gep134 = getelementptr i8, ptr %array, i64 17
%invariant.gep136 = getelementptr i8, ptr %array, i64 18
%invariant.gep138 = getelementptr i8, ptr %array, i64 19
%invariant.gep140 = getelementptr i8, ptr %array, i64 20
%invariant.gep142 = getelementptr i8, ptr %array, i64 21
%invariant.gep144 = getelementptr i8, ptr %array, i64 22
%invariant.gep146 = getelementptr i8, ptr %array, i64 23
%invariant.gep148 = getelementptr i8, ptr %array, i64 24
%invariant.gep150 = getelementptr i8, ptr %array, i64 25
%invariant.gep152 = getelementptr i8, ptr %array, i64 26
%invariant.gep154 = getelementptr i8, ptr %array, i64 27
%invariant.gep156 = getelementptr i8, ptr %array, i64 28
%invariant.gep158 = getelementptr i8, ptr %array, i64 29
%invariant.gep160 = getelementptr i8, ptr %array, i64 30
%invariant.gep162 = getelementptr i8, ptr %array, i64 31
br label %vector.body
vector.body: ; preds = %pred.store.continue77, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue77 ]
%offset.idx = add i64 %index, %0
%5 = getelementptr inbounds i8, ptr %array, i64 %offset.idx
%wide.load = load <16 x i8>, ptr %5, align 1, !tbaa !14
%6 = getelementptr inbounds i8, ptr %5, i64 16
%wide.load15 = load <16 x i8>, ptr %6, align 1, !tbaa !14
%7 = icmp eq <16 x i8> %wide.load, %broadcast.splat
%8 = icmp eq <16 x i8> %wide.load15, %broadcast.splat
%9 = extractelement <16 x i1> %7, i64 0
br i1 %9, label %pred.store.if, label %pred.store.continue
pred.store.if: ; preds = %vector.body
%10 = getelementptr inbounds i8, ptr %array, i64 %offset.idx
store i8 %post, ptr %10, align 1, !tbaa !14
br label %pred.store.continue
pred.store.continue: ; preds = %pred.store.if, %vector.body
%11 = extractelement <16 x i1> %7, i64 1
br i1 %11, label %pred.store.if16, label %pred.store.continue17
pred.store.if16: ; preds = %pred.store.continue
%gep = getelementptr i8, ptr %invariant.gep, i64 %offset.idx
store i8 %post, ptr %gep, align 1, !tbaa !14
br label %pred.store.continue17
pred.store.continue17: ; preds = %pred.store.if16, %pred.store.continue
%12 = extractelement <16 x i1> %7, i64 2
br i1 %12, label %pred.store.if18, label %pred.store.continue19
pred.store.if18: ; preds = %pred.store.continue17
%gep105 = getelementptr i8, ptr %invariant.gep104, i64 %offset.idx
store i8 %post, ptr %gep105, align 1, !tbaa !14
br label %pred.store.continue19
pred.store.continue19: ; preds = %pred.store.if18, %pred.store.continue17
%13 = extractelement <16 x i1> %7, i64 3
br i1 %13, label %pred.store.if20, label %pred.store.continue21
pred.store.if20: ; preds = %pred.store.continue19
%gep107 = getelementptr i8, ptr %invariant.gep106, i64 %offset.idx
store i8 %post, ptr %gep107, align 1, !tbaa !14
br label %pred.store.continue21
pred.store.continue21: ; preds = %pred.store.if20, %pred.store.continue19
%14 = extractelement <16 x i1> %7, i64 4
br i1 %14, label %pred.store.if22, label %pred.store.continue23
pred.store.if22: ; preds = %pred.store.continue21
%gep109 = getelementptr i8, ptr %invariant.gep108, i64 %offset.idx
store i8 %post, ptr %gep109, align 1, !tbaa !14
br label %pred.store.continue23
pred.store.continue23: ; preds = %pred.store.if22, %pred.store.continue21
%15 = extractelement <16 x i1> %7, i64 5
br i1 %15, label %pred.store.if24, label %pred.store.continue25
pred.store.if24: ; preds = %pred.store.continue23
%gep111 = getelementptr i8, ptr %invariant.gep110, i64 %offset.idx
store i8 %post, ptr %gep111, align 1, !tbaa !14
br label %pred.store.continue25
pred.store.continue25: ; preds = %pred.store.if24, %pred.store.continue23
%16 = extractelement <16 x i1> %7, i64 6
br i1 %16, label %pred.store.if26, label %pred.store.continue27
pred.store.if26: ; preds = %pred.store.continue25
%gep113 = getelementptr i8, ptr %invariant.gep112, i64 %offset.idx
store i8 %post, ptr %gep113, align 1, !tbaa !14
br label %pred.store.continue27
pred.store.continue27: ; preds = %pred.store.if26, %pred.store.continue25
%17 = extractelement <16 x i1> %7, i64 7
br i1 %17, label %pred.store.if28, label %pred.store.continue29
pred.store.if28: ; preds = %pred.store.continue27
%gep115 = getelementptr i8, ptr %invariant.gep114, i64 %offset.idx
store i8 %post, ptr %gep115, align 1, !tbaa !14
br label %pred.store.continue29
pred.store.continue29: ; preds = %pred.store.if28, %pred.store.continue27
%18 = extractelement <16 x i1> %7, i64 8
br i1 %18, label %pred.store.if30, label %pred.store.continue31
pred.store.if30: ; preds = %pred.store.continue29
%gep117 = getelementptr i8, ptr %invariant.gep116, i64 %offset.idx
store i8 %post, ptr %gep117, align 1, !tbaa !14
br label %pred.store.continue31
pred.store.continue31: ; preds = %pred.store.if30, %pred.store.continue29
%19 = extractelement <16 x i1> %7, i64 9
br i1 %19, label %pred.store.if32, label %pred.store.continue33
pred.store.if32: ; preds = %pred.store.continue31
%gep119 = getelementptr i8, ptr %invariant.gep118, i64 %offset.idx
store i8 %post, ptr %gep119, align 1, !tbaa !14
br label %pred.store.continue33
pred.store.continue33: ; preds = %pred.store.if32, %pred.store.continue31
%20 = extractelement <16 x i1> %7, i64 10
br i1 %20, label %pred.store.if34, label %pred.store.continue35
pred.store.if34: ; preds = %pred.store.continue33
%gep121 = getelementptr i8, ptr %invariant.gep120, i64 %offset.idx
store i8 %post, ptr %gep121, align 1, !tbaa !14
br label %pred.store.continue35
pred.store.continue35: ; preds = %pred.store.if34, %pred.store.continue33
%21 = extractelement <16 x i1> %7, i64 11
br i1 %21, label %pred.store.if36, label %pred.store.continue37
pred.store.if36: ; preds = %pred.store.continue35
%gep123 = getelementptr i8, ptr %invariant.gep122, i64 %offset.idx
store i8 %post, ptr %gep123, align 1, !tbaa !14
br label %pred.store.continue37
pred.store.continue37: ; preds = %pred.store.if36, %pred.store.continue35
%22 = extractelement <16 x i1> %7, i64 12
br i1 %22, label %pred.store.if38, label %pred.store.continue39
pred.store.if38: ; preds = %pred.store.continue37
%gep125 = getelementptr i8, ptr %invariant.gep124, i64 %offset.idx
store i8 %post, ptr %gep125, align 1, !tbaa !14
br label %pred.store.continue39
pred.store.continue39: ; preds = %pred.store.if38, %pred.store.continue37
%23 = extractelement <16 x i1> %7, i64 13
br i1 %23, label %pred.store.if40, label %pred.store.continue41
pred.store.if40: ; preds = %pred.store.continue39
%gep127 = getelementptr i8, ptr %invariant.gep126, i64 %offset.idx
store i8 %post, ptr %gep127, align 1, !tbaa !14
br label %pred.store.continue41
pred.store.continue41: ; preds = %pred.store.if40, %pred.store.continue39
%24 = extractelement <16 x i1> %7, i64 14
br i1 %24, label %pred.store.if42, label %pred.store.continue43
pred.store.if42: ; preds = %pred.store.continue41
%gep129 = getelementptr i8, ptr %invariant.gep128, i64 %offset.idx
store i8 %post, ptr %gep129, align 1, !tbaa !14
br label %pred.store.continue43
pred.store.continue43: ; preds = %pred.store.if42, %pred.store.continue41
%25 = extractelement <16 x i1> %7, i64 15
br i1 %25, label %pred.store.if44, label %pred.store.continue45
pred.store.if44: ; preds = %pred.store.continue43
%gep131 = getelementptr i8, ptr %invariant.gep130, i64 %offset.idx
store i8 %post, ptr %gep131, align 1, !tbaa !14
br label %pred.store.continue45
pred.store.continue45: ; preds = %pred.store.if44, %pred.store.continue43
%26 = extractelement <16 x i1> %8, i64 0
br i1 %26, label %pred.store.if46, label %pred.store.continue47
pred.store.if46: ; preds = %pred.store.continue45
%gep133 = getelementptr i8, ptr %invariant.gep132, i64 %offset.idx
store i8 %post, ptr %gep133, align 1, !tbaa !14
br label %pred.store.continue47
pred.store.continue47: ; preds = %pred.store.if46, %pred.store.continue45
%27 = extractelement <16 x i1> %8, i64 1
br i1 %27, label %pred.store.if48, label %pred.store.continue49
pred.store.if48: ; preds = %pred.store.continue47
%gep135 = getelementptr i8, ptr %invariant.gep134, i64 %offset.idx
store i8 %post, ptr %gep135, align 1, !tbaa !14
br label %pred.store.continue49
pred.store.continue49: ; preds = %pred.store.if48, %pred.store.continue47
%28 = extractelement <16 x i1> %8, i64 2
br i1 %28, label %pred.store.if50, label %pred.store.continue51
pred.store.if50: ; preds = %pred.store.continue49
%gep137 = getelementptr i8, ptr %invariant.gep136, i64 %offset.idx
store i8 %post, ptr %gep137, align 1, !tbaa !14
br label %pred.store.continue51
pred.store.continue51: ; preds = %pred.store.if50, %pred.store.continue49
%29 = extractelement <16 x i1> %8, i64 3
br i1 %29, label %pred.store.if52, label %pred.store.continue53
pred.store.if52: ; preds = %pred.store.continue51
%gep139 = getelementptr i8, ptr %invariant.gep138, i64 %offset.idx
store i8 %post, ptr %gep139, align 1, !tbaa !14
br label %pred.store.continue53
pred.store.continue53: ; preds = %pred.store.if52, %pred.store.continue51
%30 = extractelement <16 x i1> %8, i64 4
br i1 %30, label %pred.store.if54, label %pred.store.continue55
pred.store.if54: ; preds = %pred.store.continue53
%gep141 = getelementptr i8, ptr %invariant.gep140, i64 %offset.idx
store i8 %post, ptr %gep141, align 1, !tbaa !14
br label %pred.store.continue55
pred.store.continue55: ; preds = %pred.store.if54, %pred.store.continue53
%31 = extractelement <16 x i1> %8, i64 5
br i1 %31, label %pred.store.if56, label %pred.store.continue57
pred.store.if56: ; preds = %pred.store.continue55
%gep143 = getelementptr i8, ptr %invariant.gep142, i64 %offset.idx
store i8 %post, ptr %gep143, align 1, !tbaa !14
br label %pred.store.continue57
pred.store.continue57: ; preds = %pred.store.if56, %pred.store.continue55
%32 = extractelement <16 x i1> %8, i64 6
br i1 %32, label %pred.store.if58, label %pred.store.continue59
pred.store.if58: ; preds = %pred.store.continue57
%gep145 = getelementptr i8, ptr %invariant.gep144, i64 %offset.idx
store i8 %post, ptr %gep145, align 1, !tbaa !14
br label %pred.store.continue59
pred.store.continue59: ; preds = %pred.store.if58, %pred.store.continue57
%33 = extractelement <16 x i1> %8, i64 7
br i1 %33, label %pred.store.if60, label %pred.store.continue61
pred.store.if60: ; preds = %pred.store.continue59
%gep147 = getelementptr i8, ptr %invariant.gep146, i64 %offset.idx
store i8 %post, ptr %gep147, align 1, !tbaa !14
br label %pred.store.continue61
pred.store.continue61: ; preds = %pred.store.if60, %pred.store.continue59
%34 = extractelement <16 x i1> %8, i64 8
br i1 %34, label %pred.store.if62, label %pred.store.continue63
pred.store.if62: ; preds = %pred.store.continue61
%gep149 = getelementptr i8, ptr %invariant.gep148, i64 %offset.idx
store i8 %post, ptr %gep149, align 1, !tbaa !14
br label %pred.store.continue63
pred.store.continue63: ; preds = %pred.store.if62, %pred.store.continue61
%35 = extractelement <16 x i1> %8, i64 9
br i1 %35, label %pred.store.if64, label %pred.store.continue65
pred.store.if64: ; preds = %pred.store.continue63
%gep151 = getelementptr i8, ptr %invariant.gep150, i64 %offset.idx
store i8 %post, ptr %gep151, align 1, !tbaa !14
br label %pred.store.continue65
pred.store.continue65: ; preds = %pred.store.if64, %pred.store.continue63
%36 = extractelement <16 x i1> %8, i64 10
br i1 %36, label %pred.store.if66, label %pred.store.continue67
pred.store.if66: ; preds = %pred.store.continue65
%gep153 = getelementptr i8, ptr %invariant.gep152, i64 %offset.idx
store i8 %post, ptr %gep153, align 1, !tbaa !14
br label %pred.store.continue67
pred.store.continue67: ; preds = %pred.store.if66, %pred.store.continue65
%37 = extractelement <16 x i1> %8, i64 11
br i1 %37, label %pred.store.if68, label %pred.store.continue69
pred.store.if68: ; preds = %pred.store.continue67
%gep155 = getelementptr i8, ptr %invariant.gep154, i64 %offset.idx
store i8 %post, ptr %gep155, align 1, !tbaa !14
br label %pred.store.continue69
pred.store.continue69: ; preds = %pred.store.if68, %pred.store.continue67
%38 = extractelement <16 x i1> %8, i64 12
br i1 %38, label %pred.store.if70, label %pred.store.continue71
pred.store.if70: ; preds = %pred.store.continue69
%gep157 = getelementptr i8, ptr %invariant.gep156, i64 %offset.idx
store i8 %post, ptr %gep157, align 1, !tbaa !14
br label %pred.store.continue71
pred.store.continue71: ; preds = %pred.store.if70, %pred.store.continue69
%39 = extractelement <16 x i1> %8, i64 13
br i1 %39, label %pred.store.if72, label %pred.store.continue73
pred.store.if72: ; preds = %pred.store.continue71
%gep159 = getelementptr i8, ptr %invariant.gep158, i64 %offset.idx
store i8 %post, ptr %gep159, align 1, !tbaa !14
br label %pred.store.continue73
pred.store.continue73: ; preds = %pred.store.if72, %pred.store.continue71
%40 = extractelement <16 x i1> %8, i64 14
br i1 %40, label %pred.store.if74, label %pred.store.continue75
pred.store.if74: ; preds = %pred.store.continue73
%gep161 = getelementptr i8, ptr %invariant.gep160, i64 %offset.idx
store i8 %post, ptr %gep161, align 1, !tbaa !14
br label %pred.store.continue75
pred.store.continue75: ; preds = %pred.store.if74, %pred.store.continue73
%41 = extractelement <16 x i1> %8, i64 15
br i1 %41, label %pred.store.if76, label %pred.store.continue77
pred.store.if76: ; preds = %pred.store.continue75
%gep163 = getelementptr i8, ptr %invariant.gep162, i64 %offset.idx
store i8 %post, ptr %gep163, align 1, !tbaa !14
br label %pred.store.continue77
pred.store.continue77: ; preds = %pred.store.if76, %pred.store.continue75
%index.next = add nuw i64 %index, 32
%42 = icmp eq i64 %index.next, %n.vec
br i1 %42, label %middle.block, label %vector.body, !llvm.loop !55
middle.block: ; preds = %pred.store.continue77
%cmp.n = icmp eq i64 %4, %n.vec
br i1 %cmp.n, label %for.end, label %vec.epilog.iter.check
vec.epilog.iter.check: ; preds = %middle.block
%ind.end80 = add nsw i64 %n.vec, %0
%n.vec.remaining = and i64 %4, 24
%min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
br i1 %min.epilog.iters.check, label %for.body.preheader, label %vec.epilog.ph
vec.epilog.ph: ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
%vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
%n.vec79 = and i64 %4, 8589934584
%ind.end = add nsw i64 %n.vec79, %0
%broadcast.splatinsert85 = insertelement <8 x i8> poison, i8 %pre, i64 0
%broadcast.splat86 = shufflevector <8 x i8> %broadcast.splatinsert85, <8 x i8> poison, <8 x i32> zeroinitializer
%invariant.gep164 = getelementptr i8, ptr %array, i64 1
%invariant.gep166 = getelementptr i8, ptr %array, i64 2
%invariant.gep168 = getelementptr i8, ptr %array, i64 3
%invariant.gep170 = getelementptr i8, ptr %array, i64 4
%invariant.gep172 = getelementptr i8, ptr %array, i64 5
%invariant.gep174 = getelementptr i8, ptr %array, i64 6
%invariant.gep176 = getelementptr i8, ptr %array, i64 7
br label %vec.epilog.vector.body
vec.epilog.vector.body: ; preds = %pred.store.continue102, %vec.epilog.ph
%index82 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next103, %pred.store.continue102 ]
%offset.idx83 = add i64 %index82, %0
%43 = getelementptr inbounds i8, ptr %array, i64 %offset.idx83
%wide.load84 = load <8 x i8>, ptr %43, align 1, !tbaa !14
%44 = icmp eq <8 x i8> %wide.load84, %broadcast.splat86
%45 = extractelement <8 x i1> %44, i64 0
br i1 %45, label %pred.store.if87, label %pred.store.continue88
pred.store.if87: ; preds = %vec.epilog.vector.body
%46 = getelementptr inbounds i8, ptr %array, i64 %offset.idx83
store i8 %post, ptr %46, align 1, !tbaa !14
br label %pred.store.continue88
pred.store.continue88: ; preds = %pred.store.if87, %vec.epilog.vector.body
%47 = extractelement <8 x i1> %44, i64 1
br i1 %47, label %pred.store.if89, label %pred.store.continue90
pred.store.if89: ; preds = %pred.store.continue88
%gep165 = getelementptr i8, ptr %invariant.gep164, i64 %offset.idx83
store i8 %post, ptr %gep165, align 1, !tbaa !14
br label %pred.store.continue90
pred.store.continue90: ; preds = %pred.store.if89, %pred.store.continue88
%48 = extractelement <8 x i1> %44, i64 2
br i1 %48, label %pred.store.if91, label %pred.store.continue92
pred.store.if91: ; preds = %pred.store.continue90
%gep167 = getelementptr i8, ptr %invariant.gep166, i64 %offset.idx83
store i8 %post, ptr %gep167, align 1, !tbaa !14
br label %pred.store.continue92
pred.store.continue92: ; preds = %pred.store.if91, %pred.store.continue90
%49 = extractelement <8 x i1> %44, i64 3
br i1 %49, label %pred.store.if93, label %pred.store.continue94
pred.store.if93: ; preds = %pred.store.continue92
%gep169 = getelementptr i8, ptr %invariant.gep168, i64 %offset.idx83
store i8 %post, ptr %gep169, align 1, !tbaa !14
br label %pred.store.continue94
pred.store.continue94: ; preds = %pred.store.if93, %pred.store.continue92
%50 = extractelement <8 x i1> %44, i64 4
br i1 %50, label %pred.store.if95, label %pred.store.continue96
pred.store.if95: ; preds = %pred.store.continue94
%gep171 = getelementptr i8, ptr %invariant.gep170, i64 %offset.idx83
store i8 %post, ptr %gep171, align 1, !tbaa !14
br label %pred.store.continue96
pred.store.continue96: ; preds = %pred.store.if95, %pred.store.continue94
%51 = extractelement <8 x i1> %44, i64 5
br i1 %51, label %pred.store.if97, label %pred.store.continue98
pred.store.if97: ; preds = %pred.store.continue96
%gep173 = getelementptr i8, ptr %invariant.gep172, i64 %offset.idx83
store i8 %post, ptr %gep173, align 1, !tbaa !14
br label %pred.store.continue98
pred.store.continue98: ; preds = %pred.store.if97, %pred.store.continue96
%52 = extractelement <8 x i1> %44, i64 6
br i1 %52, label %pred.store.if99, label %pred.store.continue100
pred.store.if99: ; preds = %pred.store.continue98
%gep175 = getelementptr i8, ptr %invariant.gep174, i64 %offset.idx83
store i8 %post, ptr %gep175, align 1, !tbaa !14
br label %pred.store.continue100
pred.store.continue100: ; preds = %pred.store.if99, %pred.store.continue98
%53 = extractelement <8 x i1> %44, i64 7
br i1 %53, label %pred.store.if101, label %pred.store.continue102
pred.store.if101: ; preds = %pred.store.continue100
%gep177 = getelementptr i8, ptr %invariant.gep176, i64 %offset.idx83
store i8 %post, ptr %gep177, align 1, !tbaa !14
br label %pred.store.continue102
pred.store.continue102: ; preds = %pred.store.if101, %pred.store.continue100
%index.next103 = add nuw i64 %index82, 8
%54 = icmp eq i64 %index.next103, %n.vec79
br i1 %54, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !56
vec.epilog.middle.block: ; preds = %pred.store.continue102
%cmp.n81 = icmp eq i64 %4, %n.vec79
br i1 %cmp.n81, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block
%indvars.iv.ph = phi i64 [ %0, %iter.check ], [ %ind.end80, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ]
br label %for.body
for.body: ; preds = %for.body.preheader, %for.inc
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ %indvars.iv.ph, %for.body.preheader ]
%arrayidx = getelementptr inbounds i8, ptr %array, i64 %indvars.iv
%55 = load i8, ptr %arrayidx, align 1, !tbaa !14
%cmp2 = icmp eq i8 %55, %pre
br i1 %cmp2, label %if.then, label %for.inc
if.then: ; preds = %for.body
store i8 %post, ptr %arrayidx, align 1, !tbaa !14
br label %for.inc
for.inc: ; preds = %for.body, %if.then
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%lftr.wideiv = trunc i64 %indvars.iv.next to i32
%exitcond.not = icmp eq i32 %1, %lftr.wideiv
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !57
for.end: ; preds = %for.inc, %middle.block, %vec.epilog.middle.block, %entry
ret void
}
; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable
define dso_local void @sort_asc_int(ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #4 {
entry:
%cmp.not28 = icmp sgt i32 %min, %max
br i1 %cmp.not28, label %for.end14, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %max to i64
%1 = sext i32 %min to i64
%2 = add i32 %max, 1
br label %for.body
for.cond.loopexit: ; preds = %for.inc, %for.body
%lftr.wideiv = trunc i64 %indvars.iv.next34 to i32
%exitcond.not = icmp eq i32 %2, %lftr.wideiv
br i1 %exitcond.not, label %for.end14, label %for.body, !llvm.loop !58
for.body: ; preds = %for.body.preheader, %for.cond.loopexit
%indvars.iv33 = phi i64 [ %1, %for.body.preheader ], [ %indvars.iv.next34, %for.cond.loopexit ]
%indvars.iv.in = phi i32 [ %min, %for.body.preheader ], [ %indvars.iv, %for.cond.loopexit ]
%indvars.iv = add i32 %indvars.iv.in, 1
%indvars.iv.next34 = add nsw i64 %indvars.iv33, 1
%cmp2.not26.not = icmp slt i64 %indvars.iv33, %0
br i1 %cmp2.not26.not, label %for.body3.lr.ph, label %for.cond.loopexit
for.body3.lr.ph: ; preds = %for.body
%3 = sext i32 %indvars.iv to i64
%arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv33
br label %for.body3
for.body3: ; preds = %for.body3.lr.ph, %for.inc
%indvars.iv30 = phi i64 [ %3, %for.body3.lr.ph ], [ %indvars.iv.next31, %for.inc ]
%4 = load i32, ptr %arrayidx, align 4, !tbaa !5
%arrayidx5 = getelementptr inbounds i32, ptr %array, i64 %indvars.iv30
%5 = load i32, ptr %arrayidx5, align 4, !tbaa !5
%cmp6 = icmp sgt i32 %4, %5
br i1 %cmp6, label %if.then, label %for.inc
if.then: ; preds = %for.body3
store i32 %5, ptr %arrayidx, align 4, !tbaa !5
store i32 %4, ptr %arrayidx5, align 4, !tbaa !5
br label %for.inc
for.inc: ; preds = %for.body3, %if.then
%indvars.iv.next31 = add nsw i64 %indvars.iv30, 1
%cmp2.not.not = icmp slt i64 %indvars.iv30, %0
br i1 %cmp2.not.not, label %for.body3, label %for.cond.loopexit, !llvm.loop !59
for.end14: ; preds = %for.cond.loopexit, %entry
ret void
}
; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable
define dso_local void @sort_des_int(ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #4 {
entry:
%cmp.not28 = icmp sgt i32 %min, %max
br i1 %cmp.not28, label %for.end14, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %max to i64
%1 = sext i32 %min to i64
%2 = add i32 %max, 1
br label %for.body
for.cond.loopexit: ; preds = %for.inc, %for.body
%lftr.wideiv = trunc i64 %indvars.iv.next34 to i32
%exitcond.not = icmp eq i32 %2, %lftr.wideiv
br i1 %exitcond.not, label %for.end14, label %for.body, !llvm.loop !60
for.body: ; preds = %for.body.preheader, %for.cond.loopexit
%indvars.iv33 = phi i64 [ %1, %for.body.preheader ], [ %indvars.iv.next34, %for.cond.loopexit ]
%indvars.iv.in = phi i32 [ %min, %for.body.preheader ], [ %indvars.iv, %for.cond.loopexit ]
%indvars.iv = add i32 %indvars.iv.in, 1
%indvars.iv.next34 = add nsw i64 %indvars.iv33, 1
%cmp2.not26.not = icmp slt i64 %indvars.iv33, %0
br i1 %cmp2.not26.not, label %for.body3.lr.ph, label %for.cond.loopexit
for.body3.lr.ph: ; preds = %for.body
%3 = sext i32 %indvars.iv to i64
%arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv33
br label %for.body3
for.body3: ; preds = %for.body3.lr.ph, %for.inc
%indvars.iv30 = phi i64 [ %3, %for.body3.lr.ph ], [ %indvars.iv.next31, %for.inc ]
%4 = load i32, ptr %arrayidx, align 4, !tbaa !5
%arrayidx5 = getelementptr inbounds i32, ptr %array, i64 %indvars.iv30
%5 = load i32, ptr %arrayidx5, align 4, !tbaa !5
%cmp6 = icmp slt i32 %4, %5
br i1 %cmp6, label %if.then, label %for.inc
if.then: ; preds = %for.body3
store i32 %5, ptr %arrayidx, align 4, !tbaa !5
store i32 %4, ptr %arrayidx5, align 4, !tbaa !5
br label %for.inc
for.inc: ; preds = %for.body3, %if.then
%indvars.iv.next31 = add nsw i64 %indvars.iv30, 1
%cmp2.not.not = icmp slt i64 %indvars.iv30, %0
br i1 %cmp2.not.not, label %for.body3, label %for.cond.loopexit, !llvm.loop !61
for.end14: ; preds = %for.cond.loopexit, %entry
ret void
}
; Function Attrs: nofree nounwind memory(argmem: readwrite) uwtable
define dso_local void @sort_asc_char_dic(ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #17 {
entry:
%cmp.not28 = icmp sgt i32 %min, %max
br i1 %cmp.not28, label %for.end14, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %max to i64
%1 = sext i32 %min to i64
%2 = add i32 %max, 1
br label %for.body
for.cond.loopexit: ; preds = %for.inc, %for.body
%lftr.wideiv = trunc i64 %indvars.iv.next34 to i32
%exitcond.not = icmp eq i32 %2, %lftr.wideiv
br i1 %exitcond.not, label %for.end14, label %for.body, !llvm.loop !62
for.body: ; preds = %for.body.preheader, %for.cond.loopexit
%indvars.iv33 = phi i64 [ %1, %for.body.preheader ], [ %indvars.iv.next34, %for.cond.loopexit ]
%indvars.iv.in = phi i32 [ %min, %for.body.preheader ], [ %indvars.iv, %for.cond.loopexit ]
%indvars.iv = add i32 %indvars.iv.in, 1
%indvars.iv.next34 = add nsw i64 %indvars.iv33, 1
%cmp2.not26.not = icmp slt i64 %indvars.iv33, %0
br i1 %cmp2.not26.not, label %for.body3.lr.ph, label %for.cond.loopexit
for.body3.lr.ph: ; preds = %for.body
%3 = sext i32 %indvars.iv to i64
%arrayidx = getelementptr inbounds i8, ptr %array, i64 %indvars.iv33
br label %for.body3
for.body3: ; preds = %for.body3.lr.ph, %for.inc
%indvars.iv30 = phi i64 [ %3, %for.body3.lr.ph ], [ %indvars.iv.next31, %for.inc ]
%arrayidx5 = getelementptr inbounds i8, ptr %array, i64 %indvars.iv30
%call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx, ptr noundef nonnull dereferenceable(1) %arrayidx5) #26
%cmp6 = icmp sgt i32 %call, 0
br i1 %cmp6, label %if.then, label %for.inc
if.then: ; preds = %for.body3
%4 = load i8, ptr %arrayidx, align 1, !tbaa !14
%5 = load i8, ptr %arrayidx5, align 1, !tbaa !14
store i8 %5, ptr %arrayidx, align 1, !tbaa !14
store i8 %4, ptr %arrayidx5, align 1, !tbaa !14
br label %for.inc
for.inc: ; preds = %for.body3, %if.then
%indvars.iv.next31 = add nsw i64 %indvars.iv30, 1
%cmp2.not.not = icmp slt i64 %indvars.iv30, %0
br i1 %cmp2.not.not, label %for.body3, label %for.cond.loopexit, !llvm.loop !63
for.end14: ; preds = %for.cond.loopexit, %entry
ret void
}
; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #13
; Function Attrs: nofree nounwind memory(argmem: readwrite) uwtable
define dso_local void @sort_asc_char_array_dic(i32 noundef %size, ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #17 {
entry:
%0 = zext i32 %size to i64
%cmp.not29 = icmp sgt i32 %min, %max
%cmp.not6.i = icmp slt i32 %size, 1
%or.cond = or i1 %cmp.not29, %cmp.not6.i
br i1 %or.cond, label %for.end14, label %for.body.preheader
for.body.preheader: ; preds = %entry
%1 = sext i32 %max to i64
%2 = sext i32 %min to i64
%3 = add i32 %max, 1
%4 = add nsw i64 %2, 1
%5 = add i32 %min, 1
%min.iters.check = icmp ult i32 %size, 8
%min.iters.check45 = icmp ult i32 %size, 32
%n.vec = and i64 %0, 4294967264
%cmp.n = icmp eq i64 %n.vec, %0
%n.vec.remaining = and i64 %0, 24
%min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
%n.vec50 = and i64 %0, 4294967288
%cmp.n51 = icmp eq i64 %n.vec50, %0
%xtraiter = and i64 %0, 1
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
%6 = sub nsw i64 0, %0
br label %for.body
for.cond.loopexit: ; preds = %for.inc, %for.body
%lftr.wideiv = trunc i64 %indvars.iv.next38 to i32
%exitcond.not = icmp eq i32 %3, %lftr.wideiv
%indvar.next = add i64 %indvar, 1
br i1 %exitcond.not, label %for.end14, label %for.body, !llvm.loop !64
for.body: ; preds = %for.body.preheader, %for.cond.loopexit
%indvar = phi i64 [ 0, %for.body.preheader ], [ %indvar.next, %for.cond.loopexit ]
%indvars.iv37 = phi i64 [ %2, %for.body.preheader ], [ %indvars.iv.next38, %for.cond.loopexit ]
%indvars.iv.in = phi i32 [ %min, %for.body.preheader ], [ %indvars.iv, %for.cond.loopexit ]
%7 = add i64 %indvar, %2
%8 = mul i64 %7, %0
%scevgep = getelementptr i8, ptr %array, i64 %8
%9 = add i64 %4, %indvar
%10 = mul i64 %9, %0
%scevgep40 = getelementptr i8, ptr %array, i64 %10
%11 = trunc i64 %indvar to i32
%12 = add i32 %5, %11
%13 = sext i32 %12 to i64
%14 = add nsw i64 %13, 1
%indvars.iv = add i32 %indvars.iv.in, 1
%indvars.iv.next38 = add nsw i64 %indvars.iv37, 1
%cmp2.not27.not = icmp slt i64 %indvars.iv37, %1
br i1 %cmp2.not27.not, label %for.body3.lr.ph, label %for.cond.loopexit
for.body3.lr.ph: ; preds = %for.body
%15 = sext i32 %indvars.iv to i64
%16 = mul nsw i64 %indvars.iv37, %0
%arrayidx = getelementptr inbounds i8, ptr %array, i64 %16
br label %for.body3
for.body3: ; preds = %for.body3.lr.ph, %for.inc
%indvar41 = phi i64 [ 0, %for.body3.lr.ph ], [ %indvar.next42, %for.inc ]
%indvars.iv34 = phi i64 [ %15, %for.body3.lr.ph ], [ %indvars.iv.next35, %for.inc ]
%17 = add i64 %indvar41, %13
%18 = mul i64 %17, %0
%scevgep43 = getelementptr i8, ptr %array, i64 %18
%19 = add i64 %14, %indvar41
%20 = mul i64 %19, %0
%scevgep44 = getelementptr i8, ptr %array, i64 %20
%21 = mul nsw i64 %indvars.iv34, %0
%arrayidx5 = getelementptr inbounds i8, ptr %array, i64 %21
%call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx, ptr noundef nonnull dereferenceable(1) %arrayidx5) #26
%cmp6 = icmp slt i32 %call, 1
br i1 %cmp6, label %for.inc, label %iter.check
iter.check: ; preds = %for.body3
br i1 %min.iters.check, label %for.body.i.preheader, label %vector.memcheck
vector.memcheck: ; preds = %iter.check
%bound0 = icmp ult ptr %scevgep, %scevgep44
%bound1 = icmp ult ptr %scevgep43, %scevgep40
%found.conflict = and i1 %bound0, %bound1
br i1 %found.conflict, label %for.body.i.preheader, label %vector.main.loop.iter.check
vector.main.loop.iter.check: ; preds = %vector.memcheck
br i1 %min.iters.check45, label %vec.epilog.ph, label %vector.body
vector.body: ; preds = %vector.main.loop.iter.check, %vector.body
%index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.main.loop.iter.check ]
%22 = getelementptr inbounds i8, ptr %arrayidx, i64 %index
%23 = getelementptr inbounds i8, ptr %arrayidx5, i64 %index
%wide.load = load <16 x i8>, ptr %22, align 1, !tbaa !14, !alias.scope !65, !noalias !68
%24 = getelementptr inbounds i8, ptr %22, i64 16
%wide.load46 = load <16 x i8>, ptr %24, align 1, !tbaa !14, !alias.scope !65, !noalias !68
%wide.load47 = load <16 x i8>, ptr %23, align 1, !tbaa !14, !alias.scope !68
%25 = getelementptr inbounds i8, ptr %23, i64 16
%wide.load48 = load <16 x i8>, ptr %25, align 1, !tbaa !14, !alias.scope !68
store <16 x i8> %wide.load47, ptr %22, align 1, !tbaa !14, !alias.scope !65, !noalias !68
store <16 x i8> %wide.load48, ptr %24, align 1, !tbaa !14, !alias.scope !65, !noalias !68
store <16 x i8> %wide.load, ptr %23, align 1, !tbaa !14, !alias.scope !68
store <16 x i8> %wide.load46, ptr %25, align 1, !tbaa !14, !alias.scope !68
%index.next = add nuw i64 %index, 32
%26 = icmp eq i64 %index.next, %n.vec
br i1 %26, label %middle.block, label %vector.body, !llvm.loop !70
middle.block: ; preds = %vector.body
br i1 %cmp.n, label %for.inc, label %vec.epilog.iter.check
vec.epilog.iter.check: ; preds = %middle.block
br i1 %min.epilog.iters.check, label %for.body.i.preheader, label %vec.epilog.ph
vec.epilog.ph: ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
%vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
br label %vec.epilog.vector.body
vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph
%index52 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next55, %vec.epilog.vector.body ]
%27 = getelementptr inbounds i8, ptr %arrayidx, i64 %index52
%28 = getelementptr inbounds i8, ptr %arrayidx5, i64 %index52
%wide.load53 = load <8 x i8>, ptr %27, align 1, !tbaa !14, !alias.scope !71, !noalias !74
%wide.load54 = load <8 x i8>, ptr %28, align 1, !tbaa !14, !alias.scope !74
store <8 x i8> %wide.load54, ptr %27, align 1, !tbaa !14, !alias.scope !71, !noalias !74
store <8 x i8> %wide.load53, ptr %28, align 1, !tbaa !14, !alias.scope !74
%index.next55 = add nuw i64 %index52, 8
%29 = icmp eq i64 %index.next55, %n.vec50
br i1 %29, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !76
vec.epilog.middle.block: ; preds = %vec.epilog.vector.body
br i1 %cmp.n51, label %for.inc, label %for.body.i.preheader
for.body.i.preheader: ; preds = %vector.memcheck, %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block
%indvars.iv.i.ph = phi i64 [ 0, %iter.check ], [ 0, %vector.memcheck ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec50, %vec.epilog.middle.block ]
br i1 %lcmp.mod.not, label %for.body.i.prol.loopexit, label %for.body.i.prol
for.body.i.prol: ; preds = %for.body.i.preheader
%arrayidx.i.prol = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv.i.ph
%arrayidx2.i.prol = getelementptr inbounds i8, ptr %arrayidx5, i64 %indvars.iv.i.ph
%30 = load i8, ptr %arrayidx.i.prol, align 1, !tbaa !14
%31 = load i8, ptr %arrayidx2.i.prol, align 1, !tbaa !14
store i8 %31, ptr %arrayidx.i.prol, align 1, !tbaa !14
store i8 %30, ptr %arrayidx2.i.prol, align 1, !tbaa !14
%indvars.iv.next.i.prol = or i64 %indvars.iv.i.ph, 1
br label %for.body.i.prol.loopexit
for.body.i.prol.loopexit: ; preds = %for.body.i.prol, %for.body.i.preheader
%indvars.iv.i.unr = phi i64 [ %indvars.iv.i.ph, %for.body.i.preheader ], [ %indvars.iv.next.i.prol, %for.body.i.prol ]
%32 = xor i64 %indvars.iv.i.ph, %6
%33 = icmp eq i64 %32, -1
br i1 %33, label %for.inc, label %for.body.i
for.body.i: ; preds = %for.body.i.prol.loopexit, %for.body.i
%indvars.iv.i = phi i64 [ %indvars.iv.next.i.1, %for.body.i ], [ %indvars.iv.i.unr, %for.body.i.prol.loopexit ]
%arrayidx.i = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv.i
%arrayidx2.i = getelementptr inbounds i8, ptr %arrayidx5, i64 %indvars.iv.i
%34 = load i8, ptr %arrayidx.i, align 1, !tbaa !14
%35 = load i8, ptr %arrayidx2.i, align 1, !tbaa !14
store i8 %35, ptr %arrayidx.i, align 1, !tbaa !14
store i8 %34, ptr %arrayidx2.i, align 1, !tbaa !14
%indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1
%arrayidx.i.1 = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv.next.i
%arrayidx2.i.1 = getelementptr inbounds i8, ptr %arrayidx5, i64 %indvars.iv.next.i
%36 = load i8, ptr %arrayidx.i.1, align 1, !tbaa !14
%37 = load i8, ptr %arrayidx2.i.1, align 1, !tbaa !14
store i8 %37, ptr %arrayidx.i.1, align 1, !tbaa !14
store i8 %36, ptr %arrayidx2.i.1, align 1, !tbaa !14
%indvars.iv.next.i.1 = add nuw nsw i64 %indvars.iv.i, 2
%38 = icmp eq i64 %indvars.iv.next.i.1, %0
br i1 %38, label %for.inc, label %for.body.i, !llvm.loop !77
for.inc: ; preds = %for.body.i.prol.loopexit, %for.body.i, %middle.block, %vec.epilog.middle.block, %for.body3
%indvars.iv.next35 = add nsw i64 %indvars.iv34, 1
%cmp2.not.not = icmp slt i64 %indvars.iv34, %1
%indvar.next42 = add i64 %indvar41, 1
br i1 %cmp2.not.not, label %for.body3, label %for.cond.loopexit, !llvm.loop !78
for.end14: ; preds = %for.cond.loopexit, %entry
ret void
}
; Function Attrs: nofree nounwind memory(argmem: readwrite) uwtable
define dso_local void @sort_des_char_dic(ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #17 {
entry:
%cmp.not28 = icmp sgt i32 %min, %max
br i1 %cmp.not28, label %for.end14, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %max to i64
%1 = sext i32 %min to i64
%2 = add i32 %max, 1
br label %for.body
for.cond.loopexit: ; preds = %for.inc, %for.body
%lftr.wideiv = trunc i64 %indvars.iv.next34 to i32
%exitcond.not = icmp eq i32 %2, %lftr.wideiv
br i1 %exitcond.not, label %for.end14, label %for.body, !llvm.loop !79
for.body: ; preds = %for.body.preheader, %for.cond.loopexit
%indvars.iv33 = phi i64 [ %1, %for.body.preheader ], [ %indvars.iv.next34, %for.cond.loopexit ]
%indvars.iv.in = phi i32 [ %min, %for.body.preheader ], [ %indvars.iv, %for.cond.loopexit ]
%indvars.iv = add i32 %indvars.iv.in, 1
%indvars.iv.next34 = add nsw i64 %indvars.iv33, 1
%cmp2.not26.not = icmp slt i64 %indvars.iv33, %0
br i1 %cmp2.not26.not, label %for.body3.lr.ph, label %for.cond.loopexit
for.body3.lr.ph: ; preds = %for.body
%3 = sext i32 %indvars.iv to i64
%arrayidx = getelementptr inbounds i8, ptr %array, i64 %indvars.iv33
br label %for.body3
for.body3: ; preds = %for.body3.lr.ph, %for.inc
%indvars.iv30 = phi i64 [ %3, %for.body3.lr.ph ], [ %indvars.iv.next31, %for.inc ]
%arrayidx5 = getelementptr inbounds i8, ptr %array, i64 %indvars.iv30
%call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx, ptr noundef nonnull dereferenceable(1) %arrayidx5) #26
%cmp6 = icmp slt i32 %call, 0
br i1 %cmp6, label %if.then, label %for.inc
if.then: ; preds = %for.body3
%4 = load i8, ptr %arrayidx, align 1, !tbaa !14
%5 = load i8, ptr %arrayidx5, align 1, !tbaa !14
store i8 %5, ptr %arrayidx, align 1, !tbaa !14
store i8 %4, ptr %arrayidx5, align 1, !tbaa !14
br label %for.inc
for.inc: ; preds = %for.body3, %if.then
%indvars.iv.next31 = add nsw i64 %indvars.iv30, 1
%cmp2.not.not = icmp slt i64 %indvars.iv30, %0
br i1 %cmp2.not.not, label %for.body3, label %for.cond.loopexit, !llvm.loop !80
for.end14: ; preds = %for.cond.loopexit, %entry
ret void
}
; Function Attrs: nofree nounwind memory(argmem: readwrite) uwtable
define dso_local void @sort_des_char_array_dic(i32 noundef %size, ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #17 {
entry:
%0 = zext i32 %size to i64
%cmp.not29 = icmp sgt i32 %min, %max
%cmp.not6.i = icmp slt i32 %size, 1
%or.cond = or i1 %cmp.not29, %cmp.not6.i
br i1 %or.cond, label %for.end14, label %for.body.preheader
for.body.preheader: ; preds = %entry
%1 = sext i32 %max to i64
%2 = sext i32 %min to i64
%3 = add i32 %max, 1
%4 = add nsw i64 %2, 1
%5 = add i32 %min, 1
%min.iters.check = icmp ult i32 %size, 8
%min.iters.check45 = icmp ult i32 %size, 32
%n.vec = and i64 %0, 4294967264
%cmp.n = icmp eq i64 %n.vec, %0
%n.vec.remaining = and i64 %0, 24
%min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
%n.vec50 = and i64 %0, 4294967288
%cmp.n51 = icmp eq i64 %n.vec50, %0
%xtraiter = and i64 %0, 1
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
%6 = sub nsw i64 0, %0
br label %for.body
for.cond.loopexit: ; preds = %for.inc, %for.body
%lftr.wideiv = trunc i64 %indvars.iv.next38 to i32
%exitcond.not = icmp eq i32 %3, %lftr.wideiv
%indvar.next = add i64 %indvar, 1
br i1 %exitcond.not, label %for.end14, label %for.body, !llvm.loop !81
for.body: ; preds = %for.body.preheader, %for.cond.loopexit
%indvar = phi i64 [ 0, %for.body.preheader ], [ %indvar.next, %for.cond.loopexit ]
%indvars.iv37 = phi i64 [ %2, %for.body.preheader ], [ %indvars.iv.next38, %for.cond.loopexit ]
%indvars.iv.in = phi i32 [ %min, %for.body.preheader ], [ %indvars.iv, %for.cond.loopexit ]
%7 = add i64 %indvar, %2
%8 = mul i64 %7, %0
%scevgep = getelementptr i8, ptr %array, i64 %8
%9 = add i64 %4, %indvar
%10 = mul i64 %9, %0
%scevgep40 = getelementptr i8, ptr %array, i64 %10
%11 = trunc i64 %indvar to i32
%12 = add i32 %5, %11
%13 = sext i32 %12 to i64
%14 = add nsw i64 %13, 1
%indvars.iv = add i32 %indvars.iv.in, 1
%indvars.iv.next38 = add nsw i64 %indvars.iv37, 1
%cmp2.not27.not = icmp slt i64 %indvars.iv37, %1
br i1 %cmp2.not27.not, label %for.body3.lr.ph, label %for.cond.loopexit
for.body3.lr.ph: ; preds = %for.body
%15 = sext i32 %indvars.iv to i64
%16 = mul nsw i64 %indvars.iv37, %0
%arrayidx = getelementptr inbounds i8, ptr %array, i64 %16
br label %for.body3
for.body3: ; preds = %for.body3.lr.ph, %for.inc
%indvar41 = phi i64 [ 0, %for.body3.lr.ph ], [ %indvar.next42, %for.inc ]
%indvars.iv34 = phi i64 [ %15, %for.body3.lr.ph ], [ %indvars.iv.next35, %for.inc ]
%17 = add i64 %indvar41, %13
%18 = mul i64 %17, %0
%scevgep43 = getelementptr i8, ptr %array, i64 %18
%19 = add i64 %14, %indvar41
%20 = mul i64 %19, %0
%scevgep44 = getelementptr i8, ptr %array, i64 %20
%21 = mul nsw i64 %indvars.iv34, %0
%arrayidx5 = getelementptr inbounds i8, ptr %array, i64 %21
%call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx, ptr noundef nonnull dereferenceable(1) %arrayidx5) #26
%cmp6 = icmp sgt i32 %call, -1
br i1 %cmp6, label %for.inc, label %iter.check
iter.check: ; preds = %for.body3
br i1 %min.iters.check, label %for.body.i.preheader, label %vector.memcheck
vector.memcheck: ; preds = %iter.check
%bound0 = icmp ult ptr %scevgep, %scevgep44
%bound1 = icmp ult ptr %scevgep43, %scevgep40
%found.conflict = and i1 %bound0, %bound1
br i1 %found.conflict, label %for.body.i.preheader, label %vector.main.loop.iter.check
vector.main.loop.iter.check: ; preds = %vector.memcheck
br i1 %min.iters.check45, label %vec.epilog.ph, label %vector.body
vector.body: ; preds = %vector.main.loop.iter.check, %vector.body
%index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.main.loop.iter.check ]
%22 = getelementptr inbounds i8, ptr %arrayidx, i64 %index
%23 = getelementptr inbounds i8, ptr %arrayidx5, i64 %index
%wide.load = load <16 x i8>, ptr %22, align 1, !tbaa !14, !alias.scope !82, !noalias !85
%24 = getelementptr inbounds i8, ptr %22, i64 16
%wide.load46 = load <16 x i8>, ptr %24, align 1, !tbaa !14, !alias.scope !82, !noalias !85
%wide.load47 = load <16 x i8>, ptr %23, align 1, !tbaa !14, !alias.scope !85
%25 = getelementptr inbounds i8, ptr %23, i64 16
%wide.load48 = load <16 x i8>, ptr %25, align 1, !tbaa !14, !alias.scope !85
store <16 x i8> %wide.load47, ptr %22, align 1, !tbaa !14, !alias.scope !82, !noalias !85
store <16 x i8> %wide.load48, ptr %24, align 1, !tbaa !14, !alias.scope !82, !noalias !85
store <16 x i8> %wide.load, ptr %23, align 1, !tbaa !14, !alias.scope !85
store <16 x i8> %wide.load46, ptr %25, align 1, !tbaa !14, !alias.scope !85
%index.next = add nuw i64 %index, 32
%26 = icmp eq i64 %index.next, %n.vec
br i1 %26, label %middle.block, label %vector.body, !llvm.loop !87
middle.block: ; preds = %vector.body
br i1 %cmp.n, label %for.inc, label %vec.epilog.iter.check
vec.epilog.iter.check: ; preds = %middle.block
br i1 %min.epilog.iters.check, label %for.body.i.preheader, label %vec.epilog.ph
vec.epilog.ph: ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
%vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
br label %vec.epilog.vector.body
vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph
%index52 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next55, %vec.epilog.vector.body ]
%27 = getelementptr inbounds i8, ptr %arrayidx, i64 %index52
%28 = getelementptr inbounds i8, ptr %arrayidx5, i64 %index52
%wide.load53 = load <8 x i8>, ptr %27, align 1, !tbaa !14, !alias.scope !88, !noalias !91
%wide.load54 = load <8 x i8>, ptr %28, align 1, !tbaa !14, !alias.scope !91
store <8 x i8> %wide.load54, ptr %27, align 1, !tbaa !14, !alias.scope !88, !noalias !91
store <8 x i8> %wide.load53, ptr %28, align 1, !tbaa !14, !alias.scope !91
%index.next55 = add nuw i64 %index52, 8
%29 = icmp eq i64 %index.next55, %n.vec50
br i1 %29, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !93
vec.epilog.middle.block: ; preds = %vec.epilog.vector.body
br i1 %cmp.n51, label %for.inc, label %for.body.i.preheader
for.body.i.preheader: ; preds = %vector.memcheck, %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block
%indvars.iv.i.ph = phi i64 [ 0, %iter.check ], [ 0, %vector.memcheck ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec50, %vec.epilog.middle.block ]
br i1 %lcmp.mod.not, label %for.body.i.prol.loopexit, label %for.body.i.prol
for.body.i.prol: ; preds = %for.body.i.preheader
%arrayidx.i.prol = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv.i.ph
%arrayidx2.i.prol = getelementptr inbounds i8, ptr %arrayidx5, i64 %indvars.iv.i.ph
%30 = load i8, ptr %arrayidx.i.prol, align 1, !tbaa !14
%31 = load i8, ptr %arrayidx2.i.prol, align 1, !tbaa !14
store i8 %31, ptr %arrayidx.i.prol, align 1, !tbaa !14
store i8 %30, ptr %arrayidx2.i.prol, align 1, !tbaa !14
%indvars.iv.next.i.prol = or i64 %indvars.iv.i.ph, 1
br label %for.body.i.prol.loopexit
for.body.i.prol.loopexit: ; preds = %for.body.i.prol, %for.body.i.preheader
%indvars.iv.i.unr = phi i64 [ %indvars.iv.i.ph, %for.body.i.preheader ], [ %indvars.iv.next.i.prol, %for.body.i.prol ]
%32 = xor i64 %indvars.iv.i.ph, %6
%33 = icmp eq i64 %32, -1
br i1 %33, label %for.inc, label %for.body.i
for.body.i: ; preds = %for.body.i.prol.loopexit, %for.body.i
%indvars.iv.i = phi i64 [ %indvars.iv.next.i.1, %for.body.i ], [ %indvars.iv.i.unr, %for.body.i.prol.loopexit ]
%arrayidx.i = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv.i
%arrayidx2.i = getelementptr inbounds i8, ptr %arrayidx5, i64 %indvars.iv.i
%34 = load i8, ptr %arrayidx.i, align 1, !tbaa !14
%35 = load i8, ptr %arrayidx2.i, align 1, !tbaa !14
store i8 %35, ptr %arrayidx.i, align 1, !tbaa !14
store i8 %34, ptr %arrayidx2.i, align 1, !tbaa !14
%indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1
%arrayidx.i.1 = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv.next.i
%arrayidx2.i.1 = getelementptr inbounds i8, ptr %arrayidx5, i64 %indvars.iv.next.i
%36 = load i8, ptr %arrayidx.i.1, align 1, !tbaa !14
%37 = load i8, ptr %arrayidx2.i.1, align 1, !tbaa !14
store i8 %37, ptr %arrayidx.i.1, align 1, !tbaa !14
store i8 %36, ptr %arrayidx2.i.1, align 1, !tbaa !14
%indvars.iv.next.i.1 = add nuw nsw i64 %indvars.iv.i, 2
%38 = icmp eq i64 %indvars.iv.next.i.1, %0
br i1 %38, label %for.inc, label %for.body.i, !llvm.loop !94
for.inc: ; preds = %for.body.i.prol.loopexit, %for.body.i, %middle.block, %vec.epilog.middle.block, %for.body3
%indvars.iv.next35 = add nsw i64 %indvars.iv34, 1
%cmp2.not.not = icmp slt i64 %indvars.iv34, %1
%indvar.next42 = add i64 %indvar41, 1
br i1 %cmp2.not.not, label %for.body3, label %for.cond.loopexit, !llvm.loop !95
for.end14: ; preds = %for.cond.loopexit, %entry
ret void
}
; Function Attrs: nofree nosync nounwind memory(argmem: read) uwtable
define dso_local i32 @max_int_array(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #18 {
entry:
%idxprom = sext i32 %min to i64
%arrayidx = getelementptr inbounds i32, ptr %array, i64 %idxprom
%0 = load i32, ptr %arrayidx, align 4, !tbaa !5
%cmp.not.not9 = icmp slt i32 %min, %max
br i1 %cmp.not.not9, label %for.body.preheader, label %for.end
for.body.preheader: ; preds = %entry
%wide.trip.count = sext i32 %max to i64
%1 = sub nsw i64 %wide.trip.count, %idxprom
%min.iters.check = icmp ult i64 %1, 8
br i1 %min.iters.check, label %for.body.preheader15, label %vector.ph
vector.ph: ; preds = %for.body.preheader
%n.vec = and i64 %1, -8
%ind.end = add nsw i64 %n.vec, %idxprom
%minmax.ident.splatinsert = insertelement <4 x i32> poison, i32 %0, i64 0
%minmax.ident.splat = shufflevector <4 x i32> %minmax.ident.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
%invariant.gep = getelementptr i32, ptr %array, i64 %idxprom
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vec.phi = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %4, %vector.body ]
%vec.phi13 = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %5, %vector.body ]
%gep = getelementptr i32, ptr %invariant.gep, i64 %index
%2 = getelementptr i32, ptr %gep, i64 1
%wide.load = load <4 x i32>, ptr %2, align 4, !tbaa !5
%3 = getelementptr i32, ptr %gep, i64 5
%wide.load14 = load <4 x i32>, ptr %3, align 4, !tbaa !5
%4 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %vec.phi, <4 x i32> %wide.load)
%5 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %vec.phi13, <4 x i32> %wide.load14)
%index.next = add nuw i64 %index, 8
%6 = icmp eq i64 %index.next, %n.vec
br i1 %6, label %middle.block, label %vector.body, !llvm.loop !96
middle.block: ; preds = %vector.body
%rdx.minmax = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %4, <4 x i32> %5)
%7 = tail call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax)
%cmp.n = icmp eq i64 %1, %n.vec
br i1 %cmp.n, label %for.end, label %for.body.preheader15
for.body.preheader15: ; preds = %for.body.preheader, %middle.block
%indvars.iv.ph = phi i64 [ %idxprom, %for.body.preheader ], [ %ind.end, %middle.block ]
%answer.011.ph = phi i32 [ %0, %for.body.preheader ], [ %7, %middle.block ]
br label %for.body
for.body: ; preds = %for.body.preheader15, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader15 ]
%answer.011 = phi i32 [ %spec.select.i, %for.body ], [ %answer.011.ph, %for.body.preheader15 ]
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%arrayidx2 = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next
%8 = load i32, ptr %arrayidx2, align 4, !tbaa !5
%spec.select.i = tail call i32 @llvm.smax.i32(i32 %answer.011, i32 %8)
%exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !97
for.end: ; preds = %for.body, %middle.block, %entry
%answer.0.lcssa = phi i32 [ %0, %entry ], [ %7, %middle.block ], [ %spec.select.i, %for.body ]
ret i32 %answer.0.lcssa
}
; Function Attrs: nofree nosync nounwind memory(argmem: readwrite) uwtable
define dso_local void @max_int_array_num(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max, ptr nocapture noundef writeonly %answer) local_unnamed_addr #16 {
entry:
%idxprom.i = sext i32 %min to i64
%arrayidx.i = getelementptr inbounds i32, ptr %array, i64 %idxprom.i
%0 = load i32, ptr %arrayidx.i, align 4, !tbaa !5
%cmp.not.not9.i = icmp slt i32 %min, %max
br i1 %cmp.not.not9.i, label %for.body.preheader.i, label %max_int_array.exit
for.body.preheader.i: ; preds = %entry
%wide.trip.count.i = sext i32 %max to i64
%1 = sub nsw i64 %wide.trip.count.i, %idxprom.i
%min.iters.check = icmp ult i64 %1, 8
br i1 %min.iters.check, label %for.body.i.preheader, label %vector.ph
vector.ph: ; preds = %for.body.preheader.i
%n.vec = and i64 %1, -8
%ind.end = add nsw i64 %n.vec, %idxprom.i
%minmax.ident.splatinsert = insertelement <4 x i32> poison, i32 %0, i64 0
%minmax.ident.splat = shufflevector <4 x i32> %minmax.ident.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
%invariant.gep = getelementptr i32, ptr %array, i64 %idxprom.i
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vec.phi = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %4, %vector.body ]
%vec.phi26 = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %5, %vector.body ]
%gep = getelementptr i32, ptr %invariant.gep, i64 %index
%2 = getelementptr i32, ptr %gep, i64 1
%wide.load = load <4 x i32>, ptr %2, align 4, !tbaa !5
%3 = getelementptr i32, ptr %gep, i64 5
%wide.load27 = load <4 x i32>, ptr %3, align 4, !tbaa !5
%4 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %vec.phi, <4 x i32> %wide.load)
%5 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %vec.phi26, <4 x i32> %wide.load27)
%index.next = add nuw i64 %index, 8
%6 = icmp eq i64 %index.next, %n.vec
br i1 %6, label %middle.block, label %vector.body, !llvm.loop !98
middle.block: ; preds = %vector.body
%rdx.minmax = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %4, <4 x i32> %5)
%7 = tail call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax)
%cmp.n = icmp eq i64 %1, %n.vec
br i1 %cmp.n, label %max_int_array.exit, label %for.body.i.preheader
for.body.i.preheader: ; preds = %for.body.preheader.i, %middle.block
%indvars.iv.i.ph = phi i64 [ %idxprom.i, %for.body.preheader.i ], [ %ind.end, %middle.block ]
%answer.011.i.ph = phi i32 [ %0, %for.body.preheader.i ], [ %7, %middle.block ]
br label %for.body.i
for.body.i: ; preds = %for.body.i.preheader, %for.body.i
%indvars.iv.i = phi i64 [ %indvars.iv.next.i, %for.body.i ], [ %indvars.iv.i.ph, %for.body.i.preheader ]
%answer.011.i = phi i32 [ %spec.select.i.i, %for.body.i ], [ %answer.011.i.ph, %for.body.i.preheader ]
%indvars.iv.next.i = add nsw i64 %indvars.iv.i, 1
%arrayidx2.i = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next.i
%8 = load i32, ptr %arrayidx2.i, align 4, !tbaa !5
%spec.select.i.i = tail call i32 @llvm.smax.i32(i32 %answer.011.i, i32 %8)
%exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %wide.trip.count.i
br i1 %exitcond.not.i, label %max_int_array.exit, label %for.body.i, !llvm.loop !99
max_int_array.exit: ; preds = %for.body.i, %middle.block, %entry
%answer.0.lcssa.i = phi i32 [ %0, %entry ], [ %7, %middle.block ], [ %spec.select.i.i, %for.body.i ]
%sub = sub nsw i32 %max, %min
%cmp.not4.i = icmp slt i32 %sub, 0
br i1 %cmp.not4.i, label %fill_int.exit, label %for.body.preheader.i16
for.body.preheader.i16: ; preds = %max_int_array.exit
%9 = add nuw i32 %sub, 1
%10 = zext i32 %9 to i64
%11 = shl nuw nsw i64 %10, 2
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %answer, i8 -1, i64 %11, i1 false), !tbaa !5
br label %fill_int.exit
fill_int.exit: ; preds = %for.body.preheader.i16, %max_int_array.exit
%cmp.not22 = icmp sgt i32 %min, %max
br i1 %cmp.not22, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %fill_int.exit
%12 = add i32 %max, 1
%13 = sub i32 %12, %min
%xtraiter = and i32 %13, 1
%14 = icmp eq i32 %max, %min
br i1 %14, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new
for.body.preheader.new: ; preds = %for.body.preheader
%unroll_iter = and i32 %13, -2
br label %for.body
for.body: ; preds = %for.inc.1, %for.body.preheader.new
%indvars.iv = phi i64 [ %idxprom.i, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.inc.1 ]
%count.023 = phi i32 [ 0, %for.body.preheader.new ], [ %count.1.1, %for.inc.1 ]
%niter = phi i32 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.inc.1 ]
%arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv
%15 = load i32, ptr %arrayidx, align 4, !tbaa !5
%cmp1 = icmp eq i32 %15, %answer.0.lcssa.i
br i1 %cmp1, label %if.then, label %for.inc
if.then: ; preds = %for.body
%idxprom2 = sext i32 %count.023 to i64
%arrayidx3 = getelementptr inbounds i32, ptr %answer, i64 %idxprom2
%16 = trunc i64 %indvars.iv to i32
store i32 %16, ptr %arrayidx3, align 4, !tbaa !5
%add = add nsw i32 %count.023, 1
br label %for.inc
for.inc: ; preds = %for.body, %if.then
%count.1 = phi i32 [ %add, %if.then ], [ %count.023, %for.body ]
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%arrayidx.1 = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next
%17 = load i32, ptr %arrayidx.1, align 4, !tbaa !5
%cmp1.1 = icmp eq i32 %17, %answer.0.lcssa.i
br i1 %cmp1.1, label %if.then.1, label %for.inc.1
if.then.1: ; preds = %for.inc
%idxprom2.1 = sext i32 %count.1 to i64
%arrayidx3.1 = getelementptr inbounds i32, ptr %answer, i64 %idxprom2.1
%18 = trunc i64 %indvars.iv.next to i32
store i32 %18, ptr %arrayidx3.1, align 4, !tbaa !5
%add.1 = add nsw i32 %count.1, 1
br label %for.inc.1
for.inc.1: ; preds = %if.then.1, %for.inc
%count.1.1 = phi i32 [ %add.1, %if.then.1 ], [ %count.1, %for.inc ]
%indvars.iv.next.1 = add nsw i64 %indvars.iv, 2
%niter.next.1 = add i32 %niter, 2
%niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter
br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa.loopexit, label %for.body, !llvm.loop !100
for.end.loopexit.unr-lcssa.loopexit: ; preds = %for.inc.1
%19 = sext i32 %count.1.1 to i64
br label %for.end.loopexit.unr-lcssa
for.end.loopexit.unr-lcssa: ; preds = %for.end.loopexit.unr-lcssa.loopexit, %for.body.preheader
%indvars.iv.unr = phi i64 [ %idxprom.i, %for.body.preheader ], [ %indvars.iv.next.1, %for.end.loopexit.unr-lcssa.loopexit ]
%count.023.unr = phi i64 [ 0, %for.body.preheader ], [ %19, %for.end.loopexit.unr-lcssa.loopexit ]
%lcmp.mod.not = icmp eq i32 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.end, label %for.body.epil
for.body.epil: ; preds = %for.end.loopexit.unr-lcssa
%arrayidx.epil = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.unr
%20 = load i32, ptr %arrayidx.epil, align 4, !tbaa !5
%cmp1.epil = icmp eq i32 %20, %answer.0.lcssa.i
br i1 %cmp1.epil, label %if.then.epil, label %for.end
if.then.epil: ; preds = %for.body.epil
%arrayidx3.epil = getelementptr inbounds i32, ptr %answer, i64 %count.023.unr
%21 = trunc i64 %indvars.iv.unr to i32
store i32 %21, ptr %arrayidx3.epil, align 4, !tbaa !5
br label %for.end
for.end: ; preds = %for.end.loopexit.unr-lcssa, %if.then.epil, %for.body.epil, %fill_int.exit
ret void
}
; Function Attrs: nofree nosync nounwind memory(argmem: read) uwtable
define dso_local i32 @min_int_array(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #18 {
entry:
%idxprom = sext i32 %min to i64
%arrayidx = getelementptr inbounds i32, ptr %array, i64 %idxprom
%0 = load i32, ptr %arrayidx, align 4, !tbaa !5
%cmp.not.not9 = icmp slt i32 %min, %max
br i1 %cmp.not.not9, label %for.body.preheader, label %for.end
for.body.preheader: ; preds = %entry
%wide.trip.count = sext i32 %max to i64
%1 = sub nsw i64 %wide.trip.count, %idxprom
%min.iters.check = icmp ult i64 %1, 8
br i1 %min.iters.check, label %for.body.preheader15, label %vector.ph
vector.ph: ; preds = %for.body.preheader
%n.vec = and i64 %1, -8
%ind.end = add nsw i64 %n.vec, %idxprom
%minmax.ident.splatinsert = insertelement <4 x i32> poison, i32 %0, i64 0
%minmax.ident.splat = shufflevector <4 x i32> %minmax.ident.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
%invariant.gep = getelementptr i32, ptr %array, i64 %idxprom
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vec.phi = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %4, %vector.body ]
%vec.phi13 = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %5, %vector.body ]
%gep = getelementptr i32, ptr %invariant.gep, i64 %index
%2 = getelementptr i32, ptr %gep, i64 1
%wide.load = load <4 x i32>, ptr %2, align 4, !tbaa !5
%3 = getelementptr i32, ptr %gep, i64 5
%wide.load14 = load <4 x i32>, ptr %3, align 4, !tbaa !5
%4 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %vec.phi, <4 x i32> %wide.load)
%5 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %vec.phi13, <4 x i32> %wide.load14)
%index.next = add nuw i64 %index, 8
%6 = icmp eq i64 %index.next, %n.vec
br i1 %6, label %middle.block, label %vector.body, !llvm.loop !101
middle.block: ; preds = %vector.body
%rdx.minmax = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %4, <4 x i32> %5)
%7 = tail call i32 @llvm.vector.reduce.smin.v4i32(<4 x i32> %rdx.minmax)
%cmp.n = icmp eq i64 %1, %n.vec
br i1 %cmp.n, label %for.end, label %for.body.preheader15
for.body.preheader15: ; preds = %for.body.preheader, %middle.block
%indvars.iv.ph = phi i64 [ %idxprom, %for.body.preheader ], [ %ind.end, %middle.block ]
%answer.011.ph = phi i32 [ %0, %for.body.preheader ], [ %7, %middle.block ]
br label %for.body
for.body: ; preds = %for.body.preheader15, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader15 ]
%answer.011 = phi i32 [ %spec.select.i, %for.body ], [ %answer.011.ph, %for.body.preheader15 ]
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%arrayidx2 = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next
%8 = load i32, ptr %arrayidx2, align 4, !tbaa !5
%spec.select.i = tail call i32 @llvm.smin.i32(i32 %answer.011, i32 %8)
%exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !102
for.end: ; preds = %for.body, %middle.block, %entry
%answer.0.lcssa = phi i32 [ %0, %entry ], [ %7, %middle.block ], [ %spec.select.i, %for.body ]
ret i32 %answer.0.lcssa
}
; Function Attrs: nofree nosync nounwind memory(argmem: readwrite) uwtable
define dso_local void @min_int_array_num(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max, ptr nocapture noundef writeonly %answer) local_unnamed_addr #16 {
entry:
%idxprom.i = sext i32 %min to i64
%arrayidx.i = getelementptr inbounds i32, ptr %array, i64 %idxprom.i
%0 = load i32, ptr %arrayidx.i, align 4, !tbaa !5
%cmp.not.not9.i = icmp slt i32 %min, %max
br i1 %cmp.not.not9.i, label %for.body.preheader.i, label %min_int_array.exit
for.body.preheader.i: ; preds = %entry
%wide.trip.count.i = sext i32 %max to i64
%1 = sub nsw i64 %wide.trip.count.i, %idxprom.i
%min.iters.check = icmp ult i64 %1, 8
br i1 %min.iters.check, label %for.body.i.preheader, label %vector.ph
vector.ph: ; preds = %for.body.preheader.i
%n.vec = and i64 %1, -8
%ind.end = add nsw i64 %n.vec, %idxprom.i
%minmax.ident.splatinsert = insertelement <4 x i32> poison, i32 %0, i64 0
%minmax.ident.splat = shufflevector <4 x i32> %minmax.ident.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
%invariant.gep = getelementptr i32, ptr %array, i64 %idxprom.i
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vec.phi = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %4, %vector.body ]
%vec.phi26 = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %5, %vector.body ]
%gep = getelementptr i32, ptr %invariant.gep, i64 %index
%2 = getelementptr i32, ptr %gep, i64 1
%wide.load = load <4 x i32>, ptr %2, align 4, !tbaa !5
%3 = getelementptr i32, ptr %gep, i64 5
%wide.load27 = load <4 x i32>, ptr %3, align 4, !tbaa !5
%4 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %vec.phi, <4 x i32> %wide.load)
%5 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %vec.phi26, <4 x i32> %wide.load27)
%index.next = add nuw i64 %index, 8
%6 = icmp eq i64 %index.next, %n.vec
br i1 %6, label %middle.block, label %vector.body, !llvm.loop !103
middle.block: ; preds = %vector.body
%rdx.minmax = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %4, <4 x i32> %5)
%7 = tail call i32 @llvm.vector.reduce.smin.v4i32(<4 x i32> %rdx.minmax)
%cmp.n = icmp eq i64 %1, %n.vec
br i1 %cmp.n, label %min_int_array.exit, label %for.body.i.preheader
for.body.i.preheader: ; preds = %for.body.preheader.i, %middle.block
%indvars.iv.i.ph = phi i64 [ %idxprom.i, %for.body.preheader.i ], [ %ind.end, %middle.block ]
%answer.011.i.ph = phi i32 [ %0, %for.body.preheader.i ], [ %7, %middle.block ]
br label %for.body.i
for.body.i: ; preds = %for.body.i.preheader, %for.body.i
%indvars.iv.i = phi i64 [ %indvars.iv.next.i, %for.body.i ], [ %indvars.iv.i.ph, %for.body.i.preheader ]
%answer.011.i = phi i32 [ %spec.select.i.i, %for.body.i ], [ %answer.011.i.ph, %for.body.i.preheader ]
%indvars.iv.next.i = add nsw i64 %indvars.iv.i, 1
%arrayidx2.i = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next.i
%8 = load i32, ptr %arrayidx2.i, align 4, !tbaa !5
%spec.select.i.i = tail call i32 @llvm.smin.i32(i32 %answer.011.i, i32 %8)
%exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %wide.trip.count.i
br i1 %exitcond.not.i, label %min_int_array.exit, label %for.body.i, !llvm.loop !104
min_int_array.exit: ; preds = %for.body.i, %middle.block, %entry
%answer.0.lcssa.i = phi i32 [ %0, %entry ], [ %7, %middle.block ], [ %spec.select.i.i, %for.body.i ]
%sub = sub nsw i32 %max, %min
%cmp.not4.i = icmp slt i32 %sub, 0
br i1 %cmp.not4.i, label %fill_int.exit, label %for.body.preheader.i16
for.body.preheader.i16: ; preds = %min_int_array.exit
%9 = add nuw i32 %sub, 1
%10 = zext i32 %9 to i64
%11 = shl nuw nsw i64 %10, 2
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %answer, i8 -1, i64 %11, i1 false), !tbaa !5
br label %fill_int.exit
fill_int.exit: ; preds = %for.body.preheader.i16, %min_int_array.exit
%cmp.not22 = icmp sgt i32 %min, %max
br i1 %cmp.not22, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %fill_int.exit
%12 = add i32 %max, 1
%13 = sub i32 %12, %min
%xtraiter = and i32 %13, 1
%14 = icmp eq i32 %max, %min
br i1 %14, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new
for.body.preheader.new: ; preds = %for.body.preheader
%unroll_iter = and i32 %13, -2
br label %for.body
for.body: ; preds = %for.inc.1, %for.body.preheader.new
%indvars.iv = phi i64 [ %idxprom.i, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.inc.1 ]
%count.023 = phi i32 [ 0, %for.body.preheader.new ], [ %count.1.1, %for.inc.1 ]
%niter = phi i32 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.inc.1 ]
%arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv
%15 = load i32, ptr %arrayidx, align 4, !tbaa !5
%cmp1 = icmp eq i32 %15, %answer.0.lcssa.i
br i1 %cmp1, label %if.then, label %for.inc
if.then: ; preds = %for.body
%idxprom2 = sext i32 %count.023 to i64
%arrayidx3 = getelementptr inbounds i32, ptr %answer, i64 %idxprom2
%16 = trunc i64 %indvars.iv to i32
store i32 %16, ptr %arrayidx3, align 4, !tbaa !5
%add = add nsw i32 %count.023, 1
br label %for.inc
for.inc: ; preds = %for.body, %if.then
%count.1 = phi i32 [ %add, %if.then ], [ %count.023, %for.body ]
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%arrayidx.1 = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next
%17 = load i32, ptr %arrayidx.1, align 4, !tbaa !5
%cmp1.1 = icmp eq i32 %17, %answer.0.lcssa.i
br i1 %cmp1.1, label %if.then.1, label %for.inc.1
if.then.1: ; preds = %for.inc
%idxprom2.1 = sext i32 %count.1 to i64
%arrayidx3.1 = getelementptr inbounds i32, ptr %answer, i64 %idxprom2.1
%18 = trunc i64 %indvars.iv.next to i32
store i32 %18, ptr %arrayidx3.1, align 4, !tbaa !5
%add.1 = add nsw i32 %count.1, 1
br label %for.inc.1
for.inc.1: ; preds = %if.then.1, %for.inc
%count.1.1 = phi i32 [ %add.1, %if.then.1 ], [ %count.1, %for.inc ]
%indvars.iv.next.1 = add nsw i64 %indvars.iv, 2
%niter.next.1 = add i32 %niter, 2
%niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter
br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa.loopexit, label %for.body, !llvm.loop !105
for.end.loopexit.unr-lcssa.loopexit: ; preds = %for.inc.1
%19 = sext i32 %count.1.1 to i64
br label %for.end.loopexit.unr-lcssa
for.end.loopexit.unr-lcssa: ; preds = %for.end.loopexit.unr-lcssa.loopexit, %for.body.preheader
%indvars.iv.unr = phi i64 [ %idxprom.i, %for.body.preheader ], [ %indvars.iv.next.1, %for.end.loopexit.unr-lcssa.loopexit ]
%count.023.unr = phi i64 [ 0, %for.body.preheader ], [ %19, %for.end.loopexit.unr-lcssa.loopexit ]
%lcmp.mod.not = icmp eq i32 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.end, label %for.body.epil
for.body.epil: ; preds = %for.end.loopexit.unr-lcssa
%arrayidx.epil = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.unr
%20 = load i32, ptr %arrayidx.epil, align 4, !tbaa !5
%cmp1.epil = icmp eq i32 %20, %answer.0.lcssa.i
br i1 %cmp1.epil, label %if.then.epil, label %for.end
if.then.epil: ; preds = %for.body.epil
%arrayidx3.epil = getelementptr inbounds i32, ptr %answer, i64 %count.023.unr
%21 = trunc i64 %indvars.iv.unr to i32
store i32 %21, ptr %arrayidx3.epil, align 4, !tbaa !5
br label %for.end
for.end: ; preds = %for.end.loopexit.unr-lcssa, %if.then.epil, %for.body.epil, %fill_int.exit
ret void
}
; Function Attrs: nofree nounwind memory(argmem: read) uwtable
define dso_local i32 @max_char_array_dic(i32 noundef %size, ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #19 {
entry:
%0 = zext i32 %size to i64
%cmp.not.not11 = icmp slt i32 %min, %max
br i1 %cmp.not.not11, label %for.body.preheader, label %for.end
for.body.preheader: ; preds = %entry
%1 = sext i32 %min to i64
%wide.trip.count = sext i32 %max to i64
br label %for.body
for.body: ; preds = %for.body.preheader, %for.body
%indvars.iv = phi i64 [ %1, %for.body.preheader ], [ %indvars.iv.next, %for.body ]
%answer.013 = phi i32 [ %min, %for.body.preheader ], [ %spec.select, %for.body ]
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%idxprom = sext i32 %answer.013 to i64
%2 = mul nsw i64 %idxprom, %0
%arrayidx = getelementptr inbounds i8, ptr %array, i64 %2
%3 = mul nsw i64 %indvars.iv.next, %0
%arrayidx2 = getelementptr inbounds i8, ptr %array, i64 %3
%call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx, ptr noundef nonnull dereferenceable(1) %arrayidx2) #26
%cmp3 = icmp slt i32 %call, 0
%4 = trunc i64 %indvars.iv.next to i32
%spec.select = select i1 %cmp3, i32 %4, i32 %answer.013
%exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !106
for.end: ; preds = %for.body, %entry
%answer.0.lcssa = phi i32 [ %min, %entry ], [ %spec.select, %for.body ]
ret i32 %answer.0.lcssa
}
; Function Attrs: nofree nounwind memory(argmem: read) uwtable
define dso_local i32 @min_char_array_dic(i32 noundef %size, ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #19 {
entry:
%0 = zext i32 %size to i64
%cmp.not.not11 = icmp slt i32 %min, %max
br i1 %cmp.not.not11, label %for.body.preheader, label %for.end
for.body.preheader: ; preds = %entry
%1 = sext i32 %min to i64
%wide.trip.count = sext i32 %max to i64
br label %for.body
for.body: ; preds = %for.body.preheader, %for.body
%indvars.iv = phi i64 [ %1, %for.body.preheader ], [ %indvars.iv.next, %for.body ]
%answer.013 = phi i32 [ %min, %for.body.preheader ], [ %spec.select, %for.body ]
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%idxprom = sext i32 %answer.013 to i64
%2 = mul nsw i64 %idxprom, %0
%arrayidx = getelementptr inbounds i8, ptr %array, i64 %2
%3 = mul nsw i64 %indvars.iv.next, %0
%arrayidx2 = getelementptr inbounds i8, ptr %array, i64 %3
%call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx, ptr noundef nonnull dereferenceable(1) %arrayidx2) #26
%cmp3 = icmp sgt i32 %call, 0
%4 = trunc i64 %indvars.iv.next to i32
%spec.select = select i1 %cmp3, i32 %4, i32 %answer.013
%exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !107
for.end: ; preds = %for.body, %entry
%answer.0.lcssa = phi i32 [ %min, %entry ], [ %spec.select, %for.body ]
ret i32 %answer.0.lcssa
}
; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable
define dso_local i32 @sum_array(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #20 {
entry:
%cmp.not6 = icmp sgt i32 %min, %max
br i1 %cmp.not6, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %min to i64
%1 = add i32 %max, 1
%2 = sub i32 %max, %min
%3 = zext i32 %2 to i64
%4 = add nuw nsw i64 %3, 1
%min.iters.check = icmp ult i32 %2, 7
br i1 %min.iters.check, label %for.body.preheader12, label %vector.ph
vector.ph: ; preds = %for.body.preheader
%n.vec = and i64 %4, 8589934584
%ind.end = add nsw i64 %n.vec, %0
%invariant.gep = getelementptr i32, ptr %array, i64 %0
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %6, %vector.body ]
%vec.phi10 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %7, %vector.body ]
%gep = getelementptr i32, ptr %invariant.gep, i64 %index
%wide.load = load <4 x i32>, ptr %gep, align 4, !tbaa !5
%5 = getelementptr inbounds i32, ptr %gep, i64 4
%wide.load11 = load <4 x i32>, ptr %5, align 4, !tbaa !5
%6 = add <4 x i32> %wide.load, %vec.phi
%7 = add <4 x i32> %wide.load11, %vec.phi10
%index.next = add nuw i64 %index, 8
%8 = icmp eq i64 %index.next, %n.vec
br i1 %8, label %middle.block, label %vector.body, !llvm.loop !108
middle.block: ; preds = %vector.body
%bin.rdx = add <4 x i32> %7, %6
%9 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
%cmp.n = icmp eq i64 %4, %n.vec
br i1 %cmp.n, label %for.end, label %for.body.preheader12
for.body.preheader12: ; preds = %for.body.preheader, %middle.block
%indvars.iv.ph = phi i64 [ %0, %for.body.preheader ], [ %ind.end, %middle.block ]
%answer.08.ph = phi i32 [ 0, %for.body.preheader ], [ %9, %middle.block ]
br label %for.body
for.body: ; preds = %for.body.preheader12, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader12 ]
%answer.08 = phi i32 [ %add, %for.body ], [ %answer.08.ph, %for.body.preheader12 ]
%arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv
%10 = load i32, ptr %arrayidx, align 4, !tbaa !5
%add = add nsw i32 %10, %answer.08
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%lftr.wideiv = trunc i64 %indvars.iv.next to i32
%exitcond.not = icmp eq i32 %1, %lftr.wideiv
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !109
for.end: ; preds = %for.body, %middle.block, %entry
%answer.0.lcssa = phi i32 [ 0, %entry ], [ %9, %middle.block ], [ %add, %for.body ]
ret i32 %answer.0.lcssa
}
; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable
define dso_local zeroext i1 @detect_int(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max, i32 noundef %element) local_unnamed_addr #20 {
entry:
%cmp.not10 = icmp sgt i32 %min, %max
br i1 %cmp.not10, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %min to i64
%1 = add i32 %max, 1
br label %for.body
for.body: ; preds = %for.body.preheader, %for.inc
%indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.inc ]
%arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv
%2 = load i32, ptr %arrayidx, align 4, !tbaa !5
%cmp1 = icmp eq i32 %2, %element
br i1 %cmp1, label %for.end.loopexit.split.loop.exit, label %for.inc
for.inc: ; preds = %for.body
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%lftr.wideiv = trunc i64 %indvars.iv.next to i32
%exitcond.not = icmp eq i32 %1, %lftr.wideiv
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !110
for.end.loopexit.split.loop.exit: ; preds = %for.body
%3 = trunc i64 %indvars.iv to i32
br label %for.end
for.end: ; preds = %for.inc, %for.end.loopexit.split.loop.exit, %entry
%i.0.lcssa = phi i32 [ %min, %entry ], [ %3, %for.end.loopexit.split.loop.exit ], [ %1, %for.inc ]
%cmp3.not = icmp sle i32 %i.0.lcssa, %max
ret i1 %cmp3.not
}
; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable
define dso_local zeroext i1 @detect_char(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max, i8 noundef signext %element) local_unnamed_addr #20 {
entry:
%cmp.not13 = icmp sgt i32 %min, %max
br i1 %cmp.not13, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %min to i64
%1 = add i32 %max, 1
br label %for.body
for.body: ; preds = %for.body.preheader, %for.inc
%indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.inc ]
%arrayidx = getelementptr inbounds i8, ptr %array, i64 %indvars.iv
%2 = load i8, ptr %arrayidx, align 1, !tbaa !14
%cmp2 = icmp eq i8 %2, %element
br i1 %cmp2, label %for.end.loopexit.split.loop.exit, label %for.inc
for.inc: ; preds = %for.body
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%lftr.wideiv = trunc i64 %indvars.iv.next to i32
%exitcond.not = icmp eq i32 %1, %lftr.wideiv
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !111
for.end.loopexit.split.loop.exit: ; preds = %for.body
%3 = trunc i64 %indvars.iv to i32
br label %for.end
for.end: ; preds = %for.inc, %for.end.loopexit.split.loop.exit, %entry
%i.0.lcssa = phi i32 [ %min, %entry ], [ %3, %for.end.loopexit.split.loop.exit ], [ %1, %for.inc ]
%cmp5.not = icmp sle i32 %i.0.lcssa, %max
ret i1 %cmp5.not
}
; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable
define dso_local zeroext i1 @detect_char_array(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max, ptr nocapture noundef readonly %element, i32 noundef %start, i32 noundef %goal) local_unnamed_addr #20 {
entry:
%sub = sub nsw i32 %goal, %start
%sub1 = sub nsw i32 %max, %min
%cmp.not = icmp sgt i32 %sub, %sub1
br i1 %cmp.not, label %if.end24, label %for.cond.preheader
for.cond.preheader: ; preds = %entry
%sub3 = sub nsw i32 %max, %sub
%cmp4.not42 = icmp slt i32 %sub3, %min
br i1 %cmp4.not42, label %if.end24, label %for.cond5.preheader.lr.ph
for.cond5.preheader.lr.ph: ; preds = %for.cond.preheader
%cmp6.not39 = icmp sgt i32 %start, %goal
%add16 = add i32 %goal, 1
br i1 %cmp6.not39, label %for.cond5.preheader.lr.ph.split.us, label %for.cond5.preheader.preheader
for.cond5.preheader.preheader: ; preds = %for.cond5.preheader.lr.ph
%0 = sext i32 %start to i64
br label %for.cond5.preheader
for.cond5.preheader.lr.ph.split.us: ; preds = %for.cond5.preheader.lr.ph
%cmp17.us = icmp eq i32 %add16, %start
br label %if.end24
for.cond5.preheader: ; preds = %for.end, %for.cond5.preheader.preheader
%i.043 = phi i32 [ %min, %for.cond5.preheader.preheader ], [ %add22, %for.end ]
%add = sub i32 %i.043, %start
br label %for.body7
for.body7: ; preds = %for.cond5.preheader, %for.inc
%indvars.iv = phi i64 [ %0, %for.cond5.preheader ], [ %indvars.iv.next, %for.inc ]
%1 = trunc i64 %indvars.iv to i32
%sub8 = add i32 %add, %1
%idxprom = sext i32 %sub8 to i64
%arrayidx = getelementptr inbounds i8, ptr %array, i64 %idxprom
%2 = load i8, ptr %arrayidx, align 1, !tbaa !14
%arrayidx10 = getelementptr inbounds i8, ptr %element, i64 %indvars.iv
%3 = load i8, ptr %arrayidx10, align 1, !tbaa !14
%cmp12 = icmp eq i8 %2, %3
br i1 %cmp12, label %for.inc, label %for.end
for.inc: ; preds = %for.body7
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%lftr.wideiv = trunc i64 %indvars.iv.next to i32
%exitcond.not = icmp eq i32 %add16, %lftr.wideiv
br i1 %exitcond.not, label %if.end24, label %for.body7, !llvm.loop !112
for.end: ; preds = %for.body7
%cmp17 = icmp eq i32 %add16, %1
%add22 = add nsw i32 %i.043, 1
%cmp4.not.not = icmp sge i32 %i.043, %sub3
%or.cond.not = or i1 %cmp4.not.not, %cmp17
br i1 %or.cond.not, label %if.end24, label %for.cond5.preheader, !llvm.loop !113
if.end24: ; preds = %for.end, %for.inc, %for.cond5.preheader.lr.ph.split.us, %for.cond.preheader, %entry
%answer.0 = phi i1 [ false, %entry ], [ false, %for.cond.preheader ], [ %cmp17.us, %for.cond5.preheader.lr.ph.split.us ], [ true, %for.inc ], [ %cmp17, %for.end ]
ret i1 %answer.0
}
; Function Attrs: nofree nosync nounwind memory(argmem: read) uwtable
define dso_local i32 @count_differentelement_int(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #18 {
entry:
%0 = zext i32 %max to i64
%vla = alloca i32, i64 %0, align 16
%cmp.not4.i = icmp slt i32 %max, 0
br i1 %cmp.not4.i, label %fill_int.exit, label %for.body.preheader.i
for.body.preheader.i: ; preds = %entry
%1 = add nuw i32 %max, 1
%2 = zext i32 %1 to i64
%3 = shl nuw nsw i64 %2, 2
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %vla, i8 0, i64 %3, i1 false), !tbaa !5
br label %fill_int.exit
fill_int.exit: ; preds = %for.body.preheader.i, %entry
%cmp.not28 = icmp sgt i32 %min, %max
br i1 %cmp.not28, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %fill_int.exit
%4 = sext i32 %min to i64
%5 = add i32 %max, 1
br label %for.body
for.body: ; preds = %for.body.preheader, %for.inc
%indvars.iv = phi i64 [ %4, %for.body.preheader ], [ %indvars.iv.next, %for.inc ]
%answer.030 = phi i32 [ 0, %for.body.preheader ], [ %answer.1, %for.inc ]
%arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv
%6 = load i32, ptr %arrayidx, align 4, !tbaa !5
%cmp.not10.i = icmp slt i32 %answer.030, 1
br i1 %cmp.not10.i, label %detect_int.exit, label %for.body.i19.preheader
for.body.i19.preheader: ; preds = %for.body
%zext = zext i32 %answer.030 to i64
br label %for.body.i19
for.body.i19: ; preds = %for.body.i19.preheader, %for.inc.i
%indvars.iv.i20 = phi i64 [ %indvars.iv.next.i22, %for.inc.i ], [ 0, %for.body.i19.preheader ]
%arrayidx.i21 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.i20
%7 = load i32, ptr %arrayidx.i21, align 4, !tbaa !5
%cmp1.i = icmp eq i32 %7, %6
br i1 %cmp1.i, label %for.end.loopexit.split.loop.exit.i, label %for.inc.i
for.inc.i: ; preds = %for.body.i19
%indvars.iv.next.i22 = add nuw nsw i64 %indvars.iv.i20, 1
%8 = icmp eq i64 %indvars.iv.next.i22, %zext
br i1 %8, label %if.then, label %for.body.i19, !llvm.loop !110
for.end.loopexit.split.loop.exit.i: ; preds = %for.body.i19
%9 = trunc i64 %indvars.iv.i20 to i32
br label %detect_int.exit
detect_int.exit: ; preds = %for.body, %for.end.loopexit.split.loop.exit.i
%i.0.lcssa.i = phi i32 [ 0, %for.body ], [ %9, %for.end.loopexit.split.loop.exit.i ]
%cmp3.not.i.not.not = icmp slt i32 %i.0.lcssa.i, %answer.030
br i1 %cmp3.not.i.not.not, label %for.inc, label %if.then
if.then: ; preds = %for.inc.i, %detect_int.exit
%idxprom5 = sext i32 %answer.030 to i64
%arrayidx6 = getelementptr inbounds i32, ptr %vla, i64 %idxprom5
store i32 %6, ptr %arrayidx6, align 4, !tbaa !5
%add = add nsw i32 %answer.030, 1
br label %for.inc
for.inc: ; preds = %detect_int.exit, %if.then
%answer.1 = phi i32 [ %add, %if.then ], [ %answer.030, %detect_int.exit ]
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%lftr.wideiv = trunc i64 %indvars.iv.next to i32
%exitcond.not = icmp eq i32 %5, %lftr.wideiv
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !114
for.end: ; preds = %for.inc, %fill_int.exit
%answer.0.lcssa = phi i32 [ 0, %fill_int.exit ], [ %answer.1, %for.inc ]
ret i32 %answer.0.lcssa
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #21
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #21
; Function Attrs: nofree nosync nounwind memory(argmem: read) uwtable
define dso_local i32 @count_differentelement_char(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #18 {
entry:
%0 = zext i32 %max to i64
%vla = alloca i8, i64 %0, align 16
%cmp.not4.i = icmp slt i32 %max, 0
br i1 %cmp.not4.i, label %fill_char.exit, label %for.body.preheader.i
for.body.preheader.i: ; preds = %entry
%1 = add nuw nsw i64 %0, 1
call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %vla, i8 0, i64 %1, i1 false), !tbaa !14
br label %fill_char.exit
fill_char.exit: ; preds = %entry, %for.body.preheader.i
%cmp.not20 = icmp sgt i32 %min, %max
br i1 %cmp.not20, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %fill_char.exit
%2 = sext i32 %min to i64
%3 = add i32 %max, 1
br label %for.body
for.body: ; preds = %for.body.preheader, %for.inc
%indvars.iv26 = phi i64 [ %2, %for.body.preheader ], [ %indvars.iv.next27, %for.inc ]
%answer.022 = phi i32 [ 0, %for.body.preheader ], [ %answer.1, %for.inc ]
%cmp.not.i = icmp slt i32 %answer.022, 1
br i1 %cmp.not.i, label %for.body.if.then_crit_edge, label %for.cond5.preheader.lr.ph.i
for.body.if.then_crit_edge: ; preds = %for.body
%arrayidx.phi.trans.insert = getelementptr inbounds i8, ptr %array, i64 %indvars.iv26
%.pre30 = load i8, ptr %arrayidx.phi.trans.insert, align 1, !tbaa !14
br label %if.then
for.cond5.preheader.lr.ph.i: ; preds = %for.body
%4 = zext i32 %answer.022 to i64
%arrayidx10.i.phi.trans.insert = getelementptr inbounds i8, ptr %array, i64 %indvars.iv26
%.pre = load i8, ptr %arrayidx10.i.phi.trans.insert, align 1, !tbaa !14
br label %for.cond5.preheader.i
for.cond.i: ; preds = %for.cond5.preheader.i
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%exitcond.not = icmp eq i64 %indvars.iv.next, %4
br i1 %exitcond.not, label %if.then, label %for.cond5.preheader.i, !llvm.loop !113
for.cond5.preheader.i: ; preds = %for.cond.i, %for.cond5.preheader.lr.ph.i
%indvars.iv = phi i64 [ %indvars.iv.next, %for.cond.i ], [ 0, %for.cond5.preheader.lr.ph.i ]
%arrayidx.i = getelementptr inbounds i8, ptr %vla, i64 %indvars.iv
%5 = load i8, ptr %arrayidx.i, align 1, !tbaa !14
%cmp12.i = icmp eq i8 %5, %.pre
br i1 %cmp12.i, label %for.inc, label %for.cond.i
if.then: ; preds = %for.cond.i, %for.body.if.then_crit_edge
%6 = phi i8 [ %.pre30, %for.body.if.then_crit_edge ], [ %.pre, %for.cond.i ]
%idxprom3 = sext i32 %answer.022 to i64
%arrayidx4 = getelementptr inbounds i8, ptr %vla, i64 %idxprom3
store i8 %6, ptr %arrayidx4, align 1, !tbaa !14
%add = add nsw i32 %answer.022, 1
br label %for.inc
for.inc: ; preds = %for.cond5.preheader.i, %if.then
%answer.1 = phi i32 [ %add, %if.then ], [ %answer.022, %for.cond5.preheader.i ]
%indvars.iv.next27 = add nsw i64 %indvars.iv26, 1
%lftr.wideiv = trunc i64 %indvars.iv.next27 to i32
%exitcond29.not = icmp eq i32 %3, %lftr.wideiv
br i1 %exitcond29.not, label %for.end, label %for.body, !llvm.loop !115
for.end: ; preds = %for.inc, %fill_char.exit
%answer.0.lcssa = phi i32 [ 0, %fill_char.exit ], [ %answer.1, %for.inc ]
ret i32 %answer.0.lcssa
}
; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable
define dso_local i32 @count_equalelement_int(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max, i32 noundef %element) local_unnamed_addr #20 {
entry:
%cmp.not6 = icmp sgt i32 %min, %max
br i1 %cmp.not6, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %min to i64
%1 = add i32 %max, 1
%2 = sub i32 %max, %min
%3 = zext i32 %2 to i64
%4 = add nuw nsw i64 %3, 1
%min.iters.check = icmp ult i32 %2, 7
br i1 %min.iters.check, label %for.body.preheader12, label %vector.ph
vector.ph: ; preds = %for.body.preheader
%n.vec = and i64 %4, 8589934584
%ind.end = add nsw i64 %n.vec, %0
%broadcast.splatinsert = insertelement <4 x i32> poison, i32 %element, i64 0
%broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
%invariant.gep = getelementptr i32, ptr %array, i64 %0
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %10, %vector.body ]
%vec.phi10 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %11, %vector.body ]
%gep = getelementptr i32, ptr %invariant.gep, i64 %index
%wide.load = load <4 x i32>, ptr %gep, align 4, !tbaa !5
%5 = getelementptr inbounds i32, ptr %gep, i64 4
%wide.load11 = load <4 x i32>, ptr %5, align 4, !tbaa !5
%6 = icmp eq <4 x i32> %wide.load, %broadcast.splat
%7 = icmp eq <4 x i32> %wide.load11, %broadcast.splat
%8 = zext <4 x i1> %6 to <4 x i32>
%9 = zext <4 x i1> %7 to <4 x i32>
%10 = add <4 x i32> %vec.phi, %8
%11 = add <4 x i32> %vec.phi10, %9
%index.next = add nuw i64 %index, 8
%12 = icmp eq i64 %index.next, %n.vec
br i1 %12, label %middle.block, label %vector.body, !llvm.loop !116
middle.block: ; preds = %vector.body
%bin.rdx = add <4 x i32> %11, %10
%13 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
%cmp.n = icmp eq i64 %4, %n.vec
br i1 %cmp.n, label %for.end, label %for.body.preheader12
for.body.preheader12: ; preds = %for.body.preheader, %middle.block
%indvars.iv.ph = phi i64 [ %0, %for.body.preheader ], [ %ind.end, %middle.block ]
%answer.08.ph = phi i32 [ 0, %for.body.preheader ], [ %13, %middle.block ]
br label %for.body
for.body: ; preds = %for.body.preheader12, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader12 ]
%answer.08 = phi i32 [ %spec.select, %for.body ], [ %answer.08.ph, %for.body.preheader12 ]
%arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv
%14 = load i32, ptr %arrayidx, align 4, !tbaa !5
%cmp1 = icmp eq i32 %14, %element
%add = zext i1 %cmp1 to i32
%spec.select = add nuw nsw i32 %answer.08, %add
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%lftr.wideiv = trunc i64 %indvars.iv.next to i32
%exitcond.not = icmp eq i32 %1, %lftr.wideiv
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !117
for.end: ; preds = %for.body, %middle.block, %entry
%answer.0.lcssa = phi i32 [ 0, %entry ], [ %13, %middle.block ], [ %spec.select, %for.body ]
ret i32 %answer.0.lcssa
}
; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable
define dso_local i32 @count_equalelement_char(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max, i8 noundef signext %element) local_unnamed_addr #20 {
entry:
%cmp.not8 = icmp sgt i32 %min, %max
br i1 %cmp.not8, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %min to i64
%1 = add i32 %max, 1
%2 = sub i32 %max, %min
%3 = zext i32 %2 to i64
%4 = add nuw nsw i64 %3, 1
%min.iters.check = icmp ult i32 %2, 7
br i1 %min.iters.check, label %for.body.preheader14, label %vector.ph
vector.ph: ; preds = %for.body.preheader
%n.vec = and i64 %4, 8589934584
%ind.end = add nsw i64 %n.vec, %0
%broadcast.splatinsert = insertelement <4 x i8> poison, i8 %element, i64 0
%broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer
%invariant.gep = getelementptr i8, ptr %array, i64 %0
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %10, %vector.body ]
%vec.phi12 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %11, %vector.body ]
%gep = getelementptr i8, ptr %invariant.gep, i64 %index
%wide.load = load <4 x i8>, ptr %gep, align 1, !tbaa !14
%5 = getelementptr inbounds i8, ptr %gep, i64 4
%wide.load13 = load <4 x i8>, ptr %5, align 1, !tbaa !14
%6 = icmp eq <4 x i8> %wide.load, %broadcast.splat
%7 = icmp eq <4 x i8> %wide.load13, %broadcast.splat
%8 = zext <4 x i1> %6 to <4 x i32>
%9 = zext <4 x i1> %7 to <4 x i32>
%10 = add <4 x i32> %vec.phi, %8
%11 = add <4 x i32> %vec.phi12, %9
%index.next = add nuw i64 %index, 8
%12 = icmp eq i64 %index.next, %n.vec
br i1 %12, label %middle.block, label %vector.body, !llvm.loop !118
middle.block: ; preds = %vector.body
%bin.rdx = add <4 x i32> %11, %10
%13 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
%cmp.n = icmp eq i64 %4, %n.vec
br i1 %cmp.n, label %for.end, label %for.body.preheader14
for.body.preheader14: ; preds = %for.body.preheader, %middle.block
%indvars.iv.ph = phi i64 [ %0, %for.body.preheader ], [ %ind.end, %middle.block ]
%answer.010.ph = phi i32 [ 0, %for.body.preheader ], [ %13, %middle.block ]
br label %for.body
for.body: ; preds = %for.body.preheader14, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader14 ]
%answer.010 = phi i32 [ %spec.select, %for.body ], [ %answer.010.ph, %for.body.preheader14 ]
%arrayidx = getelementptr inbounds i8, ptr %array, i64 %indvars.iv
%14 = load i8, ptr %arrayidx, align 1, !tbaa !14
%cmp2 = icmp eq i8 %14, %element
%add = zext i1 %cmp2 to i32
%spec.select = add nuw nsw i32 %answer.010, %add
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%lftr.wideiv = trunc i64 %indvars.iv.next to i32
%exitcond.not = icmp eq i32 %1, %lftr.wideiv
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !119
for.end: ; preds = %for.body, %middle.block, %entry
%answer.0.lcssa = phi i32 [ 0, %entry ], [ %13, %middle.block ], [ %spec.select, %for.body ]
ret i32 %answer.0.lcssa
}
; Function Attrs: nofree nounwind memory(argmem: read) uwtable
define dso_local i32 @count_equalelement_char_array(i32 noundef %size, ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max, ptr nocapture noundef readonly %element) local_unnamed_addr #19 {
entry:
%0 = zext i32 %size to i64
%cmp.not6 = icmp sgt i32 %min, %max
br i1 %cmp.not6, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %entry
%1 = sext i32 %min to i64
%2 = add i32 %max, 1
br label %for.body
for.body: ; preds = %for.body.preheader, %for.body
%indvars.iv = phi i64 [ %1, %for.body.preheader ], [ %indvars.iv.next, %for.body ]
%answer.08 = phi i32 [ 0, %for.body.preheader ], [ %spec.select, %for.body ]
%3 = mul nsw i64 %indvars.iv, %0
%arrayidx = getelementptr inbounds i8, ptr %array, i64 %3
%call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx, ptr noundef nonnull dereferenceable(1) %element) #26
%cmp1 = icmp eq i32 %call, 0
%add = zext i1 %cmp1 to i32
%spec.select = add nuw nsw i32 %answer.08, %add
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%lftr.wideiv = trunc i64 %indvars.iv.next to i32
%exitcond.not = icmp eq i32 %2, %lftr.wideiv
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !120
for.end: ; preds = %for.body, %entry
%answer.0.lcssa = phi i32 [ 0, %entry ], [ %spec.select, %for.body ]
ret i32 %answer.0.lcssa
}
; Function Attrs: nofree nounwind uwtable
define dso_local void @scanf_int_array(ptr noundef %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #10 {
entry:
%cmp.not3 = icmp sgt i32 %min, %max
br i1 %cmp.not3, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %min to i64
%1 = add i32 %max, 1
br label %for.body
for.body: ; preds = %for.body.preheader, %for.body
%indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ]
%arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv
%call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef %arrayidx)
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%lftr.wideiv = trunc i64 %indvars.iv.next to i32
%exitcond.not = icmp eq i32 %1, %lftr.wideiv
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !121
for.end: ; preds = %for.body, %entry
ret void
}
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #22
; Function Attrs: nofree nounwind uwtable
define dso_local void @scanf_int_array_2(ptr noundef %array1, ptr noundef %array2, i32 noundef %min, i32 noundef %max) local_unnamed_addr #10 {
entry:
%cmp.not6 = icmp sgt i32 %min, %max
br i1 %cmp.not6, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %min to i64
%1 = add i32 %max, 1
br label %for.body
for.body: ; preds = %for.body.preheader, %for.body
%indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ]
%arrayidx = getelementptr inbounds i32, ptr %array1, i64 %indvars.iv
%arrayidx2 = getelementptr inbounds i32, ptr %array2, i64 %indvars.iv
%call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef %arrayidx, ptr noundef %arrayidx2)
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%lftr.wideiv = trunc i64 %indvars.iv.next to i32
%exitcond.not = icmp eq i32 %1, %lftr.wideiv
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !122
for.end: ; preds = %for.body, %entry
ret void
}
; Function Attrs: nofree nounwind uwtable
define dso_local void @scanf_int_array_3(ptr noundef %array1, ptr noundef %array2, ptr noundef %array3, i32 noundef %min, i32 noundef %max) local_unnamed_addr #10 {
entry:
%cmp.not9 = icmp sgt i32 %min, %max
br i1 %cmp.not9, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %min to i64
%1 = add i32 %max, 1
br label %for.body
for.body: ; preds = %for.body.preheader, %for.body
%indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ]
%arrayidx = getelementptr inbounds i32, ptr %array1, i64 %indvars.iv
%arrayidx2 = getelementptr inbounds i32, ptr %array2, i64 %indvars.iv
%arrayidx4 = getelementptr inbounds i32, ptr %array3, i64 %indvars.iv
%call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef %arrayidx, ptr noundef %arrayidx2, ptr noundef %arrayidx4)
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%lftr.wideiv = trunc i64 %indvars.iv.next to i32
%exitcond.not = icmp eq i32 %1, %lftr.wideiv
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !123
for.end: ; preds = %for.body, %entry
ret void
}
; Function Attrs: nofree nounwind uwtable
define dso_local void @scanf_char_array(ptr noundef %array, i32 noundef %num) local_unnamed_addr #10 {
entry:
%array8 = ptrtoint ptr %array to i64
%call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef %array)
%call1 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %array) #26
%0 = trunc i64 %call1 to i32
%conv = add i32 %0, -1
%cmp.not24.i = icmp slt i32 %conv, 0
br i1 %cmp.not24.i, label %for.cond3.preheader.i, label %iter.check
iter.check: ; preds = %entry
%1 = zext i32 %conv to i64
%2 = sext i32 %num to i64
%invariant.gep.i = getelementptr i8, ptr %array, i64 %2
%3 = add nuw nsw i64 %1, 1
%min.iters.check = icmp ult i32 %conv, 3
br i1 %min.iters.check, label %for.body.i.preheader, label %vector.scevcheck
vector.scevcheck: ; preds = %iter.check
%4 = getelementptr i8, ptr %array, i64 %2
%scevgep = getelementptr i8, ptr %4, i64 %1
%5 = icmp ugt ptr %4, %scevgep
%scevgep4 = getelementptr i8, ptr %array, i64 %1
%6 = icmp ult ptr %scevgep4, %array
%7 = or i1 %5, %6
br i1 %7, label %for.body.i.preheader, label %vector.memcheck
vector.memcheck: ; preds = %vector.scevcheck
%8 = add i64 %array8, %1
%9 = add i64 %array8, %2
%10 = add i64 %9, %1
%11 = sub i64 %8, %10
%diff.check = icmp ult i64 %11, 16
br i1 %diff.check, label %for.body.i.preheader, label %vector.main.loop.iter.check
vector.main.loop.iter.check: ; preds = %vector.memcheck
%min.iters.check9 = icmp ult i32 %conv, 15
br i1 %min.iters.check9, label %vec.epilog.ph, label %vector.ph
vector.ph: ; preds = %vector.main.loop.iter.check
%n.vec = and i64 %3, 8589934576
%invariant.gep = getelementptr i8, ptr %array, i64 -15
%invariant.gep21 = getelementptr i8, ptr %invariant.gep.i, i64 -15
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%offset.idx = sub i64 %1, %index
%gep = getelementptr i8, ptr %invariant.gep, i64 %offset.idx
%wide.load = load <16 x i8>, ptr %gep, align 1, !tbaa !14
%gep22 = getelementptr i8, ptr %invariant.gep21, i64 %offset.idx
store <16 x i8> %wide.load, ptr %gep22, align 1, !tbaa !14
%index.next = add nuw i64 %index, 16
%12 = icmp eq i64 %index.next, %n.vec
br i1 %12, label %middle.block, label %vector.body, !llvm.loop !124
middle.block: ; preds = %vector.body
%cmp.n = icmp eq i64 %3, %n.vec
br i1 %cmp.n, label %for.cond3.preheader.i, label %vec.epilog.iter.check
vec.epilog.iter.check: ; preds = %middle.block
%ind.end13 = sub nsw i64 %1, %n.vec
%n.vec.remaining = and i64 %3, 12
%min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
br i1 %min.epilog.iters.check, label %for.body.i.preheader, label %vec.epilog.ph
vec.epilog.ph: ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
%vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
%n.vec12 = and i64 %3, 8589934588
%ind.end = sub nsw i64 %1, %n.vec12
%invariant.gep23 = getelementptr i8, ptr %array, i64 -3
%invariant.gep25 = getelementptr i8, ptr %invariant.gep.i, i64 -3
br label %vec.epilog.vector.body
vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph
%index15 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next20, %vec.epilog.vector.body ]
%offset.idx16 = sub i64 %1, %index15
%gep24 = getelementptr i8, ptr %invariant.gep23, i64 %offset.idx16
%wide.load17 = load <4 x i8>, ptr %gep24, align 1, !tbaa !14
%gep26 = getelementptr i8, ptr %invariant.gep25, i64 %offset.idx16
store <4 x i8> %wide.load17, ptr %gep26, align 1, !tbaa !14
%index.next20 = add nuw i64 %index15, 4
%13 = icmp eq i64 %index.next20, %n.vec12
br i1 %13, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !125
vec.epilog.middle.block: ; preds = %vec.epilog.vector.body
%cmp.n14 = icmp eq i64 %3, %n.vec12
br i1 %cmp.n14, label %for.cond3.preheader.i, label %for.body.i.preheader
for.body.i.preheader: ; preds = %vector.memcheck, %vector.scevcheck, %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block
%indvars.iv.i.ph = phi i64 [ %1, %iter.check ], [ %1, %vector.memcheck ], [ %1, %vector.scevcheck ], [ %ind.end13, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ]
%14 = add nsw i64 %indvars.iv.i.ph, 1
%xtraiter = and i64 %14, 3
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.body.i.prol.loopexit, label %for.body.i.prol
for.body.i.prol: ; preds = %for.body.i.preheader, %for.body.i.prol
%indvars.iv.i.prol = phi i64 [ %indvars.iv.next.i.prol, %for.body.i.prol ], [ %indvars.iv.i.ph, %for.body.i.preheader ]
%prol.iter = phi i64 [ %prol.iter.next, %for.body.i.prol ], [ 0, %for.body.i.preheader ]
%arrayidx.i.prol = getelementptr inbounds i8, ptr %array, i64 %indvars.iv.i.prol
%15 = load i8, ptr %arrayidx.i.prol, align 1, !tbaa !14
%gep.i.prol = getelementptr i8, ptr %invariant.gep.i, i64 %indvars.iv.i.prol
store i8 %15, ptr %gep.i.prol, align 1, !tbaa !14
%indvars.iv.next.i.prol = add nsw i64 %indvars.iv.i.prol, -1
%prol.iter.next = add i64 %prol.iter, 1
%prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
br i1 %prol.iter.cmp.not, label %for.body.i.prol.loopexit, label %for.body.i.prol, !llvm.loop !126
for.body.i.prol.loopexit: ; preds = %for.body.i.prol, %for.body.i.preheader
%indvars.iv.i.unr = phi i64 [ %indvars.iv.i.ph, %for.body.i.preheader ], [ %indvars.iv.next.i.prol, %for.body.i.prol ]
%16 = icmp ult i64 %indvars.iv.i.ph, 3
br i1 %16, label %for.cond3.preheader.i, label %for.body.i
for.cond3.preheader.i: ; preds = %for.body.i.prol.loopexit, %for.body.i, %middle.block, %vec.epilog.middle.block, %entry
%cmp6.not.not26.i = icmp sgt i32 %num, 0
br i1 %cmp6.not.not26.i, label %for.body7.preheader.i, label %shift_char.exit
for.body7.preheader.i: ; preds = %for.cond3.preheader.i
%17 = zext i32 %num to i64
tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %array, i8 0, i64 %17, i1 false), !tbaa !14
br label %shift_char.exit
for.body.i: ; preds = %for.body.i.prol.loopexit, %for.body.i
%indvars.iv.i = phi i64 [ %indvars.iv.next.i.3, %for.body.i ], [ %indvars.iv.i.unr, %for.body.i.prol.loopexit ]
%arrayidx.i = getelementptr inbounds i8, ptr %array, i64 %indvars.iv.i
%18 = load i8, ptr %arrayidx.i, align 1, !tbaa !14
%gep.i = getelementptr i8, ptr %invariant.gep.i, i64 %indvars.iv.i
store i8 %18, ptr %gep.i, align 1, !tbaa !14
%indvars.iv.next.i = add nsw i64 %indvars.iv.i, -1
%arrayidx.i.1 = getelementptr inbounds i8, ptr %array, i64 %indvars.iv.next.i
%19 = load i8, ptr %arrayidx.i.1, align 1, !tbaa !14
%gep.i.1 = getelementptr i8, ptr %invariant.gep.i, i64 %indvars.iv.next.i
store i8 %19, ptr %gep.i.1, align 1, !tbaa !14
%indvars.iv.next.i.1 = add nsw i64 %indvars.iv.i, -2
%arrayidx.i.2 = getelementptr inbounds i8, ptr %array, i64 %indvars.iv.next.i.1
%20 = load i8, ptr %arrayidx.i.2, align 1, !tbaa !14
%gep.i.2 = getelementptr i8, ptr %invariant.gep.i, i64 %indvars.iv.next.i.1
store i8 %20, ptr %gep.i.2, align 1, !tbaa !14
%indvars.iv.next.i.2 = add nsw i64 %indvars.iv.i, -3
%arrayidx.i.3 = getelementptr inbounds i8, ptr %array, i64 %indvars.iv.next.i.2
%21 = load i8, ptr %arrayidx.i.3, align 1, !tbaa !14
%gep.i.3 = getelementptr i8, ptr %invariant.gep.i, i64 %indvars.iv.next.i.2
store i8 %21, ptr %gep.i.3, align 1, !tbaa !14
%indvars.iv.next.i.3 = add nsw i64 %indvars.iv.i, -4
%cmp.not.not.i.not.3 = icmp eq i64 %indvars.iv.next.i.2, 0
br i1 %cmp.not.not.i.not.3, label %for.cond3.preheader.i, label %for.body.i, !llvm.loop !127
shift_char.exit: ; preds = %for.cond3.preheader.i, %for.body7.preheader.i
ret void
}
; Function Attrs: nofree nounwind uwtable
define dso_local void @printf_int_array(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #10 {
entry:
%cmp.not3 = icmp sgt i32 %min, %max
br i1 %cmp.not3, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %min to i64
%1 = add i32 %max, 1
br label %for.body
for.body: ; preds = %for.body.preheader, %for.body
%indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ]
%arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv
%2 = load i32, ptr %arrayidx, align 4, !tbaa !5
%call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %2)
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%lftr.wideiv = trunc i64 %indvars.iv.next to i32
%exitcond.not = icmp eq i32 %1, %lftr.wideiv
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !128
for.end: ; preds = %for.body, %entry
ret void
}
; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #22
; Function Attrs: nofree nounwind uwtable
define dso_local void @printf_char_array(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #10 {
entry:
%cmp.not3 = icmp sgt i32 %min, %max
br i1 %cmp.not3, label %for.end, label %for.body.preheader
for.body.preheader: ; preds = %entry
%0 = sext i32 %min to i64
%1 = add i32 %max, 1
br label %for.body
for.body: ; preds = %for.body.preheader, %for.body
%indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ]
%arrayidx = getelementptr inbounds i8, ptr %array, i64 %indvars.iv
%2 = load i8, ptr %arrayidx, align 1, !tbaa !14
%conv = sext i8 %2 to i32
%putchar = tail call i32 @putchar(i32 %conv)
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%lftr.wideiv = trunc i64 %indvars.iv.next to i32
%exitcond.not = icmp eq i32 %1, %lftr.wideiv
br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !129
for.end: ; preds = %for.body, %entry
ret void
}
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #10 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #25
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #25
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%add = add nsw i32 %0, 1
%1 = zext i32 %add to i64
%2 = load i32, ptr %W, align 4, !tbaa !5
%add1 = add i32 %2, 2
%3 = zext i32 %add1 to i64
%4 = call ptr @llvm.stacksave.p0()
%5 = mul nuw i64 %3, %1
%vla = alloca i8, i64 %5, align 16
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp.not147 = icmp slt i32 %6, 1
br i1 %cmp.not147, label %for.cond31.preheader.thread239, label %for.body
for.body: ; preds = %entry, %scanf_char_array.exit
%indvars.iv = phi i64 [ %indvars.iv.next, %scanf_char_array.exit ], [ 1, %entry ]
%7 = mul nuw nsw i64 %indvars.iv, %3
%arrayidx = getelementptr inbounds i8, ptr %vla, i64 %7
%call.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %arrayidx)
%call1.i = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %arrayidx) #26
%8 = trunc i64 %call1.i to i32
%conv.i = add i32 %8, -1
%cmp.not24.i.i = icmp slt i32 %conv.i, 0
br i1 %cmp.not24.i.i, label %scanf_char_array.exit, label %for.body.preheader.i.i
for.body.preheader.i.i: ; preds = %for.body
%9 = zext i32 %conv.i to i64
%invariant.gep.i.i = getelementptr i8, ptr %arrayidx, i64 1
%10 = add nuw nsw i64 %9, 1
%xtraiter = and i64 %10, 3
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br i1 %lcmp.mod.not, label %for.body.i.i.prol.loopexit, label %for.body.i.i.prol
for.body.i.i.prol: ; preds = %for.body.preheader.i.i, %for.body.i.i.prol
%indvars.iv.i.i.prol = phi i64 [ %indvars.iv.next.i.i.prol, %for.body.i.i.prol ], [ %9, %for.body.preheader.i.i ]
%prol.iter = phi i64 [ %prol.iter.next, %for.body.i.i.prol ], [ 0, %for.body.preheader.i.i ]
%arrayidx.i.i.prol = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv.i.i.prol
%11 = load i8, ptr %arrayidx.i.i.prol, align 1, !tbaa !14
%gep.i.i.prol = getelementptr i8, ptr %invariant.gep.i.i, i64 %indvars.iv.i.i.prol
store i8 %11, ptr %gep.i.i.prol, align 1, !tbaa !14
%indvars.iv.next.i.i.prol = add nsw i64 %indvars.iv.i.i.prol, -1
%prol.iter.next = add i64 %prol.iter, 1
%prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
br i1 %prol.iter.cmp.not, label %for.body.i.i.prol.loopexit, label %for.body.i.i.prol, !llvm.loop !130
for.body.i.i.prol.loopexit: ; preds = %for.body.i.i.prol, %for.body.preheader.i.i
%indvars.iv.i.i.unr = phi i64 [ %9, %for.body.preheader.i.i ], [ %indvars.iv.next.i.i.prol, %for.body.i.i.prol ]
%12 = icmp ult i32 %conv.i, 3
br i1 %12, label %scanf_char_array.exit, label %for.body.preheader.i.i.new
for.body.preheader.i.i.new: ; preds = %for.body.i.i.prol.loopexit
%invariant.gep328 = getelementptr i8, ptr %arrayidx, i64 -1
br label %for.body.i.i
for.body.i.i: ; preds = %for.body.i.i, %for.body.preheader.i.i.new
%indvars.iv.i.i = phi i64 [ %indvars.iv.i.i.unr, %for.body.preheader.i.i.new ], [ %indvars.iv.next.i.i.3, %for.body.i.i ]
%arrayidx.i.i = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv.i.i
%13 = load i8, ptr %arrayidx.i.i, align 1, !tbaa !14
%gep.i.i = getelementptr i8, ptr %invariant.gep.i.i, i64 %indvars.iv.i.i
store i8 %13, ptr %gep.i.i, align 1, !tbaa !14
%gep329 = getelementptr i8, ptr %invariant.gep328, i64 %indvars.iv.i.i
%14 = load i8, ptr %gep329, align 1, !tbaa !14
%gep.i.i.1 = getelementptr i8, ptr %arrayidx, i64 %indvars.iv.i.i
store i8 %14, ptr %gep.i.i.1, align 1, !tbaa !14
%indvars.iv.next.i.i.1 = add nsw i64 %indvars.iv.i.i, -2
%arrayidx.i.i.2 = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv.next.i.i.1
%15 = load i8, ptr %arrayidx.i.i.2, align 1, !tbaa !14
%gep.i.i.2 = getelementptr i8, ptr %invariant.gep.i.i, i64 %indvars.iv.next.i.i.1
store i8 %15, ptr %gep.i.i.2, align 1, !tbaa !14
%indvars.iv.next.i.i.2 = add nsw i64 %indvars.iv.i.i, -3
%arrayidx.i.i.3 = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv.next.i.i.2
%16 = load i8, ptr %arrayidx.i.i.3, align 1, !tbaa !14
%gep.i.i.3 = getelementptr i8, ptr %invariant.gep.i.i, i64 %indvars.iv.next.i.i.2
store i8 %16, ptr %gep.i.i.3, align 1, !tbaa !14
%indvars.iv.next.i.i.3 = add nsw i64 %indvars.iv.i.i, -4
%cmp.not.not.i.not.i.3 = icmp eq i64 %indvars.iv.next.i.i.2, 0
br i1 %cmp.not.not.i.not.i.3, label %scanf_char_array.exit, label %for.body.i.i, !llvm.loop !131
scanf_char_array.exit: ; preds = %for.body.i.i.prol.loopexit, %for.body.i.i, %for.body
store i8 0, ptr %arrayidx, align 1
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%17 = load i32, ptr %H, align 4, !tbaa !5
%18 = sext i32 %17 to i64
%cmp.not.not = icmp slt i64 %indvars.iv, %18
br i1 %cmp.not.not, label %for.body, label %for.end, !llvm.loop !132
for.end: ; preds = %scanf_char_array.exit
%19 = zext i32 %17 to i64
%vla3 = alloca i32, i64 %19, align 16
%20 = load i32, ptr %W, align 4, !tbaa !5
%21 = zext i32 %20 to i64
%vla4 = alloca i32, i64 %21, align 16
%cmp6.not153 = icmp slt i32 %17, 1
br i1 %cmp6.not153, label %for.cond31.preheader, label %for.cond8.preheader.lr.ph
for.cond8.preheader.lr.ph: ; preds = %for.end
%cmp9.not149 = icmp slt i32 %20, 1
%add20 = add i32 %20, 1
br i1 %cmp9.not149, label %for.cond8.preheader.lr.ph.split.us, label %for.cond8.preheader.preheader
for.cond8.preheader.preheader: ; preds = %for.cond8.preheader.lr.ph
%22 = add nuw i32 %17, 1
%wide.trip.count191 = zext i32 %22 to i64
%wide.trip.count = zext i32 %add20 to i64
br label %for.cond8.preheader
for.cond8.preheader.lr.ph.split.us: ; preds = %for.cond8.preheader.lr.ph
%cmp21.us = icmp eq i32 %20, 0
br i1 %cmp21.us, label %for.cond8.preheader.us.us.preheader, label %for.body65.lr.ph
for.cond8.preheader.us.us.preheader: ; preds = %for.cond8.preheader.lr.ph.split.us
%min.iters.check = icmp ult i32 %17, 8
br i1 %min.iters.check, label %for.cond8.preheader.us.us.preheader321, label %vector.ph
vector.ph: ; preds = %for.cond8.preheader.us.us.preheader
%n.vec = and i64 %19, 4294967288
%.cast = trunc i64 %n.vec to i32
%ind.end = or i32 %.cast, 1
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vec.ind = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph ], [ %vec.ind.next, %vector.body ]
%step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
%23 = getelementptr inbounds i32, ptr %vla3, i64 %index
store <4 x i32> %vec.ind, ptr %23, align 16, !tbaa !5
%24 = getelementptr inbounds i32, ptr %23, i64 4
store <4 x i32> %step.add, ptr %24, align 16, !tbaa !5
%index.next = add nuw i64 %index, 8
%vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
%25 = icmp eq i64 %index.next, %n.vec
br i1 %25, label %middle.block, label %vector.body, !llvm.loop !133
middle.block: ; preds = %vector.body
%cmp.n = icmp eq i64 %n.vec, %19
br i1 %cmp.n, label %for.cond31.preheader, label %for.cond8.preheader.us.us.preheader321
for.cond8.preheader.us.us.preheader321: ; preds = %for.cond8.preheader.us.us.preheader, %middle.block
%indvars.iv193.ph = phi i64 [ 0, %for.cond8.preheader.us.us.preheader ], [ %n.vec, %middle.block ]
%i.1154.us.us.ph = phi i32 [ 1, %for.cond8.preheader.us.us.preheader ], [ %ind.end, %middle.block ]
br label %for.cond8.preheader.us.us
for.cond8.preheader.us.us: ; preds = %for.cond8.preheader.us.us.preheader321, %for.cond8.preheader.us.us
%indvars.iv193 = phi i64 [ %indvars.iv.next194, %for.cond8.preheader.us.us ], [ %indvars.iv193.ph, %for.cond8.preheader.us.us.preheader321 ]
%i.1154.us.us = phi i32 [ %add29.us.us, %for.cond8.preheader.us.us ], [ %i.1154.us.us.ph, %for.cond8.preheader.us.us.preheader321 ]
%arrayidx25.us.us = getelementptr inbounds i32, ptr %vla3, i64 %indvars.iv193
store i32 %i.1154.us.us, ptr %arrayidx25.us.us, align 4, !tbaa !5
%indvars.iv.next194 = add nuw nsw i64 %indvars.iv193, 1
%add29.us.us = add nuw nsw i32 %i.1154.us.us, 1
%exitcond197.not = icmp eq i64 %indvars.iv.next194, %19
br i1 %exitcond197.not, label %for.cond31.preheader, label %for.cond8.preheader.us.us, !llvm.loop !134
for.cond8.preheader: ; preds = %for.cond8.preheader.preheader, %for.inc28
%indvars.iv188 = phi i64 [ 1, %for.cond8.preheader.preheader ], [ %indvars.iv.next189, %for.inc28 ]
%count_hol.0155 = phi i32 [ 0, %for.cond8.preheader.preheader ], [ %count_hol.1, %for.inc28 ]
%26 = mul nuw nsw i64 %indvars.iv188, %3
%arrayidx12 = getelementptr inbounds i8, ptr %vla, i64 %26
br label %for.body10
for.cond31.preheader: ; preds = %for.inc28, %for.cond8.preheader.us.us, %middle.block, %for.end
%count_hol.0.lcssa = phi i32 [ 0, %for.end ], [ %17, %middle.block ], [ %17, %for.cond8.preheader.us.us ], [ %count_hol.1, %for.inc28 ]
%cmp32.not162 = icmp slt i32 %20, 1
br i1 %cmp32.not162, label %for.cond62.preheader, label %for.cond35.preheader.lr.ph
for.cond31.preheader.thread239: ; preds = %entry
%27 = zext i32 %6 to i64
%vla3224 = alloca i32, i64 %27, align 16
%28 = load i32, ptr %W, align 4, !tbaa !5
%29 = zext i32 %28 to i64
%vla4225 = alloca i32, i64 %29, align 16
%cmp32.not162244 = icmp slt i32 %28, 1
br i1 %cmp32.not162244, label %for.end96, label %for.cond35.preheader.lr.ph.split.us
for.cond35.preheader.lr.ph: ; preds = %for.cond31.preheader
%add51 = add i32 %17, 1
br i1 %cmp6.not153, label %for.cond35.preheader.lr.ph.split.us, label %for.cond35.preheader.preheader
for.cond35.preheader.preheader: ; preds = %for.cond35.preheader.lr.ph
%30 = add nuw i32 %20, 1
%wide.trip.count206 = zext i32 %30 to i64
%wide.trip.count201 = zext i32 %add51 to i64
br label %for.cond35.preheader
for.cond35.preheader.lr.ph.split.us: ; preds = %for.cond31.preheader.thread239, %for.cond35.preheader.lr.ph
%vla4228246256 = phi ptr [ %vla4, %for.cond35.preheader.lr.ph ], [ %vla4225, %for.cond31.preheader.thread239 ]
%31 = phi i64 [ %21, %for.cond35.preheader.lr.ph ], [ %29, %for.cond31.preheader.thread239 ]
%32 = phi i32 [ %20, %for.cond35.preheader.lr.ph ], [ %28, %for.cond31.preheader.thread239 ]
%vla3227247255 = phi ptr [ %vla3, %for.cond35.preheader.lr.ph ], [ %vla3224, %for.cond31.preheader.thread239 ]
%33 = phi i32 [ %17, %for.cond35.preheader.lr.ph ], [ %6, %for.cond31.preheader.thread239 ]
%count_hol.0.lcssa248254 = phi i32 [ %count_hol.0.lcssa, %for.cond35.preheader.lr.ph ], [ 0, %for.cond31.preheader.thread239 ]
%cmp52.us = icmp eq i32 %33, 0
br i1 %cmp52.us, label %for.cond35.preheader.us.us.preheader, label %for.end96
for.cond35.preheader.us.us.preheader: ; preds = %for.cond35.preheader.lr.ph.split.us
%min.iters.check299 = icmp ult i64 %31, 8
br i1 %min.iters.check299, label %for.cond35.preheader.us.us.preheader318, label %vector.ph300
vector.ph300: ; preds = %for.cond35.preheader.us.us.preheader
%n.vec302 = and i64 %31, 4294967288
%.cast304 = trunc i64 %n.vec302 to i32
%ind.end305 = or i32 %.cast304, 1
br label %vector.body308
vector.body308: ; preds = %vector.body308, %vector.ph300
%index309 = phi i64 [ 0, %vector.ph300 ], [ %index.next314, %vector.body308 ]
%vec.ind310 = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph300 ], [ %vec.ind.next313, %vector.body308 ]
%step.add311 = add <4 x i32> %vec.ind310, <i32 4, i32 4, i32 4, i32 4>
%34 = getelementptr inbounds i32, ptr %vla4228246256, i64 %index309
store <4 x i32> %vec.ind310, ptr %34, align 16, !tbaa !5
%35 = getelementptr inbounds i32, ptr %34, i64 4
store <4 x i32> %step.add311, ptr %35, align 16, !tbaa !5
%index.next314 = add nuw i64 %index309, 8
%vec.ind.next313 = add <4 x i32> %vec.ind310, <i32 8, i32 8, i32 8, i32 8>
%36 = icmp eq i64 %index.next314, %n.vec302
br i1 %36, label %middle.block297, label %vector.body308, !llvm.loop !135
middle.block297: ; preds = %vector.body308
%cmp.n307 = icmp eq i64 %31, %n.vec302
br i1 %cmp.n307, label %for.cond62.preheader, label %for.cond35.preheader.us.us.preheader318
for.cond35.preheader.us.us.preheader318: ; preds = %for.cond35.preheader.us.us.preheader, %middle.block297
%indvars.iv208.ph = phi i64 [ 0, %for.cond35.preheader.us.us.preheader ], [ %n.vec302, %middle.block297 ]
%j.1163.us.us.ph = phi i32 [ 1, %for.cond35.preheader.us.us.preheader ], [ %ind.end305, %middle.block297 ]
br label %for.cond35.preheader.us.us
for.cond35.preheader.us.us: ; preds = %for.cond35.preheader.us.us.preheader318, %for.cond35.preheader.us.us
%indvars.iv208 = phi i64 [ %indvars.iv.next209, %for.cond35.preheader.us.us ], [ %indvars.iv208.ph, %for.cond35.preheader.us.us.preheader318 ]
%j.1163.us.us = phi i32 [ %add60.us.us, %for.cond35.preheader.us.us ], [ %j.1163.us.us.ph, %for.cond35.preheader.us.us.preheader318 ]
%arrayidx56.us.us = getelementptr inbounds i32, ptr %vla4228246256, i64 %indvars.iv208
store i32 %j.1163.us.us, ptr %arrayidx56.us.us, align 4, !tbaa !5
%indvars.iv.next209 = add nuw nsw i64 %indvars.iv208, 1
%add60.us.us = add nuw nsw i32 %j.1163.us.us, 1
%exitcond212.not = icmp eq i64 %indvars.iv.next209, %31
br i1 %exitcond212.not, label %for.cond62.preheader, label %for.cond35.preheader.us.us, !llvm.loop !136
for.body10: ; preds = %for.cond8.preheader, %for.inc17
%indvars.iv185 = phi i64 [ 1, %for.cond8.preheader ], [ %indvars.iv.next186, %for.inc17 ]
%arrayidx14 = getelementptr inbounds i8, ptr %arrayidx12, i64 %indvars.iv185
%37 = load i8, ptr %arrayidx14, align 1, !tbaa !14
%cmp15 = icmp eq i8 %37, 46
br i1 %cmp15, label %for.inc17, label %for.end19
for.inc17: ; preds = %for.body10
%indvars.iv.next186 = add nuw nsw i64 %indvars.iv185, 1
%exitcond.not = icmp eq i64 %indvars.iv.next186, %wide.trip.count
br i1 %exitcond.not, label %if.then23, label %for.body10, !llvm.loop !137
for.end19: ; preds = %for.body10
%38 = trunc i64 %indvars.iv185 to i32
%cmp21 = icmp eq i32 %add20, %38
br i1 %cmp21, label %if.then23, label %for.inc28
if.then23: ; preds = %for.inc17, %for.end19
%idxprom24 = sext i32 %count_hol.0155 to i64
%arrayidx25 = getelementptr inbounds i32, ptr %vla3, i64 %idxprom24
%39 = trunc i64 %indvars.iv188 to i32
store i32 %39, ptr %arrayidx25, align 4, !tbaa !5
%add26 = add nsw i32 %count_hol.0155, 1
br label %for.inc28
for.inc28: ; preds = %for.end19, %if.then23
%count_hol.1 = phi i32 [ %add26, %if.then23 ], [ %count_hol.0155, %for.end19 ]
%indvars.iv.next189 = add nuw nsw i64 %indvars.iv188, 1
%exitcond192.not = icmp eq i64 %indvars.iv.next189, %wide.trip.count191
br i1 %exitcond192.not, label %for.cond31.preheader, label %for.cond8.preheader, !llvm.loop !138
for.cond35.preheader: ; preds = %for.cond35.preheader.preheader, %for.inc59
%indvars.iv203 = phi i64 [ 1, %for.cond35.preheader.preheader ], [ %indvars.iv.next204, %for.inc59 ]
%count_ver.0164 = phi i32 [ 0, %for.cond35.preheader.preheader ], [ %count_ver.1, %for.inc59 ]
%invariant.gep = getelementptr inbounds i8, ptr %vla, i64 %indvars.iv203
br label %for.body38
for.cond62.preheader: ; preds = %for.inc59, %for.cond35.preheader.us.us, %middle.block297, %for.cond31.preheader
%count_hol.0.lcssa238 = phi i32 [ %count_hol.0.lcssa, %for.cond31.preheader ], [ %count_hol.0.lcssa248254, %middle.block297 ], [ %count_hol.0.lcssa248254, %for.cond35.preheader.us.us ], [ %count_hol.0.lcssa, %for.inc59 ]
%40 = phi i32 [ %17, %for.cond31.preheader ], [ %33, %middle.block297 ], [ %33, %for.cond35.preheader.us.us ], [ %17, %for.inc59 ]
%vla3227237 = phi ptr [ %vla3, %for.cond31.preheader ], [ %vla3227247255, %middle.block297 ], [ %vla3227247255, %for.cond35.preheader.us.us ], [ %vla3, %for.inc59 ]
%vla4228236 = phi ptr [ %vla4, %for.cond31.preheader ], [ %vla4228246256, %middle.block297 ], [ %vla4228246256, %for.cond35.preheader.us.us ], [ %vla4, %for.inc59 ]
%cmp6.not153229235 = phi i1 [ %cmp6.not153, %for.cond31.preheader ], [ true, %middle.block297 ], [ true, %for.cond35.preheader.us.us ], [ %cmp6.not153, %for.inc59 ]
%count_ver.0.lcssa = phi i32 [ 0, %for.cond31.preheader ], [ %32, %middle.block297 ], [ %32, %for.cond35.preheader.us.us ], [ %count_ver.1, %for.inc59 ]
br i1 %cmp6.not153229235, label %for.end96, label %for.body65.lr.ph
for.body65.lr.ph: ; preds = %for.cond8.preheader.lr.ph.split.us, %for.cond62.preheader
%count_ver.0.lcssa274 = phi i32 [ %count_ver.0.lcssa, %for.cond62.preheader ], [ 0, %for.cond8.preheader.lr.ph.split.us ]
%vla4228236273 = phi ptr [ %vla4228236, %for.cond62.preheader ], [ %vla4, %for.cond8.preheader.lr.ph.split.us ]
%vla3227237272 = phi ptr [ %vla3227237, %for.cond62.preheader ], [ %vla3, %for.cond8.preheader.lr.ph.split.us ]
%41 = phi i32 [ %40, %for.cond62.preheader ], [ %17, %for.cond8.preheader.lr.ph.split.us ]
%count_hol.0.lcssa238271 = phi i32 [ %count_hol.0.lcssa238, %for.cond62.preheader ], [ 0, %for.cond8.preheader.lr.ph.split.us ]
%cmp.not10.i = icmp slt i32 %count_hol.0.lcssa238271, 1
%cmp.not10.i129 = icmp slt i32 %count_ver.0.lcssa274, 1
%zext = zext i32 %count_hol.0.lcssa238271 to i64
%zext213 = zext i32 %count_ver.0.lcssa274 to i64
br label %for.body65
for.body38: ; preds = %for.cond35.preheader, %for.inc48
%indvars.iv198 = phi i64 [ 1, %for.cond35.preheader ], [ %indvars.iv.next199, %for.inc48 ]
%42 = mul nuw nsw i64 %indvars.iv198, %3
%gep = getelementptr inbounds i8, ptr %invariant.gep, i64 %42
%43 = load i8, ptr %gep, align 1, !tbaa !14
%cmp44 = icmp eq i8 %43, 46
br i1 %cmp44, label %for.inc48, label %for.end50
for.inc48: ; preds = %for.body38
%indvars.iv.next199 = add nuw nsw i64 %indvars.iv198, 1
%exitcond202.not = icmp eq i64 %indvars.iv.next199, %wide.trip.count201
br i1 %exitcond202.not, label %if.then54, label %for.body38, !llvm.loop !139
for.end50: ; preds = %for.body38
%44 = trunc i64 %indvars.iv198 to i32
%cmp52 = icmp eq i32 %add51, %44
br i1 %cmp52, label %if.then54, label %for.inc59
if.then54: ; preds = %for.inc48, %for.end50
%idxprom55 = sext i32 %count_ver.0164 to i64
%arrayidx56 = getelementptr inbounds i32, ptr %vla4, i64 %idxprom55
%45 = trunc i64 %indvars.iv203 to i32
store i32 %45, ptr %arrayidx56, align 4, !tbaa !5
%add57 = add nsw i32 %count_ver.0164, 1
br label %for.inc59
for.inc59: ; preds = %for.end50, %if.then54
%count_ver.1 = phi i32 [ %add57, %if.then54 ], [ %count_ver.0164, %for.end50 ]
%indvars.iv.next204 = add nuw nsw i64 %indvars.iv203, 1
%exitcond207.not = icmp eq i64 %indvars.iv.next204, %wide.trip.count206
br i1 %exitcond207.not, label %for.cond62.preheader, label %for.cond35.preheader, !llvm.loop !140
for.body65: ; preds = %for.body65.lr.ph, %for.inc94
%46 = phi i32 [ %41, %for.body65.lr.ph ], [ %64, %for.inc94 ]
%indvars.iv220 = phi i64 [ 1, %for.body65.lr.ph ], [ %indvars.iv.next221, %for.inc94 ]
br i1 %cmp.not10.i, label %detect_int.exit, label %for.body.i
for.body.i: ; preds = %for.body65, %for.inc.i
%indvars.iv.i = phi i64 [ %indvars.iv.next.i, %for.inc.i ], [ 0, %for.body65 ]
%arrayidx.i = getelementptr inbounds i32, ptr %vla3227237272, i64 %indvars.iv.i
%47 = load i32, ptr %arrayidx.i, align 4, !tbaa !5
%48 = zext i32 %47 to i64
%cmp1.i = icmp eq i64 %indvars.iv220, %48
br i1 %cmp1.i, label %for.end.loopexit.split.loop.exit.i, label %for.inc.i
for.inc.i: ; preds = %for.body.i
%indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1
%49 = icmp eq i64 %indvars.iv.next.i, %zext
br i1 %49, label %for.cond71.preheader, label %for.body.i, !llvm.loop !110
for.end.loopexit.split.loop.exit.i: ; preds = %for.body.i
%50 = trunc i64 %indvars.iv.i to i32
br label %detect_int.exit
detect_int.exit: ; preds = %for.body65, %for.end.loopexit.split.loop.exit.i
%i.0.lcssa.i = phi i32 [ 0, %for.body65 ], [ %50, %for.end.loopexit.split.loop.exit.i ]
%cmp3.not.i.not.not = icmp slt i32 %i.0.lcssa.i, %count_hol.0.lcssa238271
br i1 %cmp3.not.i.not.not, label %for.inc94, label %for.cond71.preheader
for.cond71.preheader: ; preds = %for.inc.i, %detect_int.exit
%51 = load i32, ptr %W, align 4, !tbaa !5
%cmp72.not168 = icmp slt i32 %51, 1
br i1 %cmp72.not168, label %if.end92, label %for.body74.lr.ph
for.body74.lr.ph: ; preds = %for.cond71.preheader
%52 = mul nuw nsw i64 %indvars.iv220, %3
%arrayidx83 = getelementptr inbounds i8, ptr %vla, i64 %52
br i1 %cmp.not10.i129, label %for.body74.us, label %for.body74
for.body74.us: ; preds = %for.body74.lr.ph, %for.body74.us
%indvars.iv217 = phi i64 [ %indvars.iv.next218, %for.body74.us ], [ 1, %for.body74.lr.ph ]
%arrayidx85.us = getelementptr inbounds i8, ptr %arrayidx83, i64 %indvars.iv217
%53 = load i8, ptr %arrayidx85.us, align 1, !tbaa !14
%conv86.us = sext i8 %53 to i32
%putchar128.us = call i32 @putchar(i32 %conv86.us)
%indvars.iv.next218 = add nuw nsw i64 %indvars.iv217, 1
%54 = load i32, ptr %W, align 4, !tbaa !5
%55 = sext i32 %54 to i64
%cmp72.not.us.not = icmp slt i64 %indvars.iv217, %55
br i1 %cmp72.not.us.not, label %for.body74.us, label %if.end92, !llvm.loop !141
for.body74: ; preds = %for.body74.lr.ph, %for.inc89
%56 = phi i32 [ %62, %for.inc89 ], [ %51, %for.body74.lr.ph ]
%indvars.iv214 = phi i64 [ %indvars.iv.next215, %for.inc89 ], [ 1, %for.body74.lr.ph ]
br label %for.body.i131
for.body.i131: ; preds = %for.body74, %for.inc.i135
%indvars.iv.i132 = phi i64 [ %indvars.iv.next.i136, %for.inc.i135 ], [ 0, %for.body74 ]
%arrayidx.i133 = getelementptr inbounds i32, ptr %vla4228236273, i64 %indvars.iv.i132
%57 = load i32, ptr %arrayidx.i133, align 4, !tbaa !5
%58 = zext i32 %57 to i64
%cmp1.i134 = icmp eq i64 %indvars.iv214, %58
br i1 %cmp1.i134, label %for.end.loopexit.split.loop.exit.i141, label %for.inc.i135
for.inc.i135: ; preds = %for.body.i131
%indvars.iv.next.i136 = add nuw nsw i64 %indvars.iv.i132, 1
%59 = icmp eq i64 %indvars.iv.next.i136, %zext213
br i1 %59, label %if.else81, label %for.body.i131, !llvm.loop !110
for.end.loopexit.split.loop.exit.i141: ; preds = %for.body.i131
%60 = trunc i64 %indvars.iv.i132 to i32
%cmp3.not.i140.not.not = icmp sgt i32 %count_ver.0.lcssa274, %60
br i1 %cmp3.not.i140.not.not, label %for.inc89, label %if.else81
if.else81: ; preds = %for.inc.i135, %for.end.loopexit.split.loop.exit.i141
%arrayidx85 = getelementptr inbounds i8, ptr %arrayidx83, i64 %indvars.iv214
%61 = load i8, ptr %arrayidx85, align 1, !tbaa !14
%conv86 = sext i8 %61 to i32
%putchar128 = call i32 @putchar(i32 %conv86)
%.pre = load i32, ptr %W, align 4, !tbaa !5
br label %for.inc89
for.inc89: ; preds = %for.end.loopexit.split.loop.exit.i141, %if.else81
%62 = phi i32 [ %56, %for.end.loopexit.split.loop.exit.i141 ], [ %.pre, %if.else81 ]
%indvars.iv.next215 = add nuw nsw i64 %indvars.iv214, 1
%63 = sext i32 %62 to i64
%cmp72.not.not = icmp slt i64 %indvars.iv214, %63
br i1 %cmp72.not.not, label %for.body74, label %if.end92, !llvm.loop !141
if.end92: ; preds = %for.inc89, %for.body74.us, %for.cond71.preheader
%putchar127 = call i32 @putchar(i32 10)
%.pre223 = load i32, ptr %H, align 4, !tbaa !5
br label %for.inc94
for.inc94: ; preds = %detect_int.exit, %if.end92
%64 = phi i32 [ %46, %detect_int.exit ], [ %.pre223, %if.end92 ]
%indvars.iv.next221 = add nuw nsw i64 %indvars.iv220, 1
%65 = sext i32 %64 to i64
%cmp63.not.not = icmp slt i64 %indvars.iv220, %65
br i1 %cmp63.not.not, label %for.body65, label %for.end96, !llvm.loop !142
for.end96: ; preds = %for.inc94, %for.cond35.preheader.lr.ph.split.us, %for.cond31.preheader.thread239, %for.cond62.preheader
%putchar = call i32 @putchar(i32 10)
call void @llvm.stackrestore.p0(ptr %4)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #25
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #25
ret i32 0
}
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #23
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #24
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #24
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #24
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.abs.i64(i64, i1 immarg) #24
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.smax.v4i32(<4 x i32>, <4 x i32>) #24
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.smax.v4i32(<4 x i32>) #24
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.smin.v4i32(<4 x i32>, <4 x i32>) #24
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.smin.v4i32(<4 x i32>) #24
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #24
attributes #0 = { nofree norecurse nosync nounwind memory(argmem: write) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nofree nosync nounwind willreturn memory(argmem: write) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 #5 = { 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 #6 = { mustprogress nofree nounwind willreturn memory(write) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nofree nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #10 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #11 = { 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 #12 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #13 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #14 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #15 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #16 = { nofree nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #17 = { nofree nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #18 = { nofree nosync nounwind memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #19 = { nofree nounwind memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #20 = { nofree norecurse nosync nounwind memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #21 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #22 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #23 = { nofree nounwind }
attributes #24 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #25 = { nounwind }
attributes #26 = { nounwind willreturn memory(read) }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !12, !11}
!14 = !{!7, !7, i64 0}
!15 = !{!16}
!16 = distinct !{!16, !17}
!17 = distinct !{!17, !"LVerDomain"}
!18 = !{!19}
!19 = distinct !{!19, !17}
!20 = distinct !{!20, !10, !11, !12}
!21 = distinct !{!21, !10, !11}
!22 = !{!23}
!23 = distinct !{!23, !24}
!24 = distinct !{!24, !"LVerDomain"}
!25 = !{!26}
!26 = distinct !{!26, !24}
!27 = distinct !{!27, !10, !11, !12}
!28 = !{!29}
!29 = distinct !{!29, !30}
!30 = distinct !{!30, !"LVerDomain"}
!31 = !{!32}
!32 = distinct !{!32, !30}
!33 = distinct !{!33, !10, !11, !12}
!34 = distinct !{!34, !10, !11}
!35 = distinct !{!35, !10}
!36 = distinct !{!36, !10}
!37 = distinct !{!37, !10}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.unroll.disable"}
!40 = distinct !{!40, !10}
!41 = distinct !{!41, !10}
!42 = distinct !{!42, !39}
!43 = distinct !{!43, !10}
!44 = distinct !{!44, !39}
!45 = distinct !{!45, !10}
!46 = distinct !{!46, !10}
!47 = distinct !{!47, !10}
!48 = distinct !{!48, !10}
!49 = distinct !{!49, !10, !11, !12}
!50 = distinct !{!50, !10, !11}
!51 = distinct !{!51, !10}
!52 = distinct !{!52, !10, !11, !12}
!53 = distinct !{!53, !10, !11, !12}
!54 = distinct !{!54, !10, !11}
!55 = distinct !{!55, !10, !11, !12}
!56 = distinct !{!56, !10, !11, !12}
!57 = distinct !{!57, !10, !12, !11}
!58 = distinct !{!58, !10}
!59 = distinct !{!59, !10}
!60 = distinct !{!60, !10}
!61 = distinct !{!61, !10}
!62 = distinct !{!62, !10}
!63 = distinct !{!63, !10}
!64 = distinct !{!64, !10}
!65 = !{!66}
!66 = distinct !{!66, !67}
!67 = distinct !{!67, !"LVerDomain"}
!68 = !{!69}
!69 = distinct !{!69, !67}
!70 = distinct !{!70, !10, !11, !12}
!71 = !{!72}
!72 = distinct !{!72, !73}
!73 = distinct !{!73, !"LVerDomain"}
!74 = !{!75}
!75 = distinct !{!75, !73}
!76 = distinct !{!76, !10, !11, !12}
!77 = distinct !{!77, !10, !11}
!78 = distinct !{!78, !10}
!79 = distinct !{!79, !10}
!80 = distinct !{!80, !10}
!81 = distinct !{!81, !10}
!82 = !{!83}
!83 = distinct !{!83, !84}
!84 = distinct !{!84, !"LVerDomain"}
!85 = !{!86}
!86 = distinct !{!86, !84}
!87 = distinct !{!87, !10, !11, !12}
!88 = !{!89}
!89 = distinct !{!89, !90}
!90 = distinct !{!90, !"LVerDomain"}
!91 = !{!92}
!92 = distinct !{!92, !90}
!93 = distinct !{!93, !10, !11, !12}
!94 = distinct !{!94, !10, !11}
!95 = distinct !{!95, !10}
!96 = distinct !{!96, !10, !11, !12}
!97 = distinct !{!97, !10, !12, !11}
!98 = distinct !{!98, !10, !11, !12}
!99 = distinct !{!99, !10, !12, !11}
!100 = distinct !{!100, !10}
!101 = distinct !{!101, !10, !11, !12}
!102 = distinct !{!102, !10, !12, !11}
!103 = distinct !{!103, !10, !11, !12}
!104 = distinct !{!104, !10, !12, !11}
!105 = distinct !{!105, !10}
!106 = distinct !{!106, !10}
!107 = distinct !{!107, !10}
!108 = distinct !{!108, !10, !11, !12}
!109 = distinct !{!109, !10, !12, !11}
!110 = distinct !{!110, !10}
!111 = distinct !{!111, !10}
!112 = distinct !{!112, !10}
!113 = distinct !{!113, !10}
!114 = distinct !{!114, !10}
!115 = distinct !{!115, !10}
!116 = distinct !{!116, !10, !11, !12}
!117 = distinct !{!117, !10, !12, !11}
!118 = distinct !{!118, !10, !11, !12}
!119 = distinct !{!119, !10, !12, !11}
!120 = distinct !{!120, !10}
!121 = distinct !{!121, !10}
!122 = distinct !{!122, !10}
!123 = distinct !{!123, !10}
!124 = distinct !{!124, !10, !11, !12}
!125 = distinct !{!125, !10, !11, !12}
!126 = distinct !{!126, !39}
!127 = distinct !{!127, !10, !11}
!128 = distinct !{!128, !10}
!129 = distinct !{!129, !10}
!130 = distinct !{!130, !39}
!131 = distinct !{!131, !10}
!132 = distinct !{!132, !10}
!133 = distinct !{!133, !10, !11, !12}
!134 = distinct !{!134, !10, !12, !11}
!135 = distinct !{!135, !10, !11, !12}
!136 = distinct !{!136, !10, !12, !11}
!137 = distinct !{!137, !10}
!138 = distinct !{!138, !10}
!139 = distinct !{!139, !10}
!140 = distinct !{!140, !10}
!141 = distinct !{!141, !10}
!142 = distinct !{!142, !10}
|
#include<stdio.h>
char s[100][100];
int row[100], line[100];
int main(){
int a, b, i, j, k = 0;
scanf("%d %d", &a, &b);
for(i = 0; i < a; i++){
scanf("%s", s[i]);
}
for(i = 0; i < a; i++){
for(j = 0; j < b; j++){
if(s[i][j] == '#'){
break;
}
}
if(j != b){
for(j = 0; j < b; j++){
s[k][j] = s[i][j];
}
k++;
}
}
a = k;
k = 0;
for(i = 0; i < b; i++){
for(j = 0; j < a; j++){
if(s[j][i] == '#'){
break;
}
}
if(j != a){
for(j = 0; j < a; j++){
s[j][k] = s[j][i];
}
k++;
}
}
b = k;
for(i = 0; i < a; i++){
for(j = 0; j < b; j++){
printf("%c", s[i][j]);
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133303/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133303/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1
@s = dso_local global [100 x [100 x i8]] zeroinitializer, align 16
@row = dso_local local_unnamed_addr global [100 x i32] zeroinitializer, align 16
@line = dso_local local_unnamed_addr global [100 x i32] zeroinitializer, align 16
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%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
%cmp142 = icmp sgt i32 %0, 0
br i1 %cmp142, label %for.body, label %for.cond2.preheader.thread
for.cond2.preheader.thread: ; preds = %entry
%.pre260 = load i32, ptr %b, align 4, !tbaa !5
%.fr261 = freeze i32 %.pre260
br label %for.end39
for.cond2.preheader: ; preds = %for.body
%cmp3152 = icmp sgt i32 %24, 0
%.pre = load i32, ptr %b, align 4, !tbaa !5
%.fr = freeze i32 %.pre
br i1 %cmp3152, label %for.cond5.preheader.lr.ph, label %for.end39
for.cond5.preheader.lr.ph: ; preds = %for.cond2.preheader
%cmp6144 = icmp sgt i32 %.fr, 0
br i1 %cmp6144, label %for.cond5.preheader.us.preheader, label %for.cond5.preheader.lr.ph.split.split
for.cond5.preheader.us.preheader: ; preds = %for.cond5.preheader.lr.ph
%wide.trip.count235 = zext i32 %24 to i64
%wide.trip.count224 = zext i32 %.fr to i64
%wide.trip.count230 = zext i32 %.fr to i64
%min.iters.check = icmp ult i32 %.fr, 8
%min.iters.check278 = icmp ult i32 %.fr, 32
%n.vec = and i64 %wide.trip.count224, 4294967264
%cmp.n = icmp eq i64 %n.vec, %wide.trip.count224
%n.vec.remaining = and i64 %wide.trip.count224, 24
%min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
%n.vec281 = and i64 %wide.trip.count224, 4294967288
%cmp.n282 = icmp eq i64 %n.vec281, %wide.trip.count224
%xtraiter = and i64 %wide.trip.count224, 3
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br label %for.body7.us.preheader
for.body7.us.preheader: ; preds = %for.inc37.us, %for.cond5.preheader.us.preheader
%indvars.iv232 = phi i64 [ 0, %for.cond5.preheader.us.preheader ], [ %indvars.iv.next233, %for.inc37.us ]
%k.0155.us = phi i32 [ 0, %for.cond5.preheader.us.preheader ], [ %k.1.us, %for.inc37.us ]
%1 = mul nuw nsw i64 %indvars.iv232, 100
%2 = add i64 %1, ptrtoint (ptr @s to i64)
br label %for.body7.us
for.body7.us: ; preds = %for.body7.us.preheader, %for.inc14.us
%indvars.iv221 = phi i64 [ 0, %for.body7.us.preheader ], [ %indvars.iv.next222, %for.inc14.us ]
%arrayidx11.us = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv232, i64 %indvars.iv221
%3 = load i8, ptr %arrayidx11.us, align 1, !tbaa !9
%cmp12.us = icmp eq i8 %3, 35
br i1 %cmp12.us, label %for.end16.us, label %for.inc14.us
for.inc14.us: ; preds = %for.body7.us
%indvars.iv.next222 = add nuw nsw i64 %indvars.iv221, 1
%exitcond225.not = icmp eq i64 %indvars.iv.next222, %wide.trip.count224
br i1 %exitcond225.not, label %for.inc37.us, label %for.body7.us, !llvm.loop !10
for.end16.us: ; preds = %for.body7.us
%4 = trunc i64 %indvars.iv221 to i32
%cmp17.not.us = icmp eq i32 %.fr, %4
br i1 %cmp17.not.us, label %for.inc37.us, label %iter.check
for.body23.us: ; preds = %for.body23.us.prol.loopexit, %for.body23.us
%indvars.iv227 = phi i64 [ %indvars.iv.next228.3, %for.body23.us ], [ %indvars.iv227.unr, %for.body23.us.prol.loopexit ]
%arrayidx27.us = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv232, i64 %indvars.iv227
%5 = load i8, ptr %arrayidx27.us, align 1, !tbaa !9
%arrayidx31.us = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %idxprom28.us, i64 %indvars.iv227
store i8 %5, ptr %arrayidx31.us, align 1, !tbaa !9
%indvars.iv.next228 = add nuw nsw i64 %indvars.iv227, 1
%arrayidx27.us.1 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv232, i64 %indvars.iv.next228
%6 = load i8, ptr %arrayidx27.us.1, align 1, !tbaa !9
%arrayidx31.us.1 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %idxprom28.us, i64 %indvars.iv.next228
store i8 %6, ptr %arrayidx31.us.1, align 1, !tbaa !9
%indvars.iv.next228.1 = add nuw nsw i64 %indvars.iv227, 2
%arrayidx27.us.2 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv232, i64 %indvars.iv.next228.1
%7 = load i8, ptr %arrayidx27.us.2, align 1, !tbaa !9
%arrayidx31.us.2 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %idxprom28.us, i64 %indvars.iv.next228.1
store i8 %7, ptr %arrayidx31.us.2, align 1, !tbaa !9
%indvars.iv.next228.2 = add nuw nsw i64 %indvars.iv227, 3
%arrayidx27.us.3 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv232, i64 %indvars.iv.next228.2
%8 = load i8, ptr %arrayidx27.us.3, align 1, !tbaa !9
%arrayidx31.us.3 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %idxprom28.us, i64 %indvars.iv.next228.2
store i8 %8, ptr %arrayidx31.us.3, align 1, !tbaa !9
%indvars.iv.next228.3 = add nuw nsw i64 %indvars.iv227, 4
%exitcond231.not.3 = icmp eq i64 %indvars.iv.next228.3, %wide.trip.count230
br i1 %exitcond231.not.3, label %for.cond20.for.end34_crit_edge.us, label %for.body23.us, !llvm.loop !12
for.inc37.us: ; preds = %for.inc14.us, %for.cond20.for.end34_crit_edge.us, %for.end16.us
%k.1.us = phi i32 [ %inc35.us, %for.cond20.for.end34_crit_edge.us ], [ %k.0155.us, %for.end16.us ], [ %k.0155.us, %for.inc14.us ]
%indvars.iv.next233 = add nuw nsw i64 %indvars.iv232, 1
%exitcond236.not = icmp eq i64 %indvars.iv.next233, %wide.trip.count235
br i1 %exitcond236.not, label %for.end39, label %for.body7.us.preheader, !llvm.loop !14
iter.check: ; preds = %for.end16.us
%idxprom28.us = sext i32 %k.0155.us to i64
br i1 %min.iters.check, label %for.body23.us.preheader, label %vector.memcheck
vector.memcheck: ; preds = %iter.check
%9 = mul nsw i64 %idxprom28.us, 100
%10 = add i64 %9, ptrtoint (ptr @s to i64)
%11 = sub i64 %10, %2
%diff.check = icmp ult i64 %11, 32
br i1 %diff.check, label %for.body23.us.preheader, label %vector.main.loop.iter.check
vector.main.loop.iter.check: ; preds = %vector.memcheck
br i1 %min.iters.check278, label %vec.epilog.ph, label %vector.body
vector.body: ; preds = %vector.main.loop.iter.check, %vector.body
%index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.main.loop.iter.check ]
%12 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv232, i64 %index
%wide.load = load <16 x i8>, ptr %12, align 4, !tbaa !9
%13 = getelementptr inbounds i8, ptr %12, i64 16
%wide.load279 = load <16 x i8>, ptr %13, align 4, !tbaa !9
%14 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %idxprom28.us, i64 %index
store <16 x i8> %wide.load, ptr %14, align 4, !tbaa !9
%15 = getelementptr inbounds i8, ptr %14, i64 16
store <16 x i8> %wide.load279, ptr %15, align 4, !tbaa !9
%index.next = add nuw i64 %index, 32
%16 = icmp eq i64 %index.next, %n.vec
br i1 %16, label %middle.block, label %vector.body, !llvm.loop !15
middle.block: ; preds = %vector.body
br i1 %cmp.n, label %for.cond20.for.end34_crit_edge.us, label %vec.epilog.iter.check
vec.epilog.iter.check: ; preds = %middle.block
br i1 %min.epilog.iters.check, label %for.body23.us.preheader, label %vec.epilog.ph
vec.epilog.ph: ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
%vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
br label %vec.epilog.vector.body
vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph
%index283 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next285, %vec.epilog.vector.body ]
%17 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv232, i64 %index283
%wide.load284 = load <8 x i8>, ptr %17, align 4, !tbaa !9
%18 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %idxprom28.us, i64 %index283
store <8 x i8> %wide.load284, ptr %18, align 4, !tbaa !9
%index.next285 = add nuw i64 %index283, 8
%19 = icmp eq i64 %index.next285, %n.vec281
br i1 %19, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !17
vec.epilog.middle.block: ; preds = %vec.epilog.vector.body
br i1 %cmp.n282, label %for.cond20.for.end34_crit_edge.us, label %for.body23.us.preheader
for.body23.us.preheader: ; preds = %vector.memcheck, %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block
%indvars.iv227.ph = phi i64 [ 0, %iter.check ], [ 0, %vector.memcheck ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec281, %vec.epilog.middle.block ]
%20 = xor i64 %indvars.iv227.ph, -1
%21 = add nsw i64 %20, %wide.trip.count224
br i1 %lcmp.mod.not, label %for.body23.us.prol.loopexit, label %for.body23.us.prol
for.body23.us.prol: ; preds = %for.body23.us.preheader, %for.body23.us.prol
%indvars.iv227.prol = phi i64 [ %indvars.iv.next228.prol, %for.body23.us.prol ], [ %indvars.iv227.ph, %for.body23.us.preheader ]
%prol.iter = phi i64 [ %prol.iter.next, %for.body23.us.prol ], [ 0, %for.body23.us.preheader ]
%arrayidx27.us.prol = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv232, i64 %indvars.iv227.prol
%22 = load i8, ptr %arrayidx27.us.prol, align 1, !tbaa !9
%arrayidx31.us.prol = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %idxprom28.us, i64 %indvars.iv227.prol
store i8 %22, ptr %arrayidx31.us.prol, align 1, !tbaa !9
%indvars.iv.next228.prol = add nuw nsw i64 %indvars.iv227.prol, 1
%prol.iter.next = add i64 %prol.iter, 1
%prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
br i1 %prol.iter.cmp.not, label %for.body23.us.prol.loopexit, label %for.body23.us.prol, !llvm.loop !18
for.body23.us.prol.loopexit: ; preds = %for.body23.us.prol, %for.body23.us.preheader
%indvars.iv227.unr = phi i64 [ %indvars.iv227.ph, %for.body23.us.preheader ], [ %indvars.iv.next228.prol, %for.body23.us.prol ]
%23 = icmp ult i64 %21, 3
br i1 %23, label %for.cond20.for.end34_crit_edge.us, label %for.body23.us
for.cond20.for.end34_crit_edge.us: ; preds = %for.body23.us.prol.loopexit, %for.body23.us, %vec.epilog.middle.block, %middle.block
%inc35.us = add nsw i32 %k.0155.us, 1
br label %for.inc37.us
for.cond5.preheader.lr.ph.split.split: ; preds = %for.cond5.preheader.lr.ph
%cmp17.not = icmp eq i32 %.fr, 0
%spec.select = select i1 %cmp17.not, i32 0, i32 %24
store i32 %spec.select, ptr %a, align 4, !tbaa !5
br label %for.end82
for.body: ; preds = %entry, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
%arrayidx = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%24 = load i32, ptr %a, align 4, !tbaa !5
%25 = sext i32 %24 to i64
%cmp = icmp slt i64 %indvars.iv.next, %25
br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !20
for.end39: ; preds = %for.inc37.us, %for.cond2.preheader.thread, %for.cond2.preheader
%.fr262 = phi i32 [ %.fr, %for.cond2.preheader ], [ %.fr261, %for.cond2.preheader.thread ], [ %.fr, %for.inc37.us ]
%26 = phi i32 [ 0, %for.cond2.preheader ], [ 0, %for.cond2.preheader.thread ], [ %k.1.us, %for.inc37.us ]
store i32 %26, ptr %a, align 4, !tbaa !5
%cmp41200 = icmp sgt i32 %.fr262, 0
br i1 %cmp41200, label %for.cond44.preheader.lr.ph, label %for.end82
for.cond44.preheader.lr.ph: ; preds = %for.end39
%cmp45194 = icmp sgt i32 %26, 0
%wide.trip.count250 = zext i32 %.fr262 to i64
%cmp60.not271 = icmp eq i32 %26, 0
%wide.trip.count240 = zext i32 %26 to i64
%xtraiter288 = and i64 %wide.trip.count240, 3
%27 = icmp ult i32 %26, 4
%unroll_iter = and i64 %wide.trip.count240, 4294967292
%lcmp.mod289.not = icmp eq i64 %xtraiter288, 0
br label %for.cond44.preheader
for.cond44.preheader: ; preds = %for.cond44.preheader.lr.ph, %for.inc80
%indvars.iv247 = phi i64 [ 0, %for.cond44.preheader.lr.ph ], [ %indvars.iv.next248, %for.inc80 ]
%k.2203 = phi i32 [ 0, %for.cond44.preheader.lr.ph ], [ %k.3, %for.inc80 ]
br i1 %cmp45194, label %for.body47, label %for.end59.thread269
for.body47: ; preds = %for.cond44.preheader, %for.inc57
%indvars.iv237 = phi i64 [ %indvars.iv.next238, %for.inc57 ], [ 0, %for.cond44.preheader ]
%arrayidx51 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv237, i64 %indvars.iv247
%28 = load i8, ptr %arrayidx51, align 1, !tbaa !9
%cmp53 = icmp eq i8 %28, 35
br i1 %cmp53, label %for.end59, label %for.inc57
for.inc57: ; preds = %for.body47
%indvars.iv.next238 = add nuw nsw i64 %indvars.iv237, 1
%exitcond241.not = icmp eq i64 %indvars.iv.next238, %wide.trip.count240
br i1 %exitcond241.not, label %for.inc80, label %for.body47, !llvm.loop !21
for.end59: ; preds = %for.body47
%29 = trunc i64 %indvars.iv237 to i32
%cmp60.not = icmp eq i32 %26, %29
br i1 %cmp60.not, label %for.inc80, label %for.cond63.preheader
for.end59.thread269: ; preds = %for.cond44.preheader
br i1 %cmp60.not271, label %for.inc80, label %for.end77
for.cond63.preheader: ; preds = %for.end59
br i1 %cmp45194, label %for.body66.lr.ph, label %for.end77
for.body66.lr.ph: ; preds = %for.cond63.preheader
%idxprom73 = sext i32 %k.2203 to i64
br i1 %27, label %for.end77.loopexit.unr-lcssa, label %for.body66
for.body66: ; preds = %for.body66.lr.ph, %for.body66
%indvars.iv242 = phi i64 [ %indvars.iv.next243.3, %for.body66 ], [ 0, %for.body66.lr.ph ]
%niter = phi i64 [ %niter.next.3, %for.body66 ], [ 0, %for.body66.lr.ph ]
%arrayidx70 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv242, i64 %indvars.iv247
%30 = load i8, ptr %arrayidx70, align 1, !tbaa !9
%arrayidx74 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv242, i64 %idxprom73
store i8 %30, ptr %arrayidx74, align 1, !tbaa !9
%indvars.iv.next243 = or i64 %indvars.iv242, 1
%arrayidx70.1 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv.next243, i64 %indvars.iv247
%31 = load i8, ptr %arrayidx70.1, align 1, !tbaa !9
%arrayidx74.1 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv.next243, i64 %idxprom73
store i8 %31, ptr %arrayidx74.1, align 1, !tbaa !9
%indvars.iv.next243.1 = or i64 %indvars.iv242, 2
%arrayidx70.2 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv.next243.1, i64 %indvars.iv247
%32 = load i8, ptr %arrayidx70.2, align 1, !tbaa !9
%arrayidx74.2 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv.next243.1, i64 %idxprom73
store i8 %32, ptr %arrayidx74.2, align 1, !tbaa !9
%indvars.iv.next243.2 = or i64 %indvars.iv242, 3
%arrayidx70.3 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv.next243.2, i64 %indvars.iv247
%33 = load i8, ptr %arrayidx70.3, align 1, !tbaa !9
%arrayidx74.3 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv.next243.2, i64 %idxprom73
store i8 %33, ptr %arrayidx74.3, align 1, !tbaa !9
%indvars.iv.next243.3 = add nuw nsw i64 %indvars.iv242, 4
%niter.next.3 = add i64 %niter, 4
%niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
br i1 %niter.ncmp.3, label %for.end77.loopexit.unr-lcssa, label %for.body66, !llvm.loop !22
for.end77.loopexit.unr-lcssa: ; preds = %for.body66, %for.body66.lr.ph
%indvars.iv242.unr = phi i64 [ 0, %for.body66.lr.ph ], [ %indvars.iv.next243.3, %for.body66 ]
br i1 %lcmp.mod289.not, label %for.end77, label %for.body66.epil
for.body66.epil: ; preds = %for.end77.loopexit.unr-lcssa, %for.body66.epil
%indvars.iv242.epil = phi i64 [ %indvars.iv.next243.epil, %for.body66.epil ], [ %indvars.iv242.unr, %for.end77.loopexit.unr-lcssa ]
%epil.iter = phi i64 [ %epil.iter.next, %for.body66.epil ], [ 0, %for.end77.loopexit.unr-lcssa ]
%arrayidx70.epil = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv242.epil, i64 %indvars.iv247
%34 = load i8, ptr %arrayidx70.epil, align 1, !tbaa !9
%arrayidx74.epil = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv242.epil, i64 %idxprom73
store i8 %34, ptr %arrayidx74.epil, align 1, !tbaa !9
%indvars.iv.next243.epil = add nuw nsw i64 %indvars.iv242.epil, 1
%epil.iter.next = add i64 %epil.iter, 1
%epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter288
br i1 %epil.iter.cmp.not, label %for.end77, label %for.body66.epil, !llvm.loop !23
for.end77: ; preds = %for.end77.loopexit.unr-lcssa, %for.body66.epil, %for.end59.thread269, %for.cond63.preheader
%inc78 = add nsw i32 %k.2203, 1
br label %for.inc80
for.inc80: ; preds = %for.inc57, %for.end59.thread269, %for.end59, %for.end77
%k.3 = phi i32 [ %inc78, %for.end77 ], [ %k.2203, %for.end59 ], [ %k.2203, %for.end59.thread269 ], [ %k.2203, %for.inc57 ]
%indvars.iv.next248 = add nuw nsw i64 %indvars.iv247, 1
%exitcond251.not = icmp eq i64 %indvars.iv.next248, %wide.trip.count250
br i1 %exitcond251.not, label %for.end82, label %for.cond44.preheader, !llvm.loop !24
for.end82: ; preds = %for.inc80, %for.cond5.preheader.lr.ph.split.split, %for.end39
%35 = phi i32 [ %26, %for.end39 ], [ %spec.select, %for.cond5.preheader.lr.ph.split.split ], [ %26, %for.inc80 ]
%k.2.lcssa = phi i32 [ 0, %for.end39 ], [ 0, %for.cond5.preheader.lr.ph.split.split ], [ %k.3, %for.inc80 ]
store i32 %k.2.lcssa, ptr %b, align 4, !tbaa !5
%cmp84207 = icmp sgt i32 %35, 0
br i1 %cmp84207, label %for.cond87.preheader, label %for.end103
for.cond87.preheaderthread-pre-split: ; preds = %for.end99
%.pr = load i32, ptr %b, align 4, !tbaa !5
br label %for.cond87.preheader
for.cond87.preheader: ; preds = %for.end82, %for.cond87.preheaderthread-pre-split
%36 = phi i32 [ %.pr, %for.cond87.preheaderthread-pre-split ], [ %k.2.lcssa, %for.end82 ]
%indvars.iv255 = phi i64 [ %indvars.iv.next256, %for.cond87.preheaderthread-pre-split ], [ 0, %for.end82 ]
%cmp88205 = icmp sgt i32 %36, 0
br i1 %cmp88205, label %for.body90, label %for.end99
for.body90: ; preds = %for.cond87.preheader, %for.body90
%indvars.iv252 = phi i64 [ %indvars.iv.next253, %for.body90 ], [ 0, %for.cond87.preheader ]
%arrayidx94 = getelementptr inbounds [100 x [100 x i8]], ptr @s, i64 0, i64 %indvars.iv255, i64 %indvars.iv252
%37 = load i8, ptr %arrayidx94, align 1, !tbaa !9
%conv95 = sext i8 %37 to i32
%putchar140 = call i32 @putchar(i32 %conv95)
%indvars.iv.next253 = add nuw nsw i64 %indvars.iv252, 1
%38 = load i32, ptr %b, align 4, !tbaa !5
%39 = sext i32 %38 to i64
%cmp88 = icmp slt i64 %indvars.iv.next253, %39
br i1 %cmp88, label %for.body90, label %for.end99, !llvm.loop !25
for.end99: ; preds = %for.body90, %for.cond87.preheader
%putchar = call i32 @putchar(i32 10)
%indvars.iv.next256 = add nuw nsw i64 %indvars.iv255, 1
%40 = load i32, ptr %a, align 4, !tbaa !5
%41 = sext i32 %40 to i64
%cmp84 = icmp slt i64 %indvars.iv.next256, %41
br i1 %cmp84, label %for.cond87.preheaderthread-pre-split, label %for.end103, !llvm.loop !26
for.end103: ; preds = %for.end99, %for.end82
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11, !13}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11, !13, !16}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !11, !13, !16}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.unroll.disable"}
!20 = distinct !{!20, !11}
!21 = distinct !{!21, !11}
!22 = distinct !{!22, !11}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !11}
!25 = distinct !{!25, !11}
!26 = distinct !{!26, !11}
|
#include <stdio.h>
#include <stdlib.h>
int main(){
int H, W, i, j, f;
scanf("%d%d", &H, &W);
char **a = (char **)malloc(sizeof(char *) * H);
for(i = 0; i < H; i++){
a[i] = (char *)malloc(sizeof(char) * (W + 1));
scanf("%s", a[i]);
}
int *reductR = (int *)malloc(sizeof(int) * H);
int *reductC = (int *)malloc(sizeof(int) * W);
for(i = 0; i < H; i++){
for(j = 0, f = 1; j < W; j++){
if(a[i][j] == '#'){
f = 0;
}
}
reductR[i] = f;
}
for(j = 0; j < W; j++){
for(i = 0, f = 1; i < H; i++){
if(a[i][j] == '#'){
f = 0;
}
}
reductC[j] = f;
}
for(i = 0; i < H; i++){
if(reductR[i] == 0){
for(j = 0; j < W; j++){
if(reductC[j] == 0){
printf("%c", a[i][j]);
}
}
printf("\n");
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133347/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133347/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #5
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%conv = sext i32 %0 to i64
%mul = shl nsw i64 %conv, 3
%call1 = call noalias ptr @malloc(i64 noundef %mul) #6
%cmp129 = icmp sgt i32 %0, 0
br i1 %cmp129, label %for.body, label %for.end
for.body: ; preds = %entry, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
%1 = load i32, ptr %W, align 4, !tbaa !5
%add = add nsw i32 %1, 1
%conv3 = sext i32 %add to i64
%call5 = call noalias ptr @malloc(i64 noundef %conv3) #6
%arrayidx = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv
store ptr %call5, ptr %arrayidx, align 8, !tbaa !9
%call8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef %call5)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%2 = load i32, ptr %H, align 4, !tbaa !5
%3 = sext i32 %2 to i64
%cmp = icmp slt i64 %indvars.iv.next, %3
br i1 %cmp, label %for.body, label %for.end, !llvm.loop !11
for.end: ; preds = %for.body, %entry
%conv9.pre-phi = phi i64 [ %conv, %entry ], [ %3, %for.body ]
%4 = phi i32 [ %0, %entry ], [ %2, %for.body ]
%mul10 = shl nsw i64 %conv9.pre-phi, 2
%call11 = call noalias ptr @malloc(i64 noundef %mul10) #6
%5 = load i32, ptr %W, align 4, !tbaa !5
%conv12 = sext i32 %5 to i64
%mul13 = shl nsw i64 %conv12, 2
%call14 = call noalias ptr @malloc(i64 noundef %mul13) #6
%cmp16135 = icmp sgt i32 %4, 0
%cmp20131 = icmp sgt i32 %5, 0
br i1 %cmp16135, label %for.cond19.preheader.lr.ph, label %for.cond38.preheader.thread
for.cond19.preheader.lr.ph: ; preds = %for.end
%wide.trip.count162 = zext i32 %4 to i64
br i1 %cmp20131, label %for.cond19.preheader.us.preheader, label %for.cond19.preheader.preheader
for.cond19.preheader.preheader: ; preds = %for.cond19.preheader.lr.ph
%min.iters.check = icmp ult i32 %4, 8
br i1 %min.iters.check, label %for.cond19.preheader.preheader224, label %vector.ph
vector.ph: ; preds = %for.cond19.preheader.preheader
%n.vec = and i64 %wide.trip.count162, 4294967288
br label %vector.body
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%6 = getelementptr inbounds i32, ptr %call11, i64 %index
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %6, align 4, !tbaa !5
%7 = getelementptr inbounds i32, ptr %6, i64 4
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %7, align 4, !tbaa !5
%index.next = add nuw i64 %index, 8
%8 = icmp eq i64 %index.next, %n.vec
br i1 %8, label %middle.block, label %vector.body, !llvm.loop !13
middle.block: ; preds = %vector.body
%cmp.n = icmp eq i64 %n.vec, %wide.trip.count162
br i1 %cmp.n, label %for.cond38.preheader, label %for.cond19.preheader.preheader224
for.cond19.preheader.preheader224: ; preds = %for.cond19.preheader.preheader, %middle.block
%indvars.iv151.ph = phi i64 [ 0, %for.cond19.preheader.preheader ], [ %n.vec, %middle.block ]
br label %for.cond19.preheader
for.cond19.preheader.us.preheader: ; preds = %for.cond19.preheader.lr.ph
%wide.trip.count157 = zext i32 %5 to i64
%min.iters.check195 = icmp ult i32 %5, 8
%n.vec198 = and i64 %wide.trip.count157, 4294967288
%cmp.n200 = icmp eq i64 %n.vec198, %wide.trip.count157
br label %for.cond19.preheader.us
for.cond19.preheader.us: ; preds = %for.cond19.preheader.us.preheader, %for.cond19.for.end32_crit_edge.us
%indvars.iv159 = phi i64 [ 0, %for.cond19.preheader.us.preheader ], [ %indvars.iv.next160, %for.cond19.for.end32_crit_edge.us ]
%arrayidx24.us = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv159
%9 = load ptr, ptr %arrayidx24.us, align 8, !tbaa !9
br i1 %min.iters.check195, label %for.body22.us.preheader, label %vector.body201
vector.body201: ; preds = %for.cond19.preheader.us, %vector.body201
%index202 = phi i64 [ %index.next205, %vector.body201 ], [ 0, %for.cond19.preheader.us ]
%vec.phi = phi <4 x i32> [ %14, %vector.body201 ], [ <i32 1, i32 1, i32 1, i32 1>, %for.cond19.preheader.us ]
%vec.phi203 = phi <4 x i32> [ %15, %vector.body201 ], [ <i32 1, i32 1, i32 1, i32 1>, %for.cond19.preheader.us ]
%10 = getelementptr inbounds i8, ptr %9, i64 %index202
%wide.load = load <4 x i8>, ptr %10, align 1, !tbaa !16
%11 = getelementptr inbounds i8, ptr %10, i64 4
%wide.load204 = load <4 x i8>, ptr %11, align 1, !tbaa !16
%12 = icmp eq <4 x i8> %wide.load, <i8 35, i8 35, i8 35, i8 35>
%13 = icmp eq <4 x i8> %wide.load204, <i8 35, i8 35, i8 35, i8 35>
%14 = select <4 x i1> %12, <4 x i32> zeroinitializer, <4 x i32> %vec.phi
%15 = select <4 x i1> %13, <4 x i32> zeroinitializer, <4 x i32> %vec.phi203
%index.next205 = add nuw i64 %index202, 8
%16 = icmp eq i64 %index.next205, %n.vec198
br i1 %16, label %middle.block193, label %vector.body201, !llvm.loop !17
middle.block193: ; preds = %vector.body201
%rdx.select.cmp.not = icmp ne <4 x i32> %14, <i32 1, i32 1, i32 1, i32 1>
%rdx.select.cmp206219 = icmp ne <4 x i32> %15, <i32 1, i32 1, i32 1, i32 1>
%rdx.select.cmp206 = select <4 x i1> %rdx.select.cmp.not, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i1> %rdx.select.cmp206219
%17 = bitcast <4 x i1> %rdx.select.cmp206 to i4
%.not = icmp eq i4 %17, 0
%rdx.select207 = zext i1 %.not to i32
br i1 %cmp.n200, label %for.cond19.for.end32_crit_edge.us, label %for.body22.us.preheader
for.body22.us.preheader: ; preds = %for.cond19.preheader.us, %middle.block193
%indvars.iv154.ph = phi i64 [ 0, %for.cond19.preheader.us ], [ %n.vec198, %middle.block193 ]
%f.0132.us.ph = phi i32 [ 1, %for.cond19.preheader.us ], [ %rdx.select207, %middle.block193 ]
br label %for.body22.us
for.body22.us: ; preds = %for.body22.us.preheader, %for.body22.us
%indvars.iv154 = phi i64 [ %indvars.iv.next155, %for.body22.us ], [ %indvars.iv154.ph, %for.body22.us.preheader ]
%f.0132.us = phi i32 [ %spec.select.us, %for.body22.us ], [ %f.0132.us.ph, %for.body22.us.preheader ]
%arrayidx26.us = getelementptr inbounds i8, ptr %9, i64 %indvars.iv154
%18 = load i8, ptr %arrayidx26.us, align 1, !tbaa !16
%cmp28.us = icmp eq i8 %18, 35
%spec.select.us = select i1 %cmp28.us, i32 0, i32 %f.0132.us
%indvars.iv.next155 = add nuw nsw i64 %indvars.iv154, 1
%exitcond158.not = icmp eq i64 %indvars.iv.next155, %wide.trip.count157
br i1 %exitcond158.not, label %for.cond19.for.end32_crit_edge.us, label %for.body22.us, !llvm.loop !18
for.cond19.for.end32_crit_edge.us: ; preds = %for.body22.us, %middle.block193
%spec.select.us.lcssa = phi i32 [ %rdx.select207, %middle.block193 ], [ %spec.select.us, %for.body22.us ]
%arrayidx34.us = getelementptr inbounds i32, ptr %call11, i64 %indvars.iv159
store i32 %spec.select.us.lcssa, ptr %arrayidx34.us, align 4, !tbaa !5
%indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1
%exitcond163.not = icmp eq i64 %indvars.iv.next160, %wide.trip.count162
br i1 %exitcond163.not, label %for.cond38.preheader, label %for.cond19.preheader.us, !llvm.loop !19
for.cond19.preheader: ; preds = %for.cond19.preheader.preheader224, %for.cond19.preheader
%indvars.iv151 = phi i64 [ %indvars.iv.next152, %for.cond19.preheader ], [ %indvars.iv151.ph, %for.cond19.preheader.preheader224 ]
%arrayidx34 = getelementptr inbounds i32, ptr %call11, i64 %indvars.iv151
store i32 1, ptr %arrayidx34, align 4, !tbaa !5
%indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
%exitcond.not = icmp eq i64 %indvars.iv.next152, %wide.trip.count162
br i1 %exitcond.not, label %for.cond38.preheader, label %for.cond19.preheader, !llvm.loop !20
for.cond38.preheader: ; preds = %for.cond19.preheader, %for.cond19.for.end32_crit_edge.us, %middle.block
%cmp39141 = icmp sgt i32 %5, 0
br i1 %cmp39141, label %for.cond42.preheader.lr.ph, label %for.cond63.preheader
for.cond38.preheader.thread: ; preds = %for.end
br i1 %cmp20131, label %for.cond42.preheader.preheader, label %for.end95
for.cond42.preheader.lr.ph: ; preds = %for.cond38.preheader
br i1 %cmp16135, label %for.cond42.preheader.us.preheader, label %for.cond42.preheader.preheader
for.cond42.preheader.preheader: ; preds = %for.cond38.preheader.thread, %for.cond42.preheader.lr.ph
%wide.trip.count167 = zext i32 %5 to i64
%min.iters.check210 = icmp ult i32 %5, 8
br i1 %min.iters.check210, label %for.cond42.preheader.preheader220, label %vector.ph211
vector.ph211: ; preds = %for.cond42.preheader.preheader
%n.vec213 = and i64 %wide.trip.count167, 4294967288
br label %vector.body216
vector.body216: ; preds = %vector.body216, %vector.ph211
%index217 = phi i64 [ 0, %vector.ph211 ], [ %index.next218, %vector.body216 ]
%19 = getelementptr inbounds i32, ptr %call14, i64 %index217
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %19, align 4, !tbaa !5
%20 = getelementptr inbounds i32, ptr %19, i64 4
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %20, align 4, !tbaa !5
%index.next218 = add nuw i64 %index217, 8
%21 = icmp eq i64 %index.next218, %n.vec213
br i1 %21, label %middle.block208, label %vector.body216, !llvm.loop !21
middle.block208: ; preds = %vector.body216
%cmp.n215 = icmp eq i64 %n.vec213, %wide.trip.count167
br i1 %cmp.n215, label %for.cond63.preheader, label %for.cond42.preheader.preheader220
for.cond42.preheader.preheader220: ; preds = %for.cond42.preheader.preheader, %middle.block208
%indvars.iv164.ph = phi i64 [ 0, %for.cond42.preheader.preheader ], [ %n.vec213, %middle.block208 ]
br label %for.cond42.preheader
for.cond42.preheader.us.preheader: ; preds = %for.cond42.preheader.lr.ph
%wide.trip.count177 = zext i32 %5 to i64
%xtraiter = and i64 %wide.trip.count162, 3
%22 = icmp ult i32 %4, 4
%unroll_iter = and i64 %wide.trip.count162, 4294967292
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br label %for.cond42.preheader.us
for.cond42.preheader.us: ; preds = %for.cond42.preheader.us.preheader, %for.cond42.for.end57_crit_edge.us
%indvars.iv174 = phi i64 [ 0, %for.cond42.preheader.us.preheader ], [ %indvars.iv.next175, %for.cond42.for.end57_crit_edge.us ]
br i1 %22, label %for.cond42.for.end57_crit_edge.us.unr-lcssa, label %for.body45.us
for.body45.us: ; preds = %for.cond42.preheader.us, %for.body45.us
%indvars.iv169 = phi i64 [ %indvars.iv.next170.3, %for.body45.us ], [ 0, %for.cond42.preheader.us ]
%f.2138.us = phi i32 [ %spec.select128.us.3, %for.body45.us ], [ 1, %for.cond42.preheader.us ]
%niter = phi i64 [ %niter.next.3, %for.body45.us ], [ 0, %for.cond42.preheader.us ]
%arrayidx47.us = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv169
%23 = load ptr, ptr %arrayidx47.us, align 8, !tbaa !9
%arrayidx49.us = getelementptr inbounds i8, ptr %23, i64 %indvars.iv174
%24 = load i8, ptr %arrayidx49.us, align 1, !tbaa !16
%cmp51.us = icmp eq i8 %24, 35
%indvars.iv.next170 = or i64 %indvars.iv169, 1
%arrayidx47.us.1 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv.next170
%25 = load ptr, ptr %arrayidx47.us.1, align 8, !tbaa !9
%arrayidx49.us.1 = getelementptr inbounds i8, ptr %25, i64 %indvars.iv174
%26 = load i8, ptr %arrayidx49.us.1, align 1, !tbaa !16
%cmp51.us.1 = icmp eq i8 %26, 35
%indvars.iv.next170.1 = or i64 %indvars.iv169, 2
%arrayidx47.us.2 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv.next170.1
%27 = load ptr, ptr %arrayidx47.us.2, align 8, !tbaa !9
%arrayidx49.us.2 = getelementptr inbounds i8, ptr %27, i64 %indvars.iv174
%28 = load i8, ptr %arrayidx49.us.2, align 1, !tbaa !16
%cmp51.us.2 = icmp eq i8 %28, 35
%indvars.iv.next170.2 = or i64 %indvars.iv169, 3
%arrayidx47.us.3 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv.next170.2
%29 = load ptr, ptr %arrayidx47.us.3, align 8, !tbaa !9
%arrayidx49.us.3 = getelementptr inbounds i8, ptr %29, i64 %indvars.iv174
%30 = load i8, ptr %arrayidx49.us.3, align 1, !tbaa !16
%cmp51.us.3 = icmp eq i8 %30, 35
%31 = select i1 %cmp51.us.3, i1 true, i1 %cmp51.us.2
%32 = select i1 %31, i1 true, i1 %cmp51.us.1
%33 = select i1 %32, i1 true, i1 %cmp51.us
%spec.select128.us.3 = select i1 %33, i32 0, i32 %f.2138.us
%indvars.iv.next170.3 = add nuw nsw i64 %indvars.iv169, 4
%niter.next.3 = add i64 %niter, 4
%niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
br i1 %niter.ncmp.3, label %for.cond42.for.end57_crit_edge.us.unr-lcssa, label %for.body45.us, !llvm.loop !22
for.cond42.for.end57_crit_edge.us.unr-lcssa: ; preds = %for.body45.us, %for.cond42.preheader.us
%spec.select128.us.lcssa.ph = phi i32 [ undef, %for.cond42.preheader.us ], [ %spec.select128.us.3, %for.body45.us ]
%indvars.iv169.unr = phi i64 [ 0, %for.cond42.preheader.us ], [ %indvars.iv.next170.3, %for.body45.us ]
%f.2138.us.unr = phi i32 [ 1, %for.cond42.preheader.us ], [ %spec.select128.us.3, %for.body45.us ]
br i1 %lcmp.mod.not, label %for.cond42.for.end57_crit_edge.us, label %for.body45.us.epil
for.body45.us.epil: ; preds = %for.cond42.for.end57_crit_edge.us.unr-lcssa, %for.body45.us.epil
%indvars.iv169.epil = phi i64 [ %indvars.iv.next170.epil, %for.body45.us.epil ], [ %indvars.iv169.unr, %for.cond42.for.end57_crit_edge.us.unr-lcssa ]
%f.2138.us.epil = phi i32 [ %spec.select128.us.epil, %for.body45.us.epil ], [ %f.2138.us.unr, %for.cond42.for.end57_crit_edge.us.unr-lcssa ]
%epil.iter = phi i64 [ %epil.iter.next, %for.body45.us.epil ], [ 0, %for.cond42.for.end57_crit_edge.us.unr-lcssa ]
%arrayidx47.us.epil = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv169.epil
%34 = load ptr, ptr %arrayidx47.us.epil, align 8, !tbaa !9
%arrayidx49.us.epil = getelementptr inbounds i8, ptr %34, i64 %indvars.iv174
%35 = load i8, ptr %arrayidx49.us.epil, align 1, !tbaa !16
%cmp51.us.epil = icmp eq i8 %35, 35
%spec.select128.us.epil = select i1 %cmp51.us.epil, i32 0, i32 %f.2138.us.epil
%indvars.iv.next170.epil = add nuw nsw i64 %indvars.iv169.epil, 1
%epil.iter.next = add i64 %epil.iter, 1
%epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
br i1 %epil.iter.cmp.not, label %for.cond42.for.end57_crit_edge.us, label %for.body45.us.epil, !llvm.loop !23
for.cond42.for.end57_crit_edge.us: ; preds = %for.body45.us.epil, %for.cond42.for.end57_crit_edge.us.unr-lcssa
%spec.select128.us.lcssa = phi i32 [ %spec.select128.us.lcssa.ph, %for.cond42.for.end57_crit_edge.us.unr-lcssa ], [ %spec.select128.us.epil, %for.body45.us.epil ]
%arrayidx59.us = getelementptr inbounds i32, ptr %call14, i64 %indvars.iv174
store i32 %spec.select128.us.lcssa, ptr %arrayidx59.us, align 4, !tbaa !5
%indvars.iv.next175 = add nuw nsw i64 %indvars.iv174, 1
%exitcond178.not = icmp eq i64 %indvars.iv.next175, %wide.trip.count177
br i1 %exitcond178.not, label %for.cond63.preheader, label %for.cond42.preheader.us, !llvm.loop !25
for.cond42.preheader: ; preds = %for.cond42.preheader.preheader220, %for.cond42.preheader
%indvars.iv164 = phi i64 [ %indvars.iv.next165, %for.cond42.preheader ], [ %indvars.iv164.ph, %for.cond42.preheader.preheader220 ]
%arrayidx59 = getelementptr inbounds i32, ptr %call14, i64 %indvars.iv164
store i32 1, ptr %arrayidx59, align 4, !tbaa !5
%indvars.iv.next165 = add nuw nsw i64 %indvars.iv164, 1
%exitcond168.not = icmp eq i64 %indvars.iv.next165, %wide.trip.count167
br i1 %exitcond168.not, label %for.cond63.preheader, label %for.cond42.preheader, !llvm.loop !26
for.cond63.preheader: ; preds = %for.cond42.preheader, %for.cond42.for.end57_crit_edge.us, %middle.block208, %for.cond38.preheader
br i1 %cmp16135, label %for.body66, label %for.end95
for.body66: ; preds = %for.cond63.preheader, %for.inc93
%36 = phi i32 [ %45, %for.inc93 ], [ %4, %for.cond63.preheader ]
%indvars.iv182 = phi i64 [ %indvars.iv.next183, %for.inc93 ], [ 0, %for.cond63.preheader ]
%arrayidx68 = getelementptr inbounds i32, ptr %call11, i64 %indvars.iv182
%37 = load i32, ptr %arrayidx68, align 4, !tbaa !5
%cmp69 = icmp eq i32 %37, 0
br i1 %cmp69, label %for.cond72.preheader, label %for.inc93
for.cond72.preheader: ; preds = %for.body66
%38 = load i32, ptr %W, align 4, !tbaa !5
%cmp73143 = icmp sgt i32 %38, 0
br i1 %cmp73143, label %for.body75.lr.ph, label %for.end90
for.body75.lr.ph: ; preds = %for.cond72.preheader
%arrayidx82 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv182
br label %for.body75
for.body75: ; preds = %for.body75.lr.ph, %for.inc88
%39 = phi i32 [ %38, %for.body75.lr.ph ], [ %43, %for.inc88 ]
%indvars.iv179 = phi i64 [ 0, %for.body75.lr.ph ], [ %indvars.iv.next180, %for.inc88 ]
%arrayidx77 = getelementptr inbounds i32, ptr %call14, i64 %indvars.iv179
%40 = load i32, ptr %arrayidx77, align 4, !tbaa !5
%cmp78 = icmp eq i32 %40, 0
br i1 %cmp78, label %if.then80, label %for.inc88
if.then80: ; preds = %for.body75
%41 = load ptr, ptr %arrayidx82, align 8, !tbaa !9
%arrayidx84 = getelementptr inbounds i8, ptr %41, i64 %indvars.iv179
%42 = load i8, ptr %arrayidx84, align 1, !tbaa !16
%conv85 = sext i8 %42 to i32
%putchar127 = call i32 @putchar(i32 %conv85)
%.pre = load i32, ptr %W, align 4, !tbaa !5
br label %for.inc88
for.inc88: ; preds = %for.body75, %if.then80
%43 = phi i32 [ %39, %for.body75 ], [ %.pre, %if.then80 ]
%indvars.iv.next180 = add nuw nsw i64 %indvars.iv179, 1
%44 = sext i32 %43 to i64
%cmp73 = icmp slt i64 %indvars.iv.next180, %44
br i1 %cmp73, label %for.body75, label %for.end90, !llvm.loop !27
for.end90: ; preds = %for.inc88, %for.cond72.preheader
%putchar = call i32 @putchar(i32 10)
%.pre185 = load i32, ptr %H, align 4, !tbaa !5
br label %for.inc93
for.inc93: ; preds = %for.body66, %for.end90
%45 = phi i32 [ %36, %for.body66 ], [ %.pre185, %for.end90 ]
%indvars.iv.next183 = add nuw nsw i64 %indvars.iv182, 1
%46 = sext i32 %45 to i64
%cmp64 = icmp slt i64 %indvars.iv.next183, %46
br i1 %cmp64, label %for.body66, label %for.end95, !llvm.loop !28
for.end95: ; preds = %for.inc93, %for.cond38.preheader.thread, %for.cond63.preheader
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #5
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #5
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind }
attributes #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !12, !14, !15}
!18 = distinct !{!18, !12, !15, !14}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12, !15, !14}
!21 = distinct !{!21, !12, !14, !15}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.unroll.disable"}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12, !15, !14}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <limits.h>
int main(void){
int h,w,count;
scanf("%d%d",&h,&w);
char a[h][w+2];
for (int i=0; i<h; i++){
scanf("%s",a[i]);
}
for (int i=0; i<h; i++){
count=0;
for (int j=0; j<w; j++){
if (a[i][j]=='.'){
count++;
}
}
if (count==w){
for (int j=i; j<h; j++){
strcpy(a[j],a[j+1]);
}
i--;
h--;
}
}
for (int i=0; i<w; i++){
count=0;
for (int j=0; j<h; j++){
if(a[j][i]=='.'){
count++;
}
}
if(count==h){
for (int j=0; j<h; j++){
for (int k=i; k<w; k++){
a[j][k]=a[j][k+1];
}
}
i--;
w--;
}
}
for (int i=0; i<h; i++){
for (int j=0; j<w; j++){
printf("%c",a[i][j]);
}
printf("\n");
}
return 0 ;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133390/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133390/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%h = alloca i32, align 4
%w = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #7
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #7
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%0 = load i32, ptr %h, align 4, !tbaa !5
%1 = zext i32 %0 to i64
%2 = load i32, ptr %w, align 4, !tbaa !5
%add = add i32 %2, 2
%3 = zext i32 %add to i64
%4 = call ptr @llvm.stacksave.p0()
%5 = mul nuw i64 %3, %1
%vla = alloca i8, i64 %5, align 16
%6 = load i32, ptr %h, align 4, !tbaa !5
%cmp164 = icmp sgt i32 %6, 0
br i1 %cmp164, label %for.body, label %for.cond3.preheader.thread
for.cond3.preheader.thread: ; preds = %entry
%w.promoted.pre284 = load i32, ptr %w, align 4, !tbaa !5
br label %for.cond45.preheader
for.cond3.preheader: ; preds = %for.body
%cmp4174 = icmp sgt i32 %8, 0
%w.promoted.pre = load i32, ptr %w, align 4, !tbaa !5
br i1 %cmp4174, label %for.cond7.preheader.lr.ph, label %for.cond45.preheader
for.cond7.preheader.lr.ph: ; preds = %for.cond3.preheader
%cmp8166 = icmp sgt i32 %w.promoted.pre, 0
%wide.trip.count = zext i32 %w.promoted.pre to i64
%min.iters.check = icmp ult i32 %w.promoted.pre, 8
%n.vec = and i64 %wide.trip.count, 4294967288
%cmp.n = icmp eq i64 %n.vec, %wide.trip.count
br label %for.cond7.preheader
for.body: ; preds = %entry, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
%7 = mul nuw nsw i64 %indvars.iv, %3
%arrayidx = getelementptr inbounds i8, ptr %vla, i64 %7
%call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx)
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
%8 = load i32, ptr %h, align 4, !tbaa !5
%9 = sext i32 %8 to i64
%cmp = icmp slt i64 %indvars.iv.next, %9
br i1 %cmp, label %for.body, label %for.cond3.preheader, !llvm.loop !9
for.cond7.preheader: ; preds = %for.cond7.preheader.lr.ph, %for.inc41
%i2.0176 = phi i32 [ 0, %for.cond7.preheader.lr.ph ], [ %inc42, %for.inc41 ]
%dec39173175 = phi i32 [ %8, %for.cond7.preheader.lr.ph ], [ %dec39172, %for.inc41 ]
br i1 %cmp8166, label %for.body10.lr.ph, label %for.cond.cleanup9
for.body10.lr.ph: ; preds = %for.cond7.preheader
%idxprom11 = sext i32 %i2.0176 to i64
%10 = mul nsw i64 %idxprom11, %3
%arrayidx12 = getelementptr inbounds i8, ptr %vla, i64 %10
br i1 %min.iters.check, label %for.body10.preheader, label %vector.body
vector.body: ; preds = %for.body10.lr.ph, %vector.body
%index = phi i64 [ %index.next, %vector.body ], [ 0, %for.body10.lr.ph ]
%vec.phi = phi <4 x i32> [ %17, %vector.body ], [ zeroinitializer, %for.body10.lr.ph ]
%vec.phi287 = phi <4 x i32> [ %18, %vector.body ], [ zeroinitializer, %for.body10.lr.ph ]
%11 = getelementptr inbounds i8, ptr %arrayidx12, i64 %index
%wide.load = load <4 x i8>, ptr %11, align 1, !tbaa !11
%12 = getelementptr inbounds i8, ptr %11, i64 4
%wide.load288 = load <4 x i8>, ptr %12, align 1, !tbaa !11
%13 = icmp eq <4 x i8> %wide.load, <i8 46, i8 46, i8 46, i8 46>
%14 = icmp eq <4 x i8> %wide.load288, <i8 46, i8 46, i8 46, i8 46>
%15 = zext <4 x i1> %13 to <4 x i32>
%16 = zext <4 x i1> %14 to <4 x i32>
%17 = add <4 x i32> %vec.phi, %15
%18 = add <4 x i32> %vec.phi287, %16
%index.next = add nuw i64 %index, 8
%19 = icmp eq i64 %index.next, %n.vec
br i1 %19, label %middle.block, label %vector.body, !llvm.loop !12
middle.block: ; preds = %vector.body
%bin.rdx = add <4 x i32> %18, %17
%20 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
br i1 %cmp.n, label %for.cond.cleanup9, label %for.body10.preheader
for.body10.preheader: ; preds = %for.body10.lr.ph, %middle.block
%indvars.iv246.ph = phi i64 [ 0, %for.body10.lr.ph ], [ %n.vec, %middle.block ]
%count.0167.ph = phi i32 [ 0, %for.body10.lr.ph ], [ %20, %middle.block ]
br label %for.body10
for.cond45.preheader: ; preds = %for.inc41, %for.cond3.preheader.thread, %for.cond3.preheader
%w.promoted.pre285 = phi i32 [ %w.promoted.pre, %for.cond3.preheader ], [ %w.promoted.pre284, %for.cond3.preheader.thread ], [ %w.promoted.pre, %for.inc41 ]
%21 = phi i32 [ %8, %for.cond3.preheader ], [ %6, %for.cond3.preheader.thread ], [ %dec39172, %for.inc41 ]
%.lcssa163.fr = freeze i32 %21
%cmp46188 = icmp sgt i32 %w.promoted.pre285, 0
br i1 %cmp46188, label %for.cond51.preheader.lr.ph, label %for.cond105.preheader
for.cond51.preheader.lr.ph: ; preds = %for.cond45.preheader
%cmp52178 = icmp sgt i32 %.lcssa163.fr, 0
br i1 %cmp52178, label %for.cond51.preheader.us.preheader, label %for.cond51.preheader.lr.ph.split.split
for.cond51.preheader.us.preheader: ; preds = %for.cond51.preheader.lr.ph
%wide.trip.count262 = zext i32 %.lcssa163.fr to i64
%wide.trip.count273 = zext i32 %.lcssa163.fr to i64
%xtraiter = and i64 %wide.trip.count262, 3
%22 = icmp ult i32 %.lcssa163.fr, 4
%unroll_iter = and i64 %wide.trip.count262, 4294967292
%lcmp.mod.not = icmp eq i64 %xtraiter, 0
br label %for.body55.lr.ph.us
for.cond.cleanup54.us.unr-lcssa: ; preds = %for.body55.us, %for.body55.lr.ph.us
%spec.select162.us.lcssa.ph = phi i32 [ undef, %for.body55.lr.ph.us ], [ %spec.select162.us.3, %for.body55.us ]
%indvars.iv259.unr = phi i64 [ 0, %for.body55.lr.ph.us ], [ %indvars.iv.next260.3, %for.body55.us ]
%count.2179.us.unr = phi i32 [ 0, %for.body55.lr.ph.us ], [ %spec.select162.us.3, %for.body55.us ]
br i1 %lcmp.mod.not, label %for.cond.cleanup54.us, label %for.body55.us.epil
for.body55.us.epil: ; preds = %for.cond.cleanup54.us.unr-lcssa, %for.body55.us.epil
%indvars.iv259.epil = phi i64 [ %indvars.iv.next260.epil, %for.body55.us.epil ], [ %indvars.iv259.unr, %for.cond.cleanup54.us.unr-lcssa ]
%count.2179.us.epil = phi i32 [ %spec.select162.us.epil, %for.body55.us.epil ], [ %count.2179.us.unr, %for.cond.cleanup54.us.unr-lcssa ]
%epil.iter = phi i64 [ %epil.iter.next, %for.body55.us.epil ], [ 0, %for.cond.cleanup54.us.unr-lcssa ]
%23 = mul nuw nsw i64 %indvars.iv259.epil, %3
%gep.us.epil = getelementptr i8, ptr %invariant.gep.us, i64 %23
%24 = load i8, ptr %gep.us.epil, align 1, !tbaa !11
%cmp61.us.epil = icmp eq i8 %24, 46
%inc64.us.epil = zext i1 %cmp61.us.epil to i32
%spec.select162.us.epil = add nuw nsw i32 %count.2179.us.epil, %inc64.us.epil
%indvars.iv.next260.epil = add nuw nsw i64 %indvars.iv259.epil, 1
%epil.iter.next = add i64 %epil.iter, 1
%epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
br i1 %epil.iter.cmp.not, label %for.cond.cleanup54.us, label %for.body55.us.epil, !llvm.loop !15
for.cond.cleanup54.us: ; preds = %for.body55.us.epil, %for.cond.cleanup54.us.unr-lcssa
%spec.select162.us.lcssa = phi i32 [ %spec.select162.us.lcssa.ph, %for.cond.cleanup54.us.unr-lcssa ], [ %spec.select162.us.epil, %for.body55.us.epil ]
%cmp69.us = icmp eq i32 %spec.select162.us.lcssa, %.lcssa163.fr
br i1 %cmp69.us, label %for.cond73.preheader.us, label %for.inc101.us
for.inc101.us: ; preds = %for.cond73.for.cond.cleanup76_crit_edge.us, %for.cond.cleanup54.us
%dec99186.us = phi i32 [ %dec99.us, %for.cond73.for.cond.cleanup76_crit_edge.us ], [ %dec99187189.us, %for.cond.cleanup54.us ]
%i44.1.us = phi i32 [ %dec98.us, %for.cond73.for.cond.cleanup76_crit_edge.us ], [ %i44.0190.us, %for.cond.cleanup54.us ]
%inc102.us = add nsw i32 %i44.1.us, 1
%cmp46.us = icmp slt i32 %inc102.us, %dec99186.us
br i1 %cmp46.us, label %for.body55.lr.ph.us, label %for.cond105.preheader, !llvm.loop !17
for.body55.us: ; preds = %for.body55.lr.ph.us, %for.body55.us
%indvars.iv259 = phi i64 [ %indvars.iv.next260.3, %for.body55.us ], [ 0, %for.body55.lr.ph.us ]
%count.2179.us = phi i32 [ %spec.select162.us.3, %for.body55.us ], [ 0, %for.body55.lr.ph.us ]
%niter = phi i64 [ %niter.next.3, %for.body55.us ], [ 0, %for.body55.lr.ph.us ]
%25 = mul nuw nsw i64 %indvars.iv259, %3
%gep.us = getelementptr i8, ptr %invariant.gep.us, i64 %25
%26 = load i8, ptr %gep.us, align 1, !tbaa !11
%cmp61.us = icmp eq i8 %26, 46
%inc64.us = zext i1 %cmp61.us to i32
%spec.select162.us = add nuw nsw i32 %count.2179.us, %inc64.us
%indvars.iv.next260 = or i64 %indvars.iv259, 1
%27 = mul nuw nsw i64 %indvars.iv.next260, %3
%gep.us.1 = getelementptr i8, ptr %invariant.gep.us, i64 %27
%28 = load i8, ptr %gep.us.1, align 1, !tbaa !11
%cmp61.us.1 = icmp eq i8 %28, 46
%inc64.us.1 = zext i1 %cmp61.us.1 to i32
%spec.select162.us.1 = add nuw nsw i32 %spec.select162.us, %inc64.us.1
%indvars.iv.next260.1 = or i64 %indvars.iv259, 2
%29 = mul nuw nsw i64 %indvars.iv.next260.1, %3
%gep.us.2 = getelementptr i8, ptr %invariant.gep.us, i64 %29
%30 = load i8, ptr %gep.us.2, align 1, !tbaa !11
%cmp61.us.2 = icmp eq i8 %30, 46
%inc64.us.2 = zext i1 %cmp61.us.2 to i32
%spec.select162.us.2 = add nuw nsw i32 %spec.select162.us.1, %inc64.us.2
%indvars.iv.next260.2 = or i64 %indvars.iv259, 3
%31 = mul nuw nsw i64 %indvars.iv.next260.2, %3
%gep.us.3 = getelementptr i8, ptr %invariant.gep.us, i64 %31
%32 = load i8, ptr %gep.us.3, align 1, !tbaa !11
%cmp61.us.3 = icmp eq i8 %32, 46
%inc64.us.3 = zext i1 %cmp61.us.3 to i32
%spec.select162.us.3 = add nuw nsw i32 %spec.select162.us.2, %inc64.us.3
%indvars.iv.next260.3 = add nuw nsw i64 %indvars.iv259, 4
%niter.next.3 = add i64 %niter, 4
%niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
br i1 %niter.ncmp.3, label %for.cond.cleanup54.us.unr-lcssa, label %for.body55.us, !llvm.loop !18
for.cond73.preheader.us: ; preds = %for.cond.cleanup54.us
%cmp79182.us = icmp slt i32 %i44.0190.us, %dec99187189.us
br i1 %cmp79182.us, label %for.cond78.preheader.us.us.preheader, label %for.cond73.for.cond.cleanup76_crit_edge.us
for.cond78.preheader.us.us.preheader: ; preds = %for.cond73.preheader.us
%33 = sext i32 %i44.0190.us to i64
%wide.trip.count268 = sext i32 %dec99187189.us to i64
%34 = sub nsw i64 %wide.trip.count268, %33
%min.iters.check291 = icmp ult i64 %34, 8
%min.iters.check293 = icmp ult i64 %34, 32
%n.vec296 = and i64 %34, -32
%cmp.n297 = icmp eq i64 %34, %n.vec296
%ind.end305 = add nsw i64 %n.vec296, %33
%n.vec.remaining = and i64 %34, 24
%min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
%n.vec304 = and i64 %34, -8
%ind.end = add nsw i64 %n.vec304, %33
%cmp.n307 = icmp eq i64 %34, %n.vec304
br label %iter.check
for.body55.lr.ph.us: ; preds = %for.inc101.us, %for.cond51.preheader.us.preheader
%i44.0190.us = phi i32 [ %inc102.us, %for.inc101.us ], [ 0, %for.cond51.preheader.us.preheader ]
%dec99187189.us = phi i32 [ %dec99186.us, %for.inc101.us ], [ %w.promoted.pre285, %for.cond51.preheader.us.preheader ]
%idxprom58.us = sext i32 %i44.0190.us to i64
%invariant.gep.us = getelementptr i8, ptr %vla, i64 %idxprom58.us
br i1 %22, label %for.cond.cleanup54.us.unr-lcssa, label %for.body55.us
for.cond73.for.cond.cleanup76_crit_edge.us: ; preds = %for.cond78.for.cond.cleanup81_crit_edge.us.us, %for.cond73.preheader.us
%dec98.us = add nsw i32 %i44.0190.us, -1
%dec99.us = add nsw i32 %dec99187189.us, -1
store i32 %dec99.us, ptr %w, align 4, !tbaa !5
br label %for.inc101.us
iter.check: ; preds = %for.cond78.preheader.us.us.preheader, %for.cond78.for.cond.cleanup81_crit_edge.us.us
%indvars.iv270 = phi i64 [ 0, %for.cond78.preheader.us.us.preheader ], [ %indvars.iv.next271, %for.cond78.for.cond.cleanup81_crit_edge.us.us ]
%35 = mul nuw nsw i64 %indvars.iv270, %3
%arrayidx84.us.us = getelementptr inbounds i8, ptr %vla, i64 %35
br i1 %min.iters.check291, label %for.body82.us.us.preheader, label %vector.main.loop.iter.check
vector.main.loop.iter.check: ; preds = %iter.check
br i1 %min.iters.check293, label %vec.epilog.ph, label %vector.body298
vector.body298: ; preds = %vector.main.loop.iter.check, %vector.body298
%index299 = phi i64 [ %index.next302, %vector.body298 ], [ 0, %vector.main.loop.iter.check ]
%offset.idx = add i64 %index299, %33
%36 = getelementptr i8, ptr %arrayidx84.us.us, i64 %offset.idx
%37 = getelementptr i8, ptr %36, i64 1
%wide.load300 = load <16 x i8>, ptr %37, align 1, !tbaa !11
%38 = getelementptr i8, ptr %36, i64 17
%wide.load301 = load <16 x i8>, ptr %38, align 1, !tbaa !11
%39 = getelementptr inbounds i8, ptr %arrayidx84.us.us, i64 %offset.idx
store <16 x i8> %wide.load300, ptr %39, align 1, !tbaa !11
%40 = getelementptr inbounds i8, ptr %39, i64 16
store <16 x i8> %wide.load301, ptr %40, align 1, !tbaa !11
%index.next302 = add nuw i64 %index299, 32
%41 = icmp eq i64 %index.next302, %n.vec296
br i1 %41, label %middle.block289, label %vector.body298, !llvm.loop !19
middle.block289: ; preds = %vector.body298
br i1 %cmp.n297, label %for.cond78.for.cond.cleanup81_crit_edge.us.us, label %vec.epilog.iter.check
vec.epilog.iter.check: ; preds = %middle.block289
br i1 %min.epilog.iters.check, label %for.body82.us.us.preheader, label %vec.epilog.ph
vec.epilog.ph: ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
%vec.epilog.resume.val = phi i64 [ %n.vec296, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
%invariant.gep = getelementptr i8, ptr %arrayidx84.us.us, i64 1
br label %vec.epilog.vector.body
vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph
%index308 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next311, %vec.epilog.vector.body ]
%offset.idx309 = add i64 %index308, %33
%gep = getelementptr i8, ptr %invariant.gep, i64 %offset.idx309
%wide.load310 = load <8 x i8>, ptr %gep, align 1, !tbaa !11
%42 = getelementptr inbounds i8, ptr %arrayidx84.us.us, i64 %offset.idx309
store <8 x i8> %wide.load310, ptr %42, align 1, !tbaa !11
%index.next311 = add nuw i64 %index308, 8
%43 = icmp eq i64 %index.next311, %n.vec304
br i1 %43, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !20
vec.epilog.middle.block: ; preds = %vec.epilog.vector.body
br i1 %cmp.n307, label %for.cond78.for.cond.cleanup81_crit_edge.us.us, label %for.body82.us.us.preheader
for.body82.us.us.preheader: ; preds = %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block
%indvars.iv265.ph = phi i64 [ %33, %iter.check ], [ %ind.end305, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ]
br label %for.body82.us.us
for.body82.us.us: ; preds = %for.body82.us.us.preheader, %for.body82.us.us
%indvars.iv265 = phi i64 [ %indvars.iv.next266, %for.body82.us.us ], [ %indvars.iv265.ph, %for.body82.us.us.preheader ]
%indvars.iv.next266 = add nsw i64 %indvars.iv265, 1
%arrayidx87.us.us = getelementptr inbounds i8, ptr %arrayidx84.us.us, i64 %indvars.iv.next266
%44 = load i8, ptr %arrayidx87.us.us, align 1, !tbaa !11
%arrayidx91.us.us = getelementptr inbounds i8, ptr %arrayidx84.us.us, i64 %indvars.iv265
store i8 %44, ptr %arrayidx91.us.us, align 1, !tbaa !11
%exitcond269.not = icmp eq i64 %indvars.iv.next266, %wide.trip.count268
br i1 %exitcond269.not, label %for.cond78.for.cond.cleanup81_crit_edge.us.us, label %for.body82.us.us, !llvm.loop !21
for.cond78.for.cond.cleanup81_crit_edge.us.us: ; preds = %for.body82.us.us, %vec.epilog.middle.block, %middle.block289
%indvars.iv.next271 = add nuw nsw i64 %indvars.iv270, 1
%exitcond274.not = icmp eq i64 %indvars.iv.next271, %wide.trip.count273
br i1 %exitcond274.not, label %for.cond73.for.cond.cleanup76_crit_edge.us, label %iter.check, !llvm.loop !22
for.cond51.preheader.lr.ph.split.split: ; preds = %for.cond51.preheader.lr.ph
%cmp69 = icmp eq i32 %.lcssa163.fr, 0
br i1 %cmp69, label %for.cond51.preheader.us227.preheader, label %for.cond.cleanup108
for.cond51.preheader.us227.preheader: ; preds = %for.cond51.preheader.lr.ph.split.split
store i32 0, ptr %w, align 4, !tbaa !5
br label %for.cond.cleanup108
for.cond.cleanup9: ; preds = %for.body10, %middle.block, %for.cond7.preheader
%count.0.lcssa = phi i32 [ 0, %for.cond7.preheader ], [ %20, %middle.block ], [ %spec.select, %for.body10 ]
%cmp21 = icmp eq i32 %count.0.lcssa, %w.promoted.pre
br i1 %cmp21, label %for.cond25.preheader, label %for.inc41
for.cond25.preheader: ; preds = %for.cond.cleanup9
%cmp26170 = icmp slt i32 %i2.0176, %dec39173175
br i1 %cmp26170, label %for.body29.preheader, label %for.cond.cleanup28
for.body29.preheader: ; preds = %for.cond25.preheader
%45 = sext i32 %i2.0176 to i64
%wide.trip.count252 = sext i32 %dec39173175 to i64
br label %for.body29
for.body10: ; preds = %for.body10.preheader, %for.body10
%indvars.iv246 = phi i64 [ %indvars.iv.next247, %for.body10 ], [ %indvars.iv246.ph, %for.body10.preheader ]
%count.0167 = phi i32 [ %spec.select, %for.body10 ], [ %count.0167.ph, %for.body10.preheader ]
%arrayidx14 = getelementptr inbounds i8, ptr %arrayidx12, i64 %indvars.iv246
%46 = load i8, ptr %arrayidx14, align 1, !tbaa !11
%cmp15 = icmp eq i8 %46, 46
%inc17 = zext i1 %cmp15 to i32
%spec.select = add nuw nsw i32 %count.0167, %inc17
%indvars.iv.next247 = add nuw nsw i64 %indvars.iv246, 1
%exitcond.not = icmp eq i64 %indvars.iv.next247, %wide.trip.count
br i1 %exitcond.not, label %for.cond.cleanup9, label %for.body10, !llvm.loop !23
for.cond.cleanup28: ; preds = %for.body29, %for.cond25.preheader
%dec = add nsw i32 %i2.0176, -1
%dec39 = add nsw i32 %dec39173175, -1
store i32 %dec39, ptr %h, align 4, !tbaa !5
br label %for.inc41
for.body29: ; preds = %for.body29.preheader, %for.body29
%indvars.iv249 = phi i64 [ %45, %for.body29.preheader ], [ %indvars.iv.next250, %for.body29 ]
%47 = mul nsw i64 %indvars.iv249, %3
%arrayidx31 = getelementptr inbounds i8, ptr %vla, i64 %47
%indvars.iv.next250 = add nsw i64 %indvars.iv249, 1
%48 = mul nsw i64 %indvars.iv.next250, %3
%arrayidx34 = getelementptr inbounds i8, ptr %vla, i64 %48
%call35 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %arrayidx31, ptr noundef nonnull dereferenceable(1) %arrayidx34) #7
%exitcond253.not = icmp eq i64 %indvars.iv.next250, %wide.trip.count252
br i1 %exitcond253.not, label %for.cond.cleanup28, label %for.body29, !llvm.loop !24
for.inc41: ; preds = %for.cond.cleanup9, %for.cond.cleanup28
%dec39172 = phi i32 [ %dec39, %for.cond.cleanup28 ], [ %dec39173175, %for.cond.cleanup9 ]
%i2.1 = phi i32 [ %dec, %for.cond.cleanup28 ], [ %i2.0176, %for.cond.cleanup9 ]
%inc42 = add nsw i32 %i2.1, 1
%cmp4 = icmp slt i32 %inc42, %dec39172
br i1 %cmp4, label %for.cond7.preheader, label %for.cond45.preheader, !llvm.loop !25
for.cond105.preheader: ; preds = %for.inc101.us, %for.cond45.preheader
%cmp106240 = icmp sgt i32 %.lcssa163.fr, 0
br i1 %cmp106240, label %for.cond111.preheader, label %for.cond.cleanup108
for.cond111.preheader: ; preds = %for.cond105.preheader, %for.cond.cleanup114
%indvars.iv278 = phi i64 [ %indvars.iv.next279, %for.cond.cleanup114 ], [ 0, %for.cond105.preheader ]
%49 = load i32, ptr %w, align 4, !tbaa !5
%cmp112238 = icmp sgt i32 %49, 0
br i1 %cmp112238, label %for.body115.lr.ph, label %for.cond.cleanup114
for.body115.lr.ph: ; preds = %for.cond111.preheader
%50 = mul nuw nsw i64 %indvars.iv278, %3
%arrayidx117 = getelementptr inbounds i8, ptr %vla, i64 %50
br label %for.body115
for.cond.cleanup108: ; preds = %for.cond.cleanup114, %for.cond51.preheader.us227.preheader, %for.cond51.preheader.lr.ph.split.split, %for.cond105.preheader
call void @llvm.stackrestore.p0(ptr %4)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #7
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #7
ret i32 0
for.cond.cleanup114: ; preds = %for.body115, %for.cond111.preheader
%putchar = call i32 @putchar(i32 10)
%indvars.iv.next279 = add nuw nsw i64 %indvars.iv278, 1
%51 = load i32, ptr %h, align 4, !tbaa !5
%52 = sext i32 %51 to i64
%cmp106 = icmp slt i64 %indvars.iv.next279, %52
br i1 %cmp106, label %for.cond111.preheader, label %for.cond.cleanup108, !llvm.loop !26
for.body115: ; preds = %for.body115.lr.ph, %for.body115
%indvars.iv275 = phi i64 [ 0, %for.body115.lr.ph ], [ %indvars.iv.next276, %for.body115 ]
%arrayidx119 = getelementptr inbounds i8, ptr %arrayidx117, i64 %indvars.iv275
%53 = load i8, ptr %arrayidx119, align 1, !tbaa !11
%conv120 = sext i8 %53 to i32
%putchar161 = call i32 @putchar(i32 %conv120)
%indvars.iv.next276 = add nuw nsw i64 %indvars.iv275, 1
%54 = load i32, ptr %w, align 4, !tbaa !5
%55 = sext i32 %54 to i64
%cmp112 = icmp slt i64 %indvars.iv.next276, %55
br i1 %cmp112, label %for.body115, label %for.cond.cleanup114, !llvm.loop !27
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #4
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #5
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #6
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nofree nounwind }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10, !13, !14}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.unroll.disable"}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !13, !14}
!20 = distinct !{!20, !10, !13, !14}
!21 = distinct !{!21, !10, !14, !13}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10, !14, !13}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
|
#include<stdio.h>
int main(){
int H,W;
int h,w;
while(1){
scanf("%d%d",&H,&W);
if(H == 0 && W == 0)break;
for(h = 0; h < H; h++){
for(w = 0; w < W; w++)putchar('#');
putchar('\n');}
putchar('\n');}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133440/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133440/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
@stdout = external local_unnamed_addr global ptr, align 8
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #3
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %9, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%h.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%w.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%4 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i = call i32 @putc(i32 noundef 35, ptr noundef %4)
%inc = add nuw nsw i32 %w.017, 1
%5 = load i32, ptr %W, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %5
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !11
for.end: ; preds = %for.body5, %for.cond3.preheader
%6 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i14 = call i32 @putc(i32 noundef 10, ptr noundef %6)
%inc9 = add nuw nsw i32 %h.019, 1
%7 = load i32, ptr %H, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %7
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !13
for.end10: ; preds = %for.end, %for.cond.preheader
%8 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i15 = call i32 @putc(i32 noundef 10, ptr noundef %8)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%9 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %9, 0
%10 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %10, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
|
#include <stdio.h>
int main()
{
int H, W, i, j;
while (1) {
scanf("%d %d", &H, &W);
if (H == 0 && W == 0) break;
for (i = 0; i < H; i++) {
for (j = 0; j < W; j++) {printf("#");}
printf("\n");
}
printf("\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133484/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133484/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.017, 1
%4 = load i32, ptr %W, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.019, 1
%5 = load i32, ptr %H, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
#include <math.h>
int main(){
int H,W,i,j;
while(1){
scanf("%d %d",&H,&W);
if(H == 0 && W == 0){
break;
}
for(i = 0;i < H;i++){
for(j = 0;j < W;j++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133527/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133527/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.017, 1
%4 = load i32, ptr %W, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.019, 1
%5 = load i32, ptr %H, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
int main(void){
int h,w,i,j;
while(1){
scanf("%d %d",&h,&w);
if(w==0&&h==0){
break;
}
for(i=0;i<h;i++){
for(j=0;j<w;j++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133570/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133570/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%h = alloca i32, align 4
%w = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%0 = load i32, ptr %w, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %h, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %7, %for.end10 ], [ %1, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %w, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.017, 1
%4 = load i32, ptr %w, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.019, 1
%5 = load i32, ptr %h, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%6 = load i32, ptr %w, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %h, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
int main(void){
int h, w, H, W;
for(;;){
scanf("%d %d", &H, &W);
if(H == 0 && W == 0)
break;
for(h = 0; h < H; h++){
for(w = 0; w < W; w++)
printf("#");
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133613/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133613/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp23 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp124 = icmp eq i32 %1, 0
%or.cond25 = select i1 %cmp23, i1 %cmp124, i1 false
br i1 %or.cond25, label %for.end13, label %for.cond2.preheader
for.cond2.preheader: ; preds = %entry, %for.end11
%2 = phi i32 [ %6, %for.end11 ], [ %0, %entry ]
%cmp320 = icmp sgt i32 %2, 0
br i1 %cmp320, label %for.cond4.preheader, label %for.end11
for.cond4.preheader: ; preds = %for.cond2.preheader, %for.end
%h.021 = phi i32 [ %inc10, %for.end ], [ 0, %for.cond2.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp518 = icmp sgt i32 %3, 0
br i1 %cmp518, label %for.body6, label %for.end
for.body6: ; preds = %for.cond4.preheader, %for.body6
%w.019 = phi i32 [ %inc, %for.body6 ], [ 0, %for.cond4.preheader ]
%putchar17 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %w.019, 1
%4 = load i32, ptr %W, align 4, !tbaa !5
%cmp5 = icmp slt i32 %inc, %4
br i1 %cmp5, label %for.body6, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body6, %for.cond4.preheader
%putchar16 = call i32 @putchar(i32 10)
%inc10 = add nuw nsw i32 %h.021, 1
%5 = load i32, ptr %H, align 4, !tbaa !5
%cmp3 = icmp slt i32 %inc10, %5
br i1 %cmp3, label %for.cond4.preheader, label %for.end11, !llvm.loop !11
for.end11: ; preds = %for.end, %for.cond2.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %for.end13, label %for.cond2.preheader
for.end13: ; preds = %for.end11, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
int main(void) {
int H, W, i, j;
while (scanf("%d %d", &H, &W) == 2) {
if (H == 0 && W == 0) break;
for (i = 1; i < H + 1; i ++) {
for (j = 1; j < W + 1; j ++) printf("#");
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133664/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133664/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%cmp23 = icmp eq i32 %call22, 2
br i1 %cmp23, label %while.body, label %while.end
while.body: ; preds = %entry, %for.end12
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp1 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp2 = icmp eq i32 %1, 0
%or.cond = select i1 %cmp1, i1 %cmp2, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %while.body
%cmp3.not20 = icmp slt i32 %0, 1
br i1 %cmp3.not20, label %for.end12, label %for.cond4.preheader
for.cond4.preheader: ; preds = %for.cond.preheader, %for.end
%i.021 = phi i32 [ %inc11, %for.end ], [ 1, %for.cond.preheader ]
%2 = load i32, ptr %W, align 4, !tbaa !5
%cmp6.not18 = icmp slt i32 %2, 1
br i1 %cmp6.not18, label %for.end, label %for.body7
for.body7: ; preds = %for.cond4.preheader, %for.body7
%j.019 = phi i32 [ %inc, %for.body7 ], [ 1, %for.cond4.preheader ]
%putchar17 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.019, 1
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp6.not.not = icmp slt i32 %j.019, %3
br i1 %cmp6.not.not, label %for.body7, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body7, %for.cond4.preheader
%putchar16 = call i32 @putchar(i32 10)
%inc11 = add nuw nsw i32 %i.021, 1
%4 = load i32, ptr %H, align 4, !tbaa !5
%cmp3.not.not = icmp slt i32 %i.021, %4
br i1 %cmp3.not.not, label %for.cond4.preheader, label %for.end12, !llvm.loop !11
for.end12: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%cmp = icmp eq i32 %call, 2
br i1 %cmp, label %while.body, label %while.end, !llvm.loop !12
while.end: ; preds = %for.end12, %while.body, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include <stdio.h>
int main(){
int H,W;
int i,j;
while(1){
scanf("%d %d",&H,&W);
if(H==0 && W==0) break;
for(i=0; i<H; i++){
for(j=0 ;j<W; j++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133707/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133707/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.017, 1
%4 = load i32, ptr %W, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.019, 1
%5 = load i32, ptr %H, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
int main(){
int H,W;
int i,j;
while(1){
scanf("%d %d",&H,&W);
if(H==0 && W==0)
break;
for(i=0;i<H;i++){
for(j=0;j<W;j++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133750/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133750/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.017, 1
%4 = load i32, ptr %W, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.019, 1
%5 = load i32, ptr %H, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
int main(void){
int H,W,h,w;
while(1){
scanf("%d %d",&H,&W);
if(H==0 && W==0)
break;
for(h=0; h<H; h++){
for(w=0; w<W; w++)
putchar('#');
putchar('\n');
}
putchar('\n');
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133815/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133815/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
@stdout = external local_unnamed_addr global ptr, align 8
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #3
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #3
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %9, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%h.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%w.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%4 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i = call i32 @putc(i32 noundef 35, ptr noundef %4)
%inc = add nuw nsw i32 %w.017, 1
%5 = load i32, ptr %W, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %5
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !11
for.end: ; preds = %for.body5, %for.cond3.preheader
%6 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i14 = call i32 @putc(i32 noundef 10, ptr noundef %6)
%inc9 = add nuw nsw i32 %h.019, 1
%7 = load i32, ptr %H, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %7
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !13
for.end10: ; preds = %for.end, %for.cond.preheader
%8 = load ptr, ptr @stdout, align 8, !tbaa !9
%call.i15 = call i32 @putc(i32 noundef 10, ptr noundef %8)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%9 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %9, 0
%10 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %10, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #3
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #3
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
|
#include <stdio.h>
int main(void)
{
int i,j,h,w;
while(1){
scanf("%d %d",&h,&w);
if(h==0 && w==0) break;
for(i=0;i<h;i++){
for(j=0;j<w;j++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133859/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133859/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%h = alloca i32, align 4
%w = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%0 = load i32, ptr %h, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %w, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %w, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.017, 1
%4 = load i32, ptr %w, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.019, 1
%5 = load i32, ptr %h, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%6 = load i32, ptr %h, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %w, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include<stdio.h>
int main(void){
int h=1, w=1,countah,countaw;
while (h != 0 && w != 0){
scanf("%d", &h);
scanf("%d", &w);
for (countah = 1; countah <= h; countah++){
for (countaw = 1; countaw <= w; countaw++){
printf("#");
}
printf("\n");
}
if (h != 0 && w != 0){
printf("\n");
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133901/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133901/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
while.body.preheader:
%h = alloca i32, align 4
%w = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4
store i32 1, ptr %h, align 4, !tbaa !5
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4
store i32 1, ptr %w, align 4, !tbaa !5
br label %while.body
while.body: ; preds = %while.body.preheader, %if.end
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h)
%call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %w)
%0 = load i32, ptr %h, align 4, !tbaa !5
%cmp3.not21 = icmp slt i32 %0, 1
br i1 %cmp3.not21, label %for.end11, label %for.cond4.preheader
for.cond4.preheader: ; preds = %while.body, %for.end
%countah.022 = phi i32 [ %inc10, %for.end ], [ 1, %while.body ]
%1 = load i32, ptr %w, align 4, !tbaa !5
%cmp5.not19 = icmp slt i32 %1, 1
br i1 %cmp5.not19, label %for.end, label %for.body6
for.body6: ; preds = %for.cond4.preheader, %for.body6
%countaw.020 = phi i32 [ %inc, %for.body6 ], [ 1, %for.cond4.preheader ]
%putchar18 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %countaw.020, 1
%2 = load i32, ptr %w, align 4, !tbaa !5
%cmp5.not.not = icmp slt i32 %countaw.020, %2
br i1 %cmp5.not.not, label %for.body6, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body6, %for.cond4.preheader
%putchar17 = call i32 @putchar(i32 10)
%inc10 = add nuw nsw i32 %countah.022, 1
%3 = load i32, ptr %h, align 4, !tbaa !5
%cmp3.not.not = icmp slt i32 %countah.022, %3
br i1 %cmp3.not.not, label %for.cond4.preheader, label %for.end11, !llvm.loop !11
for.end11: ; preds = %for.end, %while.body
%.lcssa = phi i32 [ %0, %while.body ], [ %3, %for.end ]
%cmp12 = icmp ne i32 %.lcssa, 0
%4 = load i32, ptr %w, align 4
%cmp13 = icmp ne i32 %4, 0
%or.cond = select i1 %cmp12, i1 %cmp13, i1 false
br i1 %or.cond, label %if.then, label %if.end
if.then: ; preds = %for.end11
%putchar = call i32 @putchar(i32 10)
%.pre = load i32, ptr %h, align 4, !tbaa !5
%.pre26 = load i32, ptr %w, align 4
br label %if.end
if.end: ; preds = %if.then, %for.end11
%5 = phi i32 [ %.pre26, %if.then ], [ %4, %for.end11 ]
%6 = phi i32 [ %.pre, %if.then ], [ %.lcssa, %for.end11 ]
%cmp = icmp ne i32 %6, 0
%cmp1 = icmp ne i32 %5, 0
%7 = select i1 %cmp, i1 %cmp1, i1 false
br i1 %7, label %while.body, label %while.end, !llvm.loop !12
while.end: ; preds = %if.end
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include <stdio.h>
int main(void)
{
int H, W;
int h, w;
scanf("%d %d",&H ,&W);
do{
for(h=1; h<=H; h++){
for(w=1; w<=W; w++)
printf("#");
printf("\n");
}
printf("\n");
scanf("%d %d",&H ,&W);
}while(H!=0 && W!=0);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133945/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133945/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%.pre = load i32, ptr %H, align 4, !tbaa !5
br label %do.body
do.body: ; preds = %for.end8, %entry
%0 = phi i32 [ %4, %for.end8 ], [ %.pre, %entry ]
%cmp.not19 = icmp slt i32 %0, 1
br i1 %cmp.not19, label %for.end8, label %for.cond1.preheader
for.cond1.preheader: ; preds = %do.body, %for.end
%h.020 = phi i32 [ %inc7, %for.end ], [ 1, %do.body ]
%1 = load i32, ptr %W, align 4, !tbaa !5
%cmp2.not17 = icmp slt i32 %1, 1
br i1 %cmp2.not17, label %for.end, label %for.body3
for.body3: ; preds = %for.cond1.preheader, %for.body3
%w.018 = phi i32 [ %inc, %for.body3 ], [ 1, %for.cond1.preheader ]
%putchar16 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %w.018, 1
%2 = load i32, ptr %W, align 4, !tbaa !5
%cmp2.not.not = icmp slt i32 %w.018, %2
br i1 %cmp2.not.not, label %for.body3, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body3, %for.cond1.preheader
%putchar15 = call i32 @putchar(i32 10)
%inc7 = add nuw nsw i32 %h.020, 1
%3 = load i32, ptr %H, align 4, !tbaa !5
%cmp.not.not = icmp slt i32 %h.020, %3
br i1 %cmp.not.not, label %for.cond1.preheader, label %for.end8, !llvm.loop !11
for.end8: ; preds = %for.end, %do.body
%putchar = call i32 @putchar(i32 10)
%call10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%4 = load i32, ptr %H, align 4, !tbaa !5
%cmp11 = icmp ne i32 %4, 0
%5 = load i32, ptr %W, align 4
%cmp12 = icmp ne i32 %5, 0
%6 = select i1 %cmp11, i1 %cmp12, i1 false
br i1 %6, label %do.body, label %do.end, !llvm.loop !12
do.end: ; preds = %for.end8
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include<stdio.h>
int main()
{
int d,s,i=0,j,h[300],w[300];
while(1)/*for(i=0;i>300;i++)*/{
scanf("%d",&h[i]);
scanf("%d",&w[i]);
if(h[i]==0 && w[i]==0){
break;
}
i++;
}
d=i;
for(s=0;s<d;s++){
for(i=h[s];i>0;i--){
for(j=w[s];j>0;j--) printf("#");
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133989/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133989/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%h = alloca [300 x i32], align 16
%w = alloca [300 x i32], align 16
call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %h) #4
call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %w) #4
br label %while.cond
while.cond: ; preds = %if.end, %entry
%indvars.iv52 = phi i32 [ %indvars.iv.next53, %if.end ], [ 0, %entry ]
%indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 0, %entry ]
%arrayidx = getelementptr inbounds [300 x i32], ptr %h, i64 0, i64 %indvars.iv
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx)
%arrayidx2 = getelementptr inbounds [300 x i32], ptr %w, i64 0, i64 %indvars.iv
%call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx2)
%0 = load i32, ptr %arrayidx, align 4, !tbaa !5
%cmp = icmp eq i32 %0, 0
br i1 %cmp, label %land.lhs.true, label %if.end
land.lhs.true: ; preds = %while.cond
%1 = load i32, ptr %arrayidx2, align 4, !tbaa !5
%cmp8 = icmp eq i32 %1, 0
br i1 %cmp8, label %for.cond.preheader, label %if.end
for.cond.preheader: ; preds = %land.lhs.true
%2 = and i64 %indvars.iv, 4294967295
%cmp946.not = icmp eq i64 %2, 0
br i1 %cmp946.not, label %for.end28, label %for.body.preheader
for.body.preheader: ; preds = %for.cond.preheader
%wide.trip.count = zext i32 %indvars.iv52 to i64
br label %for.body
if.end: ; preds = %land.lhs.true, %while.cond
%indvars.iv.next = add nuw i64 %indvars.iv, 1
%indvars.iv.next53 = add nuw i32 %indvars.iv52, 1
br label %while.cond
for.body: ; preds = %for.body.preheader, %for.end24
%indvars.iv49 = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next50, %for.end24 ]
%arrayidx11 = getelementptr inbounds [300 x i32], ptr %h, i64 0, i64 %indvars.iv49
%3 = load i32, ptr %arrayidx11, align 4, !tbaa !5
%cmp1344 = icmp sgt i32 %3, 0
br i1 %cmp1344, label %for.body14.lr.ph, label %for.end24
for.body14.lr.ph: ; preds = %for.body
%arrayidx16 = getelementptr inbounds [300 x i32], ptr %w, i64 0, i64 %indvars.iv49
br label %for.body14
for.body14: ; preds = %for.body14.lr.ph, %for.end
%i.145 = phi i32 [ %3, %for.body14.lr.ph ], [ %dec23, %for.end ]
%4 = load i32, ptr %arrayidx16, align 4, !tbaa !5
%cmp1842 = icmp sgt i32 %4, 0
br i1 %cmp1842, label %for.body19, label %for.end
for.body19: ; preds = %for.body14, %for.body19
%j.043 = phi i32 [ %dec, %for.body19 ], [ %4, %for.body14 ]
%putchar41 = call i32 @putchar(i32 35)
%dec = add nsw i32 %j.043, -1
%cmp18 = icmp ugt i32 %j.043, 1
br i1 %cmp18, label %for.body19, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body19, %for.body14
%putchar40 = call i32 @putchar(i32 10)
%dec23 = add nsw i32 %i.145, -1
%cmp13 = icmp sgt i32 %i.145, 1
br i1 %cmp13, label %for.body14, label %for.end24, !llvm.loop !11
for.end24: ; preds = %for.end, %for.body
%putchar = call i32 @putchar(i32 10)
%indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
%exitcond.not = icmp eq i64 %indvars.iv.next50, %wide.trip.count
br i1 %exitcond.not, label %for.end28, label %for.body, !llvm.loop !12
for.end28: ; preds = %for.end24, %for.cond.preheader
call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %w) #4
call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %h) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
|
#include<stdio.h>
int main(void){
int H,W,a,b;
while(1){
scanf("%d %d",&H,&W);
if(H==0 && W==0){
break;
}
for(a=0;a<H;a++){
for(b=0;b<W;b++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134030/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134030/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %H, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %W, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%a.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%b.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %b.017, 1
%4 = load i32, ptr %W, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %a.019, 1
%5 = load i32, ptr %H, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%6 = load i32, ptr %H, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %W, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
int main(){
int H,W,i,j;
while(1){
scanf("%d%d",&H,&W);
if (W==0 && H==0) break;
for(i=0;i<H;i++){
for(j=0;j<W;j++){
printf("#");
}
printf("\n");
}
printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134074/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134074/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%H = alloca i32, align 4
%W = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4
%call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%0 = load i32, ptr %W, align 4, !tbaa !5
%cmp21 = icmp eq i32 %0, 0
%1 = load i32, ptr %H, align 4
%cmp122 = icmp eq i32 %1, 0
%or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false
br i1 %or.cond23, label %while.end, label %for.cond.preheader
for.cond.preheader: ; preds = %entry, %for.end10
%2 = phi i32 [ %7, %for.end10 ], [ %1, %entry ]
%cmp218 = icmp sgt i32 %2, 0
br i1 %cmp218, label %for.cond3.preheader, label %for.end10
for.cond3.preheader: ; preds = %for.cond.preheader, %for.end
%i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ]
%3 = load i32, ptr %W, align 4, !tbaa !5
%cmp416 = icmp sgt i32 %3, 0
br i1 %cmp416, label %for.body5, label %for.end
for.body5: ; preds = %for.cond3.preheader, %for.body5
%j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ]
%putchar15 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.017, 1
%4 = load i32, ptr %W, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc, %4
br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body5, %for.cond3.preheader
%putchar14 = call i32 @putchar(i32 10)
%inc9 = add nuw nsw i32 %i.019, 1
%5 = load i32, ptr %H, align 4, !tbaa !5
%cmp2 = icmp slt i32 %inc9, %5
br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11
for.end10: ; preds = %for.end, %for.cond.preheader
%putchar = call i32 @putchar(i32 10)
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W)
%6 = load i32, ptr %W, align 4, !tbaa !5
%cmp = icmp eq i32 %6, 0
%7 = load i32, ptr %H, align 4
%cmp1 = icmp eq i32 %7, 0
%or.cond = select i1 %cmp, i1 %cmp1, i1 false
br i1 %or.cond, label %while.end, label %for.cond.preheader
while.end: ; preds = %for.end10, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
int main(){
for( ; ; ){
int h, w, i, j;
scanf("%d%d", &h, &w);
if(h == 0 & w == 0){return 0;}
for(i = 0; i < h; i++){
for(j = 0; j < w; j++)
{printf("#");}
printf("\n");
}
printf("\n");
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134131/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134131/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%h = alloca i32, align 4
%w = alloca i32, align 4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4
%call29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%0 = load i32, ptr %h, align 4, !tbaa !5
%1 = load i32, ptr %w, align 4, !tbaa !5
%2 = or i32 %1, %0
%and21.not30 = icmp eq i32 %2, 0
br i1 %and21.not30, label %cleanup.thread, label %for.cond3.preheader
for.cond3.preheader: ; preds = %entry, %cleanup
%3 = phi i32 [ %7, %cleanup ], [ %0, %entry ]
%cmp427 = icmp sgt i32 %3, 0
br i1 %cmp427, label %for.cond6.preheader, label %cleanup
cleanup.thread: ; preds = %cleanup, %entry
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4
ret i32 0
for.cond6.preheader: ; preds = %for.cond3.preheader, %for.end
%i.028 = phi i32 [ %inc13, %for.end ], [ 0, %for.cond3.preheader ]
%4 = load i32, ptr %w, align 4, !tbaa !5
%cmp725 = icmp sgt i32 %4, 0
br i1 %cmp725, label %for.body9, label %for.end
for.body9: ; preds = %for.cond6.preheader, %for.body9
%j.026 = phi i32 [ %inc, %for.body9 ], [ 0, %for.cond6.preheader ]
%putchar23 = call i32 @putchar(i32 35)
%inc = add nuw nsw i32 %j.026, 1
%5 = load i32, ptr %w, align 4, !tbaa !5
%cmp7 = icmp slt i32 %inc, %5
br i1 %cmp7, label %for.body9, label %for.end, !llvm.loop !9
for.end: ; preds = %for.body9, %for.cond6.preheader
%putchar22 = call i32 @putchar(i32 10)
%inc13 = add nuw nsw i32 %i.028, 1
%6 = load i32, ptr %h, align 4, !tbaa !5
%cmp4 = icmp slt i32 %inc13, %6
br i1 %cmp4, label %for.cond6.preheader, label %cleanup, !llvm.loop !11
cleanup: ; preds = %for.end, %for.cond3.preheader
%putchar = call i32 @putchar(i32 10)
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4
call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4
call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w)
%7 = load i32, ptr %h, align 4, !tbaa !5
%8 = load i32, ptr %w, align 4, !tbaa !5
%9 = or i32 %8, %7
%and21.not = icmp eq i32 %9, 0
br i1 %and21.not, label %cleanup.thread, label %for.cond3.preheader
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
|
#include <stdio.h>
int main(void)
{
int h[300];
int w[300];
int i = -1,j,k,l;
do{
i++;
scanf("%d%d", &h[i], &w[i]);
} while (h[i] != 0 || w[i] != 0);
for (j = 0; j <= i; j++){
for (l = 0; l < h[j]; l++){
for (k = 0; k < w[j]; k++) { printf("#"); }
printf("\n");
}
if(j != i)printf("\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134182/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134182/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1
; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
%h = alloca [300 x i32], align 16
%w = alloca [300 x i32], align 16
call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %h) #4
call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %w) #4
br label %do.body
do.body: ; preds = %do.body.backedge, %entry
%indvars.iv54 = phi i32 [ %indvars.iv.next55, %do.body.backedge ], [ 1, %entry ]
%indvars.iv = phi i64 [ %indvars.iv.next, %do.body.backedge ], [ -1, %entry ]
%indvars.iv.next = add nsw i64 %indvars.iv, 1
%arrayidx = getelementptr inbounds [300 x i32], ptr %h, i64 0, i64 %indvars.iv.next
%arrayidx2 = getelementptr inbounds [300 x i32], ptr %w, i64 0, i64 %indvars.iv.next
%call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx2)
%0 = load i32, ptr %arrayidx, align 4, !tbaa !5
%cmp.not = icmp eq i32 %0, 0
br i1 %cmp.not, label %lor.rhs, label %do.body.backedge
lor.rhs: ; preds = %do.body
%1 = load i32, ptr %arrayidx2, align 4, !tbaa !5
%cmp7.not = icmp eq i32 %1, 0
br i1 %cmp7.not, label %for.cond.preheader, label %do.body.backedge
do.body.backedge: ; preds = %lor.rhs, %do.body
%indvars.iv.next55 = add nuw i32 %indvars.iv54, 1
br label %do.body, !llvm.loop !9
for.cond.preheader: ; preds = %lor.rhs
%2 = trunc i64 %indvars.iv to i32
%cmp8.not48 = icmp slt i32 %2, -1
br i1 %cmp8.not48, label %for.end29, label %for.cond9.preheader.preheader
for.cond9.preheader.preheader: ; preds = %for.cond.preheader
%3 = and i64 %indvars.iv.next, 4294967295
%wide.trip.count = zext i32 %indvars.iv54 to i64
br label %for.cond9.preheader
for.cond9.preheader: ; preds = %for.cond9.preheader.preheader, %for.inc27
%indvars.iv51 = phi i64 [ 0, %for.cond9.preheader.preheader ], [ %indvars.iv.next52, %for.inc27 ]
%arrayidx11 = getelementptr inbounds [300 x i32], ptr %h, i64 0, i64 %indvars.iv51
%4 = load i32, ptr %arrayidx11, align 4, !tbaa !5
%cmp1246 = icmp sgt i32 %4, 0
br i1 %cmp1246, label %for.cond14.preheader.lr.ph, label %for.end24
for.cond14.preheader.lr.ph: ; preds = %for.cond9.preheader
%arrayidx16 = getelementptr inbounds [300 x i32], ptr %w, i64 0, i64 %indvars.iv51
br label %for.cond14.preheader
for.cond14.preheader: ; preds = %for.cond14.preheader.lr.ph, %for.end
%l.047 = phi i32 [ 0, %for.cond14.preheader.lr.ph ], [ %inc23, %for.end ]
%5 = load i32, ptr %arrayidx16, align 4, !tbaa !5
%cmp1744 = icmp sgt i32 %5, 0
br i1 %cmp1744, label %for.body18, label %for.end
for.body18: ; preds = %for.cond14.preheader, %for.body18
%k.045 = phi i32 [ %inc20, %for.body18 ], [ 0, %for.cond14.preheader ]
%putchar43 = call i32 @putchar(i32 35)
%inc20 = add nuw nsw i32 %k.045, 1
%6 = load i32, ptr %arrayidx16, align 4, !tbaa !5
%cmp17 = icmp slt i32 %inc20, %6
br i1 %cmp17, label %for.body18, label %for.end, !llvm.loop !11
for.end: ; preds = %for.body18, %for.cond14.preheader
%putchar42 = call i32 @putchar(i32 10)
%inc23 = add nuw nsw i32 %l.047, 1
%7 = load i32, ptr %arrayidx11, align 4, !tbaa !5
%cmp12 = icmp slt i32 %inc23, %7
br i1 %cmp12, label %for.cond14.preheader, label %for.end24, !llvm.loop !12
for.end24: ; preds = %for.end, %for.cond9.preheader
%cmp25.not = icmp eq i64 %indvars.iv51, %3
br i1 %cmp25.not, label %for.inc27, label %if.then
if.then: ; preds = %for.end24
%putchar = call i32 @putchar(i32 10)
br label %for.inc27
for.inc27: ; preds = %for.end24, %if.then
%indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
%exitcond = icmp eq i64 %indvars.iv.next52, %wide.trip.count
br i1 %exitcond, label %for.end29, label %for.cond9.preheader, !llvm.loop !13
for.end29: ; preds = %for.inc27, %for.cond.preheader
call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %w) #4
call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %h) #4
ret i32 0
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
; Function Attrs: nofree nounwind
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3
attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.