Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> #include <ctype.h> #include <stdlib.h> int main() { int a[101][101], b[101][101]; long long c[101][101], s; int i, j, k; int n, m, l; scanf("%d%d%d", &n, &m, &l); for (i = 0; i < n; i++) { for (j = 0; j < m; j++) scanf("%d", &a[i][j]); } for (i = 0; i < m; i++) { for (j = 0; j < l; j++) scanf("%d", &b[i][j]); } for (i = 0; i < n; i++) { for (j = 0; j < l; j++) { s = 0; for (k = 0; k < m; k++) { s += a[i][k] * b[k][j]; } c[i][j] = s; } } for (i = 0; i < n; i++) { printf("%lld", c[i][0]); for (j = 1; j < l; j++) printf(" %lld", c[i][j]); putchar('\n'); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156359/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156359/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c" %lld\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: %a = alloca [101 x [101 x i32]], align 16 %b = alloca [101 x [101 x i32]], align 16 %c = alloca [101 x [101 x i64]], align 16 %n = alloca i32, align 4 %m = alloca i32, align 4 %l = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 40804, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 40804, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 81608, ptr nonnull %c) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %l) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m, ptr noundef nonnull %l) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp112 = icmp sgt i32 %0, 0 %.pre178 = load i32, ptr %m, align 4, !tbaa !5 br i1 %cmp112, label %for.cond1.preheader.lr.ph, label %for.cond10.preheader for.cond1.preheader.lr.ph: ; preds = %entry %1 = icmp sgt i32 %.pre178, 0 br i1 %1, label %for.cond1.preheader, label %for.cond30.preheader.lr.ph for.cond1.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.inc7 %2 = phi i32 [ %10, %for.inc7 ], [ %0, %for.cond1.preheader.lr.ph ] %3 = phi i32 [ %11, %for.inc7 ], [ %.pre178, %for.cond1.preheader.lr.ph ] %indvars.iv144 = phi i64 [ %indvars.iv.next145, %for.inc7 ], [ 0, %for.cond1.preheader.lr.ph ] %cmp2110 = icmp sgt i32 %3, 0 br i1 %cmp2110, label %for.body3, label %for.inc7 for.cond10.preheader: ; preds = %for.inc7, %entry %4 = phi i32 [ %0, %entry ], [ %10, %for.inc7 ] %5 = phi i32 [ %.pre178, %entry ], [ %11, %for.inc7 ] %cmp11116 = icmp sgt i32 %5, 0 %6 = load i32, ptr %l, align 4 %7 = icmp sgt i32 %6, 0 %or.cond = select i1 %cmp11116, i1 %7, i1 false br i1 %or.cond, label %for.cond13.preheader, label %for.cond27.preheader for.body3: ; preds = %for.cond1.preheader, %for.body3 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ 0, %for.cond1.preheader ] %arrayidx5 = getelementptr inbounds [101 x [101 x i32]], ptr %a, i64 0, i64 %indvars.iv144, i64 %indvars.iv %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx5) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %8 = load i32, ptr %m, align 4, !tbaa !5 %9 = sext i32 %8 to i64 %cmp2 = icmp slt i64 %indvars.iv.next, %9 br i1 %cmp2, label %for.body3, label %for.inc7.loopexit, !llvm.loop !9 for.inc7.loopexit: ; preds = %for.body3 %.pre = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc7 for.inc7: ; preds = %for.inc7.loopexit, %for.cond1.preheader %10 = phi i32 [ %.pre, %for.inc7.loopexit ], [ %2, %for.cond1.preheader ] %11 = phi i32 [ %8, %for.inc7.loopexit ], [ %3, %for.cond1.preheader ] %indvars.iv.next145 = add nuw nsw i64 %indvars.iv144, 1 %12 = sext i32 %10 to i64 %cmp = icmp slt i64 %indvars.iv.next145, %12 br i1 %cmp, label %for.cond1.preheader, label %for.cond10.preheader, !llvm.loop !11 for.cond13.preheader: ; preds = %for.cond10.preheader, %for.inc24 %13 = phi i32 [ %39, %for.inc24 ], [ %5, %for.cond10.preheader ] %14 = phi i32 [ %40, %for.inc24 ], [ %6, %for.cond10.preheader ] %indvars.iv150 = phi i64 [ %indvars.iv.next151, %for.inc24 ], [ 0, %for.cond10.preheader ] %cmp14114 = icmp sgt i32 %14, 0 br i1 %cmp14114, label %for.body15, label %for.inc24 for.cond27.preheader.loopexit: ; preds = %for.inc24 %.pre180 = load i32, ptr %n, align 4, !tbaa !5 br label %for.cond27.preheader for.cond27.preheader: ; preds = %for.cond27.preheader.loopexit, %for.cond10.preheader %15 = phi i32 [ %4, %for.cond10.preheader ], [ %.pre180, %for.cond27.preheader.loopexit ] %.lcssa = phi i32 [ %5, %for.cond10.preheader ], [ %39, %for.cond27.preheader.loopexit ] %cmp28124 = icmp sgt i32 %15, 0 br i1 %cmp28124, label %for.cond30.preheader.lr.ph, label %for.end80 for.cond30.preheader.lr.ph: ; preds = %for.cond1.preheader.lr.ph, %for.cond27.preheader %.lcssa184 = phi i32 [ %.lcssa, %for.cond27.preheader ], [ %.pre178, %for.cond1.preheader.lr.ph ] %16 = phi i32 [ %15, %for.cond27.preheader ], [ %0, %for.cond1.preheader.lr.ph ] %17 = load i32, ptr %l, align 4, !tbaa !5 %cmp31122 = icmp sgt i32 %17, 0 br i1 %cmp31122, label %for.cond30.preheader.lr.ph.split.us, label %for.body60.preheader for.body60.preheader.loopexit201.unr-lcssa: ; preds = %for.cond30.preheader.us, %for.cond30.preheader.us.preheader %indvar.unr = phi i64 [ 0, %for.cond30.preheader.us.preheader ], [ %indvar.next.7, %for.cond30.preheader.us ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.body60.preheader, label %for.cond30.preheader.us.epil for.cond30.preheader.us.epil: ; preds = %for.body60.preheader.loopexit201.unr-lcssa, %for.cond30.preheader.us.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond30.preheader.us.epil ], [ %indvar.unr, %for.body60.preheader.loopexit201.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond30.preheader.us.epil ], [ 0, %for.body60.preheader.loopexit201.unr-lcssa ] %18 = mul nuw nsw i64 %indvar.epil, 808 %scevgep.epil = getelementptr i8, ptr %c, i64 %18 call void @llvm.memset.p0.i64(ptr align 8 %scevgep.epil, i8 0, i64 %20, i1 false), !tbaa !13 %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.body60.preheader, label %for.cond30.preheader.us.epil, !llvm.loop !15 for.body60.preheader: ; preds = %for.body60.preheader.loopexit201.unr-lcssa, %for.cond30.preheader.us.epil, %for.cond30.for.inc54_crit_edge.split.us.us.us, %for.cond30.preheader.lr.ph br label %for.body60 for.cond30.preheader.lr.ph.split.us: ; preds = %for.cond30.preheader.lr.ph %cmp34118 = icmp sgt i32 %.lcssa184, 0 br i1 %cmp34118, label %for.cond30.preheader.us.us.preheader, label %for.cond30.preheader.us.preheader for.cond30.preheader.us.preheader: ; preds = %for.cond30.preheader.lr.ph.split.us %19 = zext i32 %17 to i64 %20 = shl nuw nsw i64 %19, 3 %wide.trip.count = zext i32 %16 to i64 %xtraiter = and i64 %wide.trip.count, 7 %21 = icmp ult i32 %16, 8 br i1 %21, label %for.body60.preheader.loopexit201.unr-lcssa, label %for.cond30.preheader.us.preheader.new for.cond30.preheader.us.preheader.new: ; preds = %for.cond30.preheader.us.preheader %unroll_iter = and i64 %wide.trip.count, 4294967288 %invariant.gep = getelementptr i8, ptr %c, i64 808 %invariant.gep218 = getelementptr i8, ptr %c, i64 1616 %invariant.gep220 = getelementptr i8, ptr %c, i64 2424 %invariant.gep222 = getelementptr i8, ptr %c, i64 3232 %invariant.gep224 = getelementptr i8, ptr %c, i64 4040 %invariant.gep226 = getelementptr i8, ptr %c, i64 4848 %invariant.gep228 = getelementptr i8, ptr %c, i64 5656 br label %for.cond30.preheader.us for.cond30.preheader.us.us.preheader: ; preds = %for.cond30.preheader.lr.ph.split.us %wide.trip.count170 = zext i32 %16 to i64 %wide.trip.count165 = zext i32 %17 to i64 %wide.trip.count160 = zext i32 %.lcssa184 to i64 %xtraiter207 = and i64 %wide.trip.count160, 1 %22 = icmp eq i32 %.lcssa184, 1 %unroll_iter211 = and i64 %wide.trip.count160, 4294967294 %lcmp.mod209.not = icmp eq i64 %xtraiter207, 0 br label %for.cond30.preheader.us.us for.cond30.preheader.us.us: ; preds = %for.cond30.preheader.us.us.preheader, %for.cond30.for.inc54_crit_edge.split.us.us.us %indvars.iv167 = phi i64 [ 0, %for.cond30.preheader.us.us.preheader ], [ %indvars.iv.next168, %for.cond30.for.inc54_crit_edge.split.us.us.us ] br label %for.cond33.preheader.us.us.us for.cond33.preheader.us.us.us: ; preds = %for.cond33.for.end46_crit_edge.us.us.us, %for.cond30.preheader.us.us %indvars.iv162 = phi i64 [ %indvars.iv.next163, %for.cond33.for.end46_crit_edge.us.us.us ], [ 0, %for.cond30.preheader.us.us ] br i1 %22, label %for.cond33.for.end46_crit_edge.us.us.us.unr-lcssa, label %for.body35.us.us.us for.body35.us.us.us: ; preds = %for.cond33.preheader.us.us.us, %for.body35.us.us.us %indvars.iv157 = phi i64 [ %indvars.iv.next158.1, %for.body35.us.us.us ], [ 0, %for.cond33.preheader.us.us.us ] %s.0119.us.us.us = phi i64 [ %add.us.us.us.1, %for.body35.us.us.us ], [ 0, %for.cond33.preheader.us.us.us ] %niter212 = phi i64 [ %niter212.next.1, %for.body35.us.us.us ], [ 0, %for.cond33.preheader.us.us.us ] %arrayidx39.us.us.us = getelementptr inbounds [101 x [101 x i32]], ptr %a, i64 0, i64 %indvars.iv167, i64 %indvars.iv157 %23 = load i32, ptr %arrayidx39.us.us.us, align 4, !tbaa !5 %arrayidx43.us.us.us = getelementptr inbounds [101 x [101 x i32]], ptr %b, i64 0, i64 %indvars.iv157, i64 %indvars.iv162 %24 = load i32, ptr %arrayidx43.us.us.us, align 4, !tbaa !5 %mul.us.us.us = mul nsw i32 %24, %23 %conv.us.us.us = sext i32 %mul.us.us.us to i64 %add.us.us.us = add nsw i64 %s.0119.us.us.us, %conv.us.us.us %indvars.iv.next158 = or i64 %indvars.iv157, 1 %arrayidx39.us.us.us.1 = getelementptr inbounds [101 x [101 x i32]], ptr %a, i64 0, i64 %indvars.iv167, i64 %indvars.iv.next158 %25 = load i32, ptr %arrayidx39.us.us.us.1, align 4, !tbaa !5 %arrayidx43.us.us.us.1 = getelementptr inbounds [101 x [101 x i32]], ptr %b, i64 0, i64 %indvars.iv.next158, i64 %indvars.iv162 %26 = load i32, ptr %arrayidx43.us.us.us.1, align 4, !tbaa !5 %mul.us.us.us.1 = mul nsw i32 %26, %25 %conv.us.us.us.1 = sext i32 %mul.us.us.us.1 to i64 %add.us.us.us.1 = add nsw i64 %add.us.us.us, %conv.us.us.us.1 %indvars.iv.next158.1 = add nuw nsw i64 %indvars.iv157, 2 %niter212.next.1 = add i64 %niter212, 2 %niter212.ncmp.1 = icmp eq i64 %niter212.next.1, %unroll_iter211 br i1 %niter212.ncmp.1, label %for.cond33.for.end46_crit_edge.us.us.us.unr-lcssa, label %for.body35.us.us.us, !llvm.loop !17 for.cond33.for.end46_crit_edge.us.us.us.unr-lcssa: ; preds = %for.body35.us.us.us, %for.cond33.preheader.us.us.us %add.us.us.us.lcssa.ph = phi i64 [ undef, %for.cond33.preheader.us.us.us ], [ %add.us.us.us.1, %for.body35.us.us.us ] %indvars.iv157.unr = phi i64 [ 0, %for.cond33.preheader.us.us.us ], [ %indvars.iv.next158.1, %for.body35.us.us.us ] %s.0119.us.us.us.unr = phi i64 [ 0, %for.cond33.preheader.us.us.us ], [ %add.us.us.us.1, %for.body35.us.us.us ] br i1 %lcmp.mod209.not, label %for.cond33.for.end46_crit_edge.us.us.us, label %for.body35.us.us.us.epil for.body35.us.us.us.epil: ; preds = %for.cond33.for.end46_crit_edge.us.us.us.unr-lcssa %arrayidx39.us.us.us.epil = getelementptr inbounds [101 x [101 x i32]], ptr %a, i64 0, i64 %indvars.iv167, i64 %indvars.iv157.unr %27 = load i32, ptr %arrayidx39.us.us.us.epil, align 4, !tbaa !5 %arrayidx43.us.us.us.epil = getelementptr inbounds [101 x [101 x i32]], ptr %b, i64 0, i64 %indvars.iv157.unr, i64 %indvars.iv162 %28 = load i32, ptr %arrayidx43.us.us.us.epil, align 4, !tbaa !5 %mul.us.us.us.epil = mul nsw i32 %28, %27 %conv.us.us.us.epil = sext i32 %mul.us.us.us.epil to i64 %add.us.us.us.epil = add nsw i64 %s.0119.us.us.us.unr, %conv.us.us.us.epil br label %for.cond33.for.end46_crit_edge.us.us.us for.cond33.for.end46_crit_edge.us.us.us: ; preds = %for.cond33.for.end46_crit_edge.us.us.us.unr-lcssa, %for.body35.us.us.us.epil %add.us.us.us.lcssa = phi i64 [ %add.us.us.us.lcssa.ph, %for.cond33.for.end46_crit_edge.us.us.us.unr-lcssa ], [ %add.us.us.us.epil, %for.body35.us.us.us.epil ] %arrayidx50.us.us.us = getelementptr inbounds [101 x [101 x i64]], ptr %c, i64 0, i64 %indvars.iv167, i64 %indvars.iv162 store i64 %add.us.us.us.lcssa, ptr %arrayidx50.us.us.us, align 8, !tbaa !13 %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1 %exitcond166.not = icmp eq i64 %indvars.iv.next163, %wide.trip.count165 br i1 %exitcond166.not, label %for.cond30.for.inc54_crit_edge.split.us.us.us, label %for.cond33.preheader.us.us.us, !llvm.loop !18 for.cond30.for.inc54_crit_edge.split.us.us.us: ; preds = %for.cond33.for.end46_crit_edge.us.us.us %indvars.iv.next168 = add nuw nsw i64 %indvars.iv167, 1 %exitcond171.not = icmp eq i64 %indvars.iv.next168, %wide.trip.count170 br i1 %exitcond171.not, label %for.body60.preheader, label %for.cond30.preheader.us.us, !llvm.loop !19 for.cond30.preheader.us: ; preds = %for.cond30.preheader.us, %for.cond30.preheader.us.preheader.new %indvar = phi i64 [ 0, %for.cond30.preheader.us.preheader.new ], [ %indvar.next.7, %for.cond30.preheader.us ] %niter = phi i64 [ 0, %for.cond30.preheader.us.preheader.new ], [ %niter.next.7, %for.cond30.preheader.us ] %29 = mul nuw nsw i64 %indvar, 808 %scevgep = getelementptr i8, ptr %c, i64 %29 call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %20, i1 false), !tbaa !13 %30 = mul nuw i64 %indvar, 808 %gep = getelementptr i8, ptr %invariant.gep, i64 %30 call void @llvm.memset.p0.i64(ptr align 8 %gep, i8 0, i64 %20, i1 false), !tbaa !13 %31 = mul nuw i64 %indvar, 808 %gep219 = getelementptr i8, ptr %invariant.gep218, i64 %31 call void @llvm.memset.p0.i64(ptr align 16 %gep219, i8 0, i64 %20, i1 false), !tbaa !13 %32 = mul nuw i64 %indvar, 808 %gep221 = getelementptr i8, ptr %invariant.gep220, i64 %32 call void @llvm.memset.p0.i64(ptr align 8 %gep221, i8 0, i64 %20, i1 false), !tbaa !13 %33 = mul nuw i64 %indvar, 808 %gep223 = getelementptr i8, ptr %invariant.gep222, i64 %33 call void @llvm.memset.p0.i64(ptr align 16 %gep223, i8 0, i64 %20, i1 false), !tbaa !13 %34 = mul nuw i64 %indvar, 808 %gep225 = getelementptr i8, ptr %invariant.gep224, i64 %34 call void @llvm.memset.p0.i64(ptr align 8 %gep225, i8 0, i64 %20, i1 false), !tbaa !13 %35 = mul nuw i64 %indvar, 808 %gep227 = getelementptr i8, ptr %invariant.gep226, i64 %35 call void @llvm.memset.p0.i64(ptr align 16 %gep227, i8 0, i64 %20, i1 false), !tbaa !13 %36 = mul nuw i64 %indvar, 808 %gep229 = getelementptr i8, ptr %invariant.gep228, i64 %36 call void @llvm.memset.p0.i64(ptr align 8 %gep229, i8 0, i64 %20, i1 false), !tbaa !13 %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.body60.preheader.loopexit201.unr-lcssa, label %for.cond30.preheader.us, !llvm.loop !19 for.body15: ; preds = %for.cond13.preheader, %for.body15 %indvars.iv147 = phi i64 [ %indvars.iv.next148, %for.body15 ], [ 0, %for.cond13.preheader ] %arrayidx19 = getelementptr inbounds [101 x [101 x i32]], ptr %b, i64 0, i64 %indvars.iv150, i64 %indvars.iv147 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx19) %indvars.iv.next148 = add nuw nsw i64 %indvars.iv147, 1 %37 = load i32, ptr %l, align 4, !tbaa !5 %38 = sext i32 %37 to i64 %cmp14 = icmp slt i64 %indvars.iv.next148, %38 br i1 %cmp14, label %for.body15, label %for.inc24.loopexit, !llvm.loop !20 for.inc24.loopexit: ; preds = %for.body15 %.pre179 = load i32, ptr %m, align 4, !tbaa !5 br label %for.inc24 for.inc24: ; preds = %for.inc24.loopexit, %for.cond13.preheader %39 = phi i32 [ %.pre179, %for.inc24.loopexit ], [ %13, %for.cond13.preheader ] %40 = phi i32 [ %37, %for.inc24.loopexit ], [ %14, %for.cond13.preheader ] %indvars.iv.next151 = add nuw nsw i64 %indvars.iv150, 1 %41 = sext i32 %39 to i64 %cmp11 = icmp slt i64 %indvars.iv.next151, %41 br i1 %cmp11, label %for.cond13.preheader, label %for.cond27.preheader.loopexit, !llvm.loop !21 for.body60: ; preds = %for.body60.preheader, %for.end76 %indvars.iv175 = phi i64 [ %indvars.iv.next176, %for.end76 ], [ 0, %for.body60.preheader ] %arrayidx62 = getelementptr inbounds [101 x [101 x i64]], ptr %c, i64 0, i64 %indvars.iv175 %42 = load i64, ptr %arrayidx62, align 8, !tbaa !13 %call64 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %42) %43 = load i32, ptr %l, align 4, !tbaa !5 %cmp66134 = icmp sgt i32 %43, 1 br i1 %cmp66134, label %for.body68, label %for.end76 for.body68: ; preds = %for.body60, %for.body68 %indvars.iv172 = phi i64 [ %indvars.iv.next173, %for.body68 ], [ 1, %for.body60 ] %arrayidx72 = getelementptr inbounds [101 x [101 x i64]], ptr %c, i64 0, i64 %indvars.iv175, i64 %indvars.iv172 %44 = load i64, ptr %arrayidx72, align 8, !tbaa !13 %call73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %44) %indvars.iv.next173 = add nuw nsw i64 %indvars.iv172, 1 %45 = load i32, ptr %l, align 4, !tbaa !5 %46 = sext i32 %45 to i64 %cmp66 = icmp slt i64 %indvars.iv.next173, %46 br i1 %cmp66, label %for.body68, label %for.end76, !llvm.loop !22 for.end76: ; preds = %for.body68, %for.body60 %47 = load ptr, ptr @stdout, align 8, !tbaa !23 %call.i = call i32 @putc(i32 noundef 10, ptr noundef %47) %indvars.iv.next176 = add nuw nsw i64 %indvars.iv175, 1 %48 = load i32, ptr %n, align 4, !tbaa !5 %49 = sext i32 %48 to i64 %cmp58 = icmp slt i64 %indvars.iv.next176, %49 br i1 %cmp58, label %for.body60, label %for.end80, !llvm.loop !25 for.end80: ; preds = %for.end76, %for.cond27.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %l) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 81608, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 40804, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 40804, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @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) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12} !12 = !{!"llvm.loop.unswitch.partial.disable"} !13 = !{!14, !14, i64 0} !14 = !{!"long long", !7, i64 0} !15 = distinct !{!15, !16} !16 = !{!"llvm.loop.unroll.disable"} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10} !19 = distinct !{!19, !10} !20 = distinct !{!20, !10} !21 = distinct !{!21, !10, !12} !22 = distinct !{!22, !10} !23 = !{!24, !24, i64 0} !24 = !{!"any pointer", !7, i64 0} !25 = distinct !{!25, !10}
#include <stdio.h> int main(void){ int s[100][100],t[100][100],n,m,l,a,b,c; long u[100][100]={{0}}; scanf("%d %d %d",&n,&m,&l); for(a=1;a<=n;a++){ for(b=1;b<=m;b++){ scanf("%d",&s[a-1][b-1]); }; }; for(a=1;a<=m;a++){ for(b=1;b<=l;b++){ scanf("%d",&t[a-1][b-1]); }; }; for(a=1;a<=n;a++){ for(b=1;b<=l;b++){ for(c=1;c<=m;c++){ u[a-1][b-1]+=s[a-1][c-1]*t[c-1][b-1]; }; }; }; for(a=1;a<=n;a++){ for(b=1;b<l;b++){ printf("%ld ",u[a-1][b-1]); };printf("%ld\n",u[a-1][b-1]); }; return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156401/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156401/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @.str.2 = private unnamed_addr constant [5 x i8] c"%ld \00", align 1 @.str.3 = private unnamed_addr constant [5 x i8] c"%ld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [100 x [100 x i32]], align 16 %t = alloca [100 x [100 x i32]], align 16 %n = alloca i32, align 4 %m = alloca i32, align 4 %l = alloca i32, align 4 %u = alloca [100 x [100 x i64]], align 16 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %s) #4 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %t) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %l) #4 call void @llvm.lifetime.start.p0(i64 80000, ptr nonnull %u) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(80000) %u, i8 0, i64 80000, i1 false) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m, ptr noundef nonnull %l) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not125 = icmp slt i32 %0, 1 %.pre190 = load i32, ptr %m, align 4, !tbaa !5 br i1 %cmp.not125, label %for.cond11.preheader, label %for.cond1.preheader.lr.ph for.cond1.preheader.lr.ph: ; preds = %entry %1 = icmp slt i32 %.pre190, 1 br i1 %1, label %for.cond33.preheader.lr.ph, label %for.cond1.preheader for.cond1.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.inc8 %2 = phi i32 [ %12, %for.inc8 ], [ %0, %for.cond1.preheader.lr.ph ] %3 = phi i32 [ %13, %for.inc8 ], [ %.pre190, %for.cond1.preheader.lr.ph ] %indvars.iv153 = phi i64 [ %indvars.iv.next154, %for.inc8 ], [ 1, %for.cond1.preheader.lr.ph ] %cmp2.not123 = icmp slt i32 %3, 1 br i1 %cmp2.not123, label %for.inc8, label %for.body3.lr.ph for.body3.lr.ph: ; preds = %for.cond1.preheader %4 = add nsw i64 %indvars.iv153, -1 br label %for.body3 for.cond11.preheader: ; preds = %for.inc8, %entry %5 = phi i32 [ %0, %entry ], [ %12, %for.inc8 ] %6 = phi i32 [ %.pre190, %entry ], [ %13, %for.inc8 ] %cmp12.not129 = icmp slt i32 %6, 1 %7 = load i32, ptr %l, align 4 %8 = icmp slt i32 %7, 1 %or.cond207 = select i1 %cmp12.not129, i1 true, i1 %8 br i1 %or.cond207, label %for.cond30.preheader, label %for.cond14.preheader for.body3: ; preds = %for.body3.lr.ph, %for.body3 %indvars.iv = phi i64 [ 1, %for.body3.lr.ph ], [ %indvars.iv.next, %for.body3 ] %9 = add nsw i64 %indvars.iv, -1 %arrayidx6 = getelementptr inbounds [100 x [100 x i32]], ptr %s, i64 0, i64 %4, i64 %9 %call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx6) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %10 = load i32, ptr %m, align 4, !tbaa !5 %11 = sext i32 %10 to i64 %cmp2.not.not = icmp slt i64 %indvars.iv, %11 br i1 %cmp2.not.not, label %for.body3, label %for.inc8.loopexit, !llvm.loop !9 for.inc8.loopexit: ; preds = %for.body3 %.pre = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc8 for.inc8: ; preds = %for.inc8.loopexit, %for.cond1.preheader %12 = phi i32 [ %.pre, %for.inc8.loopexit ], [ %2, %for.cond1.preheader ] %13 = phi i32 [ %10, %for.inc8.loopexit ], [ %3, %for.cond1.preheader ] %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1 %14 = sext i32 %12 to i64 %cmp.not.not = icmp slt i64 %indvars.iv153, %14 br i1 %cmp.not.not, label %for.cond1.preheader, label %for.cond11.preheader, !llvm.loop !11 for.cond14.preheader: ; preds = %for.cond11.preheader, %for.inc27 %15 = phi i32 [ %28, %for.inc27 ], [ %6, %for.cond11.preheader ] %16 = phi i32 [ %29, %for.inc27 ], [ %7, %for.cond11.preheader ] %indvars.iv161 = phi i64 [ %indvars.iv.next162, %for.inc27 ], [ 1, %for.cond11.preheader ] %cmp15.not127 = icmp slt i32 %16, 1 br i1 %cmp15.not127, label %for.inc27, label %for.body16.lr.ph for.body16.lr.ph: ; preds = %for.cond14.preheader %17 = add nsw i64 %indvars.iv161, -1 br label %for.body16 for.cond30.preheader.loopexit148: ; preds = %for.inc27 %.pre192 = load i32, ptr %n, align 4, !tbaa !5 br label %for.cond30.preheader for.cond30.preheader: ; preds = %for.cond30.preheader.loopexit148, %for.cond11.preheader %18 = phi i32 [ %5, %for.cond11.preheader ], [ %.pre192, %for.cond30.preheader.loopexit148 ] %.lcssa = phi i32 [ %6, %for.cond11.preheader ], [ %28, %for.cond30.preheader.loopexit148 ] %cmp31.not135 = icmp slt i32 %18, 1 br i1 %cmp31.not135, label %for.end93, label %for.cond33.preheader.lr.ph for.cond33.preheader.lr.ph: ; preds = %for.cond1.preheader.lr.ph, %for.cond30.preheader %.lcssa197 = phi i32 [ %.lcssa, %for.cond30.preheader ], [ %.pre190, %for.cond1.preheader.lr.ph ] %19 = phi i32 [ %18, %for.cond30.preheader ], [ %0, %for.cond1.preheader.lr.ph ] %20 = load i32, ptr %l, align 4, !tbaa !5 %cmp34.not133 = icmp slt i32 %20, 1 %cmp37.not131 = icmp slt i32 %.lcssa197, 1 %or.cond = select i1 %cmp34.not133, i1 true, i1 %cmp37.not131 br i1 %or.cond, label %for.cond70.preheader.preheader, label %for.cond33.preheader.preheader for.cond33.preheader.preheader: ; preds = %for.cond33.preheader.lr.ph %21 = add nuw i32 %20, 1 %22 = add nuw i32 %19, 1 %wide.trip.count179 = zext i32 %22 to i64 %wide.trip.count173 = zext i32 %21 to i64 %23 = zext i32 %.lcssa197 to i64 %xtraiter = and i64 %23, 1 %24 = icmp eq i32 %.lcssa197, 1 %unroll_iter = and i64 %23, 4294967294 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br label %for.cond33.preheader for.body16: ; preds = %for.body16.lr.ph, %for.body16 %indvars.iv157 = phi i64 [ 1, %for.body16.lr.ph ], [ %indvars.iv.next158, %for.body16 ] %25 = add nsw i64 %indvars.iv157, -1 %arrayidx22 = getelementptr inbounds [100 x [100 x i32]], ptr %t, i64 0, i64 %17, i64 %25 %call23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx22) %indvars.iv.next158 = add nuw nsw i64 %indvars.iv157, 1 %26 = load i32, ptr %l, align 4, !tbaa !5 %27 = sext i32 %26 to i64 %cmp15.not.not = icmp slt i64 %indvars.iv157, %27 br i1 %cmp15.not.not, label %for.body16, label %for.inc27.loopexit, !llvm.loop !13 for.inc27.loopexit: ; preds = %for.body16 %.pre191 = load i32, ptr %m, align 4, !tbaa !5 br label %for.inc27 for.inc27: ; preds = %for.inc27.loopexit, %for.cond14.preheader %28 = phi i32 [ %.pre191, %for.inc27.loopexit ], [ %15, %for.cond14.preheader ] %29 = phi i32 [ %26, %for.inc27.loopexit ], [ %16, %for.cond14.preheader ] %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1 %30 = sext i32 %28 to i64 %cmp12.not.not = icmp slt i64 %indvars.iv161, %30 br i1 %cmp12.not.not, label %for.cond14.preheader, label %for.cond30.preheader.loopexit148, !llvm.loop !14 for.cond33.preheader: ; preds = %for.cond33.preheader.preheader, %for.cond33.for.inc63_crit_edge.split %indvars.iv175 = phi i64 [ 1, %for.cond33.preheader.preheader ], [ %indvars.iv.next176, %for.cond33.for.inc63_crit_edge.split ] %31 = add nsw i64 %indvars.iv175, -1 br label %for.cond36.preheader for.cond36.preheader: ; preds = %for.cond33.preheader, %for.cond36.for.inc60_crit_edge %indvars.iv169 = phi i64 [ 1, %for.cond33.preheader ], [ %indvars.iv.next170, %for.cond36.for.inc60_crit_edge ] %32 = add nsw i64 %indvars.iv169, -1 %arrayidx56 = getelementptr inbounds [100 x [100 x i64]], ptr %u, i64 0, i64 %31, i64 %32 %arrayidx56.promoted = load i64, ptr %arrayidx56, align 8, !tbaa !15 br i1 %24, label %for.cond36.for.inc60_crit_edge.unr-lcssa, label %for.body38 for.body38: ; preds = %for.cond36.preheader, %for.body38 %indvars.iv165 = phi i64 [ %indvars.iv.next166.1, %for.body38 ], [ 1, %for.cond36.preheader ] %33 = phi i64 [ %add.1, %for.body38 ], [ %arrayidx56.promoted, %for.cond36.preheader ] %niter = phi i64 [ %niter.next.1, %for.body38 ], [ 0, %for.cond36.preheader ] %34 = add nsw i64 %indvars.iv165, -1 %arrayidx44 = getelementptr inbounds [100 x [100 x i32]], ptr %s, i64 0, i64 %31, i64 %34 %35 = load i32, ptr %arrayidx44, align 4, !tbaa !5 %arrayidx50 = getelementptr inbounds [100 x [100 x i32]], ptr %t, i64 0, i64 %34, i64 %32 %36 = load i32, ptr %arrayidx50, align 4, !tbaa !5 %mul = mul nsw i32 %36, %35 %conv = sext i32 %mul to i64 %add = add nsw i64 %33, %conv %arrayidx44.1 = getelementptr inbounds [100 x [100 x i32]], ptr %s, i64 0, i64 %31, i64 %indvars.iv165 %37 = load i32, ptr %arrayidx44.1, align 4, !tbaa !5 %arrayidx50.1 = getelementptr inbounds [100 x [100 x i32]], ptr %t, i64 0, i64 %indvars.iv165, i64 %32 %38 = load i32, ptr %arrayidx50.1, align 4, !tbaa !5 %mul.1 = mul nsw i32 %38, %37 %conv.1 = sext i32 %mul.1 to i64 %add.1 = add nsw i64 %add, %conv.1 %indvars.iv.next166.1 = add nuw nsw i64 %indvars.iv165, 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.cond36.for.inc60_crit_edge.unr-lcssa, label %for.body38, !llvm.loop !17 for.cond36.for.inc60_crit_edge.unr-lcssa: ; preds = %for.body38, %for.cond36.preheader %add.lcssa.ph = phi i64 [ undef, %for.cond36.preheader ], [ %add.1, %for.body38 ] %indvars.iv165.unr = phi i64 [ 1, %for.cond36.preheader ], [ %indvars.iv.next166.1, %for.body38 ] %.unr = phi i64 [ %arrayidx56.promoted, %for.cond36.preheader ], [ %add.1, %for.body38 ] br i1 %lcmp.mod.not, label %for.cond36.for.inc60_crit_edge, label %for.body38.epil for.body38.epil: ; preds = %for.cond36.for.inc60_crit_edge.unr-lcssa %39 = add nsw i64 %indvars.iv165.unr, -1 %arrayidx44.epil = getelementptr inbounds [100 x [100 x i32]], ptr %s, i64 0, i64 %31, i64 %39 %40 = load i32, ptr %arrayidx44.epil, align 4, !tbaa !5 %arrayidx50.epil = getelementptr inbounds [100 x [100 x i32]], ptr %t, i64 0, i64 %39, i64 %32 %41 = load i32, ptr %arrayidx50.epil, align 4, !tbaa !5 %mul.epil = mul nsw i32 %41, %40 %conv.epil = sext i32 %mul.epil to i64 %add.epil = add nsw i64 %.unr, %conv.epil br label %for.cond36.for.inc60_crit_edge for.cond36.for.inc60_crit_edge: ; preds = %for.cond36.for.inc60_crit_edge.unr-lcssa, %for.body38.epil %add.lcssa = phi i64 [ %add.lcssa.ph, %for.cond36.for.inc60_crit_edge.unr-lcssa ], [ %add.epil, %for.body38.epil ] store i64 %add.lcssa, ptr %arrayidx56, align 8, !tbaa !15 %indvars.iv.next170 = add nuw nsw i64 %indvars.iv169, 1 %exitcond174.not = icmp eq i64 %indvars.iv.next170, %wide.trip.count173 br i1 %exitcond174.not, label %for.cond33.for.inc63_crit_edge.split, label %for.cond36.preheader, !llvm.loop !18 for.cond33.for.inc63_crit_edge.split: ; preds = %for.cond36.for.inc60_crit_edge %indvars.iv.next176 = add nuw nsw i64 %indvars.iv175, 1 %exitcond180.not = icmp eq i64 %indvars.iv.next176, %wide.trip.count179 br i1 %exitcond180.not, label %for.cond70.preheader.preheader, label %for.cond33.preheader, !llvm.loop !19 for.cond70.preheader.preheader: ; preds = %for.cond33.for.inc63_crit_edge.split, %for.cond33.preheader.lr.ph br label %for.cond70.preheader for.cond70.preheader: ; preds = %for.cond70.preheader.preheader, %for.end83 %indvars.iv185 = phi i64 [ %indvars.iv.next186, %for.end83 ], [ 1, %for.cond70.preheader.preheader ] %42 = load i32, ptr %l, align 4, !tbaa !5 %cmp71141 = icmp sgt i32 %42, 1 %43 = add nsw i64 %indvars.iv185, -1 br i1 %cmp71141, label %for.body73, label %for.end83 for.body73: ; preds = %for.cond70.preheader, %for.body73 %indvars.iv181 = phi i64 [ %indvars.iv.next182, %for.body73 ], [ 1, %for.cond70.preheader ] %44 = add nsw i64 %indvars.iv181, -1 %arrayidx79 = getelementptr inbounds [100 x [100 x i64]], ptr %u, i64 0, i64 %43, i64 %44 %45 = load i64, ptr %arrayidx79, align 8, !tbaa !15 %call80 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %45) %indvars.iv.next182 = add nuw nsw i64 %indvars.iv181, 1 %46 = load i32, ptr %l, align 4, !tbaa !5 %47 = sext i32 %46 to i64 %cmp71 = icmp slt i64 %indvars.iv.next182, %47 br i1 %cmp71, label %for.body73, label %for.end83, !llvm.loop !20 for.end83: ; preds = %for.body73, %for.cond70.preheader %b.3.lcssa = phi i64 [ 0, %for.cond70.preheader ], [ %indvars.iv181, %for.body73 ] %idxprom88 = and i64 %b.3.lcssa, 4294967295 %arrayidx89 = getelementptr inbounds [100 x [100 x i64]], ptr %u, i64 0, i64 %43, i64 %idxprom88 %48 = load i64, ptr %arrayidx89, align 8, !tbaa !15 %call90 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %48) %indvars.iv.next186 = add nuw nsw i64 %indvars.iv185, 1 %49 = load i32, ptr %n, align 4, !tbaa !5 %50 = sext i32 %49 to i64 %cmp67.not.not = icmp slt i64 %indvars.iv185, %50 br i1 %cmp67.not.not, label %for.cond70.preheader, label %for.end93, !llvm.loop !21 for.end93: ; preds = %for.end83, %for.cond30.preheader call void @llvm.lifetime.end.p0(i64 80000, ptr nonnull %u) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %l) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %t) #4 call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %s) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12} !12 = !{!"llvm.loop.unswitch.partial.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10, !12} !15 = !{!16, !16, i64 0} !16 = !{!"long", !7, i64 0} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10} !19 = distinct !{!19, !10} !20 = distinct !{!20, !10} !21 = distinct !{!21, !10}
#include "stdio.h" int main(int argc, char const *argv[]) { int i,j,k,n,m,l; long num1[100][100],num2[100][100],num3[100][100]; scanf("%d",&n); scanf("%d",&m); scanf("%d",&l); for(i=0;i<n;i++){ for(j=0;j<m;j++){ scanf("%ld",&num1[i][j]); } } for(i=0;i<m;i++){ for(j=0;j<l;j++){ scanf("%ld",&num2[i][j]); } } for(i=0;i<n;i++){ for(j=0;j<l;j++){ num3[i][j] = 0; for(k=0;k<m;k++){ num3[i][j] += num1[i][k] * num2[k][j]; } } } for(i=0;i<n;i++){ for(j=0;j<l;j++){ printf("%ld",num3[i][j]); if(j== l-1) printf("\n"); else printf(" "); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156445/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156445/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%ld\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 %l = alloca i32, align 4 %num1 = alloca [100 x [100 x i64]], align 16 %num2 = alloca [100 x [100 x i64]], align 16 %num3 = alloca [100 x [100 x i64]], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %l) #5 call void @llvm.lifetime.start.p0(i64 80000, ptr nonnull %num1) #5 call void @llvm.lifetime.start.p0(i64 80000, ptr nonnull %num2) #5 call void @llvm.lifetime.start.p0(i64 80000, ptr nonnull %num3) #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, ptr noundef nonnull %m) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %l) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp116 = icmp sgt i32 %0, 0 %.pre185 = load i32, ptr %m, align 4, !tbaa !5 br i1 %cmp116, label %for.cond3.preheader.lr.ph, label %for.cond12.preheader for.cond3.preheader.lr.ph: ; preds = %entry %1 = icmp sgt i32 %.pre185, 0 br i1 %1, label %for.cond3.preheader, label %for.cond32.preheader.lr.ph for.cond3.preheader: ; preds = %for.cond3.preheader.lr.ph, %for.inc9 %2 = phi i32 [ %10, %for.inc9 ], [ %0, %for.cond3.preheader.lr.ph ] %3 = phi i32 [ %11, %for.inc9 ], [ %.pre185, %for.cond3.preheader.lr.ph ] %indvars.iv148 = phi i64 [ %indvars.iv.next149, %for.inc9 ], [ 0, %for.cond3.preheader.lr.ph ] %cmp4114 = icmp sgt i32 %3, 0 br i1 %cmp4114, label %for.body5, label %for.inc9 for.cond12.preheader: ; preds = %for.inc9, %entry %4 = phi i32 [ %0, %entry ], [ %10, %for.inc9 ] %5 = phi i32 [ %.pre185, %entry ], [ %11, %for.inc9 ] %cmp13120 = icmp sgt i32 %5, 0 %6 = load i32, ptr %l, align 4 %7 = icmp sgt i32 %6, 0 %or.cond = select i1 %cmp13120, i1 %7, i1 false br i1 %or.cond, label %for.cond15.preheader, label %for.cond29.preheader for.body5: ; preds = %for.cond3.preheader, %for.body5 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body5 ], [ 0, %for.cond3.preheader ] %arrayidx7 = getelementptr inbounds [100 x [100 x i64]], ptr %num1, i64 0, i64 %indvars.iv148, 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 %8 = load i32, ptr %m, align 4, !tbaa !5 %9 = sext i32 %8 to i64 %cmp4 = icmp slt i64 %indvars.iv.next, %9 br i1 %cmp4, label %for.body5, label %for.inc9.loopexit, !llvm.loop !9 for.inc9.loopexit: ; preds = %for.body5 %.pre = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc9 for.inc9: ; preds = %for.inc9.loopexit, %for.cond3.preheader %10 = phi i32 [ %.pre, %for.inc9.loopexit ], [ %2, %for.cond3.preheader ] %11 = phi i32 [ %8, %for.inc9.loopexit ], [ %3, %for.cond3.preheader ] %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1 %12 = sext i32 %10 to i64 %cmp = icmp slt i64 %indvars.iv.next149, %12 br i1 %cmp, label %for.cond3.preheader, label %for.cond12.preheader, !llvm.loop !11 for.cond15.preheader: ; preds = %for.cond12.preheader, %for.inc26 %13 = phi i32 [ %38, %for.inc26 ], [ %5, %for.cond12.preheader ] %14 = phi i32 [ %39, %for.inc26 ], [ %6, %for.cond12.preheader ] %indvars.iv154 = phi i64 [ %indvars.iv.next155, %for.inc26 ], [ 0, %for.cond12.preheader ] %cmp16118 = icmp sgt i32 %14, 0 br i1 %cmp16118, label %for.body17, label %for.inc26 for.cond29.preheader.loopexit: ; preds = %for.inc26 %.pre187 = load i32, ptr %n, align 4, !tbaa !5 br label %for.cond29.preheader for.cond29.preheader: ; preds = %for.cond29.preheader.loopexit, %for.cond12.preheader %15 = phi i32 [ %4, %for.cond12.preheader ], [ %.pre187, %for.cond29.preheader.loopexit ] %.lcssa = phi i32 [ %5, %for.cond12.preheader ], [ %38, %for.cond29.preheader.loopexit ] %cmp30127 = icmp sgt i32 %15, 0 br i1 %cmp30127, label %for.cond32.preheader.lr.ph, label %for.end82 for.cond32.preheader.lr.ph: ; preds = %for.cond3.preheader.lr.ph, %for.cond29.preheader %.lcssa192 = phi i32 [ %.lcssa, %for.cond29.preheader ], [ %.pre185, %for.cond3.preheader.lr.ph ] %16 = phi i32 [ %15, %for.cond29.preheader ], [ %0, %for.cond3.preheader.lr.ph ] %17 = load i32, ptr %l, align 4, !tbaa !5 %cmp33125 = icmp sgt i32 %17, 0 br i1 %cmp33125, label %for.cond32.preheader.lr.ph.split.us, label %for.cond63.preheader for.cond32.preheader.lr.ph.split.us: ; preds = %for.cond32.preheader.lr.ph %cmp40122 = icmp sgt i32 %.lcssa192, 0 br i1 %cmp40122, label %for.cond32.preheader.us.us.preheader, label %for.cond32.preheader.us.preheader for.cond32.preheader.us.preheader: ; preds = %for.cond32.preheader.lr.ph.split.us %18 = zext i32 %17 to i64 %19 = shl nuw nsw i64 %18, 3 %wide.trip.count = zext i32 %16 to i64 %xtraiter = and i64 %wide.trip.count, 7 %20 = icmp ult i32 %16, 8 br i1 %20, label %for.cond63.preheader.loopexit214.unr-lcssa, label %for.cond32.preheader.us.preheader.new for.cond32.preheader.us.preheader.new: ; preds = %for.cond32.preheader.us.preheader %unroll_iter = and i64 %wide.trip.count, 4294967288 %invariant.gep = getelementptr i8, ptr %num3, i64 800 %invariant.gep232 = getelementptr i8, ptr %num3, i64 1600 %invariant.gep234 = getelementptr i8, ptr %num3, i64 2400 %invariant.gep236 = getelementptr i8, ptr %num3, i64 3200 %invariant.gep238 = getelementptr i8, ptr %num3, i64 4000 %invariant.gep240 = getelementptr i8, ptr %num3, i64 4800 %invariant.gep242 = getelementptr i8, ptr %num3, i64 5600 br label %for.cond32.preheader.us for.cond32.preheader.us.us.preheader: ; preds = %for.cond32.preheader.lr.ph.split.us %wide.trip.count177 = zext i32 %16 to i64 %wide.trip.count172 = zext i32 %17 to i64 %wide.trip.count164 = zext i32 %.lcssa192 to i64 %xtraiter220 = and i64 %wide.trip.count164, 1 %21 = icmp eq i32 %.lcssa192, 1 %unroll_iter224 = and i64 %wide.trip.count164, 4294967294 %lcmp.mod222.not = icmp eq i64 %xtraiter220, 0 br label %for.cond32.preheader.us.us for.cond32.preheader.us.us: ; preds = %for.cond32.preheader.us.us.preheader, %for.cond32.for.inc60_crit_edge.split.us.us.us %indvars.iv174 = phi i64 [ 0, %for.cond32.preheader.us.us.preheader ], [ %indvars.iv.next175, %for.cond32.for.inc60_crit_edge.split.us.us.us ] br label %for.body34.us.us.us for.body34.us.us.us: ; preds = %for.cond39.for.inc57_crit_edge.us.us.us, %for.cond32.preheader.us.us %indvars.iv169 = phi i64 [ %indvars.iv.next170, %for.cond39.for.inc57_crit_edge.us.us.us ], [ 0, %for.cond32.preheader.us.us ] %arrayidx38.us.us.us = getelementptr inbounds [100 x [100 x i64]], ptr %num3, i64 0, i64 %indvars.iv174, i64 %indvars.iv169 br i1 %21, label %for.cond39.for.inc57_crit_edge.us.us.us.unr-lcssa, label %for.body41.us.us.us for.body41.us.us.us: ; preds = %for.body34.us.us.us, %for.body41.us.us.us %indvars.iv161 = phi i64 [ %indvars.iv.next162.1, %for.body41.us.us.us ], [ 0, %for.body34.us.us.us ] %add124.us.us.us = phi i64 [ %add.us.us.us.1, %for.body41.us.us.us ], [ 0, %for.body34.us.us.us ] %niter225 = phi i64 [ %niter225.next.1, %for.body41.us.us.us ], [ 0, %for.body34.us.us.us ] %arrayidx45.us.us.us = getelementptr inbounds [100 x [100 x i64]], ptr %num1, i64 0, i64 %indvars.iv174, i64 %indvars.iv161 %22 = load i64, ptr %arrayidx45.us.us.us, align 16, !tbaa !13 %arrayidx49.us.us.us = getelementptr inbounds [100 x [100 x i64]], ptr %num2, i64 0, i64 %indvars.iv161, i64 %indvars.iv169 %23 = load i64, ptr %arrayidx49.us.us.us, align 8, !tbaa !13 %mul.us.us.us = mul nsw i64 %23, %22 %add.us.us.us = add nsw i64 %add124.us.us.us, %mul.us.us.us %indvars.iv.next162 = or i64 %indvars.iv161, 1 %arrayidx45.us.us.us.1 = getelementptr inbounds [100 x [100 x i64]], ptr %num1, i64 0, i64 %indvars.iv174, i64 %indvars.iv.next162 %24 = load i64, ptr %arrayidx45.us.us.us.1, align 8, !tbaa !13 %arrayidx49.us.us.us.1 = getelementptr inbounds [100 x [100 x i64]], ptr %num2, i64 0, i64 %indvars.iv.next162, i64 %indvars.iv169 %25 = load i64, ptr %arrayidx49.us.us.us.1, align 8, !tbaa !13 %mul.us.us.us.1 = mul nsw i64 %25, %24 %add.us.us.us.1 = add nsw i64 %add.us.us.us, %mul.us.us.us.1 %indvars.iv.next162.1 = add nuw nsw i64 %indvars.iv161, 2 %niter225.next.1 = add i64 %niter225, 2 %niter225.ncmp.1 = icmp eq i64 %niter225.next.1, %unroll_iter224 br i1 %niter225.ncmp.1, label %for.cond39.for.inc57_crit_edge.us.us.us.unr-lcssa, label %for.body41.us.us.us, !llvm.loop !15 for.cond39.for.inc57_crit_edge.us.us.us.unr-lcssa: ; preds = %for.body41.us.us.us, %for.body34.us.us.us %add.us.us.us.lcssa.ph = phi i64 [ undef, %for.body34.us.us.us ], [ %add.us.us.us.1, %for.body41.us.us.us ] %indvars.iv161.unr = phi i64 [ 0, %for.body34.us.us.us ], [ %indvars.iv.next162.1, %for.body41.us.us.us ] %add124.us.us.us.unr = phi i64 [ 0, %for.body34.us.us.us ], [ %add.us.us.us.1, %for.body41.us.us.us ] br i1 %lcmp.mod222.not, label %for.cond39.for.inc57_crit_edge.us.us.us, label %for.body41.us.us.us.epil for.body41.us.us.us.epil: ; preds = %for.cond39.for.inc57_crit_edge.us.us.us.unr-lcssa %arrayidx45.us.us.us.epil = getelementptr inbounds [100 x [100 x i64]], ptr %num1, i64 0, i64 %indvars.iv174, i64 %indvars.iv161.unr %26 = load i64, ptr %arrayidx45.us.us.us.epil, align 8, !tbaa !13 %arrayidx49.us.us.us.epil = getelementptr inbounds [100 x [100 x i64]], ptr %num2, i64 0, i64 %indvars.iv161.unr, i64 %indvars.iv169 %27 = load i64, ptr %arrayidx49.us.us.us.epil, align 8, !tbaa !13 %mul.us.us.us.epil = mul nsw i64 %27, %26 %add.us.us.us.epil = add nsw i64 %add124.us.us.us.unr, %mul.us.us.us.epil br label %for.cond39.for.inc57_crit_edge.us.us.us for.cond39.for.inc57_crit_edge.us.us.us: ; preds = %for.cond39.for.inc57_crit_edge.us.us.us.unr-lcssa, %for.body41.us.us.us.epil %add.us.us.us.lcssa = phi i64 [ %add.us.us.us.lcssa.ph, %for.cond39.for.inc57_crit_edge.us.us.us.unr-lcssa ], [ %add.us.us.us.epil, %for.body41.us.us.us.epil ] store i64 %add.us.us.us.lcssa, ptr %arrayidx38.us.us.us, align 8, !tbaa !13 %indvars.iv.next170 = add nuw nsw i64 %indvars.iv169, 1 %exitcond173.not = icmp eq i64 %indvars.iv.next170, %wide.trip.count172 br i1 %exitcond173.not, label %for.cond32.for.inc60_crit_edge.split.us.us.us, label %for.body34.us.us.us, !llvm.loop !16 for.cond32.for.inc60_crit_edge.split.us.us.us: ; preds = %for.cond39.for.inc57_crit_edge.us.us.us %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.cond32.preheader.us.us, !llvm.loop !17 for.cond32.preheader.us: ; preds = %for.cond32.preheader.us, %for.cond32.preheader.us.preheader.new %indvar = phi i64 [ 0, %for.cond32.preheader.us.preheader.new ], [ %indvar.next.7, %for.cond32.preheader.us ] %niter = phi i64 [ 0, %for.cond32.preheader.us.preheader.new ], [ %niter.next.7, %for.cond32.preheader.us ] %28 = mul nuw nsw i64 %indvar, 800 %scevgep = getelementptr i8, ptr %num3, i64 %28 call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %19, i1 false), !tbaa !13 %29 = mul nuw i64 %indvar, 800 %gep = getelementptr i8, ptr %invariant.gep, i64 %29 call void @llvm.memset.p0.i64(ptr align 16 %gep, i8 0, i64 %19, i1 false), !tbaa !13 %30 = mul nuw i64 %indvar, 800 %gep233 = getelementptr i8, ptr %invariant.gep232, i64 %30 call void @llvm.memset.p0.i64(ptr align 16 %gep233, i8 0, i64 %19, i1 false), !tbaa !13 %31 = mul nuw i64 %indvar, 800 %gep235 = getelementptr i8, ptr %invariant.gep234, i64 %31 call void @llvm.memset.p0.i64(ptr align 16 %gep235, i8 0, i64 %19, i1 false), !tbaa !13 %32 = mul nuw i64 %indvar, 800 %gep237 = getelementptr i8, ptr %invariant.gep236, i64 %32 call void @llvm.memset.p0.i64(ptr align 16 %gep237, i8 0, i64 %19, i1 false), !tbaa !13 %33 = mul nuw i64 %indvar, 800 %gep239 = getelementptr i8, ptr %invariant.gep238, i64 %33 call void @llvm.memset.p0.i64(ptr align 16 %gep239, i8 0, i64 %19, i1 false), !tbaa !13 %34 = mul nuw i64 %indvar, 800 %gep241 = getelementptr i8, ptr %invariant.gep240, i64 %34 call void @llvm.memset.p0.i64(ptr align 16 %gep241, i8 0, i64 %19, i1 false), !tbaa !13 %35 = mul nuw i64 %indvar, 800 %gep243 = getelementptr i8, ptr %invariant.gep242, i64 %35 call void @llvm.memset.p0.i64(ptr align 16 %gep243, i8 0, i64 %19, i1 false), !tbaa !13 %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.cond63.preheader.loopexit214.unr-lcssa, label %for.cond32.preheader.us, !llvm.loop !17 for.body17: ; preds = %for.cond15.preheader, %for.body17 %indvars.iv151 = phi i64 [ %indvars.iv.next152, %for.body17 ], [ 0, %for.cond15.preheader ] %arrayidx21 = getelementptr inbounds [100 x [100 x i64]], ptr %num2, i64 0, i64 %indvars.iv154, i64 %indvars.iv151 %call22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx21) %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1 %36 = load i32, ptr %l, align 4, !tbaa !5 %37 = sext i32 %36 to i64 %cmp16 = icmp slt i64 %indvars.iv.next152, %37 br i1 %cmp16, label %for.body17, label %for.inc26.loopexit, !llvm.loop !18 for.inc26.loopexit: ; preds = %for.body17 %.pre186 = load i32, ptr %m, align 4, !tbaa !5 br label %for.inc26 for.inc26: ; preds = %for.inc26.loopexit, %for.cond15.preheader %38 = phi i32 [ %.pre186, %for.inc26.loopexit ], [ %13, %for.cond15.preheader ] %39 = phi i32 [ %36, %for.inc26.loopexit ], [ %14, %for.cond15.preheader ] %indvars.iv.next155 = add nuw nsw i64 %indvars.iv154, 1 %40 = sext i32 %38 to i64 %cmp13 = icmp slt i64 %indvars.iv.next155, %40 br i1 %cmp13, label %for.cond15.preheader, label %for.cond29.preheader.loopexit, !llvm.loop !19 for.cond63.preheader.loopexit214.unr-lcssa: ; preds = %for.cond32.preheader.us, %for.cond32.preheader.us.preheader %indvar.unr = phi i64 [ 0, %for.cond32.preheader.us.preheader ], [ %indvar.next.7, %for.cond32.preheader.us ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond63.preheader, label %for.cond32.preheader.us.epil for.cond32.preheader.us.epil: ; preds = %for.cond63.preheader.loopexit214.unr-lcssa, %for.cond32.preheader.us.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond32.preheader.us.epil ], [ %indvar.unr, %for.cond63.preheader.loopexit214.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond32.preheader.us.epil ], [ 0, %for.cond63.preheader.loopexit214.unr-lcssa ] %41 = mul nuw nsw i64 %indvar.epil, 800 %scevgep.epil = getelementptr i8, ptr %num3, i64 %41 call void @llvm.memset.p0.i64(ptr align 16 %scevgep.epil, i8 0, i64 %19, i1 false), !tbaa !13 %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.cond63.preheader, label %for.cond32.preheader.us.epil, !llvm.loop !20 for.cond63.preheader: ; preds = %for.cond63.preheader.loopexit214.unr-lcssa, %for.cond32.preheader.us.epil, %for.cond32.for.inc60_crit_edge.split.us.us.us, %for.cond32.preheader.lr.ph %42 = load i32, ptr %l, align 4 %43 = icmp sgt i32 %42, 0 br i1 %43, label %for.cond66.preheader, label %for.end82 for.cond66.preheader: ; preds = %for.cond63.preheader, %for.inc80 %44 = phi i32 [ %51, %for.inc80 ], [ %16, %for.cond63.preheader ] %45 = phi i32 [ %52, %for.inc80 ], [ %42, %for.cond63.preheader ] %indvars.iv182 = phi i64 [ %indvars.iv.next183, %for.inc80 ], [ 0, %for.cond63.preheader ] %cmp67137 = icmp sgt i32 %45, 0 br i1 %cmp67137, label %for.body68, label %for.inc80 for.body68: ; preds = %for.cond66.preheader, %for.body68 %indvars.iv179 = phi i64 [ %indvars.iv.next180, %for.body68 ], [ 0, %for.cond66.preheader ] %arrayidx72 = getelementptr inbounds [100 x [100 x i64]], ptr %num3, i64 0, i64 %indvars.iv182, i64 %indvars.iv179 %46 = load i64, ptr %arrayidx72, align 8, !tbaa !13 %call73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %46) %47 = load i32, ptr %l, align 4, !tbaa !5 %sub = add nsw i32 %47, -1 %48 = zext i32 %sub to i64 %cmp74 = icmp eq i64 %indvars.iv179, %48 %. = select i1 %cmp74, i32 10, i32 32 %putchar113 = call i32 @putchar(i32 %.) %indvars.iv.next180 = add nuw nsw i64 %indvars.iv179, 1 %49 = load i32, ptr %l, align 4, !tbaa !5 %50 = sext i32 %49 to i64 %cmp67 = icmp slt i64 %indvars.iv.next180, %50 br i1 %cmp67, label %for.body68, label %for.inc80.loopexit, !llvm.loop !22 for.inc80.loopexit: ; preds = %for.body68 %.pre188 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc80 for.inc80: ; preds = %for.inc80.loopexit, %for.cond66.preheader %51 = phi i32 [ %.pre188, %for.inc80.loopexit ], [ %44, %for.cond66.preheader ] %52 = phi i32 [ %49, %for.inc80.loopexit ], [ %45, %for.cond66.preheader ] %indvars.iv.next183 = add nuw nsw i64 %indvars.iv182, 1 %53 = sext i32 %51 to i64 %cmp64 = icmp slt i64 %indvars.iv.next183, %53 br i1 %cmp64, label %for.cond66.preheader, label %for.end82, !llvm.loop !23 for.end82: ; preds = %for.inc80, %for.cond29.preheader, %for.cond63.preheader call void @llvm.lifetime.end.p0(i64 80000, ptr nonnull %num3) #5 call void @llvm.lifetime.end.p0(i64 80000, ptr nonnull %num2) #5 call void @llvm.lifetime.end.p0(i64 80000, ptr nonnull %num1) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %l) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12} !12 = !{!"llvm.loop.unswitch.partial.disable"} !13 = !{!14, !14, i64 0} !14 = !{!"long", !7, i64 0} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10} !19 = distinct !{!19, !10, !12} !20 = distinct !{!20, !21} !21 = !{!"llvm.loop.unroll.disable"} !22 = distinct !{!22, !10} !23 = distinct !{!23, !10, !12}
#include <stdio.h> int main(int argc, char *argv[]) { int n; long long a, b; scanf("%d %lld %lld", &n, &a, &b); long long x[100000]; for(int i = 0; i < n; i++) scanf("%lld", &x[i]); long long ans = 0; for(int i = 1; i < n; i++){ if(a * (x[i] - x[i - 1]) > b) ans += b; else ans += a * (x[i] - x[i - 1]); } printf("%lld\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156496/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156496/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [13 x i8] c"%d %lld %lld\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %a = alloca i64, align 8 %b = alloca i64, align 8 %x = alloca [100000 x i64], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %a, ptr noundef nonnull %b) call void @llvm.lifetime.start.p0(i64 800000, ptr nonnull %x) #4 %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp34 = icmp sgt i32 %0, 0 br i1 %cmp34, label %for.body, label %for.cond.cleanup5 for.cond3.preheader: ; preds = %for.body %cmp436 = icmp sgt i32 %5, 1 br i1 %cmp436, label %for.body6.lr.ph, label %for.cond.cleanup5 for.body6.lr.ph: ; preds = %for.cond3.preheader %1 = load i64, ptr %a, align 8, !tbaa !9 %2 = load i64, ptr %b, align 8, !tbaa !9 %wide.trip.count = zext i32 %5 to i64 %.pre = load i64, ptr %x, align 16, !tbaa !9 %3 = add nsw i64 %wide.trip.count, -1 %xtraiter = and i64 %3, 1 %4 = icmp eq i32 %5, 2 br i1 %4, label %for.cond.cleanup5.loopexit.unr-lcssa, label %for.body6.lr.ph.new for.body6.lr.ph.new: ; preds = %for.body6.lr.ph %unroll_iter = and i64 %3, -2 br label %for.body6 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100000 x i64], ptr %x, 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 %5 = load i32, ptr %n, align 4, !tbaa !5 %6 = sext i32 %5 to i64 %cmp = icmp slt i64 %indvars.iv.next, %6 br i1 %cmp, label %for.body, label %for.cond3.preheader, !llvm.loop !11 for.cond.cleanup5.loopexit.unr-lcssa: ; preds = %for.body6, %for.body6.lr.ph %ans.1.lcssa.ph = phi i64 [ undef, %for.body6.lr.ph ], [ %ans.1.1, %for.body6 ] %.unr = phi i64 [ %.pre, %for.body6.lr.ph ], [ %10, %for.body6 ] %indvars.iv42.unr = phi i64 [ 1, %for.body6.lr.ph ], [ %indvars.iv.next43.1, %for.body6 ] %ans.037.unr = phi i64 [ 0, %for.body6.lr.ph ], [ %ans.1.1, %for.body6 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup5, label %for.body6.epil for.body6.epil: ; preds = %for.cond.cleanup5.loopexit.unr-lcssa %arrayidx8.epil = getelementptr inbounds [100000 x i64], ptr %x, i64 0, i64 %indvars.iv42.unr %7 = load i64, ptr %arrayidx8.epil, align 8, !tbaa !9 %sub11.epil = sub nsw i64 %7, %.unr %mul.epil = mul nsw i64 %sub11.epil, %1 %.mul.epil = call i64 @llvm.smin.i64(i64 %mul.epil, i64 %2) %ans.1.epil = add nsw i64 %.mul.epil, %ans.037.unr br label %for.cond.cleanup5 for.cond.cleanup5: ; preds = %for.body6.epil, %for.cond.cleanup5.loopexit.unr-lcssa, %entry, %for.cond3.preheader %ans.0.lcssa = phi i64 [ 0, %for.cond3.preheader ], [ 0, %entry ], [ %ans.1.lcssa.ph, %for.cond.cleanup5.loopexit.unr-lcssa ], [ %ans.1.epil, %for.body6.epil ] %call24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %ans.0.lcssa) call void @llvm.lifetime.end.p0(i64 800000, 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 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 for.body6: ; preds = %for.body6, %for.body6.lr.ph.new %8 = phi i64 [ %.pre, %for.body6.lr.ph.new ], [ %10, %for.body6 ] %indvars.iv42 = phi i64 [ 1, %for.body6.lr.ph.new ], [ %indvars.iv.next43.1, %for.body6 ] %ans.037 = phi i64 [ 0, %for.body6.lr.ph.new ], [ %ans.1.1, %for.body6 ] %niter = phi i64 [ 0, %for.body6.lr.ph.new ], [ %niter.next.1, %for.body6 ] %arrayidx8 = getelementptr inbounds [100000 x i64], ptr %x, i64 0, i64 %indvars.iv42 %9 = load i64, ptr %arrayidx8, align 8, !tbaa !9 %sub11 = sub nsw i64 %9, %8 %mul = mul nsw i64 %sub11, %1 %.mul = call i64 @llvm.smin.i64(i64 %mul, i64 %2) %ans.1 = add nsw i64 %.mul, %ans.037 %indvars.iv.next43 = add nuw nsw i64 %indvars.iv42, 1 %arrayidx8.1 = getelementptr inbounds [100000 x i64], ptr %x, i64 0, i64 %indvars.iv.next43 %10 = load i64, ptr %arrayidx8.1, align 8, !tbaa !9 %sub11.1 = sub nsw i64 %10, %9 %mul.1 = mul nsw i64 %sub11.1, %1 %.mul.1 = call i64 @llvm.smin.i64(i64 %mul.1, i64 %2) %ans.1.1 = add nsw i64 %.mul.1, %ans.1 %indvars.iv.next43.1 = add nuw nsw i64 %indvars.iv42, 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.cond.cleanup5.loopexit.unr-lcssa, label %for.body6, !llvm.loop !13 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"long long", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12}
#include"stdio.h" int main(){ int N,D,res=1,i; scanf("%d%d",&D,&N); N+=N/100; for(i=0;i<D;i++){ res*=100; } res*=N; printf("%d",res); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156539/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156539/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %D = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %D) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %D, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %div = sdiv i32 %0, 100 %add = add nsw i32 %div, %0 store i32 %add, ptr %N, align 4, !tbaa !5 %1 = load i32, ptr %D, align 4, !tbaa !5 %cmp6 = icmp sgt i32 %1, 0 br i1 %cmp6, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %min.iters.check = icmp ult i32 %1, 8 br i1 %min.iters.check, label %for.body.preheader10, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i32 %1, -8 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %2, %vector.body ] %vec.phi9 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %3, %vector.body ] %2 = mul <4 x i32> %vec.phi, <i32 100, i32 100, i32 100, i32 100> %3 = mul <4 x i32> %vec.phi9, <i32 100, i32 100, i32 100, i32 100> %index.next = add nuw i32 %index, 8 %4 = icmp eq i32 %index.next, %n.vec br i1 %4, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %bin.rdx = mul <4 x i32> %3, %2 %5 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %1, %n.vec br i1 %cmp.n, label %for.end, label %for.body.preheader10 for.body.preheader10: ; preds = %for.body.preheader, %middle.block %i.08.ph = phi i32 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] %res.07.ph = phi i32 [ 1, %for.body.preheader ], [ %5, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader10, %for.body %i.08 = phi i32 [ %inc, %for.body ], [ %i.08.ph, %for.body.preheader10 ] %res.07 = phi i32 [ %mul, %for.body ], [ %res.07.ph, %for.body.preheader10 ] %mul = mul nsw i32 %res.07, 100 %inc = add nuw nsw i32 %i.08, 1 %exitcond.not = icmp eq i32 %inc, %1 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !13 for.end: ; preds = %for.body, %middle.block, %entry %res.0.lcssa = phi i32 [ 1, %entry ], [ %5, %middle.block ], [ %mul, %for.body ] %mul1 = mul nsw i32 %res.0.lcssa, %add %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %D) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.mul.v4i32(<4 x i32>) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = distinct !{!13, !10, !12, !11}
#include<stdio.h> int main(){ int a,b,c=1; scanf("%d %d",&a,&b); for(int i=0; i<a; i++){ c*=100; } if(b!=100){ printf("%d",c*b); }else{ printf("%d",c*101); } return 0;}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156582/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156582/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %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 %cmp9 = icmp sgt i32 %0, 0 br i1 %cmp9, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %entry %min.iters.check = icmp ult i32 %0, 8 br i1 %min.iters.check, label %for.body.preheader13, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i32 %0, -8 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %1, %vector.body ] %vec.phi12 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %2, %vector.body ] %1 = mul <4 x i32> %vec.phi, <i32 100, i32 100, i32 100, i32 100> %2 = mul <4 x i32> %vec.phi12, <i32 100, i32 100, i32 100, i32 100> %index.next = add nuw i32 %index, 8 %3 = icmp eq i32 %index.next, %n.vec br i1 %3, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %bin.rdx = mul <4 x i32> %2, %1 %4 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %0, %n.vec br i1 %cmp.n, label %for.cond.cleanup, label %for.body.preheader13 for.body.preheader13: ; preds = %for.body.preheader, %middle.block %i.011.ph = phi i32 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] %c.010.ph = phi i32 [ 1, %for.body.preheader ], [ %4, %middle.block ] br label %for.body for.cond.cleanup: ; preds = %for.body, %middle.block, %entry %c.0.lcssa = phi i32 [ 1, %entry ], [ %4, %middle.block ], [ %mul, %for.body ] %5 = load i32, ptr %b, align 4, !tbaa !5 %cmp1.not = icmp eq i32 %5, 100 %mul4.sink.v = select i1 %cmp1.not, i32 101, i32 %5 %mul4.sink = mul nsw i32 %c.0.lcssa, %mul4.sink.v %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul4.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 for.body: ; preds = %for.body.preheader13, %for.body %i.011 = phi i32 [ %inc, %for.body ], [ %i.011.ph, %for.body.preheader13 ] %c.010 = phi i32 [ %mul, %for.body ], [ %c.010.ph, %for.body.preheader13 ] %mul = mul nsw i32 %c.010, 100 %inc = add nuw nsw i32 %i.011, 1 %exitcond.not = icmp eq i32 %inc, %0 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !13 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.mul.v4i32(<4 x i32>) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = distinct !{!13, !10, !12, !11}
#include <stdio.h> int main(){ int D, N; scanf("%d%d", &D, &N); if(D==0) if(N!=100) printf("%d", N); else printf("101"); else if(D==1) if(N!=100) printf("%d", N*100); else printf("10100"); else if(N!=100) printf("%d", N*10000); else printf("1010000"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156625/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156625/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"101\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"10100\00", align 1 @.str.4 = private unnamed_addr constant [8 x i8] c"1010000\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %D = alloca i32, align 4 %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %D) #3 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 %D, ptr noundef nonnull %N) %0 = load i32, ptr %D, align 4, !tbaa !5 %1 = load i32, ptr %N, align 4, !tbaa !5 %cmp15.not = icmp eq i32 %1, 100 switch i32 %0, label %if.else14 [ i32 0, label %if.then i32 1, label %if.then7 ] if.then: ; preds = %entry br i1 %cmp15.not, label %if.else, label %if.then2 if.then2: ; preds = %if.then %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %1) br label %if.end23 if.else: ; preds = %if.then %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2) br label %if.end23 if.then7: ; preds = %entry br i1 %cmp15.not, label %if.else11, label %if.then9 if.then9: ; preds = %if.then7 %mul = mul nsw i32 %1, 100 %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul) br label %if.end23 if.else11: ; preds = %if.then7 %call12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3) br label %if.end23 if.else14: ; preds = %entry br i1 %cmp15.not, label %if.else19, label %if.then16 if.then16: ; preds = %if.else14 %mul17 = mul nsw i32 %1, 10000 %call18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul17) br label %if.end23 if.else19: ; preds = %if.else14 %call20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4) br label %if.end23 if.end23: ; preds = %if.else11, %if.then9, %if.else19, %if.then16, %if.then2, %if.else call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %D) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(){ int D,N; scanf("%d%d",&D,&N); if(N==100){ N++; } switch(D){ case 0: printf("%d",N); break; case 1: printf("%d",N*100); break; case 2: printf("%d",N*10000); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156669/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156669/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %D = alloca i32, align 4 %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %D) #3 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 %D, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %cmp = icmp eq i32 %0, 100 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 101, ptr %N, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %1 = phi i32 [ 101, %if.then ], [ %0, %entry ] %2 = load i32, ptr %D, align 4, !tbaa !5 switch i32 %2, label %sw.epilog [ i32 0, label %sw.epilog.sink.split i32 1, label %sw.bb2 i32 2, label %sw.bb4 ] sw.bb2: ; preds = %if.end %mul = mul nsw i32 %1, 100 br label %sw.epilog.sink.split sw.bb4: ; preds = %if.end %mul5 = mul nsw i32 %1, 10000 br label %sw.epilog.sink.split sw.epilog.sink.split: ; preds = %if.end, %sw.bb2, %sw.bb4 %mul5.sink = phi i32 [ %mul5, %sw.bb4 ], [ %mul, %sw.bb2 ], [ %1, %if.end ] %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul5.sink) br label %sw.epilog sw.epilog: ; preds = %sw.epilog.sink.split, %if.end call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %D) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int d, n; scanf("%d %d", &d, &n); if (d == 2) { if (n == 100) { printf("1010000\n"); }else { printf("%d\n", n * 10000); } }else if (d == 1) { if (n == 100) { printf("10100\n"); }else { printf("%d\n", n * 100); } }else { if (n == 100) { printf("101\n"); }else { printf("%d\n", n); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156711/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156711/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [4 x i8] c"101\00", align 1 @str.5 = private unnamed_addr constant [6 x i8] c"10100\00", align 1 @str.6 = private unnamed_addr constant [8 x i8] c"1010000\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %d = alloca i32, align 4 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #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 %d, ptr noundef nonnull %n) %0 = load i32, ptr %d, align 4, !tbaa !5 %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp16 = icmp eq i32 %1, 100 switch i32 %0, label %if.else15 [ i32 2, label %if.then i32 1, label %if.then7 ] if.then: ; preds = %entry br i1 %cmp16, label %if.then2, label %if.else if.then2: ; preds = %if.then %puts28 = call i32 @puts(ptr nonnull dereferenceable(1) @str.6) br label %if.end23 if.else: ; preds = %if.then %mul = mul nsw i32 %1, 10000 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %mul) br label %if.end23 if.then7: ; preds = %entry br i1 %cmp16, label %if.then9, label %if.else11 if.then9: ; preds = %if.then7 %puts27 = call i32 @puts(ptr nonnull dereferenceable(1) @str.5) br label %if.end23 if.else11: ; preds = %if.then7 %mul12 = mul nsw i32 %1, 100 %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %mul12) br label %if.end23 if.else15: ; preds = %entry br i1 %cmp16, label %if.then17, label %if.else19 if.then17: ; preds = %if.else15 %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end23 if.else19: ; preds = %if.else15 %call20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %1) br label %if.end23 if.end23: ; preds = %if.else11, %if.then9, %if.else19, %if.then17, %if.then2, %if.else call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(int argc, char const *argv[]) { int D,N; scanf("%d %d",&D,&N ); if(D==0){ if(N<100) printf("%d",N ); else if(N==100) printf("%d",N+1 ); } else if(D==1){ if(N<100) printf("%d",N*100 ); else if(N==100) printf("%d",N*100+100 ); return 0; } else if(D==2){ if(N<100) printf("%d",N*10000 ); else if(N==100) printf("%d",N*10000+10000 ); return 0; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156755/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156755/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %D = alloca i32, align 4 %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %D) #3 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 %D, ptr noundef nonnull %N) %0 = load i32, ptr %D, align 4, !tbaa !5 switch i32 %0, label %cleanup [ i32 0, label %if.then i32 1, label %if.then10 i32 2, label %if.then24 ] if.then: ; preds = %entry %1 = load i32, ptr %N, align 4, !tbaa !5 %cmp1 = icmp slt i32 %1, 100 br i1 %cmp1, label %cleanup.sink.split, label %if.else if.else: ; preds = %if.then %cmp4 = icmp eq i32 %1, 100 br i1 %cmp4, label %cleanup.sink.split, label %cleanup if.then10: ; preds = %entry %2 = load i32, ptr %N, align 4, !tbaa !5 %cmp11 = icmp slt i32 %2, 100 br i1 %cmp11, label %if.then12, label %if.else14 if.then12: ; preds = %if.then10 %mul = mul nsw i32 %2, 100 br label %cleanup.sink.split if.else14: ; preds = %if.then10 %cmp15 = icmp eq i32 %2, 100 br i1 %cmp15, label %cleanup.sink.split, label %cleanup if.then24: ; preds = %entry %3 = load i32, ptr %N, align 4, !tbaa !5 %cmp25 = icmp slt i32 %3, 100 br i1 %cmp25, label %if.then26, label %if.else29 if.then26: ; preds = %if.then24 %mul27 = mul nsw i32 %3, 10000 br label %cleanup.sink.split if.else29: ; preds = %if.then24 %cmp30 = icmp eq i32 %3, 100 br i1 %cmp30, label %cleanup.sink.split, label %cleanup cleanup.sink.split: ; preds = %if.else29, %if.else14, %if.else, %if.then, %if.then12, %if.then26 %.sink = phi i32 [ %mul27, %if.then26 ], [ %mul, %if.then12 ], [ %1, %if.then ], [ 101, %if.else ], [ 10100, %if.else14 ], [ 1010000, %if.else29 ] %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.sink) br label %cleanup cleanup: ; preds = %cleanup.sink.split, %if.else, %entry, %if.else29, %if.else14 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %D) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main() { int d, n; scanf("%d %d", &d, &n); if(d==0&&n==100) printf("101"); else if(d==0) printf("%d", n); if(d==1&&n==100) printf("10100"); else if(d==1) printf("%d", 100*n); if(d==2&&n==100) printf("1010000"); else if(d==2) printf("%d", 10000*n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156805/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156805/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"101\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"10100\00", align 1 @.str.4 = private unnamed_addr constant [8 x i8] c"1010000\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %d = alloca i32, align 4 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #3 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 %d, ptr noundef nonnull %n) %0 = load i32, ptr %d, align 4, !tbaa !5 %cmp = icmp eq i32 %0, 0 %1 = load i32, ptr %n, align 4 %cmp1 = icmp eq i32 %1, 100 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %if.then, label %if.else if.then: ; preds = %entry %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1) br label %if.end6 if.else: ; preds = %entry br i1 %cmp, label %if.then4, label %if.end6 if.then4: ; preds = %if.else %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %1) br label %if.end6 if.end6: ; preds = %if.else, %if.then4, %if.then %2 = load i32, ptr %d, align 4, !tbaa !5 %cmp7 = icmp eq i32 %2, 1 %3 = load i32, ptr %n, align 4 %cmp9 = icmp eq i32 %3, 100 %or.cond30 = select i1 %cmp7, i1 %cmp9, i1 false br i1 %or.cond30, label %if.then10, label %if.else12 if.then10: ; preds = %if.end6 %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3) br label %if.end17 if.else12: ; preds = %if.end6 br i1 %cmp7, label %if.then14, label %if.end17 if.then14: ; preds = %if.else12 %mul = mul nsw i32 %3, 100 %call15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %mul) br label %if.end17 if.end17: ; preds = %if.else12, %if.then14, %if.then10 %4 = load i32, ptr %d, align 4, !tbaa !5 %cmp18 = icmp eq i32 %4, 2 %5 = load i32, ptr %n, align 4 %cmp20 = icmp eq i32 %5, 100 %or.cond31 = select i1 %cmp18, i1 %cmp20, i1 false br i1 %or.cond31, label %if.then21, label %if.else23 if.then21: ; preds = %if.end17 %call22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4) br label %if.end29 if.else23: ; preds = %if.end17 br i1 %cmp18, label %if.then25, label %if.end29 if.then25: ; preds = %if.else23 %mul26 = mul nsw i32 %5, 10000 %call27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %mul26) br label %if.end29 if.end29: ; preds = %if.else23, %if.then25, %if.then21 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <string.h> #define WIDTH 3001 #define HEIGHT 51 int dp[HEIGHT * WIDTH]; int main(void) { int i, j, k; int n, m, s; while(scanf("%d%d%d", &n, &m, &s), n){ n *= n; dp[0] = 1; for(i=1; i<WIDTH*HEIGHT; ++i) dp[i] = 0; for(i=1; i<=m; ++i){ for(j=n; j>=0; --j){ for(k=s; k>=0; --k){ if(j && i <= k){ dp[j*WIDTH + k] = (dp[j*WIDTH + k] + dp[(j-1)*WIDTH + k-i]) % 100000; } } } } printf("%d\n", dp[n*WIDTH + s]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156849/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156849/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @dp = dso_local local_unnamed_addr global [153051 x i32] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 %s = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #4 %call74 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m, ptr noundef nonnull %s) %0 = load i32, ptr %n, align 4, !tbaa !5 %tobool.not75 = icmp eq i32 %0, 0 br i1 %tobool.not75, label %while.end, label %while.body while.body: ; preds = %entry, %for.end32 %1 = phi i32 [ %12, %for.end32 ], [ %0, %entry ] %mul = mul nsw i32 %1, %1 %mul.fr = freeze i32 %mul store i32 %mul.fr, ptr %n, align 4, !tbaa !5 store i32 1, ptr @dp, align 16, !tbaa !5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(612200) getelementptr inbounds ([153051 x i32], ptr @dp, i64 0, i64 1), i8 0, i64 612200, i1 false), !tbaa !5 %2 = load i32, ptr %m, align 4, !tbaa !5 %cmp2.not65 = icmp sgt i32 %2, 0 %.pre = load i32, ptr %s, align 4 %cmp855 = icmp sgt i32 %.pre, -1 %or.cond = select i1 %cmp2.not65, i1 %cmp855, i1 false br i1 %or.cond, label %for.cond4.preheader.us.us.preheader, label %for.end32 for.cond4.preheader.us.us.preheader: ; preds = %while.body %3 = zext i32 %.pre to i64 %4 = add nuw i32 %2, 1 %wide.trip.count = zext i32 %4 to i64 br label %for.cond4.preheader.us.us for.cond4.preheader.us.us: ; preds = %for.cond4.preheader.us.us.preheader, %for.cond4.for.inc30_crit_edge.split.us.us.us %indvars.iv82 = phi i64 [ 1, %for.cond4.preheader.us.us.preheader ], [ %indvars.iv.next83, %for.cond4.for.inc30_crit_edge.split.us.us.us ] %5 = trunc i64 %indvars.iv82 to i32 br label %for.body6.us.us.us for.body6.us.us.us: ; preds = %for.cond7.for.inc27_crit_edge.us.us.us, %for.cond4.preheader.us.us %j.058.us.us.us = phi i32 [ %mul.fr, %for.cond4.preheader.us.us ], [ %dec28.us.us.us, %for.cond7.for.inc27_crit_edge.us.us.us ] %tobool10.not.us.us.us = icmp eq i32 %j.058.us.us.us, 0 %mul12.us.us.us = mul nsw i32 %j.058.us.us.us, 3001 %reass.sub = sub i32 %mul12.us.us.us, %5 %add16.us.us.us = add i32 %reass.sub, -3001 br i1 %tobool10.not.us.us.us, label %for.cond4.for.inc30_crit_edge.split.us.us.us, label %for.body9.us59.us.us.preheader for.body9.us59.us.us.preheader: ; preds = %for.body6.us.us.us %6 = sext i32 %mul12.us.us.us to i64 br label %for.body9.us59.us.us for.body9.us59.us.us: ; preds = %for.body9.us59.us.us.preheader, %for.inc25.us.us.us %indvars.iv = phi i64 [ %3, %for.body9.us59.us.us.preheader ], [ %indvars.iv.next, %for.inc25.us.us.us ] %cmp11.not.us.us.us = icmp sgt i64 %indvars.iv82, %indvars.iv br i1 %cmp11.not.us.us.us, label %for.inc25.us.us.us, label %if.then.us.us.us if.then.us.us.us: ; preds = %for.body9.us59.us.us %7 = add nsw i64 %indvars.iv, %6 %arrayidx14.us.us.us = getelementptr inbounds [153051 x i32], ptr @dp, i64 0, i64 %7 %8 = load i32, ptr %arrayidx14.us.us.us, align 4, !tbaa !5 %9 = trunc i64 %indvars.iv to i32 %sub17.us.us.us = add i32 %add16.us.us.us, %9 %idxprom18.us.us.us = sext i32 %sub17.us.us.us to i64 %arrayidx19.us.us.us = getelementptr inbounds [153051 x i32], ptr @dp, i64 0, i64 %idxprom18.us.us.us %10 = load i32, ptr %arrayidx19.us.us.us, align 4, !tbaa !5 %add20.us.us.us = add nsw i32 %10, %8 %rem.us.us.us = srem i32 %add20.us.us.us, 100000 store i32 %rem.us.us.us, ptr %arrayidx14.us.us.us, align 4, !tbaa !5 br label %for.inc25.us.us.us for.inc25.us.us.us: ; preds = %if.then.us.us.us, %for.body9.us59.us.us %indvars.iv.next = add nsw i64 %indvars.iv, -1 %cmp8.us62.us.us = icmp sgt i64 %indvars.iv, 0 br i1 %cmp8.us62.us.us, label %for.body9.us59.us.us, label %for.cond7.for.inc27_crit_edge.us.us.us, !llvm.loop !9 for.cond7.for.inc27_crit_edge.us.us.us: ; preds = %for.inc25.us.us.us %dec28.us.us.us = add i32 %j.058.us.us.us, -1 %cmp5.us.us.us = icmp sgt i32 %dec28.us.us.us, -1 br i1 %cmp5.us.us.us, label %for.body6.us.us.us, label %for.cond4.for.inc30_crit_edge.split.us.us.us, !llvm.loop !11 for.cond4.for.inc30_crit_edge.split.us.us.us: ; preds = %for.body6.us.us.us, %for.cond7.for.inc27_crit_edge.us.us.us %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1 %exitcond.not = icmp eq i64 %indvars.iv.next83, %wide.trip.count br i1 %exitcond.not, label %for.end32, label %for.cond4.preheader.us.us, !llvm.loop !12 for.end32: ; preds = %for.cond4.for.inc30_crit_edge.split.us.us.us, %while.body %mul33 = mul nsw i32 %mul.fr, 3001 %add34 = add nsw i32 %.pre, %mul33 %idxprom35 = sext i32 %add34 to i64 %arrayidx36 = getelementptr inbounds [153051 x i32], ptr @dp, i64 0, i64 %idxprom35 %11 = load i32, ptr %arrayidx36, align 4, !tbaa !5 %call37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %11) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m, ptr noundef nonnull %s) %12 = load i32, ptr %n, align 4, !tbaa !5 %tobool.not = icmp eq i32 %12, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !13 while.end: ; preds = %for.end32, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include <stdio.h> int main(void) { int i; int cup[4] = {1}; char c[2]; while (scanf("%c,%c", &c[0], &c[1]) != EOF){ if (c[0] =='A' && c[1] =='B' || c[0] =='B' && c[1] =='A'){ cup[3] = cup[0]; cup[0] = cup[1]; cup[1] = cup[3]; } else if (c[0] =='A' && c[1] =='C' || c[0] =='C' && c[1] =='A'){ cup[3] = cup[0]; cup[0] = cup[2]; cup[2] = cup[3]; } else if (c[0] =='B' && c[1] =='C' || c[0] =='C' && c[1] =='B'){ cup[3] = cup[1]; cup[1] = cup[2]; cup[2] = cup[3]; } } for (i = 0; i < 3; i++){ if (cup[i] == 1){ switch (i){ case 0: printf("A\n"); break; case 1: printf("B\n"); break; case 2: printf("C\n"); break; } } } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156892/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156892/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%c,%c\00", align 1 @str = private unnamed_addr constant [2 x i8] c"C\00", align 1 @str.4 = private unnamed_addr constant [2 x i8] c"B\00", align 1 @str.5 = private unnamed_addr constant [2 x i8] c"A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %c = alloca [2 x i8], align 1 call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %c) #4 %arrayidx1 = getelementptr inbounds [2 x i8], ptr %c, i64 0, i64 1 %call102 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c, ptr noundef nonnull %arrayidx1) %cmp.not103 = icmp eq i32 %call102, -1 br i1 %cmp.not103, label %for.inc.2.sink.split, label %while.body for.cond.preheader: ; preds = %if.end78 %0 = icmp eq i32 %10, 1 %1 = icmp eq i32 %9, 1 %2 = icmp eq i32 %8, 1 br i1 %0, label %sw.bb, label %for.inc while.body: ; preds = %entry, %if.end78 %3 = phi i32 [ %8, %if.end78 ], [ 0, %entry ] %4 = phi i32 [ %9, %if.end78 ], [ 0, %entry ] %5 = phi i32 [ %10, %if.end78 ], [ 1, %entry ] %6 = load i8, ptr %c, align 1, !tbaa !5 %cmp3 = icmp eq i8 %6, 65 %7 = load i8, ptr %arrayidx1, align 1 %cmp7 = icmp eq i8 %7, 66 %or.cond = select i1 %cmp3, i1 %cmp7, i1 false br i1 %or.cond, label %if.end78, label %lor.lhs.false lor.lhs.false: ; preds = %while.body %cmp11 = icmp eq i8 %6, 66 %cmp16 = icmp eq i8 %7, 65 %or.cond91 = select i1 %cmp11, i1 %cmp16, i1 false br i1 %or.cond91, label %if.end78, label %if.else if.else: ; preds = %lor.lhs.false %cmp31 = icmp eq i8 %7, 67 %or.cond92 = select i1 %cmp3, i1 %cmp31, i1 false br i1 %or.cond92, label %if.end78, label %lor.lhs.false33 lor.lhs.false33: ; preds = %if.else %cmp36 = icmp eq i8 %6, 67 %or.cond93 = select i1 %cmp36, i1 %cmp16, i1 false br i1 %or.cond93, label %if.end78, label %if.else50 if.else50: ; preds = %lor.lhs.false33 %or.cond94 = select i1 %cmp11, i1 %cmp31, i1 false %or.cond95 = select i1 %cmp36, i1 %cmp7, i1 false %or.cond101 = select i1 %or.cond94, i1 true, i1 %or.cond95 %spec.select = select i1 %or.cond101, i32 %4, i32 %3 %spec.select128 = select i1 %or.cond101, i32 %3, i32 %4 br label %if.end78 if.end78: ; preds = %if.else50, %if.else, %lor.lhs.false33, %while.body, %lor.lhs.false %8 = phi i32 [ %3, %lor.lhs.false ], [ %3, %while.body ], [ %5, %lor.lhs.false33 ], [ %5, %if.else ], [ %spec.select, %if.else50 ] %9 = phi i32 [ %5, %lor.lhs.false ], [ %5, %while.body ], [ %4, %lor.lhs.false33 ], [ %4, %if.else ], [ %spec.select128, %if.else50 ] %10 = phi i32 [ %4, %lor.lhs.false ], [ %4, %while.body ], [ %3, %lor.lhs.false33 ], [ %3, %if.else ], [ %5, %if.else50 ] %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c, ptr noundef nonnull %arrayidx1) %cmp.not = icmp eq i32 %call, -1 br i1 %cmp.not, label %for.cond.preheader, label %while.body, !llvm.loop !8 sw.bb: ; preds = %for.cond.preheader %puts100 = call i32 @puts(ptr nonnull dereferenceable(1) @str.5) br i1 %1, label %sw.bb86.1, label %for.inc.1 for.inc: ; preds = %for.cond.preheader br i1 %1, label %sw.bb86.1, label %for.inc.1 sw.bb86.1: ; preds = %for.inc, %sw.bb %puts99.1 = call i32 @puts(ptr nonnull dereferenceable(1) @str.4) br i1 %2, label %for.inc.2.sink.split, label %for.inc.2 for.inc.1: ; preds = %sw.bb, %for.inc br i1 %2, label %for.inc.2.sink.split, label %for.inc.2 for.inc.2.sink.split: ; preds = %sw.bb86.1, %for.inc.1, %entry %str.5.sink = phi ptr [ @str.5, %entry ], [ @str, %for.inc.1 ], [ @str, %sw.bb86.1 ] %puts100124 = call i32 @puts(ptr nonnull dereferenceable(1) %str.5.sink) br label %for.inc.2 for.inc.2: ; preds = %for.inc.2.sink.split, %sw.bb86.1, %for.inc.1 call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %c) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <stdlib.h> #include <math.h> int main() { long long x,y,x1,y1,sum=0,g; scanf("%I64d%I64d%I64d%I64d",&x,&y,&x1,&y1); g=abs(abs(x-x1)-abs(y-y1)); if(abs(x-x1)>abs(y-y1)) sum=g+abs(y-y1); else sum=g+abs(x-x1); printf("%I64d",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15695/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15695/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [21 x i8] c"%I64d%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: %x = alloca i64, align 8 %y = alloca i64, align 8 %x1 = alloca i64, align 8 %y1 = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x) #5 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %y) #5 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x1) #5 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %y1) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y, ptr noundef nonnull %x1, ptr noundef nonnull %y1) %0 = load i64, ptr %x, align 8, !tbaa !5 %1 = load i64, ptr %x1, align 8, !tbaa !5 %sub = sub nsw i64 %0, %1 %conv = trunc i64 %sub to i32 %2 = call i32 @llvm.abs.i32(i32 %conv, i1 true) %3 = load i64, ptr %y, align 8, !tbaa !5 %4 = load i64, ptr %y1, align 8, !tbaa !5 %sub1 = sub nsw i64 %3, %4 %conv2 = trunc i64 %sub1 to i32 %5 = call i32 @llvm.abs.i32(i32 %conv2, i1 true) %. = call i32 @llvm.umin.i32(i32 %2, i32 %5) %sub3 = sub nsw i32 %2, %5 %6 = call i32 @llvm.abs.i32(i32 %sub3, i1 true) %sum.0.in = add nuw i32 %6, %. %sum.0 = zext i32 %sum.0.in to i64 %call17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %sum.0) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %y1) #5 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %x1) #5 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %y) #5 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %x) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umin.i32(i32, i32) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <math.h> int main(void){ char ball='A',c1,c2; while(scanf(" %c,%c",&c1,&c2)!=EOF){ if(c1==ball)ball=c2; else if(c2==ball)ball=c1; } printf("%c\n",ball); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157006/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157006/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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" %c,%c\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%c\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %c1 = alloca i8, align 1 %c2 = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c1) #3 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c2) #3 %call14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c1, ptr noundef nonnull %c2) %cmp.not15 = icmp eq i32 %call14, -1 br i1 %cmp.not15, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %ball.016 = phi i8 [ %ball.1, %while.body ], [ 65, %entry ] %0 = load i8, ptr %c1, align 1, !tbaa !5 %cmp2 = icmp eq i8 %0, %ball.016 %1 = load i8, ptr %c2, align 1 %cmp6 = icmp eq i8 %1, %ball.016 %spec.select = select i1 %cmp6, i8 %0, i8 %ball.016 %ball.1 = select i1 %cmp2, i8 %1, i8 %spec.select %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c1, ptr noundef nonnull %c2) %cmp.not = icmp eq i32 %call, -1 br i1 %cmp.not, label %while.end.loopexit, label %while.body, !llvm.loop !8 while.end.loopexit: ; preds = %while.body %2 = sext i8 %ball.1 to i32 br label %while.end while.end: ; preds = %while.end.loopexit, %entry %ball.0.lcssa = phi i32 [ 65, %entry ], [ %2, %while.end.loopexit ] %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ball.0.lcssa) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c2) #3 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c1) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #define N 3000 double dp[N][N];//i枚目まで見てj枚表の確立 double coin[N]; int main(void){ int i; int j; int n; double ans =0; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%lf",&coin[i]); } dp[0][0]=1.0; for(i=0;i<n;i++){ dp[i+1][0]=dp[i][0]*(1.0-coin[i+1]); } for(i=0;i<n;i++){ for(j=0;j<n;j++){ dp[i+1][j+1]=dp[i][j]*coin[i+1]+dp[i][j+1]*(1.0-coin[i+1]); } } for(j=(n+1)/2;j<=n;j++){ ans += dp[n][j]; } printf("%.10lf",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157079/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157079/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%lf\00", align 1 @coin = dso_local global [3000 x double] zeroinitializer, align 16 @dp = dso_local local_unnamed_addr global [3000 x [3000 x double]] zeroinitializer, align 16 @.str.2 = private unnamed_addr constant [7 x i8] c"%.10lf\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not89 = icmp slt i32 %0, 1 br i1 %cmp.not89, label %for.end.thread, label %for.body for.end.thread: ; preds = %entry store double 1.000000e+00, ptr @dp, align 16, !tbaa !9 br label %for.end52 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 1, %entry ] %arrayidx = getelementptr inbounds [3000 x double], ptr @coin, 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 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp.not.not = icmp slt i64 %indvars.iv, %2 br i1 %cmp.not.not, label %for.body, label %for.end, !llvm.loop !11 for.end: ; preds = %for.body store double 1.000000e+00, ptr @dp, align 16, !tbaa !9 %cmp391 = icmp sgt i32 %1, 0 br i1 %cmp391, label %for.body4.preheader, label %for.end52 for.body4.preheader: ; preds = %for.end %wide.trip.count = zext i32 %1 to i64 %xtraiter = and i64 %wide.trip.count, 1 %3 = icmp eq i32 %1, 1 br i1 %3, label %for.cond17.preheader.unr-lcssa, label %for.body4.preheader.new for.body4.preheader.new: ; preds = %for.body4.preheader %unroll_iter = and i64 %wide.trip.count, 4294967294 br label %for.body4 for.cond17.preheader.unr-lcssa.loopexit: ; preds = %for.body4 %4 = add nuw nsw i64 %indvars.iv103, 3 br label %for.cond17.preheader.unr-lcssa for.cond17.preheader.unr-lcssa: ; preds = %for.cond17.preheader.unr-lcssa.loopexit, %for.body4.preheader %.unr = phi double [ 1.000000e+00, %for.body4.preheader ], [ %mul.1, %for.cond17.preheader.unr-lcssa.loopexit ] %indvars.iv103.unr = phi i64 [ 1, %for.body4.preheader ], [ %4, %for.cond17.preheader.unr-lcssa.loopexit ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond17.preheader, label %for.body4.epil for.body4.epil: ; preds = %for.cond17.preheader.unr-lcssa %arrayidx9.epil = getelementptr inbounds [3000 x double], ptr @coin, i64 0, i64 %indvars.iv103.unr %5 = load double, ptr %arrayidx9.epil, align 8, !tbaa !9 %sub.epil = fsub double 1.000000e+00, %5 %mul.epil = fmul double %.unr, %sub.epil %arrayidx12.epil = getelementptr inbounds [3000 x [3000 x double]], ptr @dp, i64 0, i64 %indvars.iv103.unr store double %mul.epil, ptr %arrayidx12.epil, align 16, !tbaa !9 br label %for.cond17.preheader for.cond17.preheader: ; preds = %for.cond17.preheader.unr-lcssa, %for.body4.epil br i1 %cmp391, label %for.cond20.preheader.us.preheader, label %for.end52 for.cond20.preheader.us.preheader: ; preds = %for.cond17.preheader %wide.trip.count114 = zext i32 %1 to i64 %min.iters.check = icmp ult i32 %1, 2 %n.vec = and i64 %wide.trip.count, 4294967294 %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br label %for.cond20.preheader.us for.cond20.preheader.us: ; preds = %for.cond20.preheader.us.preheader, %for.cond20.for.inc50_crit_edge.us %indvars.iv111 = phi i64 [ 0, %for.cond20.preheader.us.preheader ], [ %indvars.iv.next112, %for.cond20.for.inc50_crit_edge.us ] %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1 %arrayidx29.us = getelementptr inbounds [3000 x double], ptr @coin, i64 0, i64 %indvars.iv.next112 %6 = load double, ptr %arrayidx29.us, align 8, !tbaa !9 %sub39.us = fsub double 1.000000e+00, %6 %arrayidx26.us.phi.trans.insert = getelementptr inbounds [3000 x [3000 x double]], ptr @dp, i64 0, i64 %indvars.iv111, i64 0 %.pre = load double, ptr %arrayidx26.us.phi.trans.insert, align 16, !tbaa !9 br i1 %min.iters.check, label %for.body22.us.preheader, label %vector.ph vector.ph: ; preds = %for.cond20.preheader.us %vector.recur.init = insertelement <2 x double> poison, double %.pre, i64 1 %broadcast.splatinsert = insertelement <2 x double> poison, double %sub39.us, i64 0 %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer %broadcast.splatinsert127 = insertelement <2 x double> poison, double %6, i64 0 %broadcast.splat128 = shufflevector <2 x double> %broadcast.splatinsert127, <2 x double> poison, <2 x i32> zeroinitializer br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vector.recur = phi <2 x double> [ %vector.recur.init, %vector.ph ], [ %wide.load, %vector.body ] %7 = or i64 %index, 1 %8 = getelementptr inbounds [3000 x [3000 x double]], ptr @dp, i64 0, i64 %indvars.iv111, i64 %7 %wide.load = load <2 x double>, ptr %8, align 8, !tbaa !9 %9 = shufflevector <2 x double> %vector.recur, <2 x double> %wide.load, <2 x i32> <i32 1, i32 2> %10 = fmul <2 x double> %wide.load, %broadcast.splat %11 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %9, <2 x double> %broadcast.splat128, <2 x double> %10) %12 = getelementptr inbounds [3000 x [3000 x double]], ptr @dp, i64 0, i64 %indvars.iv.next112, i64 %7 store <2 x double> %11, ptr %12, align 8, !tbaa !9 %index.next = add nuw i64 %index, 2 %13 = icmp eq i64 %index.next, %n.vec br i1 %13, label %middle.block, label %vector.body, !llvm.loop !13 middle.block: ; preds = %vector.body %vector.recur.extract = extractelement <2 x double> %wide.load, i64 1 br i1 %cmp.n, label %for.cond20.for.inc50_crit_edge.us, label %for.body22.us.preheader for.body22.us.preheader: ; preds = %for.cond20.preheader.us, %middle.block %scalar.recur.ph = phi double [ %vector.recur.extract, %middle.block ], [ %.pre, %for.cond20.preheader.us ] %indvars.iv106.ph = phi i64 [ %n.vec, %middle.block ], [ 0, %for.cond20.preheader.us ] br label %for.body22.us for.body22.us: ; preds = %for.body22.us.preheader, %for.body22.us %scalar.recur = phi double [ %14, %for.body22.us ], [ %scalar.recur.ph, %for.body22.us.preheader ] %indvars.iv106 = phi i64 [ %indvars.iv.next107, %for.body22.us ], [ %indvars.iv106.ph, %for.body22.us.preheader ] %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1 %arrayidx35.us = getelementptr inbounds [3000 x [3000 x double]], ptr @dp, i64 0, i64 %indvars.iv111, i64 %indvars.iv.next107 %14 = load double, ptr %arrayidx35.us, align 8, !tbaa !9 %mul40.us = fmul double %14, %sub39.us %15 = call double @llvm.fmuladd.f64(double %scalar.recur, double %6, double %mul40.us) %arrayidx46.us = getelementptr inbounds [3000 x [3000 x double]], ptr @dp, i64 0, i64 %indvars.iv.next112, i64 %indvars.iv.next107 store double %15, ptr %arrayidx46.us, align 8, !tbaa !9 %exitcond110.not = icmp eq i64 %indvars.iv.next107, %wide.trip.count114 br i1 %exitcond110.not, label %for.cond20.for.inc50_crit_edge.us, label %for.body22.us, !llvm.loop !16 for.cond20.for.inc50_crit_edge.us: ; preds = %for.body22.us, %middle.block %exitcond115.not = icmp eq i64 %indvars.iv.next112, %wide.trip.count114 br i1 %exitcond115.not, label %for.end52, label %for.cond20.preheader.us, !llvm.loop !17 for.body4: ; preds = %for.body4, %for.body4.preheader.new %16 = phi double [ 1.000000e+00, %for.body4.preheader.new ], [ %mul.1, %for.body4 ] %indvars.iv103 = phi i64 [ 0, %for.body4.preheader.new ], [ %indvars.iv.next104.1, %for.body4 ] %niter = phi i64 [ 0, %for.body4.preheader.new ], [ %niter.next.1, %for.body4 ] %indvars.iv.next104 = or i64 %indvars.iv103, 1 %arrayidx9 = getelementptr inbounds [3000 x double], ptr @coin, i64 0, i64 %indvars.iv.next104 %17 = load double, ptr %arrayidx9, align 8, !tbaa !9 %sub = fsub double 1.000000e+00, %17 %mul = fmul double %16, %sub %arrayidx12 = getelementptr inbounds [3000 x [3000 x double]], ptr @dp, i64 0, i64 %indvars.iv.next104 store double %mul, ptr %arrayidx12, align 16, !tbaa !9 %indvars.iv.next104.1 = add nuw nsw i64 %indvars.iv103, 2 %arrayidx9.1 = getelementptr inbounds [3000 x double], ptr @coin, i64 0, i64 %indvars.iv.next104.1 %18 = load double, ptr %arrayidx9.1, align 16, !tbaa !9 %sub.1 = fsub double 1.000000e+00, %18 %mul.1 = fmul double %mul, %sub.1 %arrayidx12.1 = getelementptr inbounds [3000 x [3000 x double]], ptr @dp, i64 0, i64 %indvars.iv.next104.1 store double %mul.1, ptr %arrayidx12.1, align 16, !tbaa !9 %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.cond17.preheader.unr-lcssa.loopexit, label %for.body4, !llvm.loop !18 for.end52: ; preds = %for.cond20.for.inc50_crit_edge.us, %for.end, %for.end.thread, %for.cond17.preheader %.lcssa122126 = phi i32 [ %1, %for.cond17.preheader ], [ %1, %for.end ], [ %0, %for.end.thread ], [ %1, %for.cond20.for.inc50_crit_edge.us ] %add53 = add nsw i32 %.lcssa122126, 1 %div = sdiv i32 %add53, 2 %cmp55.not97 = icmp sgt i32 %div, %.lcssa122126 br i1 %cmp55.not97, label %for.end64, label %for.body56.lr.ph for.body56.lr.ph: ; preds = %for.end52 %idxprom57 = sext i32 %.lcssa122126 to i64 %19 = sext i32 %div to i64 %20 = add i32 %.lcssa122126, 1 %21 = sub i32 %20, %div %22 = sub i32 %.lcssa122126, %div %xtraiter129 = and i32 %21, 3 %lcmp.mod130.not = icmp eq i32 %xtraiter129, 0 br i1 %lcmp.mod130.not, label %for.body56.prol.loopexit, label %for.body56.prol for.body56.prol: ; preds = %for.body56.lr.ph, %for.body56.prol %indvars.iv116.prol = phi i64 [ %indvars.iv.next117.prol, %for.body56.prol ], [ %19, %for.body56.lr.ph ] %ans.099.prol = phi double [ %add61.prol, %for.body56.prol ], [ 0.000000e+00, %for.body56.lr.ph ] %prol.iter = phi i32 [ %prol.iter.next, %for.body56.prol ], [ 0, %for.body56.lr.ph ] %arrayidx60.prol = getelementptr inbounds [3000 x [3000 x double]], ptr @dp, i64 0, i64 %idxprom57, i64 %indvars.iv116.prol %23 = load double, ptr %arrayidx60.prol, align 8, !tbaa !9 %add61.prol = fadd double %ans.099.prol, %23 %indvars.iv.next117.prol = add nsw i64 %indvars.iv116.prol, 1 %prol.iter.next = add i32 %prol.iter, 1 %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter129 br i1 %prol.iter.cmp.not, label %for.body56.prol.loopexit, label %for.body56.prol, !llvm.loop !19 for.body56.prol.loopexit: ; preds = %for.body56.prol, %for.body56.lr.ph %add61.lcssa.unr = phi double [ undef, %for.body56.lr.ph ], [ %add61.prol, %for.body56.prol ] %indvars.iv116.unr = phi i64 [ %19, %for.body56.lr.ph ], [ %indvars.iv.next117.prol, %for.body56.prol ] %ans.099.unr = phi double [ 0.000000e+00, %for.body56.lr.ph ], [ %add61.prol, %for.body56.prol ] %24 = icmp ult i32 %22, 3 br i1 %24, label %for.end64, label %for.body56 for.body56: ; preds = %for.body56.prol.loopexit, %for.body56 %indvars.iv116 = phi i64 [ %indvars.iv.next117.3, %for.body56 ], [ %indvars.iv116.unr, %for.body56.prol.loopexit ] %ans.099 = phi double [ %add61.3, %for.body56 ], [ %ans.099.unr, %for.body56.prol.loopexit ] %arrayidx60 = getelementptr inbounds [3000 x [3000 x double]], ptr @dp, i64 0, i64 %idxprom57, i64 %indvars.iv116 %25 = load double, ptr %arrayidx60, align 8, !tbaa !9 %add61 = fadd double %ans.099, %25 %indvars.iv.next117 = add nsw i64 %indvars.iv116, 1 %arrayidx60.1 = getelementptr inbounds [3000 x [3000 x double]], ptr @dp, i64 0, i64 %idxprom57, i64 %indvars.iv.next117 %26 = load double, ptr %arrayidx60.1, align 8, !tbaa !9 %add61.1 = fadd double %add61, %26 %indvars.iv.next117.1 = add nsw i64 %indvars.iv116, 2 %arrayidx60.2 = getelementptr inbounds [3000 x [3000 x double]], ptr @dp, i64 0, i64 %idxprom57, i64 %indvars.iv.next117.1 %27 = load double, ptr %arrayidx60.2, align 8, !tbaa !9 %add61.2 = fadd double %add61.1, %27 %indvars.iv.next117.2 = add nsw i64 %indvars.iv116, 3 %arrayidx60.3 = getelementptr inbounds [3000 x [3000 x double]], ptr @dp, i64 0, i64 %idxprom57, i64 %indvars.iv.next117.2 %28 = load double, ptr %arrayidx60.3, align 8, !tbaa !9 %add61.3 = fadd double %add61.2, %28 %indvars.iv.next117.3 = add nsw i64 %indvars.iv116, 4 %lftr.wideiv.3 = trunc i64 %indvars.iv.next117.3 to i32 %exitcond119.not.3 = icmp eq i32 %add53, %lftr.wideiv.3 br i1 %exitcond119.not.3, label %for.end64, label %for.body56, !llvm.loop !21 for.end64: ; preds = %for.body56.prol.loopexit, %for.body56, %for.end52 %ans.0.lcssa = phi double [ 0.000000e+00, %for.end52 ], [ %add61.lcssa.unr, %for.body56.prol.loopexit ], [ %add61.3, %for.body56 ] %call65 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %ans.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare double @llvm.fmuladd.f64(double, double, double) #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"double", !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 = distinct !{!16, !12, !15, !14} !17 = distinct !{!17, !12} !18 = distinct !{!18, !12} !19 = distinct !{!19, !20} !20 = !{!"llvm.loop.unroll.disable"} !21 = distinct !{!21, !12}
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> #define rep(i, n) for(int i=0; i<(n); ++i) #define max 200001 //qsort(str, n, sizeof(int), up_comp); int up_comp(const void *a, const void *b){return *(int*)a - *(int*)b;} int down_comp(const void *a, const void *b){return *(int*)b - *(int*)a;} int int_sort( const void * a , const void * b ) {return strcmp(( char * )a , ( char * )b );} int count_digit(int a){int i=0;while(a!=0){a=a/10;i++;}return i;} int euclid( int a, int b ){int temp;if(a<b){temp=a;a=b;b=temp;}if(b<1)return -1;if(a%b==0) return b;return euclid(b,a%b);} int main(void){ char s[2]; scanf("%s", s); if (!strcmp(s, "A")) { printf("T"); } else if (!strcmp(s, "T")) { printf("A"); } else if (!strcmp(s, "C")) { printf("G"); } else { printf("C"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157121/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157121/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [2 x i8] c"A\00", align 1 @.str.2 = private unnamed_addr constant [2 x i8] c"T\00", align 1 @.str.3 = private unnamed_addr constant [2 x i8] c"C\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @up_comp(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 ret i32 %sub } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @down_comp(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 ret i32 %sub } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @int_sort(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #1 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %a, ptr noundef nonnull dereferenceable(1) %b) #11 ret i32 %call } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @count_digit(i32 noundef %a) local_unnamed_addr #3 { entry: %cmp.not3 = icmp eq i32 %a, 0 br i1 %cmp.not3, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %i.05 = phi i32 [ %inc, %while.body ], [ 0, %entry ] %a.addr.04 = phi i32 [ %div, %while.body ], [ %a, %entry ] %div = sdiv i32 %a.addr.04, 10 %inc = add nuw nsw i32 %i.05, 1 %a.addr.04.off = add i32 %a.addr.04, 9 %cmp.not = icmp ult i32 %a.addr.04.off, 19 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %while.body, %entry %i.0.lcssa = phi i32 [ 0, %entry ], [ %inc, %while.body ] ret i32 %i.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #4 ; Function Attrs: nofree nosync nounwind memory(none) uwtable define dso_local i32 @euclid(i32 noundef %a, i32 noundef %b) local_unnamed_addr #5 { entry: br label %tailrecurse tailrecurse: ; preds = %if.end3, %entry %a.tr = phi i32 [ %a, %entry ], [ %spec.select17, %if.end3 ] %b.tr = phi i32 [ %b, %entry ], [ %rem, %if.end3 ] %spec.select17 = tail call i32 @llvm.smin.i32(i32 %a.tr, i32 %b.tr) %cmp1 = icmp slt i32 %spec.select17, 1 br i1 %cmp1, label %cleanup, label %if.end3 if.end3: ; preds = %tailrecurse %spec.select = tail call i32 @llvm.smax.i32(i32 %a.tr, i32 %b.tr) %rem = srem i32 %spec.select, %spec.select17 %cmp4 = icmp eq i32 %rem, 0 br i1 %cmp4, label %cleanup, label %tailrecurse cleanup: ; preds = %if.end3, %tailrecurse %retval.0 = phi i32 [ -1, %tailrecurse ], [ %spec.select17, %if.end3 ] ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #6 { entry: %s = alloca [2 x i8], align 1 call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %s) #12 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(2) %s, ptr noundef nonnull dereferenceable(2) @.str.1, i64 2) %tobool.not = icmp eq i32 %bcmp, 0 br i1 %tobool.not, label %if.end18, label %if.else if.else: ; preds = %entry %bcmp19 = call i32 @bcmp(ptr noundef nonnull dereferenceable(2) %s, ptr noundef nonnull dereferenceable(2) @.str.2, i64 2) %tobool6.not = icmp eq i32 %bcmp19, 0 br i1 %tobool6.not, label %if.end18, label %if.else9 if.else9: ; preds = %if.else %bcmp21 = call i32 @bcmp(ptr noundef nonnull dereferenceable(2) %s, ptr noundef nonnull dereferenceable(2) @.str.3, i64 2) %tobool12.not = icmp eq i32 %bcmp21, 0 %. = select i1 %tobool12.not, i32 71, i32 67 br label %if.end18 if.end18: ; preds = %if.else9, %if.else, %entry %.sink = phi i32 [ 84, %entry ], [ 65, %if.else ], [ %., %if.else9 ] %putchar20 = call i32 @putchar(i32 %.sink) call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %s) #12 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #7 ; Function Attrs: nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #8 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #9 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #10 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #10 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nofree nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree 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 #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #5 = { 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 #6 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #8 = { nofree nounwind willreturn memory(argmem: read) } attributes #9 = { nofree nounwind } attributes #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #11 = { nounwind willreturn memory(read) } attributes #12 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !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() { char n; scanf("%c",&n); if(n=='A') printf("T"); else if(n=='T') printf("A"); else if(n=='G') printf("C"); else if(n=='C') printf("G"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157165/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157165/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%c\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %n) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i8, ptr %n, align 1, !tbaa !5 switch i8 %0, label %if.end22 [ i8 65, label %if.end22.sink.split i8 84, label %if.then6 i8 71, label %if.then12 i8 67, label %if.then18 ] if.then6: ; preds = %entry br label %if.end22.sink.split if.then12: ; preds = %entry br label %if.end22.sink.split if.then18: ; preds = %entry br label %if.end22.sink.split if.end22.sink.split: ; preds = %entry, %if.then12, %if.then18, %if.then6 %.sink = phi i32 [ 65, %if.then6 ], [ 71, %if.then18 ], [ 67, %if.then12 ], [ 84, %entry ] %putchar24 = call i32 @putchar(i32 %.sink) br label %if.end22 if.end22: ; preds = %if.end22.sink.split, %entry call void @llvm.lifetime.end.p0(i64 1, 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 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void) { char b; scanf("%s",&b); if(b=='A') printf("T"); if(b=='T') printf("A"); if(b=='C') printf("G"); if(b=='G') printf("C"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157208/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157208/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %b = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b) %0 = load i8, ptr %b, align 1, !tbaa !5 %cmp = icmp eq i8 %0, 65 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry %putchar = call i32 @putchar(i32 84) %.pr = load i8, ptr %b, align 1, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %1 = phi i8 [ %.pr, %if.then ], [ %0, %entry ] %cmp4 = icmp eq i8 %1, 84 br i1 %cmp4, label %if.then6, label %if.end8 if.then6: ; preds = %if.end %putchar21 = call i32 @putchar(i32 65) %.pre = load i8, ptr %b, align 1, !tbaa !5 br label %if.end8 if.end8: ; preds = %if.then6, %if.end %2 = phi i8 [ %.pre, %if.then6 ], [ %1, %if.end ] %cmp10 = icmp eq i8 %2, 67 br i1 %cmp10, label %if.then12, label %if.end14 if.then12: ; preds = %if.end8 %putchar22 = call i32 @putchar(i32 71) %.pr24 = load i8, ptr %b, align 1, !tbaa !5 br label %if.end14 if.end14: ; preds = %if.then12, %if.end8 %3 = phi i8 [ %.pr24, %if.then12 ], [ %2, %if.end8 ] %cmp16 = icmp eq i8 %3, 71 br i1 %cmp16, label %if.then18, label %if.end20 if.then18: ; preds = %if.end14 %putchar23 = call i32 @putchar(i32 67) br label %if.end20 if.end20: ; preds = %if.then18, %if.end14 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %b) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <string.h> int main(void) { char buff[256]; scanf("%s",buff); if(!strcmp(buff, "A")) printf("T"); else if(!strcmp(buff, "T")) printf("A"); else if(!strcmp(buff, "G")) printf("C"); else if(!strcmp(buff, "C")) printf("G"); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157266/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157266/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %buff = alloca [256 x i8], align 16 call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %buff) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %buff) %lhsv = load i16, ptr %buff, align 16 switch i16 %lhsv, label %if.end23 [ i16 65, label %if.end23.sink.split i16 84, label %if.then7 i16 71, label %if.then13 i16 67, label %if.then19 ] if.then7: ; preds = %entry br label %if.end23.sink.split if.then13: ; preds = %entry br label %if.end23.sink.split if.then19: ; preds = %entry br label %if.end23.sink.split if.end23.sink.split: ; preds = %entry, %if.then13, %if.then19, %if.then7 %.sink = phi i32 [ 65, %if.then7 ], [ 71, %if.then19 ], [ 67, %if.then13 ], [ 84, %entry ] %putchar28 = call i32 @putchar(i32 %.sink) br label %if.end23 if.end23: ; preds = %if.end23.sink.split, %entry call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %buff) #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)"}
#include <stdio.h> int main(void){ char base[101]; scanf("%s",base); if (base[0] == 'A'){ printf("T"); }else if(base[0] =='T'){ printf("A"); }else if(base[0] =='G'){ printf("C"); }else{ printf("G"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157316/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157316/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %base = alloca [101 x i8], align 16 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %base) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %base) %0 = load i8, ptr %base, align 16, !tbaa !5 switch i8 %0, label %if.else16 [ i8 65, label %if.end19 i8 84, label %if.then7 i8 71, label %if.then14 ] if.then7: ; preds = %entry br label %if.end19 if.then14: ; preds = %entry br label %if.end19 if.else16: ; preds = %entry br label %if.end19 if.end19: ; preds = %entry, %if.then7, %if.else16, %if.then14 %.sink = phi i32 [ 65, %if.then7 ], [ 71, %if.else16 ], [ 67, %if.then14 ], [ 84, %entry ] %putchar21 = call i32 @putchar(i32 %.sink) call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %base) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<stdlib.h> #define ll long long int int main() { ll a,b,i,j,max=-1,t,c,d; scanf("%lld%lld",&a,&b); scanf("%lld%lld",&c,&d); t=abs(a-c); j=llabs(b-d); if(t>j) max=t; else max=j; printf("%lld\n",max); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15736/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15736/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%lld%lld\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i64, align 8 %b = alloca i64, align 8 %c = alloca i64, align 8 %d = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #5 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #5 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %c) #5 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %d) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c, ptr noundef nonnull %d) %0 = load i64, ptr %a, align 8, !tbaa !5 %1 = load i64, ptr %c, align 8, !tbaa !5 %sub = sub nsw i64 %0, %1 %conv = trunc i64 %sub to i32 %2 = call i32 @llvm.abs.i32(i32 %conv, i1 true) %conv2 = zext i32 %2 to i64 %3 = load i64, ptr %b, align 8, !tbaa !5 %4 = load i64, ptr %d, align 8, !tbaa !5 %sub3 = sub nsw i64 %3, %4 %5 = call i64 @llvm.abs.i64(i64 %sub3, i1 true) %conv2. = call i64 @llvm.umax.i64(i64 %5, i64 %conv2) %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %conv2.) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %d) #5 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %c) #5 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #5 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.abs.i64(i64, i1 immarg) #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umax.i64(i64, i64) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<string.h> int main(){ char s[1]; scanf("%s", s); if(strcmp(s, "A") == 0){ printf("T\n"); }else if(strcmp(s, "T") == 0){ printf("A\n"); }else if(strcmp(s, "G") == 0){ printf("C\n"); }else if(strcmp(s, "C") == 0){ printf("G\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157402/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157402/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @str = private unnamed_addr constant [2 x i8] c"G\00", align 1 @str.9 = private unnamed_addr constant [2 x i8] c"C\00", align 1 @str.10 = private unnamed_addr constant [2 x i8] c"A\00", align 1 @str.11 = private unnamed_addr constant [2 x i8] c"T\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [1 x i8], align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %s) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %call2 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %s, ptr noundef nonnull dereferenceable(2) @str.10) #6 %cmp = icmp eq i32 %call2, 0 br i1 %cmp, label %if.end23.sink.split, label %if.else if.else: ; preds = %entry %call5 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %s, ptr noundef nonnull dereferenceable(2) @str.11) #6 %cmp6 = icmp eq i32 %call5, 0 br i1 %cmp6, label %if.end23.sink.split, label %if.else9 if.else9: ; preds = %if.else %call11 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %s, ptr noundef nonnull dereferenceable(2) @str) #6 %cmp12 = icmp eq i32 %call11, 0 br i1 %cmp12, label %if.end23.sink.split, label %if.else15 if.else15: ; preds = %if.else9 %call17 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %s, ptr noundef nonnull dereferenceable(2) @str.9) #6 %cmp18 = icmp eq i32 %call17, 0 br i1 %cmp18, label %if.end23.sink.split, label %if.end23 if.end23.sink.split: ; preds = %if.else15, %if.else9, %if.else, %entry %str.10.sink = phi ptr [ @str.11, %entry ], [ @str.10, %if.else ], [ @str.9, %if.else9 ], [ @str, %if.else15 ] %puts25 = call i32 @puts(ptr nonnull dereferenceable(1) %str.10.sink) br label %if.end23 if.end23: ; preds = %if.end23.sink.split, %if.else15 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %s) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } attributes #6 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
#include <stdio.h> int main(){ char c,a; scanf("%c",&c); switch (c) { case 'A': a = 'T'; break; case 'T': a = 'A'; break; case 'G': a = 'C'; break; case 'C': a = 'G'; break; default: break; } printf("%c",a); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157453/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157453/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%c\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %c = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c) %0 = load i8, ptr %c, align 1, !tbaa !5 %conv = sext i8 %0 to i32 switch i32 %conv, label %sw.epilog [ i32 65, label %sw.bb i32 84, label %sw.bb1 i32 71, label %sw.bb2 i32 67, label %sw.bb3 ] sw.bb: ; preds = %entry br label %sw.epilog sw.bb1: ; preds = %entry br label %sw.epilog sw.bb2: ; preds = %entry br label %sw.epilog sw.bb3: ; preds = %entry br label %sw.epilog sw.epilog: ; preds = %entry, %sw.bb3, %sw.bb2, %sw.bb1, %sw.bb %a.0 = phi i32 [ 0, %entry ], [ 71, %sw.bb3 ], [ 67, %sw.bb2 ], [ 65, %sw.bb1 ], [ 84, %sw.bb ] %putchar = call i32 @putchar(i32 %a.0) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ char b; scanf("%c",&b); if(b == 'A'){ printf("T\n"); } else if(b == 'T'){ printf("A\n"); } else if(b == 'C'){ printf("G\n"); } else if(b == 'G'){ printf("C\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157497/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157497/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%c\00", align 1 @str = private unnamed_addr constant [2 x i8] c"C\00", align 1 @str.5 = private unnamed_addr constant [2 x i8] c"G\00", align 1 @str.6 = private unnamed_addr constant [2 x i8] c"A\00", align 1 @str.7 = private unnamed_addr constant [2 x i8] c"T\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %b = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b) %0 = load i8, ptr %b, align 1, !tbaa !5 switch i8 %0, label %if.end22 [ i8 65, label %if.end22.sink.split i8 84, label %if.then6 i8 67, label %if.then12 i8 71, label %if.then18 ] if.then6: ; preds = %entry br label %if.end22.sink.split if.then12: ; preds = %entry br label %if.end22.sink.split if.then18: ; preds = %entry br label %if.end22.sink.split if.end22.sink.split: ; preds = %entry, %if.then12, %if.then18, %if.then6 %str.6.sink = phi ptr [ @str.6, %if.then6 ], [ @str, %if.then18 ], [ @str.5, %if.then12 ], [ @str.7, %entry ] %puts24 = call i32 @puts(ptr nonnull dereferenceable(1) %str.6.sink) br label %if.end22 if.end22: ; preds = %if.end22.sink.split, %entry call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %b) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void){ char S; scanf("%c",&S); if(S == 'A') printf("T\n"); else if(S == 'C') printf("G\n"); else if(S == 'G') printf("C\n"); else if(S == 'T') printf("A\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157547/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157547/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%c\00", align 1 @str = private unnamed_addr constant [2 x i8] c"A\00", align 1 @str.5 = private unnamed_addr constant [2 x i8] c"C\00", align 1 @str.6 = private unnamed_addr constant [2 x i8] c"G\00", align 1 @str.7 = private unnamed_addr constant [2 x i8] c"T\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %S = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %S) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S) %0 = load i8, ptr %S, align 1, !tbaa !5 switch i8 %0, label %if.end22 [ i8 65, label %if.end22.sink.split i8 67, label %if.then6 i8 71, label %if.then12 i8 84, label %if.then18 ] if.then6: ; preds = %entry br label %if.end22.sink.split if.then12: ; preds = %entry br label %if.end22.sink.split if.then18: ; preds = %entry br label %if.end22.sink.split if.end22.sink.split: ; preds = %entry, %if.then12, %if.then18, %if.then6 %str.6.sink = phi ptr [ @str.6, %if.then6 ], [ @str, %if.then18 ], [ @str.5, %if.then12 ], [ @str.7, %entry ] %puts24 = call i32 @puts(ptr nonnull dereferenceable(1) %str.6.sink) br label %if.end22 if.end22: ; preds = %if.end22.sink.split, %entry call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %S) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int N, K; int A[271828]; int main(void) { int i; int ng = 0, ok = 1000000000; if (scanf("%d%d", &N, &K) != 2) return 1; for (i = 0; i < N; i++) { if (scanf("%d", &A[i]) != 1) return 1; } while (ng + 1 < ok) { int m = ng + (ok - ng) / 2; int count = 0; for (i = 0; i < N; i++) { count += (A[i] + m - 1) / m - 1; } if (count <= K) ok = m; else ng = m; } printf("%d\n", ok); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157590/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157590/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @N = dso_local global i32 0, align 4 @K = dso_local global i32 0, align 4 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @A = dso_local global [271828 x i32] zeroinitializer, align 16 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @N, ptr noundef nonnull @K) %cmp.not = icmp eq i32 %call, 2 br i1 %cmp.not, label %for.cond.preheader, label %cleanup for.cond.preheader: ; preds = %entry %0 = load i32, ptr @N, align 4, !tbaa !5 %cmp141 = icmp sgt i32 %0, 0 br i1 %cmp141, label %for.body, label %while.cond.preheader.thread while.cond.preheader.thread: ; preds = %for.cond.preheader %1 = load i32, ptr @K, align 4, !tbaa !5 %.fr70 = freeze i32 %1 br label %while.cond.preheader.split for.cond: ; preds = %for.body %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %2 = load i32, ptr @N, align 4, !tbaa !5 %3 = sext i32 %2 to i64 %cmp1 = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp1, label %for.body, label %while.cond.preheader, !llvm.loop !9 while.cond.preheader: ; preds = %for.cond %cmp943 = icmp sgt i32 %2, 0 %4 = load i32, ptr @K, align 4, !tbaa !5 %.fr = freeze i32 %4 br i1 %cmp943, label %while.body.us.preheader, label %while.cond.preheader.split while.body.us.preheader: ; preds = %while.cond.preheader %wide.trip.count = zext i32 %2 to i64 %xtraiter = and i64 %wide.trip.count, 1 %5 = icmp eq i32 %2, 1 %unroll_iter = and i64 %wide.trip.count, 4294967294 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br label %while.body.us while.body.us: ; preds = %while.body.us.preheader, %for.cond8.for.end20_crit_edge.us %ok.048.us = phi i32 [ %ok.0.add7.us, %for.cond8.for.end20_crit_edge.us ], [ 1000000000, %while.body.us.preheader ] %ng.047.us = phi i32 [ %add7.ng.0.us, %for.cond8.for.end20_crit_edge.us ], [ 0, %while.body.us.preheader ] %sub.us = sub nsw i32 %ok.048.us, %ng.047.us %div.us = sdiv i32 %sub.us, 2 %add7.us = add nsw i32 %div.us, %ng.047.us %add13.us = add i32 %add7.us, -1 br i1 %5, label %for.cond8.for.end20_crit_edge.us.unr-lcssa, label %for.body10.us for.body10.us: ; preds = %while.body.us, %for.body10.us %indvars.iv65 = phi i64 [ %indvars.iv.next66.1, %for.body10.us ], [ 0, %while.body.us ] %count.045.us = phi i32 [ %add17.us.1, %for.body10.us ], [ 0, %while.body.us ] %niter = phi i64 [ %niter.next.1, %for.body10.us ], [ 0, %while.body.us ] %arrayidx12.us = getelementptr inbounds [271828 x i32], ptr @A, i64 0, i64 %indvars.iv65 %6 = load i32, ptr %arrayidx12.us, align 8, !tbaa !5 %sub14.us = add i32 %add13.us, %6 %div15.us = sdiv i32 %sub14.us, %add7.us %sub16.us = add i32 %count.045.us, -1 %add17.us = add i32 %sub16.us, %div15.us %indvars.iv.next66 = or i64 %indvars.iv65, 1 %arrayidx12.us.1 = getelementptr inbounds [271828 x i32], ptr @A, i64 0, i64 %indvars.iv.next66 %7 = load i32, ptr %arrayidx12.us.1, align 4, !tbaa !5 %sub14.us.1 = add i32 %add13.us, %7 %div15.us.1 = sdiv i32 %sub14.us.1, %add7.us %sub16.us.1 = add i32 %add17.us, -1 %add17.us.1 = add i32 %sub16.us.1, %div15.us.1 %indvars.iv.next66.1 = add nuw nsw i64 %indvars.iv65, 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.cond8.for.end20_crit_edge.us.unr-lcssa, label %for.body10.us, !llvm.loop !11 for.cond8.for.end20_crit_edge.us.unr-lcssa: ; preds = %for.body10.us, %while.body.us %add17.us.lcssa.ph = phi i32 [ undef, %while.body.us ], [ %add17.us.1, %for.body10.us ] %indvars.iv65.unr = phi i64 [ 0, %while.body.us ], [ %indvars.iv.next66.1, %for.body10.us ] %count.045.us.unr = phi i32 [ 0, %while.body.us ], [ %add17.us.1, %for.body10.us ] br i1 %lcmp.mod.not, label %for.cond8.for.end20_crit_edge.us, label %for.body10.us.epil for.body10.us.epil: ; preds = %for.cond8.for.end20_crit_edge.us.unr-lcssa %arrayidx12.us.epil = getelementptr inbounds [271828 x i32], ptr @A, i64 0, i64 %indvars.iv65.unr %8 = load i32, ptr %arrayidx12.us.epil, align 4, !tbaa !5 %sub14.us.epil = add i32 %add13.us, %8 %div15.us.epil = sdiv i32 %sub14.us.epil, %add7.us %sub16.us.epil = add i32 %count.045.us.unr, -1 %add17.us.epil = add i32 %sub16.us.epil, %div15.us.epil br label %for.cond8.for.end20_crit_edge.us for.cond8.for.end20_crit_edge.us: ; preds = %for.cond8.for.end20_crit_edge.us.unr-lcssa, %for.body10.us.epil %add17.us.lcssa = phi i32 [ %add17.us.lcssa.ph, %for.cond8.for.end20_crit_edge.us.unr-lcssa ], [ %add17.us.epil, %for.body10.us.epil ] %cmp21.not.us = icmp sgt i32 %add17.us.lcssa, %.fr %add7.ng.0.us = select i1 %cmp21.not.us, i32 %add7.us, i32 %ng.047.us %ok.0.add7.us = select i1 %cmp21.not.us, i32 %ok.048.us, i32 %add7.us %add.us = add nsw i32 %add7.ng.0.us, 1 %cmp6.us = icmp slt i32 %add.us, %ok.0.add7.us br i1 %cmp6.us, label %while.body.us, label %while.end, !llvm.loop !12 while.cond.preheader.split: ; preds = %while.cond.preheader.thread, %while.cond.preheader %.fr71 = phi i32 [ %.fr70, %while.cond.preheader.thread ], [ %.fr, %while.cond.preheader ] %cmp21.not = icmp slt i32 %.fr71, 0 %spec.select = select i1 %cmp21.not, i32 1000000000, i32 1 br label %while.end for.body: ; preds = %for.cond.preheader, %for.cond %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond ], [ 0, %for.cond.preheader ] %arrayidx = getelementptr inbounds [271828 x i32], ptr @A, i64 0, i64 %indvars.iv %call2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %cmp3.not = icmp eq i32 %call2, 1 br i1 %cmp3.not, label %for.cond, label %cleanup while.end: ; preds = %for.cond8.for.end20_crit_edge.us, %while.cond.preheader.split %.us-phi = phi i32 [ %spec.select, %while.cond.preheader.split ], [ %ok.0.add7.us, %for.cond8.for.end20_crit_edge.us ] %call24 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.us-phi) br label %cleanup cleanup: ; preds = %for.body, %entry, %while.end %retval.0 = phi i32 [ 0, %while.end ], [ 1, %entry ], [ 1, %for.body ] ret i32 %retval.0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #define ll long long #define rep(i,n) for(ll i=0;i<(n);i++) #define max(p,q) ((p)>(q)?(p):(q)) #define min(p,q) ((p)<(q)?(p):(q)) #define chmax(a,b) ((a)=(a)>(b)?(a):(b)) #define chmin(a,b) ((a)=(a)<(b)?(a):(b)) #define abs(p) ((p)>=(0)?(p):(-(p))) #define MOD 1000000007 ll powll(ll a,ll b){ll r=1;rep(i,b){r*=a;}return r;} #define swap(a,b) do{ll w=(a);(a)=(b);(b)=w;}while(0) #define swapd(a,b) do{double w=(a);(a)=(b);(b)=w}while(0) #define in(a) scanf("%lld", &(a)) #define in2(a,b) scanf("%lld %lld",&(a),&(b)) #define in3(a,b,c) scanf("%lld %lld %lld",&(a),&(b),&(c)) #define ind(a) scanf("%lf", &(a)) #define ins(a) scanf("%s", (a)) #define put(a) printf("%lld\n", (a)) #define putd(a) printf("%.15f\n", (a)) // puts(a) printf("%s\n", a) 文字はこっち //your code here! /*int cmp(const void *a, const void *b){ ll A=*(ll *)a, B=*(ll *)b; if(A==B)return 0; else return A>B ? 1:-1;//昇順ソート 1,2,....9 } int cmp2(const void *a, const void *b){ ll A=*(ll *)a, B=*(ll *)b; if(A==B)return 0; else return A>B ? -1:1;//降順 }*/ int cmp(const void *a, const void *b){ char A=*(char *)a, B=*(char *)b; return A-B;//昇順ソート a,b....z } int cmp2(const void *a, const void *b){ char A=*(char *)a, B=*(char *)b; return B-A; } int main(void){ ll snum[101], tnum[101]; char s[101], t[101]; ins(s); ins(t); /*ll N=strlen(s); rep(i, N) snum[i] = s[i] - 'a'; qsort(snum, N, sizeof(ll), cmp); rep(i, N) s[i] = 'a' + snum[i]; N=strlen(t); rep(i, N) tnum[i] = t[i] - 'a'; qsort(tnum, N, sizeof(ll), cmp2); rep(i, N) t[i] = 'a' + tnum[i]; if(strcmp(s,t) < 0) puts("Yes"); else puts("No"); */ //qsort万能説 qsort(s, strlen(s), sizeof(char), cmp); qsort(t, strlen(t), sizeof(char), cmp2); if(strcmp(s,t)<0) puts("Yes"); else puts("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157648/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157648/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @powll(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %cmp3 = icmp sgt i64 %b, 0 br i1 %cmp3, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %entry %xtraiter = and i64 %b, 7 %0 = icmp ult i64 %b, 8 br i1 %0, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %b, -8 br label %for.body for.cond.cleanup.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %mul.lcssa.ph = phi i64 [ undef, %for.body.preheader ], [ %mul.7, %for.body ] %r.04.unr = phi i64 [ 1, %for.body.preheader ], [ %mul.7, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup, label %for.body.epil for.body.epil: ; preds = %for.cond.cleanup.loopexit.unr-lcssa, %for.body.epil %r.04.epil = phi i64 [ %mul.epil, %for.body.epil ], [ %r.04.unr, %for.cond.cleanup.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.cond.cleanup.loopexit.unr-lcssa ] %mul.epil = mul nsw i64 %r.04.epil, %a %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.cond.cleanup, label %for.body.epil, !llvm.loop !5 for.cond.cleanup: ; preds = %for.cond.cleanup.loopexit.unr-lcssa, %for.body.epil, %entry %r.0.lcssa = phi i64 [ 1, %entry ], [ %mul.lcssa.ph, %for.cond.cleanup.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ] ret i64 %r.0.lcssa for.body: ; preds = %for.body, %for.body.preheader.new %r.04 = phi i64 [ 1, %for.body.preheader.new ], [ %mul.7, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.7, %for.body ] %mul = mul nsw i64 %r.04, %a %mul.1 = mul nsw i64 %mul, %a %mul.2 = mul nsw i64 %mul.1, %a %mul.3 = mul nsw i64 %mul.2, %a %mul.4 = mul nsw i64 %mul.3, %a %mul.5 = mul nsw i64 %mul.4, %a %mul.6 = mul nsw i64 %mul.5, %a %mul.7 = mul nsw i64 %mul.6, %a %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body, !llvm.loop !7 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @cmp(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #2 { entry: %0 = load i8, ptr %a, align 1, !tbaa !9 %1 = load i8, ptr %b, align 1, !tbaa !9 %conv = sext i8 %0 to i32 %conv1 = sext i8 %1 to i32 %sub = sub nsw i32 %conv, %conv1 ret i32 %sub } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @cmp2(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #2 { entry: %0 = load i8, ptr %a, align 1, !tbaa !9 %1 = load i8, ptr %b, align 1, !tbaa !9 %conv = sext i8 %1 to i32 %conv1 = sext i8 %0 to i32 %sub = sub nsw i32 %conv, %conv1 ret i32 %sub } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %s = alloca [101 x i8], align 16 %t = alloca [101 x i8], align 16 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %s) #7 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %t) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %call5 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #8 call void @qsort(ptr noundef nonnull %s, i64 noundef %call5, i64 noundef 1, ptr noundef nonnull @cmp) #7 %call8 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %t) #8 call void @qsort(ptr noundef nonnull %t, i64 noundef %call8, i64 noundef 1, ptr noundef nonnull @cmp2) #7 %call11 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %s, ptr noundef nonnull dereferenceable(1) %t) #8 %cmp = icmp slt i32 %call11, 0 %.str.1..str.2 = select i1 %cmp, ptr @.str.1, ptr @.str.2 %call13 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.1..str.2) call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %t) #7 call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %s) #7 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #6 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #6 ; 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { 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 #7 = { nounwind } attributes #8 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = distinct !{!5, !6} !6 = !{!"llvm.loop.unroll.disable"} !7 = distinct !{!7, !8} !8 = !{!"llvm.loop.mustprogress"} !9 = !{!10, !10, i64 0} !10 = !{!"omnipotent char", !11, i64 0} !11 = !{!"Simple C/C++ TBAA"}
/* cat <<EOF >mistaken-paste */ #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #define BIG 2000000007 #define MOD 1000000007 typedef uint64_t ull; typedef int64_t sll; #define N_MAX 10000 #define M_MAX 200 typedef struct { int32_t a; int32_t b; } hw; typedef struct { sll a; sll b; } hwll; typedef struct { ull s; ull t; int32_t c; } struct_a; const hw vector8[8] = { {-1, -1}, {-1, 0}, {-1, +1}, { 0, -1}, { 0, +1}, {+1, -1}, {+1, 0}, {+1, +1} }; ull n, m; ull h, w; ull k; ull vua, vub, vuc, vud, vue, vuf; sll vsa, vsb, vsc, vsd, vse, vsf; long double vra, vrb, vrc; size_t slen; size_t tlen; ull a[N_MAX]; // sll a[N_MAX]; // ull a[N_MAX][N_MAX]; // ull wall[N_MAX][M_MAX]; ull b[N_MAX]; // sll b[N_MAX]; // ull b[N_MAX][N_MAX]; // sll b[N_MAX][N_MAX]; char s[N_MAX + 1]; char t[N_MAX + 1]; // char s[N_MAX][M_MAX + 1]; // ull dp[N_MAX]; // sll dp[N_MAX]; bool dp[N_MAX]; // ull dq[N_MAX]; // ull dp[N_MAX + 1][N_MAX + 1]; // ull dp[N_MAX][M_MAX + 1]; // hw arr[N_MAX]; // hwll arr[N_MAX * 2]; // hw brr[M_MAX]; // ull bitdp[1 << N_MAX]; // ull digitdp[102][ 2][ 2]; // pos less carry // struct_a arr[N_MAX * 2]; // struct_b brr[N_MAX * 2]; void swap_adj (ull *a, ull *b) { ull tmp = *b; *b = *a; *a = tmp; return; } ull divide (ull a, ull b) { ull x = MOD - 2; ull ans = 1; while (x) { if (x & 1) ans = (ans * b) % MOD; b = (b * b) % MOD; x /= 2; } return (a * ans) % MOD; } int32_t digits (ull x) { int32_t i = 1; while (x >= 10) { x /= 10; i++; } return i; } 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; } // int32_t nextroute (int32_t arr[]) { // int32_t i = n - 1; // int32_t j, x; // while (arr[i - 1] > arr[i]) i--; // x = n; // for (j = i; j < n; j++) { // if (arr[j] < arr[i - 1]) continue; // if (x == n || arr[x] > arr[j]) x = j; // } // arr[i - 1] ^= arr[x]; // arr[x] ^= arr[i - 1]; // arr[i - 1] ^= arr[x]; // qsort(&arr[i], n - i, sizeof(int32_t), comp); // return 0; // } int32_t targetdig (ull x, int32_t index /* 1-indexed */) { // static...? int32_t posmax = digits(x); if (posmax < index) return -1; while (posmax > index) { posmax--; x /= 10; } return x % 10; } int32_t charcomp (const char left, const char right) { if (left < right) { return -1; } else if (left > right) { return +1; } else { return 0; } } int32_t pcharcomp (const char *left, const char *right) { return charcomp(*left, *right); } int32_t pcharrevcomp (const char *left, const char *right) { return charcomp(*right, *left); } int32_t intcomp (const int32_t left, const int32_t right) { if (left < right) { return -1; } else if (left > right) { return +1; } else { return 0; } } int32_t pintcomp (const int32_t *left, const int32_t *right) { return intcomp(*left, *right); } int32_t ullcomp (const ull left, const ull right) { if (left < right) { return -1; } else if (left > right) { return +1; } else { return 0; } } int32_t pullcomp (const ull *left, const ull *right) { return ullcomp(*left, *right); } int32_t sllcomp (const sll left, const sll right) { if (left < right) { return -1; } else if (left > right) { return +1; } else { return 0; } } int32_t psllcomp (const sll *left, const sll *right) { return sllcomp(*left, *right); } int32_t phwAcomp (const hw *left, const hw *right) { return intcomp(left->a, right->a); } int32_t phwBcomp (const hw *left, const hw *right) { return intcomp(left->b, right->b); } int32_t phwABcomp (const hw *left, const hw *right) { int32_t x = phwAcomp(left, right); if (x) return x; return phwBcomp(left, right); } int32_t phwllAcomp (const hwll *left, const hwll *right) { return sllcomp(left->a, right->a); } int32_t phwllBcomp (const hwll *left, const hwll *right) { return sllcomp(left->b, right->b); } int32_t phwllABcomp (const hwll *left, const hwll *right) { int32_t x = phwllAcomp(left, right); if (x) return x; return phwllBcomp(left, right); } int32_t pstrAcomp (const struct_a *left, const struct_a *right) { int32_t x; if (x = ullcomp(left->t, right->t)) return x; if (x = ullcomp(left->s, right->s)) return x; if (x = intcomp(left->c, right->c)) return x; return 0; } int32_t bitlet (char c) { return (1 << (c - 'a')); } ull ullabs (ull a, ull b) { if (a >= b) { return a - b; } else { return b - a; } } sll sllabs (sll a, sll b) { if (a >= b) { return a - b; } else { return b - a; } } sll nibutanlobo (bool (*func)(sll arg), sll ok, sll ng) { while (sllabs(ok, ng) > 1) { sll med = (ok + ng) / 2; if (func(med)) { ok = med; } else { ng = med; } // printf("debug: [%lld %lld)\n", ok, ng); } if (!func(ok)) return ok * 2 - ng; return ok; } void printquotient (ull left, ull right) { const int32_t digits = 20; printf("%llu.", left / right); left %= right; for (int32_t i = 0; i < digits; i++) { left *= 10; printf("%1d", left / right); left %= right; } puts(""); return; } ull solve () { sll i, j, ki; ull result = 0; // sll result; ull sum = 0; // qsortの際には"p"ullcompを使う // if (k % 2 == 0) { // for (i = 0; i < n; i++) { // printf("%llu%c", ((i == 0) ? (k / 2 - 1) : (k / 2)), ((i == n - 1) ? '\n' : ' ')); // } // } else { // // // } qsort(s, strlen(s), sizeof(char), pcharcomp); qsort(t, strlen(t), sizeof(char), pcharrevcomp); if (strcmp(s, t) < 0) { goto success; } else { goto fail; } printf("%llu\n", result); // puts(s); return 0; success: // puts("YES"); puts("Yes"); // printf("%llu\n", result); return 0; fail: // puts("NO"); puts("No"); // puts("0"); return 1; } int32_t main (void) { int32_t i, j; int32_t x, y; // scanf("%llu%llu", &h, &w); // scanf("%llu", &n, &m); // scanf("%llu%llu", &k, &n); // scanf("%llu%llu%llu%llu", &vua, &vub, &vuc, &vud); scanf("%s", s); scanf("%s", t); // scanf("%lld%lld", &vsa, &vsb); // for (i = 0; i < n; i++) { // scanf("%llu", &a[i]); // } // for (i = 0; i < n; i++) { // scanf("%llu", &a[i]); // } // for (i = 0; i < m; i++) { // scanf("%lld", &b[i]); // } // for (i = 0; i < n - 1; i++) { // scanf("%llu%llu", &arr[i].a, &arr[i].b); // } // for (i = 0; i < h; i++) { // for (j = 0; j < w; j++) { // scanf("%llu", &a[i][j]); // } // } solve(); // for (i = 0; i < n; i++) { // // scanf("%llu%llu", &vua, &vub); // scanf("%s", s); // solve(); // } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157705/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157705/source.c" target datalayout = "e-m:e-p270: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.hw = type { i32, i32 } %struct.hwll = type { i64, i64 } %struct.struct_a = type { i64, i64, i32 } @vector8 = dso_local local_unnamed_addr constant [8 x %struct.hw] [%struct.hw { i32 -1, i32 -1 }, %struct.hw { i32 -1, i32 0 }, %struct.hw { i32 -1, i32 1 }, %struct.hw { i32 0, i32 -1 }, %struct.hw { i32 0, i32 1 }, %struct.hw { i32 1, i32 -1 }, %struct.hw { i32 1, i32 0 }, %struct.hw { i32 1, i32 1 }], align 16 @.str = private unnamed_addr constant [6 x i8] c"%llu.\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%1d\00", align 1 @s = dso_local global [10001 x i8] zeroinitializer, align 16 @t = dso_local global [10001 x i8] zeroinitializer, align 16 @.str.3 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @.str.4 = private unnamed_addr constant [3 x i8] c"No\00", align 1 @.str.5 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @n = dso_local local_unnamed_addr global i64 0, align 8 @m = dso_local local_unnamed_addr global i64 0, align 8 @h = dso_local local_unnamed_addr global i64 0, align 8 @w = dso_local local_unnamed_addr global i64 0, align 8 @k = dso_local local_unnamed_addr global i64 0, align 8 @vua = dso_local local_unnamed_addr global i64 0, align 8 @vub = dso_local local_unnamed_addr global i64 0, align 8 @vuc = dso_local local_unnamed_addr global i64 0, align 8 @vud = dso_local local_unnamed_addr global i64 0, align 8 @vue = dso_local local_unnamed_addr global i64 0, align 8 @vuf = dso_local local_unnamed_addr global i64 0, align 8 @vsa = dso_local local_unnamed_addr global i64 0, align 8 @vsb = dso_local local_unnamed_addr global i64 0, align 8 @vsc = dso_local local_unnamed_addr global i64 0, align 8 @vsd = dso_local local_unnamed_addr global i64 0, align 8 @vse = dso_local local_unnamed_addr global i64 0, align 8 @vsf = 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 @slen = dso_local local_unnamed_addr global i64 0, align 8 @tlen = dso_local local_unnamed_addr global i64 0, align 8 @a = dso_local local_unnamed_addr global [10000 x i64] zeroinitializer, align 16 @b = dso_local local_unnamed_addr global [10000 x i64] zeroinitializer, align 16 @dp = dso_local local_unnamed_addr global [10000 x i8] zeroinitializer, align 16 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @swap_adj(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #0 { entry: %0 = load i64, ptr %b, align 8, !tbaa !5 %1 = load i64, ptr %a, align 8, !tbaa !5 store i64 %1, ptr %b, align 8, !tbaa !5 store i64 %0, ptr %a, align 8, !tbaa !5 ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @divide(i64 noundef %a, i64 noundef %b) local_unnamed_addr #1 { entry: br label %while.body while.body: ; preds = %entry, %if.end %ans.014 = phi i64 [ 1, %entry ], [ %ans.1, %if.end ] %x.013 = phi i64 [ 1000000005, %entry ], [ %div11, %if.end ] %b.addr.012 = phi i64 [ %b, %entry ], [ %rem3, %if.end ] %and = and i64 %x.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 %ans.014, %b.addr.012 %rem = urem i64 %mul, 1000000007 br label %if.end if.end: ; preds = %if.then, %while.body %ans.1 = phi i64 [ %rem, %if.then ], [ %ans.014, %while.body ] %mul2 = mul i64 %b.addr.012, %b.addr.012 %rem3 = urem i64 %mul2, 1000000007 %div11 = lshr i64 %x.013, 1 %tobool.not = icmp ult i64 %x.013, 2 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %if.end %mul4 = mul i64 %ans.1, %a %rem5 = urem i64 %mul4, 1000000007 ret i64 %rem5 } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @digits(i64 noundef %x) local_unnamed_addr #1 { entry: %cmp3 = icmp ugt i64 %x, 9 br i1 %cmp3, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %i.05 = phi i32 [ %inc, %while.body ], [ 1, %entry ] %x.addr.04 = phi i64 [ %div, %while.body ], [ %x, %entry ] %div = udiv i64 %x.addr.04, 10 %inc = add nuw nsw i32 %i.05, 1 %cmp = icmp ugt i64 %x.addr.04, 99 br i1 %cmp, label %while.body, label %while.end, !llvm.loop !11 while.end: ; preds = %while.body, %entry %i.0.lcssa = phi i32 [ 1, %entry ], [ %inc, %while.body ] ret i32 %i.0.lcssa } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @umin(i64 noundef %x, i64 noundef %y) local_unnamed_addr #2 { 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 #2 { 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 #2 { 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 #2 { 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 !12 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 i32 @targetdig(i64 noundef %x, i32 noundef %index) local_unnamed_addr #1 { entry: %cmp3.i = icmp ugt i64 %x, 9 br i1 %cmp3.i, label %while.body.i, label %digits.exit while.body.i: ; preds = %entry, %while.body.i %i.05.i = phi i32 [ %inc.i, %while.body.i ], [ 1, %entry ] %x.addr.04.i = phi i64 [ %div.i, %while.body.i ], [ %x, %entry ] %div.i = udiv i64 %x.addr.04.i, 10 %inc.i = add nuw nsw i32 %i.05.i, 1 %cmp.i = icmp ugt i64 %x.addr.04.i, 99 br i1 %cmp.i, label %while.body.i, label %digits.exit, !llvm.loop !11 digits.exit: ; preds = %while.body.i, %entry %i.0.lcssa.i = phi i32 [ 1, %entry ], [ %inc.i, %while.body.i ] %cmp = icmp slt i32 %i.0.lcssa.i, %index br i1 %cmp, label %cleanup, label %while.cond.preheader while.cond.preheader: ; preds = %digits.exit %cmp17 = icmp sgt i32 %i.0.lcssa.i, %index br i1 %cmp17, label %while.body.preheader, label %while.end while.body.preheader: ; preds = %while.cond.preheader %0 = sub i32 %i.0.lcssa.i, %index %1 = xor i32 %index, -1 %2 = add i32 %i.0.lcssa.i, %1 %xtraiter = and i32 %0, 3 %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %while.body.prol.loopexit, label %while.body.prol while.body.prol: ; preds = %while.body.preheader, %while.body.prol %posmax.09.prol = phi i32 [ %dec.prol, %while.body.prol ], [ %i.0.lcssa.i, %while.body.preheader ] %x.addr.08.prol = phi i64 [ %div.prol, %while.body.prol ], [ %x, %while.body.preheader ] %prol.iter = phi i32 [ %prol.iter.next, %while.body.prol ], [ 0, %while.body.preheader ] %dec.prol = add nsw i32 %posmax.09.prol, -1 %div.prol = udiv i64 %x.addr.08.prol, 10 %prol.iter.next = add i32 %prol.iter, 1 %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter br i1 %prol.iter.cmp.not, label %while.body.prol.loopexit, label %while.body.prol, !llvm.loop !13 while.body.prol.loopexit: ; preds = %while.body.prol, %while.body.preheader %posmax.09.unr = phi i32 [ %i.0.lcssa.i, %while.body.preheader ], [ %dec.prol, %while.body.prol ] %x.addr.08.unr = phi i64 [ %x, %while.body.preheader ], [ %div.prol, %while.body.prol ] %div.lcssa.unr = phi i64 [ undef, %while.body.preheader ], [ %div.prol, %while.body.prol ] %3 = icmp ult i32 %2, 3 br i1 %3, label %while.end, label %while.body while.body: ; preds = %while.body.prol.loopexit, %while.body %posmax.09 = phi i32 [ %dec.3, %while.body ], [ %posmax.09.unr, %while.body.prol.loopexit ] %x.addr.08 = phi i64 [ %div.3, %while.body ], [ %x.addr.08.unr, %while.body.prol.loopexit ] %dec.3 = add nsw i32 %posmax.09, -4 %div.3 = udiv i64 %x.addr.08, 10000 %cmp1.3 = icmp sgt i32 %dec.3, %index br i1 %cmp1.3, label %while.body, label %while.end, !llvm.loop !15 while.end: ; preds = %while.body.prol.loopexit, %while.body, %while.cond.preheader %x.addr.0.lcssa = phi i64 [ %x, %while.cond.preheader ], [ %div.lcssa.unr, %while.body.prol.loopexit ], [ %div.3, %while.body ] %rem = urem i64 %x.addr.0.lcssa, 10 %conv = trunc i64 %rem to i32 br label %cleanup cleanup: ; preds = %digits.exit, %while.end %retval.0 = phi i32 [ %conv, %while.end ], [ -1, %digits.exit ] ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @charcomp(i8 noundef signext %left, i8 noundef signext %right) local_unnamed_addr #3 { entry: %cmp = icmp slt i8 %left, %right %cmp5 = icmp sgt i8 %left, %right %. = 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 @pcharcomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) #4 { entry: %0 = load i8, ptr %left, align 1, !tbaa !16 %1 = load i8, ptr %right, align 1, !tbaa !16 %cmp.i = icmp slt i8 %0, %1 %cmp5.i = icmp sgt i8 %0, %1 %..i = zext i1 %cmp5.i to i32 %retval.0.i = select i1 %cmp.i, i32 -1, i32 %..i ret i32 %retval.0.i } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @pcharrevcomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) #4 { entry: %0 = load i8, ptr %right, align 1, !tbaa !16 %1 = load i8, ptr %left, align 1, !tbaa !16 %cmp.i = icmp slt i8 %0, %1 %cmp5.i = icmp sgt i8 %0, %1 %..i = zext i1 %cmp5.i to i32 %retval.0.i = select i1 %cmp.i, i32 -1, i32 %..i ret i32 %retval.0.i } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @intcomp(i32 noundef %left, i32 noundef %right) local_unnamed_addr #3 { entry: %cmp = icmp slt i32 %left, %right %cmp1 = icmp sgt i32 %left, %right %. = 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 @pintcomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #4 { entry: %0 = load i32, ptr %left, align 4, !tbaa !17 %1 = load i32, ptr %right, align 4, !tbaa !17 %cmp.i = icmp slt i32 %0, %1 %cmp1.i = icmp sgt i32 %0, %1 %..i = zext i1 %cmp1.i to i32 %retval.0.i = select i1 %cmp.i, i32 -1, i32 %..i ret i32 %retval.0.i } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @ullcomp(i64 noundef %left, i64 noundef %right) local_unnamed_addr #3 { entry: %cmp = icmp ult i64 %left, %right %cmp1 = icmp ugt i64 %left, %right %. = 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 @pullcomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #4 { entry: %0 = load i64, ptr %left, align 8, !tbaa !5 %1 = load i64, ptr %right, align 8, !tbaa !5 %cmp.i = icmp ult i64 %0, %1 %cmp1.i = icmp ugt i64 %0, %1 %..i = zext i1 %cmp1.i to i32 %retval.0.i = select i1 %cmp.i, i32 -1, i32 %..i ret i32 %retval.0.i } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @sllcomp(i64 noundef %left, i64 noundef %right) local_unnamed_addr #3 { entry: %cmp = icmp slt i64 %left, %right %cmp1 = icmp sgt i64 %left, %right %. = 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 #4 { entry: %0 = load i64, ptr %left, align 8, !tbaa !5 %1 = load i64, ptr %right, align 8, !tbaa !5 %cmp.i = icmp slt i64 %0, %1 %cmp1.i = icmp sgt i64 %0, %1 %..i = zext i1 %cmp1.i to i32 %retval.0.i = select i1 %cmp.i, i32 -1, i32 %..i ret i32 %retval.0.i } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @phwAcomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #4 { entry: %0 = load i32, ptr %left, align 4, !tbaa !19 %1 = load i32, ptr %right, align 4, !tbaa !19 %cmp.i = icmp slt i32 %0, %1 %cmp1.i = icmp sgt i32 %0, %1 %..i = zext i1 %cmp1.i to i32 %retval.0.i = select i1 %cmp.i, i32 -1, i32 %..i ret i32 %retval.0.i } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @phwBcomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #4 { entry: %b = getelementptr inbounds %struct.hw, ptr %left, i64 0, i32 1 %0 = load i32, ptr %b, align 4, !tbaa !21 %b1 = getelementptr inbounds %struct.hw, ptr %right, i64 0, i32 1 %1 = load i32, ptr %b1, align 4, !tbaa !21 %cmp.i = icmp slt i32 %0, %1 %cmp1.i = icmp sgt i32 %0, %1 %..i = zext i1 %cmp1.i to i32 %retval.0.i = select i1 %cmp.i, i32 -1, i32 %..i ret i32 %retval.0.i } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @phwABcomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #4 { entry: %0 = load i32, ptr %left, align 4, !tbaa !19 %1 = load i32, ptr %right, align 4, !tbaa !19 %cmp.i.i = icmp slt i32 %0, %1 %cmp1.i.i = icmp sgt i32 %0, %1 %..i.i = zext i1 %cmp1.i.i to i32 %retval.0.i.i = select i1 %cmp.i.i, i32 -1, i32 %..i.i %tobool.not = icmp eq i32 %retval.0.i.i, 0 br i1 %tobool.not, label %if.end, label %cleanup if.end: ; preds = %entry %b.i = getelementptr inbounds %struct.hw, ptr %left, i64 0, i32 1 %2 = load i32, ptr %b.i, align 4, !tbaa !21 %b1.i = getelementptr inbounds %struct.hw, ptr %right, i64 0, i32 1 %3 = load i32, ptr %b1.i, align 4, !tbaa !21 %cmp.i.i5 = icmp slt i32 %2, %3 %cmp1.i.i6 = icmp sgt i32 %2, %3 %..i.i7 = zext i1 %cmp1.i.i6 to i32 %retval.0.i.i8 = select i1 %cmp.i.i5, i32 -1, i32 %..i.i7 br label %cleanup cleanup: ; preds = %entry, %if.end %retval.0 = phi i32 [ %retval.0.i.i8, %if.end ], [ %retval.0.i.i, %entry ] ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @phwllAcomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #4 { entry: %0 = load i64, ptr %left, align 8, !tbaa !22 %1 = load i64, ptr %right, align 8, !tbaa !22 %cmp.i = icmp slt i64 %0, %1 %cmp1.i = icmp sgt i64 %0, %1 %..i = zext i1 %cmp1.i to i32 %retval.0.i = select i1 %cmp.i, i32 -1, i32 %..i ret i32 %retval.0.i } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @phwllBcomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #4 { entry: %b = getelementptr inbounds %struct.hwll, ptr %left, i64 0, i32 1 %0 = load i64, ptr %b, align 8, !tbaa !24 %b1 = getelementptr inbounds %struct.hwll, ptr %right, i64 0, i32 1 %1 = load i64, ptr %b1, align 8, !tbaa !24 %cmp.i = icmp slt i64 %0, %1 %cmp1.i = icmp sgt i64 %0, %1 %..i = zext i1 %cmp1.i to i32 %retval.0.i = select i1 %cmp.i, i32 -1, i32 %..i ret i32 %retval.0.i } ; 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 #4 { entry: %0 = load i64, ptr %left, align 8, !tbaa !22 %1 = load i64, ptr %right, align 8, !tbaa !22 %cmp.i.i = icmp slt i64 %0, %1 %cmp1.i.i = icmp sgt i64 %0, %1 %..i.i = zext i1 %cmp1.i.i to i32 %retval.0.i.i = select i1 %cmp.i.i, i32 -1, i32 %..i.i %tobool.not = icmp eq i32 %retval.0.i.i, 0 br i1 %tobool.not, label %if.end, label %cleanup if.end: ; preds = %entry %b.i = getelementptr inbounds %struct.hwll, ptr %left, i64 0, i32 1 %2 = load i64, ptr %b.i, align 8, !tbaa !24 %b1.i = getelementptr inbounds %struct.hwll, ptr %right, i64 0, i32 1 %3 = load i64, ptr %b1.i, align 8, !tbaa !24 %cmp.i.i5 = icmp slt i64 %2, %3 %cmp1.i.i6 = icmp sgt i64 %2, %3 %..i.i7 = zext i1 %cmp1.i.i6 to i32 %retval.0.i.i8 = select i1 %cmp.i.i5, i32 -1, i32 %..i.i7 br label %cleanup cleanup: ; preds = %entry, %if.end %retval.0 = phi i32 [ %retval.0.i.i8, %if.end ], [ %retval.0.i.i, %entry ] ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @pstrAcomp(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #4 { entry: %t = getelementptr inbounds %struct.struct_a, ptr %left, i64 0, i32 1 %0 = load i64, ptr %t, align 8, !tbaa !25 %t1 = getelementptr inbounds %struct.struct_a, ptr %right, i64 0, i32 1 %1 = load i64, ptr %t1, align 8, !tbaa !25 %cmp.i = icmp ult i64 %0, %1 %cmp1.i = icmp ugt i64 %0, %1 %..i = zext i1 %cmp1.i to i32 %retval.0.i = select i1 %cmp.i, i32 -1, i32 %..i %tobool.not = icmp eq i32 %retval.0.i, 0 br i1 %tobool.not, label %if.end, label %cleanup if.end: ; preds = %entry %2 = load i64, ptr %left, align 8, !tbaa !27 %3 = load i64, ptr %right, align 8, !tbaa !27 %cmp.i18 = icmp ult i64 %2, %3 %cmp1.i19 = icmp ugt i64 %2, %3 %..i20 = zext i1 %cmp1.i19 to i32 %retval.0.i21 = select i1 %cmp.i18, i32 -1, i32 %..i20 %tobool4.not = icmp eq i32 %retval.0.i21, 0 br i1 %tobool4.not, label %if.end6, label %cleanup if.end6: ; preds = %if.end %c = getelementptr inbounds %struct.struct_a, ptr %left, i64 0, i32 2 %4 = load i32, ptr %c, align 8, !tbaa !28 %c7 = getelementptr inbounds %struct.struct_a, ptr %right, i64 0, i32 2 %5 = load i32, ptr %c7, align 8, !tbaa !28 %cmp.i22 = icmp slt i32 %4, %5 %cmp1.i23 = icmp sgt i32 %4, %5 %..i24 = zext i1 %cmp1.i23 to i32 %retval.0.i25 = select i1 %cmp.i22, i32 -1, i32 %..i24 br label %cleanup cleanup: ; preds = %if.end6, %if.end, %entry %retval.0 = phi i32 [ %retval.0.i, %entry ], [ %retval.0.i21, %if.end ], [ %retval.0.i25, %if.end6 ] ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @bitlet(i8 noundef signext %c) local_unnamed_addr #3 { entry: %conv = sext i8 %c to i32 %sub = add nsw i32 %conv, -97 %shl = shl nuw nsw i32 1, %sub ret i32 %shl } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @ullabs(i64 noundef %a, i64 noundef %b) local_unnamed_addr #3 { 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 @sllabs(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { 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: nounwind uwtable define dso_local i64 @nibutanlobo(ptr nocapture noundef readonly %func, i64 noundef %ok, i64 noundef %ng) local_unnamed_addr #5 { entry: %sub.i14 = sub nsw i64 %ok, %ng %retval.0.i15 = tail call i64 @llvm.abs.i64(i64 %sub.i14, i1 true) %cmp16 = icmp ugt i64 %retval.0.i15, 1 br i1 %cmp16, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %ng.addr.018 = phi i64 [ %ng.addr.0.div, %while.body ], [ %ng, %entry ] %ok.addr.017 = phi i64 [ %div.ok.addr.0, %while.body ], [ %ok, %entry ] %add = add nsw i64 %ng.addr.018, %ok.addr.017 %div = sdiv i64 %add, 2 %call1 = tail call zeroext i1 %func(i64 noundef %div) #12 %div.ok.addr.0 = select i1 %call1, i64 %div, i64 %ok.addr.017 %ng.addr.0.div = select i1 %call1, i64 %ng.addr.018, i64 %div %sub.i = sub nsw i64 %div.ok.addr.0, %ng.addr.0.div %retval.0.i = tail call i64 @llvm.abs.i64(i64 %sub.i, i1 true) %cmp = icmp ugt i64 %retval.0.i, 1 br i1 %cmp, label %while.body, label %while.end, !llvm.loop !29 while.end: ; preds = %while.body, %entry %ok.addr.0.lcssa = phi i64 [ %ok, %entry ], [ %div.ok.addr.0, %while.body ] %ng.addr.0.lcssa = phi i64 [ %ng, %entry ], [ %ng.addr.0.div, %while.body ] %call2 = tail call zeroext i1 %func(i64 noundef %ok.addr.0.lcssa) #12 %mul = shl nsw i64 %ok.addr.0.lcssa, 1 %sub = sub nsw i64 %mul, %ng.addr.0.lcssa %retval.0 = select i1 %call2, i64 %ok.addr.0.lcssa, i64 %sub ret i64 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local void @printquotient(i64 noundef %left, i64 noundef %right) local_unnamed_addr #6 { entry: %div = udiv i64 %left, %right %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %div) %left.addr.0 = urem i64 %left, %right %mul = mul i64 %left.addr.0, 10 %div1 = udiv i64 %mul, %right %call2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1) %left.addr.0.1 = urem i64 %mul, %right %mul.1 = mul i64 %left.addr.0.1, 10 %div1.1 = udiv i64 %mul.1, %right %call2.1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.1) %left.addr.0.2 = urem i64 %mul.1, %right %mul.2 = mul i64 %left.addr.0.2, 10 %div1.2 = udiv i64 %mul.2, %right %call2.2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.2) %left.addr.0.3 = urem i64 %mul.2, %right %mul.3 = mul i64 %left.addr.0.3, 10 %div1.3 = udiv i64 %mul.3, %right %call2.3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.3) %left.addr.0.4 = urem i64 %mul.3, %right %mul.4 = mul i64 %left.addr.0.4, 10 %div1.4 = udiv i64 %mul.4, %right %call2.4 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.4) %left.addr.0.5 = urem i64 %mul.4, %right %mul.5 = mul i64 %left.addr.0.5, 10 %div1.5 = udiv i64 %mul.5, %right %call2.5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.5) %left.addr.0.6 = urem i64 %mul.5, %right %mul.6 = mul i64 %left.addr.0.6, 10 %div1.6 = udiv i64 %mul.6, %right %call2.6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.6) %left.addr.0.7 = urem i64 %mul.6, %right %mul.7 = mul i64 %left.addr.0.7, 10 %div1.7 = udiv i64 %mul.7, %right %call2.7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.7) %left.addr.0.8 = urem i64 %mul.7, %right %mul.8 = mul i64 %left.addr.0.8, 10 %div1.8 = udiv i64 %mul.8, %right %call2.8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.8) %left.addr.0.9 = urem i64 %mul.8, %right %mul.9 = mul i64 %left.addr.0.9, 10 %div1.9 = udiv i64 %mul.9, %right %call2.9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.9) %left.addr.0.10 = urem i64 %mul.9, %right %mul.10 = mul i64 %left.addr.0.10, 10 %div1.10 = udiv i64 %mul.10, %right %call2.10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.10) %left.addr.0.11 = urem i64 %mul.10, %right %mul.11 = mul i64 %left.addr.0.11, 10 %div1.11 = udiv i64 %mul.11, %right %call2.11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.11) %left.addr.0.12 = urem i64 %mul.11, %right %mul.12 = mul i64 %left.addr.0.12, 10 %div1.12 = udiv i64 %mul.12, %right %call2.12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.12) %left.addr.0.13 = urem i64 %mul.12, %right %mul.13 = mul i64 %left.addr.0.13, 10 %div1.13 = udiv i64 %mul.13, %right %call2.13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.13) %left.addr.0.14 = urem i64 %mul.13, %right %mul.14 = mul i64 %left.addr.0.14, 10 %div1.14 = udiv i64 %mul.14, %right %call2.14 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.14) %left.addr.0.15 = urem i64 %mul.14, %right %mul.15 = mul i64 %left.addr.0.15, 10 %div1.15 = udiv i64 %mul.15, %right %call2.15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.15) %left.addr.0.16 = urem i64 %mul.15, %right %mul.16 = mul i64 %left.addr.0.16, 10 %div1.16 = udiv i64 %mul.16, %right %call2.16 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.16) %left.addr.0.17 = urem i64 %mul.16, %right %mul.17 = mul i64 %left.addr.0.17, 10 %div1.17 = udiv i64 %mul.17, %right %call2.17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.17) %left.addr.0.18 = urem i64 %mul.17, %right %mul.18 = mul i64 %left.addr.0.18, 10 %div1.18 = udiv i64 %mul.18, %right %call2.18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.18) %left.addr.0.19 = urem i64 %mul.18, %right %mul.19 = mul i64 %left.addr.0.19, 10 %div1.19 = udiv i64 %mul.19, %right %call2.19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div1.19) %putchar = tail call i32 @putchar(i32 10) ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #7 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #7 ; Function Attrs: nofree nounwind uwtable define dso_local i64 @solve() local_unnamed_addr #6 { entry: %call = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @s) #13 tail call void @qsort(ptr noundef nonnull @s, i64 noundef %call, i64 noundef 1, ptr noundef nonnull @pcharcomp) #12 %call1 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @t) #13 tail call void @qsort(ptr noundef nonnull @t, i64 noundef %call1, i64 noundef 1, ptr noundef nonnull @pcharrevcomp) #12 %call2 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @s, ptr noundef nonnull dereferenceable(1) @t) #13 %cmp = icmp sgt i32 %call2, -1 %.str.3..str.4 = select i1 %cmp, ptr @.str.4, ptr @.str.3 %. = zext i1 %cmp to i64 %call4 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.3..str.4) ret i64 %. } ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #8 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #9 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #9 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #6 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull @s) %call1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull @t) %call.i = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @s) #13 tail call void @qsort(ptr noundef nonnull @s, i64 noundef %call.i, i64 noundef 1, ptr noundef nonnull @pcharcomp) #12 %call1.i = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @t) #13 tail call void @qsort(ptr noundef nonnull @t, i64 noundef %call1.i, i64 noundef 1, ptr noundef nonnull @pcharrevcomp) #12 %call2.i = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @s, ptr noundef nonnull dereferenceable(1) @t) #13 %cmp.i = icmp sgt i32 %call2.i, -1 %.str.3..str.4.i = select i1 %cmp.i, ptr @.str.4, ptr @.str.3 %call4.i = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.3..str.4.i) ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #7 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #10 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umax.i64(i64, i64) #10 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #10 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #10 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #11 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.abs.i64(i64, i1 immarg) #10 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree 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 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(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: 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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #8 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #9 = { 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 #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #11 = { nofree nounwind } attributes #12 = { nounwind } attributes #13 = { 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 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !14} !14 = !{!"llvm.loop.unroll.disable"} !15 = distinct !{!15, !10} !16 = !{!7, !7, i64 0} !17 = !{!18, !18, i64 0} !18 = !{!"int", !7, i64 0} !19 = !{!20, !18, i64 0} !20 = !{!"", !18, i64 0, !18, i64 4} !21 = !{!20, !18, i64 4} !22 = !{!23, !6, i64 0} !23 = !{!"", !6, i64 0, !6, i64 8} !24 = !{!23, !6, i64 8} !25 = !{!26, !6, i64 8} !26 = !{!"", !6, i64 0, !6, i64 8, !18, i64 16} !27 = !{!26, !6, i64 0} !28 = !{!26, !18, i64 16} !29 = distinct !{!29, !10}
#pragma warning(disable:4996) #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <float.h> #pragma region 定義 #define i_cin(X) scanf("%d", &X) #define i_cin2(X,Y) scanf("%d %d",&X,&Y) #define i_cin4(X,Y,Z,W) scanf("%d %d %d %d",&X,&Y,&Z,&W) #define i_cin3(X,Y,Z) scanf("%d %d %d",&X,&Y,&Z) #define l_cin(X) scanf("%ld",&X) #define f_cin(X) scanf("%f",&X) #define l_cin2(X,Y) scanf("%ld %ld",&X,&Y) #define s_cin(X) scanf("%s",&X) #define ll_cin(X) scanf("%lld", &X) #define i_cout(X) printf("%d\n",X) #define f_cout(X) printf("%g\n",X) #define i_cout2(X,Y) printf("%d %d\n",X,Y) #define l_cout(X) printf("%ld\n",X) #define s_cout(X) printf("%s\n",X) #define ll_cout(X) printf("%lld\n",X) typedef long long ll; #define rept(x, s, n) for (int x = s; x < n; x++) #define S_RTN(S) s_cout(S);return 0 #define _itoa(A,N) sprintf(A, "%d", N); int i_cins(int n, int* A); int l_cins2(int n, long* A, long* B); int s_dsort(const void* a, const void* b); int s_asort(const void* a, const void* b); int _gcd(int a, int b); int _swp(int* a, int* b); int _cknum(char* a, int n); int _atoi(char* s, int len); int s_asorts(const void* a, const void* b); //昇順 int s_asorts(const void* a, const void* b) { return(strcmp((char*)a, (char*)b)); } int s_dsort(const void* a, const void* b) { return(*(int*)b - *(int*)a); } int s_asort(const void* a, const void* b) { return(*(int*)a - *(int*)b); } int l_cins2(int n, long* a, long* b) { int i; rept(i, 0, n) { l_cin2(*(a + i), *(b + i)); } return 0; } int i_cins(int n, int* a) { int i; for (i = 0; i < n; i++) { i_cin(*(a + i)); } return 0; } int _gcd(int a, int b) { int r, tmp; if (a < b) { tmp = a; a = b; b = tmp; } r = a % b; while (r) { if (!r) break; a = b; b = r; r = a % b; } return(b); } long _max(long a, long b) { return a > b ? a : b; } long _min(long a, long b) { return a < b ? a : b; } int _swp(int* a, int* b) { int tmp; tmp = *b; *b = *a; *a = tmp; return 0; } int _cknum(char* a, int n) { int i; char t = '0'; for (i = 0; i < n; i++) { if (a[i] < '0' || a[i]>'9') return 1; } return 0; } int _atoi(char* s, int len) { char tmp[20]; memcpy(tmp, s, len); tmp[len] = 0x00; return (atoi(tmp)); } #pragma endregion int main(void) { int n, k,i,r,l; //char a[100001]; i_cin2(n,k); //s_cin(a); r = 1;n -= k; k--; r += (n % k) ? n / k + 1 : n / k; i_cout(r); /*for (i = 0; i < n; i++) if (a[i] == '1') break; r = (i%(k-1))?i/k:i/k+1; n -= (i - 1); l = (n%(k-1))? n / k : n / k + 1; i_cout(n + l);*/ return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157763/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157763/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%ld %ld\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @s_asorts(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %a, ptr noundef nonnull dereferenceable(1) %b) #14 ret i32 %call } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @s_dsort(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #2 { entry: %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 %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 @s_asort(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #2 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 ret i32 %sub } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @l_cins2(i32 noundef %n, ptr noundef %a, ptr noundef %b) local_unnamed_addr #3 { entry: %cmp7 = icmp sgt i32 %n, 0 br i1 %cmp7, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %n to i64 br label %for.body for.cond.cleanup: ; preds = %for.body, %entry ret i32 0 for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] %add.ptr = getelementptr inbounds i64, ptr %a, i64 %indvars.iv %add.ptr3 = getelementptr inbounds i64, ptr %b, i64 %indvars.iv %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef %add.ptr, ptr noundef %add.ptr3) %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 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #4 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) 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) #4 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @i_cins(i32 noundef %n, ptr noundef %a) local_unnamed_addr #3 { entry: %cmp3 = icmp sgt i32 %n, 0 br i1 %cmp3, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %n to i64 br label %for.body for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] %add.ptr = getelementptr inbounds i32, ptr %a, i64 %indvars.iv %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef %add.ptr) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !11 for.end: ; preds = %for.body, %entry ret i32 0 } ; Function Attrs: nofree nosync nounwind memory(none) uwtable define dso_local i32 @_gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #6 { entry: %spec.select = tail call i32 @llvm.smin.i32(i32 %a, i32 %b) %spec.select15 = tail call i32 @llvm.smax.i32(i32 %a, i32 %b) %rem = srem i32 %spec.select15, %spec.select %tobool.not16 = icmp eq i32 %rem, 0 br i1 %tobool.not16, label %while.end, label %if.end3 if.end3: ; preds = %entry, %if.end3 %r.018 = phi i32 [ %rem4, %if.end3 ], [ %rem, %entry ] %b.addr.117 = phi i32 [ %r.018, %if.end3 ], [ %spec.select, %entry ] %rem4 = srem i32 %b.addr.117, %r.018 %tobool.not = icmp eq i32 %rem4, 0 br i1 %tobool.not, label %while.end, label %if.end3, !llvm.loop !12 while.end: ; preds = %if.end3, %entry %b.addr.1.lcssa = phi i32 [ %spec.select, %entry ], [ %r.018, %if.end3 ] ret i32 %b.addr.1.lcssa } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @_max(i64 noundef %a, i64 noundef %b) local_unnamed_addr #7 { entry: %cond = tail call i64 @llvm.smax.i64(i64 %a, i64 %b) ret i64 %cond } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @_min(i64 noundef %a, i64 noundef %b) local_unnamed_addr #7 { entry: %cond = tail call i64 @llvm.smin.i64(i64 %a, i64 %b) ret i64 %cond } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local i32 @_swp(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #8 { entry: %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 store i32 %1, ptr %b, align 4, !tbaa !5 store i32 %0, ptr %a, align 4, !tbaa !5 ret i32 0 } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @_cknum(ptr nocapture noundef readonly %a, i32 noundef %n) local_unnamed_addr #9 { entry: %cmp13 = icmp sgt i32 %n, 0 br i1 %cmp13, label %for.body.preheader, label %cleanup for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %n to i64 br label %for.body 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 %cleanup, label %for.body, !llvm.loop !13 for.body: ; preds = %for.body.preheader, %for.cond %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.cond ] %arrayidx = getelementptr inbounds i8, ptr %a, i64 %indvars.iv %0 = load i8, ptr %arrayidx, align 1, !tbaa !14 %1 = add i8 %0, -58 %or.cond = icmp ult i8 %1, -10 br i1 %or.cond, label %cleanup, label %for.cond cleanup: ; preds = %for.body, %for.cond, %entry %retval.0 = phi i32 [ 0, %entry ], [ 0, %for.cond ], [ 1, %for.body ] ret i32 %retval.0 } ; Function Attrs: mustprogress nofree nounwind willreturn uwtable define dso_local i32 @_atoi(ptr nocapture noundef readonly %s, i32 noundef %len) local_unnamed_addr #10 { entry: %tmp = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %tmp) #15 %conv = sext i32 %len to i64 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %tmp, ptr align 1 %s, i64 %conv, i1 false) %arrayidx = getelementptr inbounds [20 x i8], ptr %tmp, i64 0, i64 %conv store i8 0, ptr %arrayidx, align 1, !tbaa !14 %call.i = call i64 @strtol(ptr nocapture noundef nonnull %tmp, ptr noundef null, i32 noundef 10) #15 %conv.i = trunc i64 %call.i to i32 call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %tmp) #15 ret i32 %conv.i } ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #11 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %n = alloca i32, align 4 %k = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #15 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #15 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %n, ptr noundef nonnull %k) %0 = load i32, ptr %k, align 4, !tbaa !5 %1 = load i32, ptr %n, align 4, !tbaa !5 %sub = sub nsw i32 %1, %0 store i32 %sub, ptr %n, align 4, !tbaa !5 %dec = add nsw i32 %0, -1 store i32 %dec, ptr %k, align 4, !tbaa !5 %rem = srem i32 %sub, %dec %tobool.not = icmp ne i32 %rem, 0 %div1 = sdiv i32 %sub, %dec %add = zext i1 %tobool.not to i32 %cond = add nsw i32 %div1, %add %add2 = add nsw i32 %cond, 1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %add2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #15 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #15 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: mustprogress nofree nounwind willreturn declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #12 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #13 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #13 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #13 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #13 attributes #0 = { 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 #1 = { 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 #2 = { 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 #3 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree 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 #7 = { 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 #8 = { 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 #9 = { 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 #10 = { mustprogress nofree nounwind willreturn uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #11 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #12 = { 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 #13 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #14 = { nounwind willreturn memory(read) } attributes #15 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = !{!7, !7, i64 0}
#include <float.h> #include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> // 内部定数 #define D_MOD 1000000007 // 除数(10の9乗+7) #define D_DIGIT_MAX 100005 // 最大桁数 // 内部変数 static FILE *szpFpI; // 入力 static char sc1Val[D_DIGIT_MAX]; // 値 static int si2PCnt[D_DIGIT_MAX][3]; // パターン数[桁数][0 or 1 or 最大値] // 内部変数 - テスト用 #ifdef D_TEST static int siRes; static FILE *szpFpA; static int siTNo; #endif // 1行出力 int fOutLine( char *pcpLine // <I> 1行 ) { char lc1Buf[1024]; #ifdef D_TEST fgets(lc1Buf, sizeof(lc1Buf), szpFpA); if (strcmp(lc1Buf, pcpLine)) { siRes = -1; } #else printf("%s", pcpLine); #endif return 0; } // 実行メイン int fMain( ) { int i, liNo; // 値 - 取得 fgets(sc1Val, sizeof(sc1Val), szpFpI); // パターン数 - 初期値 si2PCnt[0][0] = 1; si2PCnt[0][2] = 2; // パターン数 - セット for (liNo = 1; ; liNo++) { if (sc1Val[liNo] < '0' || '1' < sc1Val[liNo]) { break; } // -> 0 si2PCnt[liNo][0] = (si2PCnt[liNo - 1][0] + si2PCnt[liNo - 1][1]) % D_MOD; // -> 1 si2PCnt[liNo][1] = (si2PCnt[liNo - 1][0] + si2PCnt[liNo - 1][1]) % D_MOD * 2 % D_MOD; // 最大値 if (sc1Val[liNo] == '0') { si2PCnt[liNo][2] = si2PCnt[liNo - 1][2]; } else { // -> 0 si2PCnt[liNo][0] = (si2PCnt[liNo][0] + si2PCnt[liNo - 1][2]) % D_MOD; // -> 1 si2PCnt[liNo][2] = si2PCnt[liNo - 1][2] * 2 % D_MOD; } } // パターン数 - 合計 int liPCnt = 0; for (i = 0; i < 3; i++) { liPCnt = (liPCnt + si2PCnt[liNo - 1][i]) % D_MOD; } return liPCnt; } // 1回実行 int fOne( ) { int liRet; char lc1Buf[1024]; // データ - 初期化 memset(si2PCnt, 0, sizeof(si2PCnt)); // パターン数 // 入力 - セット #ifdef D_TEST sprintf(lc1Buf, ".\\Test\\T%d.txt", siTNo); szpFpI = fopen(lc1Buf, "r"); sprintf(lc1Buf, ".\\Test\\A%d.txt", siTNo); szpFpA = fopen(lc1Buf, "r"); siRes = 0; #else szpFpI = stdin; #endif // 実行メイン liRet = fMain(); // 1行出力 sprintf(lc1Buf, "%d\n", liRet); fOutLine(lc1Buf); // 残データ有無 #ifdef D_TEST lc1Buf[0] = '\0'; fgets(lc1Buf, sizeof(lc1Buf), szpFpA); if (strcmp(lc1Buf, "")) { siRes = -1; } #endif // テストファイルクローズ #ifdef D_TEST fclose(szpFpI); fclose(szpFpA); #endif // テスト結果 #ifdef D_TEST if (siRes == 0) { printf("OK %d\n", siTNo); } else { printf("NG %d\n", siTNo); } #endif return 0; } // プログラム開始 int main() { #ifdef D_TEST int i; for (i = D_TEST_SNO; i <= D_TEST_ENO; i++) { siTNo = i; fOne(); } #else fOne(); #endif return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157813/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157813/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @sc1Val = internal global [100005 x i8] zeroinitializer, align 16 @szpFpI = internal unnamed_addr global ptr null, align 8 @si2PCnt = internal unnamed_addr global [100005 x [3 x i32]] zeroinitializer, align 16 @stdin = external local_unnamed_addr global ptr, align 8 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @fOutLine(ptr noundef %pcpLine) local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef %pcpLine) ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @fMain() local_unnamed_addr #0 { entry: %0 = load ptr, ptr @szpFpI, align 8, !tbaa !5 %call = tail call ptr @fgets(ptr noundef nonnull @sc1Val, i32 noundef 100005, ptr noundef %0) store i32 1, ptr @si2PCnt, align 16, !tbaa !9 store i32 2, ptr getelementptr inbounds ([100005 x [3 x i32]], ptr @si2PCnt, i64 0, i64 0, i64 2), align 8, !tbaa !9 %1 = load i8, ptr getelementptr inbounds ([100005 x i8], ptr @sc1Val, i64 0, i64 1), align 1, !tbaa !11 %2 = add i8 %1, -50 %or.cond99 = icmp ult i8 %2, -2 br i1 %or.cond99, label %for.cond66.preheader, label %if.end.preheader if.end.preheader: ; preds = %entry %.pre = load i32, ptr getelementptr inbounds ([100005 x [3 x i32]], ptr @si2PCnt, i64 0, i64 0, i64 1), align 4, !tbaa !9 br label %if.end for.cond66.preheader.loopexit: ; preds = %for.inc %idxprom70.phi.trans.insert = and i64 %indvars.iv, 4294967295 %arrayidx73.phi.trans.insert = getelementptr inbounds [100005 x [3 x i32]], ptr @si2PCnt, i64 0, i64 %idxprom70.phi.trans.insert, i64 0 %.pre108 = load i32, ptr %arrayidx73.phi.trans.insert, align 4, !tbaa !9 %arrayidx73.2.phi.trans.insert = getelementptr inbounds [100005 x [3 x i32]], ptr @si2PCnt, i64 0, i64 %idxprom70.phi.trans.insert, i64 2 %.pre109 = load i32, ptr %arrayidx73.2.phi.trans.insert, align 4, !tbaa !9 %3 = and i64 %indvars.iv, 4294967295 %4 = srem i32 %.pre108, 1000000007 br label %for.cond66.preheader for.cond66.preheader: ; preds = %entry, %for.cond66.preheader.loopexit %5 = phi i32 [ %.pre109, %for.cond66.preheader.loopexit ], [ 2, %entry ] %rem75 = phi i32 [ %4, %for.cond66.preheader.loopexit ], [ 1, %entry ] %liNo.0.lcssa = phi i64 [ %3, %for.cond66.preheader.loopexit ], [ 0, %entry ] %arrayidx73.1 = getelementptr inbounds [100005 x [3 x i32]], ptr @si2PCnt, i64 0, i64 %liNo.0.lcssa, i64 1 %6 = load i32, ptr %arrayidx73.1, align 4, !tbaa !9 %add74.1 = add nsw i32 %6, %rem75 %rem75.1 = srem i32 %add74.1, 1000000007 %add74.2 = add nsw i32 %5, %rem75.1 %rem75.2 = srem i32 %add74.2, 1000000007 ret i32 %rem75.2 if.end: ; preds = %if.end.preheader, %for.inc %7 = phi i32 [ 2, %if.end.preheader ], [ %rem61.sink, %for.inc ] %8 = phi i32 [ %.pre, %if.end.preheader ], [ %rem27, %for.inc ] %9 = phi i32 [ 1, %if.end.preheader ], [ %11, %for.inc ] %indvars.iv = phi i64 [ 1, %if.end.preheader ], [ %indvars.iv.next, %for.inc ] %10 = phi i8 [ %1, %if.end.preheader ], [ %13, %for.inc ] %add = add nsw i32 %8, %9 %rem = srem i32 %add, 1000000007 %arrayidx15 = getelementptr inbounds [100005 x [3 x i32]], ptr @si2PCnt, i64 0, i64 %indvars.iv store i32 %rem, ptr %arrayidx15, align 4, !tbaa !9 %mul = shl nsw i32 %rem, 1 %rem27 = srem i32 %mul, 1000000007 %arrayidx30 = getelementptr inbounds [100005 x [3 x i32]], ptr @si2PCnt, i64 0, i64 %indvars.iv, i64 1 store i32 %rem27, ptr %arrayidx30, align 4, !tbaa !9 %cmp34 = icmp eq i8 %10, 48 br i1 %cmp34, label %for.inc, label %if.else if.else: ; preds = %if.end %add51 = add nsw i32 %7, %rem %rem52 = srem i32 %add51, 1000000007 store i32 %rem52, ptr %arrayidx15, align 4, !tbaa !9 %mul60 = shl nsw i32 %7, 1 %rem61 = srem i32 %mul60, 1000000007 br label %for.inc for.inc: ; preds = %if.end, %if.else %11 = phi i32 [ %rem52, %if.else ], [ %rem, %if.end ] %rem61.sink = phi i32 [ %rem61, %if.else ], [ %7, %if.end ] %12 = getelementptr inbounds [100005 x [3 x i32]], ptr @si2PCnt, i64 0, i64 %indvars.iv, i64 2 store i32 %rem61.sink, ptr %12, align 4 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds [100005 x i8], ptr @sc1Val, i64 0, i64 %indvars.iv.next %13 = load i8, ptr %arrayidx, align 1, !tbaa !11 %14 = add i8 %13, -50 %or.cond = icmp ult i8 %14, -2 br i1 %or.cond, label %for.cond66.preheader.loopexit, label %if.end } ; Function Attrs: nofree nounwind declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @fOne() local_unnamed_addr #0 { entry: %lc1Buf = alloca [1024 x i8], align 16 call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %lc1Buf) #4 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1200060) @si2PCnt, i8 0, i64 1200060, i1 false) %0 = load ptr, ptr @stdin, align 8, !tbaa !5 store ptr %0, ptr @szpFpI, align 8, !tbaa !5 %call.i = tail call ptr @fgets(ptr noundef nonnull @sc1Val, i32 noundef 100005, ptr noundef %0) store i32 1, ptr @si2PCnt, align 16, !tbaa !9 store i32 2, ptr getelementptr inbounds ([100005 x [3 x i32]], ptr @si2PCnt, i64 0, i64 0, i64 2), align 8, !tbaa !9 %1 = load i8, ptr getelementptr inbounds ([100005 x i8], ptr @sc1Val, i64 0, i64 1), align 1, !tbaa !11 %2 = add i8 %1, -50 %or.cond99.i = icmp ult i8 %2, -2 br i1 %or.cond99.i, label %fMain.exit, label %if.end.preheader.i if.end.preheader.i: ; preds = %entry %.pre.i = load i32, ptr getelementptr inbounds ([100005 x [3 x i32]], ptr @si2PCnt, i64 0, i64 0, i64 1), align 4, !tbaa !9 br label %if.end.i for.cond66.preheader.loopexit.i: ; preds = %for.inc.i %idxprom70.phi.trans.insert.i = and i64 %indvars.iv.i, 4294967295 %arrayidx73.phi.trans.insert.i = getelementptr inbounds [100005 x [3 x i32]], ptr @si2PCnt, i64 0, i64 %idxprom70.phi.trans.insert.i, i64 0 %.pre108.i = load i32, ptr %arrayidx73.phi.trans.insert.i, align 4, !tbaa !9 %arrayidx73.2.phi.trans.insert.i = getelementptr inbounds [100005 x [3 x i32]], ptr @si2PCnt, i64 0, i64 %idxprom70.phi.trans.insert.i, i64 2 %.pre109.i = load i32, ptr %arrayidx73.2.phi.trans.insert.i, align 4, !tbaa !9 %3 = srem i32 %.pre108.i, 1000000007 br label %fMain.exit if.end.i: ; preds = %for.inc.i, %if.end.preheader.i %4 = phi i32 [ 2, %if.end.preheader.i ], [ %rem61.sink.i, %for.inc.i ] %5 = phi i32 [ %.pre.i, %if.end.preheader.i ], [ %rem27.i, %for.inc.i ] %6 = phi i32 [ 1, %if.end.preheader.i ], [ %8, %for.inc.i ] %indvars.iv.i = phi i64 [ 1, %if.end.preheader.i ], [ %indvars.iv.next.i, %for.inc.i ] %7 = phi i8 [ %1, %if.end.preheader.i ], [ %10, %for.inc.i ] %add.i = add nsw i32 %6, %5 %rem.i = srem i32 %add.i, 1000000007 %arrayidx15.i = getelementptr inbounds [100005 x [3 x i32]], ptr @si2PCnt, i64 0, i64 %indvars.iv.i store i32 %rem.i, ptr %arrayidx15.i, align 4, !tbaa !9 %mul.i = shl nsw i32 %rem.i, 1 %rem27.i = srem i32 %mul.i, 1000000007 %arrayidx30.i = getelementptr inbounds [100005 x [3 x i32]], ptr @si2PCnt, i64 0, i64 %indvars.iv.i, i64 1 store i32 %rem27.i, ptr %arrayidx30.i, align 4, !tbaa !9 %cmp34.i = icmp eq i8 %7, 48 br i1 %cmp34.i, label %for.inc.i, label %if.else.i if.else.i: ; preds = %if.end.i %add51.i = add nsw i32 %rem.i, %4 %rem52.i = srem i32 %add51.i, 1000000007 store i32 %rem52.i, ptr %arrayidx15.i, align 4, !tbaa !9 %mul60.i = shl nsw i32 %4, 1 %rem61.i = srem i32 %mul60.i, 1000000007 br label %for.inc.i for.inc.i: ; preds = %if.else.i, %if.end.i %8 = phi i32 [ %rem52.i, %if.else.i ], [ %rem.i, %if.end.i ] %rem61.sink.i = phi i32 [ %rem61.i, %if.else.i ], [ %4, %if.end.i ] %9 = getelementptr inbounds [100005 x [3 x i32]], ptr @si2PCnt, i64 0, i64 %indvars.iv.i, i64 2 store i32 %rem61.sink.i, ptr %9, align 4 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %arrayidx.i = getelementptr inbounds [100005 x i8], ptr @sc1Val, i64 0, i64 %indvars.iv.next.i %10 = load i8, ptr %arrayidx.i, align 1, !tbaa !11 %11 = add i8 %10, -50 %or.cond.i = icmp ult i8 %11, -2 br i1 %or.cond.i, label %for.cond66.preheader.loopexit.i, label %if.end.i fMain.exit: ; preds = %entry, %for.cond66.preheader.loopexit.i %12 = phi i32 [ %.pre109.i, %for.cond66.preheader.loopexit.i ], [ 2, %entry ] %rem75.i = phi i32 [ %3, %for.cond66.preheader.loopexit.i ], [ 1, %entry ] %liNo.0.lcssa.i = phi i64 [ %idxprom70.phi.trans.insert.i, %for.cond66.preheader.loopexit.i ], [ 0, %entry ] %arrayidx73.1.i = getelementptr inbounds [100005 x [3 x i32]], ptr @si2PCnt, i64 0, i64 %liNo.0.lcssa.i, i64 1 %13 = load i32, ptr %arrayidx73.1.i, align 4, !tbaa !9 %add74.1.i = add nsw i32 %13, %rem75.i %rem75.1.i = srem i32 %add74.1.i, 1000000007 %add74.2.i = add nsw i32 %rem75.1.i, %12 %rem75.2.i = srem i32 %add74.2.i, 1000000007 %call1 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %lc1Buf, ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %rem75.2.i) #4 %call.i4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull %lc1Buf) call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %lc1Buf) #4 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) #3 ; Function Attrs: nofree nounwind declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %call = tail call i32 @fOne() ret i32 0 } attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"int", !7, i64 0} !11 = !{!7, !7, i64 0}
#include <stdio.h> int r, c, p; int main() { while((c = getchar_unlocked()) > 10) { if (c == p) { p = 1; } else { r += 1; p = p == 1 ? 0 : c; } } printf("%d\n", r); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157857/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157857/source.c" target datalayout = "e-m:e-p270: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._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] } @c = dso_local local_unnamed_addr global i32 0, align 4 @p = dso_local local_unnamed_addr global i32 0, align 4 @r = dso_local local_unnamed_addr global i32 0, align 4 @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @stdin = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %.pre4 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %while.cond while.cond: ; preds = %if.end, %entry %0 = phi ptr [ %4, %if.end ], [ %.pre4, %entry ] %_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 = %while.cond %call.i = tail call i32 @__uflow(ptr noundef nonnull %0) #3 %.pre = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit cond.false.i: ; preds = %while.cond %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 %4 = phi ptr [ %.pre, %cond.true.i ], [ %0, %cond.false.i ] %cond.i = phi i32 [ %call.i, %cond.true.i ], [ %conv3.i, %cond.false.i ] store i32 %cond.i, ptr @c, align 4, !tbaa !17 %cmp = icmp sgt i32 %cond.i, 10 br i1 %cmp, label %while.body, label %while.end while.body: ; preds = %getchar_unlocked.exit %5 = load i32, ptr @p, align 4, !tbaa !17 %cmp1 = icmp eq i32 %cond.i, %5 br i1 %cmp1, label %if.end, label %if.else if.else: ; preds = %while.body %6 = load i32, ptr @r, align 4, !tbaa !17 %add = add nsw i32 %6, 1 store i32 %add, ptr @r, align 4, !tbaa !17 %cmp2 = icmp eq i32 %5, 1 %cond = select i1 %cmp2, i32 0, i32 %cond.i br label %if.end if.end: ; preds = %while.body, %if.else %storemerge = phi i32 [ %cond, %if.else ], [ 1, %while.body ] store i32 %storemerge, ptr @p, align 4, !tbaa !17 br label %while.cond, !llvm.loop !18 while.end: ; preds = %getchar_unlocked.exit %7 = load i32, ptr @r, align 4, !tbaa !17 %call3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %7) ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 declare i32 @__uflow(ptr 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 = { nofree nounwind "no-trapping-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 = { "no-trapping-math"="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, !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 = !{!11, !11, i64 0} !18 = distinct !{!18, !19} !19 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(void){ int c[5][5]; for(int i=0; i<3; i++)scanf("%d %d %d", &c[i][0], &c[i][1], &c[i][2]); for(int i=1; i<3; i++){ for(int j=1; j<3; j++){ if(c[i][0]-c[i-1][0]!=c[i][j]-c[i-1][j]){ printf("No\n"); return 0; } } } for(int i=1; i<3; i++){ for(int j=1; j<3; j++){ if(c[0][i]-c[0][i-1]!=c[j][i]-c[j][i-1]){ printf("No\n"); return 0; } } } printf("Yes\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157914/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157914/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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.3 = 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: %c = alloca [5 x [5 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %c) #4 %arrayidx4 = getelementptr inbounds [5 x [5 x i32]], ptr %c, i64 0, i64 0, i64 1 %arrayidx7 = getelementptr inbounds [5 x [5 x i32]], ptr %c, i64 0, i64 0, i64 2 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c, ptr noundef nonnull %arrayidx4, ptr noundef nonnull %arrayidx7) %arrayidx.1 = getelementptr inbounds [5 x [5 x i32]], ptr %c, i64 0, i64 1 %arrayidx4.1 = getelementptr inbounds [5 x [5 x i32]], ptr %c, i64 0, i64 1, i64 1 %arrayidx7.1 = getelementptr inbounds [5 x [5 x i32]], ptr %c, i64 0, i64 1, i64 2 %call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.1, ptr noundef nonnull %arrayidx4.1, ptr noundef nonnull %arrayidx7.1) %arrayidx.2 = getelementptr inbounds [5 x [5 x i32]], ptr %c, i64 0, i64 2 %arrayidx4.2 = getelementptr inbounds [5 x [5 x i32]], ptr %c, i64 0, i64 2, i64 1 %arrayidx7.2 = getelementptr inbounds [5 x [5 x i32]], ptr %c, i64 0, i64 2, i64 2 %call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.2, ptr noundef nonnull %arrayidx4.2, ptr noundef nonnull %arrayidx7.2) %0 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %1 = load i32, ptr %c, align 16, !tbaa !5 %sub23 = sub nsw i32 %0, %1 %2 = load i32, ptr %arrayidx4.1, align 8, !tbaa !5 %3 = load i32, ptr %arrayidx4, align 4, !tbaa !5 %sub33 = sub nsw i32 %2, %3 %cmp34.not = icmp eq i32 %sub23, %sub33 br i1 %cmp34.not, label %for.cond13, label %cleanup87 for.cond13: ; preds = %entry %4 = load i32, ptr %arrayidx7.1, align 4, !tbaa !5 %5 = load i32, ptr %arrayidx7, align 8, !tbaa !5 %sub33.1 = sub nsw i32 %4, %5 %cmp34.not.1 = icmp eq i32 %sub23, %sub33.1 br i1 %cmp34.not.1, label %for.cond13.1, label %cleanup87 for.cond13.1: ; preds = %for.cond13 %6 = load i32, ptr %arrayidx.2, align 8, !tbaa !5 %sub23.1 = sub nsw i32 %6, %0 %7 = load i32, ptr %arrayidx4.2, align 4, !tbaa !5 %sub33.1127 = sub nsw i32 %7, %2 %cmp34.not.1128 = icmp eq i32 %sub23.1, %sub33.1127 br i1 %cmp34.not.1128, label %for.cond13.1129, label %cleanup87 for.cond13.1129: ; preds = %for.cond13.1 %8 = load i32, ptr %arrayidx7.2, align 16, !tbaa !5 %sub33.1.1 = sub nsw i32 %8, %4 %cmp34.not.1.1 = icmp eq i32 %sub23.1, %sub33.1.1 br i1 %cmp34.not.1.1, label %for.cond13.1.1, label %cleanup87 for.cond13.1.1: ; preds = %for.cond13.1129 %sub61 = sub nsw i32 %3, %1 %sub71 = sub nsw i32 %2, %0 %cmp72.not = icmp eq i32 %sub61, %sub71 %sub71.1 = sub nsw i32 %7, %6 %cmp72.not.1 = icmp eq i32 %sub61, %sub71.1 %or.cond = select i1 %cmp72.not, i1 %cmp72.not.1, i1 false br i1 %or.cond, label %for.cond50.1, label %cleanup83 for.cond50.1: ; preds = %for.cond13.1.1 %sub61.1 = sub nsw i32 %5, %3 %sub71.1135 = sub nsw i32 %4, %2 %cmp72.not.1136 = icmp eq i32 %sub61.1, %sub71.1135 %sub71.1.1 = sub nsw i32 %8, %7 %cmp72.not.1.1 = icmp eq i32 %sub61.1, %sub71.1.1 %or.cond138 = select i1 %cmp72.not.1136, i1 %cmp72.not.1.1, i1 false br i1 %or.cond138, label %cleanup87, label %cleanup83 cleanup83: ; preds = %for.cond50.1, %for.cond13.1.1 br label %cleanup87 cleanup87: ; preds = %for.cond50.1, %entry, %for.cond13, %for.cond13.1, %for.cond13.1129, %cleanup83 %str.3.sink = phi ptr [ @str.3, %cleanup83 ], [ @str.3, %for.cond13.1129 ], [ @str.3, %for.cond13.1 ], [ @str.3, %for.cond13 ], [ @str.3, %entry ], [ @str.4, %for.cond50.1 ] %puts114 = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.sink) call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %c) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #define BUF_SIZE 30 int main(void) { FILE *fp = stdin; char line[BUF_SIZE]; int i, j; int a[3][3]; int min = 101; int argmin_x, argmin_y; for(i = 0; i < 3; i++) { if(!fgets(line, BUF_SIZE, fp)) return 0; sscanf(line, "%d %d %d", &a[i][0], &a[i][1], &a[i][2]); for(j = 0; j < 3; j++) { if(a[i][j] < min) { min = a[i][j]; argmin_x = i; argmin_y = j; } } } int flag = 1; for(i = 0; i <= min; i++) { //a_i = i int b1 = a[i][0] - i; int b2 = a[i][1] - i; int b3 = a[i][2] - i; flag = 1; // probe for(j = 0; j < 3; j++) { int tmp1 = b1 - a[j][0]; int tmp2 = b2 - a[j][1]; int tmp3 = b3 - a[j][2]; if(tmp1 == tmp2 && tmp1 == tmp3) { continue; } else { flag = 0; break; } } if(flag) break; } printf("%s\n", flag ? "Yes" : "No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157958/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157958/source.c" target datalayout = "e-m:e-p270: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 [9 x i8] c"%d %d %d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @.str.3 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %line = alloca [30 x i8], align 16 %a = alloca [3 x [3 x i32]], align 16 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 call void @llvm.lifetime.start.p0(i64 30, ptr nonnull %line) #5 call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %a) #5 %call = call ptr @fgets(ptr noundef nonnull %line, i32 noundef 30, ptr noundef %0) %tobool.not = icmp eq ptr %call, null br i1 %tobool.not, label %cleanup77, label %if.end for.body29.preheader: ; preds = %if.end.2 %spec.select.2.2 = call i32 @llvm.smin.i32(i32 %spec.select.1.2, i32 101) %1 = add nuw nsw i32 %spec.select.2.2, 1 %wide.trip.count = zext i32 %1 to i64 %.pre = load i32, ptr %a, align 16, !tbaa !9 %.pre147 = load i32, ptr %arrayidx5, align 4, !tbaa !9 %2 = load i32, ptr %arrayidx8, align 8 %3 = load i32, ptr %arrayidx.1, align 4 %4 = load i32, ptr %arrayidx5.1, align 16 %5 = load i32, ptr %arrayidx8.1, align 4 br label %for.body29 if.end: ; preds = %entry %arrayidx5 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 0, i64 1 %arrayidx8 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 0, i64 2 %call9 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %line, ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %arrayidx5, ptr noundef nonnull %arrayidx8) #5 %6 = load i32, ptr %a, align 16, !tbaa !9 %7 = load i32, ptr %arrayidx5, align 4, !tbaa !9 %8 = load i32, ptr %arrayidx8, align 8, !tbaa !9 %call.1 = call ptr @fgets(ptr noundef nonnull %line, i32 noundef 30, ptr noundef %0) %tobool.not.1 = icmp eq ptr %call.1, null br i1 %tobool.not.1, label %cleanup77, label %if.end.1 if.end.1: ; preds = %if.end %arrayidx.1 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 1 %arrayidx5.1 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 1, i64 1 %arrayidx8.1 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 1, i64 2 %call9.1 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %line, ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.1, ptr noundef nonnull %arrayidx5.1, ptr noundef nonnull %arrayidx8.1) #5 %9 = load i32, ptr %arrayidx.1, align 4, !tbaa !9 %10 = load i32, ptr %arrayidx5.1, align 16, !tbaa !9 %11 = load i32, ptr %arrayidx8.1, align 4, !tbaa !9 %call.2 = call ptr @fgets(ptr noundef nonnull %line, i32 noundef 30, ptr noundef %0) %tobool.not.2 = icmp eq ptr %call.2, null br i1 %tobool.not.2, label %cleanup77, label %if.end.2 if.end.2: ; preds = %if.end.1 %spec.select = call i32 @llvm.smin.i32(i32 %6, i32 %7) %spec.select.1 = call i32 @llvm.smin.i32(i32 %spec.select, i32 %8) %spec.select.2 = call i32 @llvm.smin.i32(i32 %spec.select.1, i32 %9) %spec.select.1141 = call i32 @llvm.smin.i32(i32 %spec.select.2, i32 %10) %spec.select.1.1 = call i32 @llvm.smin.i32(i32 %spec.select.1141, i32 %11) %arrayidx.2 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 2 %arrayidx5.2 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 2, i64 1 %arrayidx8.2 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 2, i64 2 %call9.2 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %line, ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.2, ptr noundef nonnull %arrayidx5.2, ptr noundef nonnull %arrayidx8.2) #5 %12 = load i32, ptr %arrayidx.2, align 8, !tbaa !9 %spec.select.2.1 = call i32 @llvm.smin.i32(i32 %spec.select.1.1, i32 %12) %13 = load i32, ptr %arrayidx5.2, align 4, !tbaa !9 %spec.select.2143 = call i32 @llvm.smin.i32(i32 %spec.select.2.1, i32 %13) %14 = load i32, ptr %arrayidx8.2, align 16, !tbaa !9 %spec.select.1.2 = call i32 @llvm.smin.i32(i32 %spec.select.2143, i32 %14) %cmp28.not134 = icmp slt i32 %spec.select.1.2, 0 br i1 %cmp28.not134, label %for.end73, label %for.body29.preheader for.body29: ; preds = %for.body29.preheader, %for.inc71 %indvars.iv = phi i64 [ 0, %for.body29.preheader ], [ %indvars.iv.next, %for.inc71 ] %i.1.neg136 = phi i32 [ 0, %for.body29.preheader ], [ %i.1.neg, %for.inc71 ] %indvars146 = trunc i64 %indvars.iv to i32 %arrayidx31 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 %indvars.iv %15 = load i32, ptr %arrayidx31, align 4, !tbaa !9 %arrayidx35 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 1 %16 = load i32, ptr %arrayidx35, align 4, !tbaa !9 %arrayidx39 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 2 %17 = load i32, ptr %arrayidx39, align 4, !tbaa !9 %.neg121 = add i32 %15, %i.1.neg136 %.neg123 = add i32 %16, %i.1.neg136 %.neg125 = add i32 %17, %i.1.neg136 %sub47 = sub i32 %.neg121, %.pre %sub51 = sub i32 %.neg123, %.pre147 %cmp56 = icmp eq i32 %sub47, %sub51 %sub55 = sub i32 %.neg125, %2 %cmp57 = icmp eq i32 %sub47, %sub55 %or.cond149 = select i1 %cmp56, i1 %cmp57, i1 false br i1 %or.cond149, label %for.cond41, label %for.inc71 for.cond41: ; preds = %for.body29 %sub47.1 = sub i32 %.neg121, %3 %sub51.1 = sub i32 %.neg123, %4 %cmp56.1 = icmp eq i32 %sub47.1, %sub51.1 %sub55.1 = sub i32 %.neg125, %5 %cmp57.1 = icmp eq i32 %sub47.1, %sub55.1 %or.cond = select i1 %cmp56.1, i1 %cmp57.1, i1 false br i1 %or.cond, label %for.cond41.1, label %for.inc71 for.cond41.1: ; preds = %for.cond41 %sub47.2 = sub i32 %.neg121, %12 %sub51.2 = sub i32 %.neg123, %13 %cmp56.2 = icmp eq i32 %sub47.2, %sub51.2 %sub55.2 = sub i32 %.neg125, %14 %cmp57.2 = icmp eq i32 %sub47.2, %sub55.2 %or.cond148 = select i1 %cmp56.2, i1 %cmp57.2, i1 false br i1 %or.cond148, label %for.end73, label %for.inc71 for.inc71: ; preds = %for.cond41.1, %for.cond41, %for.body29 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %i.1.neg = xor i32 %indvars146, -1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end73, label %for.body29, !llvm.loop !11 for.end73: ; preds = %for.inc71, %for.cond41.1, %if.end.2 %tobool74.not = phi ptr [ @.str.2, %if.end.2 ], [ @.str.3, %for.inc71 ], [ @.str.2, %for.cond41.1 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %tobool74.not) br label %cleanup77 cleanup77: ; preds = %entry, %if.end, %if.end.1, %for.end73 call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %a) #5 call void @llvm.lifetime.end.p0(i64 30, ptr nonnull %line) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"int", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main() { int a[3][3],sum=0,sum1,sum2,i,j; for(i=0;i<3;i++) for(j=0;j<3;j++) { scanf("%d",&a[i][j]); sum+=a[i][j]; } sum1=a[0][0]+a[2][1]+a[1][2]; sum2=a[2][2]+a[0][1]+a[1][0]; if(a[0][0]+a[2][2]==a[0][2]+a[2][0]&&sum1==sum2&&sum==sum2*3) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158021/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158021/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca [3 x [3 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 16, !tbaa !5 %arrayidx5.1 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 0, i64 1 %call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.1) %1 = load i32, ptr %arrayidx5.1, align 4, !tbaa !5 %arrayidx5.2 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 0, i64 2 %call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.2) %2 = load i32, ptr %arrayidx5.2, align 8, !tbaa !5 %arrayidx5.160 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 1, i64 0 %call.161 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.160) %3 = load i32, ptr %arrayidx5.160, align 4, !tbaa !5 %arrayidx5.1.1 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 1, i64 1 %call.1.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.1.1) %4 = load i32, ptr %arrayidx5.1.1, align 16, !tbaa !5 %arrayidx5.2.1 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 1, i64 2 %call.2.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.2.1) %5 = load i32, ptr %arrayidx5.2.1, align 4, !tbaa !5 %arrayidx5.263 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 2, i64 0 %call.264 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.263) %6 = load i32, ptr %arrayidx5.263, align 8, !tbaa !5 %arrayidx5.1.2 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 2, i64 1 %call.1.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.1.2) %7 = load i32, ptr %arrayidx5.1.2, align 4, !tbaa !5 %arrayidx5.2.2 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 2, i64 2 %call.2.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.2.2) %8 = load i32, ptr %arrayidx5.2.2, align 16, !tbaa !5 %9 = load i32, ptr %a, align 16, !tbaa !5 %add33 = add nsw i32 %8, %9 %10 = load i32, ptr %arrayidx5.2, align 8, !tbaa !5 %11 = load i32, ptr %arrayidx5.263, align 8, !tbaa !5 %add38 = add nsw i32 %11, %10 %cmp39 = icmp eq i32 %add33, %add38 br i1 %cmp39, label %land.lhs.true, label %if.else land.lhs.true: ; preds = %entry %add.1 = add nsw i32 %1, %0 %add.2 = add nsw i32 %2, %add.1 %add.162 = add nsw i32 %3, %add.2 %add.1.1 = add nsw i32 %4, %add.162 %add.2.1 = add nsw i32 %5, %add.1.1 %add.265 = add nsw i32 %6, %add.2.1 %add.1.2 = add nsw i32 %7, %add.265 %add.2.2 = add nsw i32 %8, %add.1.2 %12 = load i32, ptr %arrayidx5.1, align 4, !tbaa !5 %add25 = add nsw i32 %12, %8 %13 = load i32, ptr %arrayidx5.160, align 4, !tbaa !5 %add28 = add nsw i32 %add25, %13 %14 = load i32, ptr %arrayidx5.1.2, align 4, !tbaa !5 %add17 = add nsw i32 %14, %9 %15 = load i32, ptr %arrayidx5.2.1, align 4, !tbaa !5 %add20 = add nsw i32 %add17, %15 %cmp40 = icmp eq i32 %add20, %add28 %mul = mul nsw i32 %add28, 3 %cmp42 = icmp eq i32 %add.2.2, %mul %or.cond = select i1 %cmp40, i1 %cmp42, i1 false br i1 %or.cond, label %if.end, label %if.else if.else: ; preds = %land.lhs.true, %entry br label %if.end if.end: ; preds = %land.lhs.true, %if.else %str.sink = phi ptr [ @str, %if.else ], [ @str.3, %land.lhs.true ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<string.h> #define debug system("PAUSE") void sort(int [], int); int main() { int a[3][3]; int i, j; for (i = 0; i < 3; i++) for (j = 0; j < 3; j++) scanf("%d", &a[i][j]); if (a[1][0] - a[0][0] == a[1][1] - a[0][1] && a[1][1] - a[0][1] == a[1][2] - a[0][2]) if (a[2][0] - a[1][0] == a[2][1] - a[1][1] && a[2][1] - a[1][1] == a[2][2] - a[1][2]) printf("Yes\n"); else printf("No\n"); else printf("No\n"); return 0; } void sort(int a[], int len) { int i, j, temp; for (i = 0; i < len - 1; i++) for (j = 0; j < len - 1 - i; j++) if (a[j] > a[j + 1]) { temp = a[j]; a[j] = a[j + 1]; a[j + 1] = temp; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158065/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158065/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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.3 = private unnamed_addr constant [3 x i8] c"No\00", align 1 @str.4 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca [3 x [3 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %a) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %arrayidx5.1 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 0, i64 1 %call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.1) %arrayidx5.2 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 0, i64 2 %call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.2) %arrayidx5.169 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 1, i64 0 %call.170 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.169) %arrayidx5.1.1 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 1, i64 1 %call.1.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.1.1) %arrayidx5.2.1 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 1, i64 2 %call.2.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.2.1) %arrayidx5.271 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 2, i64 0 %call.272 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.271) %arrayidx5.1.2 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 2, i64 1 %call.1.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.1.2) %arrayidx5.2.2 = getelementptr inbounds [3 x [3 x i32]], ptr %a, i64 0, i64 2, i64 2 %call.2.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.2.2) %0 = load i32, ptr %arrayidx5.169, align 4, !tbaa !5 %1 = load i32, ptr %a, align 16, !tbaa !5 %sub = sub nsw i32 %0, %1 %2 = load i32, ptr %arrayidx5.1.1, align 16, !tbaa !5 %3 = load i32, ptr %arrayidx5.1, align 4, !tbaa !5 %sub17 = sub nsw i32 %2, %3 %cmp18 = icmp eq i32 %sub, %sub17 br i1 %cmp18, label %land.lhs.true, label %if.end58 land.lhs.true: ; preds = %entry %4 = load i32, ptr %arrayidx5.2.1, align 4, !tbaa !5 %5 = load i32, ptr %arrayidx5.2, align 8, !tbaa !5 %sub28 = sub nsw i32 %4, %5 %cmp29 = icmp eq i32 %sub, %sub28 br i1 %cmp29, label %if.then, label %if.end58 if.then: ; preds = %land.lhs.true %6 = load i32, ptr %arrayidx5.271, align 8, !tbaa !5 %sub34 = sub nsw i32 %6, %0 %7 = load i32, ptr %arrayidx5.1.2, align 4, !tbaa !5 %sub39 = sub nsw i32 %7, %2 %cmp40 = icmp eq i32 %sub34, %sub39 br i1 %cmp40, label %land.lhs.true41, label %if.else land.lhs.true41: ; preds = %if.then %8 = load i32, ptr %arrayidx5.2.2, align 16, !tbaa !5 %sub51 = sub nsw i32 %8, %4 %cmp52 = icmp eq i32 %sub34, %sub51 br i1 %cmp52, label %if.end58, label %if.else if.else: ; preds = %land.lhs.true41, %if.then br label %if.end58 if.end58: ; preds = %entry, %land.lhs.true, %land.lhs.true41, %if.else %str.4.sink = phi ptr [ @str.3, %if.else ], [ @str.4, %land.lhs.true41 ], [ @str.3, %land.lhs.true ], [ @str.3, %entry ] %puts64 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink) call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %a) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @sort(ptr nocapture noundef %a, i32 noundef %len) local_unnamed_addr #3 { entry: %sub = add i32 %len, -1 %cmp40 = icmp sgt i32 %len, 1 br i1 %cmp40, label %for.cond1.preheader.preheader, label %for.end21 for.cond1.preheader.preheader: ; preds = %entry %invariant.gep = getelementptr i32, ptr %a, i64 1 br label %for.cond1.preheader for.cond1.preheader: ; preds = %for.cond1.preheader.preheader, %for.inc19 %indvars.iv43 = phi i32 [ %indvars.iv.next44, %for.inc19 ], [ %sub, %for.cond1.preheader.preheader ] %i.041 = phi i32 [ %inc20, %for.inc19 ], [ 0, %for.cond1.preheader.preheader ] %0 = zext i32 %indvars.iv43 to i64 %cmp438 = icmp sgt i32 %sub, %i.041 br i1 %cmp438, label %for.body5.preheader, label %for.inc19 for.body5.preheader: ; preds = %for.cond1.preheader %.pre = load i32, ptr %a, align 4, !tbaa !5 %xtraiter = and i64 %0, 1 %1 = icmp eq i32 %indvars.iv43, 1 br i1 %1, label %for.inc19.loopexit.unr-lcssa, label %for.body5.preheader.new for.body5.preheader.new: ; preds = %for.body5.preheader %unroll_iter = and i64 %0, 4294967294 br label %for.body5 for.body5: ; preds = %for.inc.1, %for.body5.preheader.new %2 = phi i32 [ %.pre, %for.body5.preheader.new ], [ %6, %for.inc.1 ] %indvars.iv = phi i64 [ 0, %for.body5.preheader.new ], [ %indvars.iv.next.1, %for.inc.1 ] %niter = phi i64 [ 0, %for.body5.preheader.new ], [ %niter.next.1, %for.inc.1 ] %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx7 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next %3 = load i32, ptr %arrayidx7, align 4, !tbaa !5 %cmp8 = icmp sgt i32 %2, %3 br i1 %cmp8, label %if.then, label %for.inc if.then: ; preds = %for.body5 %arrayidx = getelementptr inbounds i32, ptr %a, i64 %indvars.iv store i32 %3, ptr %arrayidx, align 4, !tbaa !5 store i32 %2, ptr %arrayidx7, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.body5, %if.then %4 = phi i32 [ %3, %for.body5 ], [ %2, %if.then ] %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %arrayidx7.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.1 %5 = load i32, ptr %arrayidx7.1, align 4, !tbaa !5 %cmp8.1 = icmp sgt i32 %4, %5 br i1 %cmp8.1, label %if.then.1, label %for.inc.1 if.then.1: ; preds = %for.inc %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next store i32 %5, ptr %arrayidx.1, align 4, !tbaa !5 store i32 %4, ptr %arrayidx7.1, align 4, !tbaa !5 br label %for.inc.1 for.inc.1: ; preds = %if.then.1, %for.inc %6 = phi i32 [ %5, %for.inc ], [ %4, %if.then.1 ] %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.inc19.loopexit.unr-lcssa, label %for.body5, !llvm.loop !9 for.inc19.loopexit.unr-lcssa: ; preds = %for.inc.1, %for.body5.preheader %.unr = phi i32 [ %.pre, %for.body5.preheader ], [ %6, %for.inc.1 ] %indvars.iv.unr = phi i64 [ 0, %for.body5.preheader ], [ %indvars.iv.next.1, %for.inc.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.inc19, label %for.body5.epil for.body5.epil: ; preds = %for.inc19.loopexit.unr-lcssa %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv.unr %7 = load i32, ptr %gep, align 4, !tbaa !5 %cmp8.epil = icmp sgt i32 %.unr, %7 br i1 %cmp8.epil, label %if.then.epil, label %for.inc19 if.then.epil: ; preds = %for.body5.epil %arrayidx.epil = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.unr store i32 %7, ptr %arrayidx.epil, align 4, !tbaa !5 store i32 %.unr, ptr %gep, align 4, !tbaa !5 br label %for.inc19 for.inc19: ; preds = %for.inc19.loopexit.unr-lcssa, %if.then.epil, %for.body5.epil, %for.cond1.preheader %inc20 = add nuw nsw i32 %i.041, 1 %indvars.iv.next44 = add i32 %indvars.iv43, -1 %exitcond45.not = icmp eq i32 %inc20, %sub br i1 %exitcond45.not, label %for.end21, label %for.cond1.preheader, !llvm.loop !11 for.end21: ; preds = %for.inc19, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #include<stdbool.h> #include<assert.h> #include<ctype.h> typedef long long ll; typedef long double ld; #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #define rrep(i,l,r)for(ll i=(l);i>=(r);i--) #define INF (1LL<<60) #define MOD1 1000000007 #define MOD2 998244353 #define MAX_N (1 << 17) #define YES printf("Yes\n") #define NO printf("No\n") #define PN printf("\n") #define charsize 100005 //10^5+5 #define PI 3.141592653589793238 void swap(ll *a, ll *b){ll c;c=*b;*b=*a;*a= c;} void cin(ll *n){ scanf("%lld",&(*n)); } ll max2(ll a,ll b){return a>=b?a:b;} ll min2(ll a,ll b){return a>=b?b:a;} ll min3(ll a, ll b, ll c){return (a<=b && a<=c) ? a : b<=c ? b : c;} ll max3(ll a, ll b, ll c){return (a>=b && a>=c) ? a : b>=c ? b : c;} ll minn(ll n, ll a[]){ll b=INF;rep(i,0,n) b=min2(b,a[i]);return b;} ll maxn(ll n, ll a[]){ll b=-INF;rep(i,0,n) b=max2(b,a[i]);return b;} ll POW(ll a, ll b){ll c=1;rep(i,0,b) c*=a;return c;} double POW_d(double a, double b){double c=1;rep(i,0,b) c*=a;return c;} ll gcd(ll a,ll b){return b?gcd(b,a%b):a;} ll lcm(ll a,ll b){return a/gcd(a,b)*b;} ll mod_MOD1(ll n){n+= n<0?((-n)/MOD1+1)*MOD1:0; return n%=MOD1;} ll mod_p(ll n ,ll p){n+= n<0?((-n)/p+1)*p:0; return n%=p;} ll change_into_num(char s[] , ll len, ll p){ return !p ? 0 : POW(10,p-1)*(s[len-p]-'0') + change_into_num(s,len,p-1); } void lr_lower( int *l, int *r, ll am, ll val , int type ){ (type<3) ? ( am < val ? ( *l = (*l+*r)/2 ) : ( *r= (*l+*r)/2 ) ) : ( am <= val ? ( *l = (*l+*r)/2 ) : ( *r= (*l+*r)/2 ) ); } void lr_upper( int *l, int *r, ll am, ll val , int type ){ (type<3) ? ( am <= val ? ( *l = (*l+*r)/2 ) : ( *r= (*l+*r)/2 ) ) : ( am < val ? ( *l = (*l+*r)/2 ) : ( *r= (*l+*r)/2 ) ); } int cmp_lower( ll a, ll b, int type ){ return (type==1) ? ( a==b ? 1 : 0 ) : (type==2) ? ( a>=b ? 1 : 0 ) : ( a>b ? 1 : 0 ) ; } int cmp_upper( ll a, ll b, int type ){ return (type==1) ? ( a==b ? 1 : 0 ) : (type==2) ? ( a<=b ? 1 : 0 ) : ( a<b ? 1 : 0 ) ; } // return smallest p which meets a[p]==val :1 >=:2 >:3 ll lower_bound( ll a[], int l, int r, ll val , int type ){ while(r-l>1) lr_lower(&l,&r,a[ (l+r)/2 ],val,type); return cmp_lower(a[l],val,type) ? l : cmp_lower(a[r],val,type) ? r : -1; } // return biggest p which meets a[p]==val :1 <=:2 <:3 ll upper_bound( ll a[], int l, int r, ll val , int type ){ while(r-l>1) lr_upper(&l,&r,a[ (l+r)/2 ],val,type); return cmp_upper(a[r],val,type) ? r : cmp_upper(a[l],val,type) ? l : -1; } // count i which meets ai==x ll count(ll a[], int l, int r, ll x){ int p = lower_bound(a,l,r,x,1); return p==-1 ? 0 : upper_bound(a,p,r,x,1)-p+1; } ll *factors[2] , fac_cnt=0 , is_factor_prepared=0; ll factor_pre(){ rep(i,0,1){ if(is_factor_prepared++) return 0; } ll tmp=(1e6)/2+1, fac_tmp[tmp]; rep(i,0,tmp){fac_tmp[i]=i?2*i+1:2;} rep(i,1,tmp){if(fac_tmp[i]){ repp(j,3,tmp/(2*i+1)+1,2 ){ if( j*(2*i+1)<tmp ) fac_tmp[ (j*(2*i+1)-1)/2 ]=0; } }else continue;} rep(i,0,tmp){if(fac_tmp[i]){ rep(j,0,2){ factors[j] = realloc( factors[j] , sizeof(ll)*( fac_cnt +1 ) ); factors[j][j?fac_cnt++:fac_cnt]=j?0:fac_tmp[i]; } } } return 0; } ll factor(ll n, ll new_common_plus){ factor_pre(); rep(i,0,fac_cnt){ ll cnt=0; rep(j,0,1){ while( ( cnt+= n %factors[0][i]==0 ? 1 : 0 ) && (n/=factors[0][i]) %factors[0][i]==0 ) continue; } factors[1][i]= new_common_plus==1 ? cnt : new_common_plus==2 ? max2(factors[1][i],cnt) : factors[1][i]+cnt ; if( factors[0][i]> n ) break; } return n; } ll judge_prime(ll n){ factor_pre(); rep(i,0,fac_cnt){ if(n<factors[0][i]*factors[0][i] || n==factors[0][i]) break; else if(n%factors[0][i]==0) n/=n; } return n==1?0:1; } ll *mf_arr,*inv_arr,*finv_arr,is_minv_made=0,is_mf_made=0; ll makeinv(ll n , ll mod){ rep(i,0,1){if(is_minv_made++) return 0;} inv_arr = realloc(inv_arr, sizeof(ll)*2 ); finv_arr = realloc(finv_arr, sizeof(ll)*2 ); inv_arr[1]=1;finv_arr[0]=finv_arr[1]=1; rep(i,2,n+1){ inv_arr = realloc(inv_arr, sizeof(ll)*(i+1) ); finv_arr = realloc(finv_arr, sizeof(ll)*(i+1) ); inv_arr[i]= mod - inv_arr[mod%i] * (mod / i) % mod; finv_arr[i] = finv_arr[i - 1] * inv_arr[i] % mod; } return 0; } ll make_mf(ll n, ll mod){ rep(i,0,1){ if(is_mf_made++) return 0; } mf_arr = realloc(mf_arr, sizeof(ll)*2 ); ll x=1; mf_arr[0]=mf_arr[1]=x; rep(i,2,n+1){ x=x*i%mod; mf_arr = realloc(mf_arr, sizeof(ll)*(i+1) ); mf_arr[i]=x; } return 0; } ll m_inv(ll x, ll mod, ll is_fac ){ makeinv(2*1e6+10,mod); return is_fac?finv_arr[x]:inv_arr[x]; } ll m_f(ll x, ll mod){ make_mf(2*1e6+10,mod); return mf_arr[x]; } // ll mod_nck(ll n, ll k, ll mod){ return m_f[n]*finv_arr[k]%mod*finv_arr[n-k]%mod; } ll m_p(ll r,ll n,ll mod){ ll t=1,s=r; while(n>0){ t = (n&1) ? t*s%mod : t; s=s*s%mod; n>>=1; } return r?t:0; } ll m_mul2(ll a, ll b, ll mod){ return a*b%mod; } ll m_mul3(ll a, ll b, ll c, ll mod){ return m_mul2(a*b%mod,c,mod); } ll m_mul4(ll a, ll b, ll c, ll d, ll mod){ return m_mul3(a*b%mod,c,d,mod); } ll m_mul5(ll a, ll b, ll c, ll d, ll e, ll mod){ return m_mul4(a*b%mod,c,d,e,mod); } int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;} int downll(const void*a, const void*b){return*(ll*)a<*(ll*)b?1:*(ll*)a>*(ll*)b?-1:0;} int cmp_string( const void * a , const void * b ) { return strcmp( (char *)a , (char *)b ); } // qsort((void*)s,n,sizeof(s[0]),int_sort ); int cmp_char(const void * a, const void * b) { return *(char *)a - *(char *)b;} void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);} void sortdown(ll*a,int n){qsort(a,n,sizeof(ll),downll);} void sort_string(int n,int size,char s[][size]){ qsort( (void*)s , n , sizeof(s[0]) , cmp_string ); } void sort_char(char *s){ qsort( (void *)s , strlen(s) , sizeof(char) , cmp_char ); } ll unique_string(ll n ,ll size, char s[][size]){ ll ans=1; rep(i,1,n) if( strcmp(s[i],s[i-1]) ) ans++; return ans; } ll unique_num(ll n , ll a[]){ ll ans=1; rep(i,1,n) if( a[i]!=a[i-1] ) ans++; return ans; } typedef struct{ ll a , b;}fr; int cmp1( const void *p, const void *q ) { return ((fr*)p) ->a - ((fr*)q)->a;} int cmp2( const void *p, const void *q ) { return ((fr*)q) ->a - ((fr*)p)->a;} void strsortup(fr*a,int n){qsort(a,n,sizeof(fr),cmp1);} void strsortdown(fr*a,int n){qsort(a,n,sizeof(fr),cmp2);} /*aのb進数時の桁数*/ ll digits(ll a, ll b){return a/b?1+digits(a/b,b):1;} /*nをa進数にしたときの、i桁目の数*/ ll base(ll n, ll a, ll i){return i==1?n%a:base(n/a,a,i-1);} ll num[10][300000],cnt[10]={}; int main(void){ // fgets(s,sizeof(s),stdin); char s[1151154]; ll n; ll ans=0; cin(&n); scanf("%s",s); rep(i,0,10) rep(j,0,300000) num[i][j]=INF; rep(i,0,n){ ll t=s[i]-'0'; num[t][cnt[t]++]=i; } // rep(i,0,10){ // rep(j,0,5){ // printf("%lld ",num[i][j]); // } // PN; // } // PN; rep(i,0,1000){ ll p=0; rrep(j,3,1){ ll now=base(i,10,j); ll tmp=lower_bound(num[now],0,3*1e5,p,2); // printf("%lld ",tmp); if(num[now][tmp]>1e8) break; if(j==1){ // printf("%lld\n",i); ans++; }else{ p=num[now][tmp]+1; } } // PN; } printf("%lld\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158108/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158108/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @fac_cnt = dso_local local_unnamed_addr global i64 0, align 8 @is_factor_prepared = dso_local local_unnamed_addr global i64 0, align 8 @factors = dso_local local_unnamed_addr global [2 x ptr] zeroinitializer, align 16 @is_minv_made = dso_local local_unnamed_addr global i64 0, align 8 @is_mf_made = dso_local local_unnamed_addr global i64 0, align 8 @inv_arr = dso_local local_unnamed_addr global ptr null, align 8 @finv_arr = dso_local local_unnamed_addr global ptr null, align 8 @mf_arr = dso_local local_unnamed_addr global ptr null, align 8 @cnt = dso_local local_unnamed_addr global [10 x i64] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @num = dso_local local_unnamed_addr global [10 x [300000 x i64]] zeroinitializer, align 16 @.str.2 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @swap(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #0 { entry: %0 = load i64, ptr %b, align 8, !tbaa !5 %1 = load i64, ptr %a, align 8, !tbaa !5 store i64 %1, ptr %b, align 8, !tbaa !5 store i64 %0, ptr %a, align 8, !tbaa !5 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local void @cin(ptr noundef %n) local_unnamed_addr #2 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef %n) ret void } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @max2(i64 noundef %a, i64 noundef %b) local_unnamed_addr #4 { entry: %cond = tail call i64 @llvm.smax.i64(i64 %a, i64 %b) ret i64 %cond } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @min2(i64 noundef %a, i64 noundef %b) local_unnamed_addr #4 { entry: %cond = tail call i64 @llvm.smin.i64(i64 %a, i64 %b) ret i64 %cond } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @min3(i64 noundef %a, i64 noundef %b, i64 noundef %c) local_unnamed_addr #4 { entry: %cmp.not = icmp sgt i64 %a, %b %cmp1.not = icmp sgt i64 %a, %c %or.cond = or i1 %cmp.not, %cmp1.not %cond = tail call i64 @llvm.smin.i64(i64 %b, i64 %c) %cond6 = select i1 %or.cond, i64 %cond, i64 %a ret i64 %cond6 } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @max3(i64 noundef %a, i64 noundef %b, i64 noundef %c) local_unnamed_addr #4 { entry: %cmp.not = icmp slt i64 %a, %b %cmp1.not = icmp slt i64 %a, %c %or.cond = or i1 %cmp.not, %cmp1.not %cond = tail call i64 @llvm.smax.i64(i64 %b, i64 %c) %cond6 = select i1 %or.cond, i64 %cond, i64 %a ret i64 %cond6 } ; Function Attrs: nofree nosync nounwind memory(argmem: read) uwtable define dso_local i64 @minn(i64 noundef %n, ptr nocapture noundef readonly %a) local_unnamed_addr #5 { entry: %cmp4 = icmp sgt i64 %n, 0 br i1 %cmp4, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %entry %min.iters.check = icmp ult i64 %n, 4 br i1 %min.iters.check, label %for.body.preheader9, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %n, -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> [ <i64 1152921504606846976, i64 1152921504606846976>, %vector.ph ], [ %2, %vector.body ] %vec.phi7 = phi <2 x i64> [ <i64 1152921504606846976, i64 1152921504606846976>, %vector.ph ], [ %3, %vector.body ] %0 = getelementptr inbounds i64, ptr %a, i64 %index %wide.load = load <2 x i64>, ptr %0, align 8, !tbaa !5 %1 = getelementptr inbounds i64, ptr %0, i64 2 %wide.load8 = load <2 x i64>, ptr %1, align 8, !tbaa !5 %2 = tail call <2 x i64> @llvm.smin.v2i64(<2 x i64> %vec.phi, <2 x i64> %wide.load) %3 = tail call <2 x i64> @llvm.smin.v2i64(<2 x i64> %vec.phi7, <2 x i64> %wide.load8) %index.next = add nuw i64 %index, 4 %4 = icmp eq i64 %index.next, %n.vec br i1 %4, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %rdx.minmax = tail call <2 x i64> @llvm.smin.v2i64(<2 x i64> %2, <2 x i64> %3) %5 = tail call i64 @llvm.vector.reduce.smin.v2i64(<2 x i64> %rdx.minmax) %cmp.n = icmp eq i64 %n.vec, %n br i1 %cmp.n, label %for.cond.cleanup, label %for.body.preheader9 for.body.preheader9: ; preds = %for.body.preheader, %middle.block %i.06.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] %b.05.ph = phi i64 [ 1152921504606846976, %for.body.preheader ], [ %5, %middle.block ] br label %for.body for.cond.cleanup: ; preds = %for.body, %middle.block, %entry %b.0.lcssa = phi i64 [ 1152921504606846976, %entry ], [ %5, %middle.block ], [ %cond.i, %for.body ] ret i64 %b.0.lcssa for.body: ; preds = %for.body.preheader9, %for.body %i.06 = phi i64 [ %inc, %for.body ], [ %i.06.ph, %for.body.preheader9 ] %b.05 = phi i64 [ %cond.i, %for.body ], [ %b.05.ph, %for.body.preheader9 ] %arrayidx = getelementptr inbounds i64, ptr %a, i64 %i.06 %6 = load i64, ptr %arrayidx, align 8, !tbaa !5 %cond.i = tail call i64 @llvm.smin.i64(i64 %b.05, i64 %6) %inc = add nuw nsw i64 %i.06, 1 %exitcond.not = icmp eq i64 %inc, %n br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !13 } ; Function Attrs: nofree nosync nounwind memory(argmem: read) uwtable define dso_local i64 @maxn(i64 noundef %n, ptr nocapture noundef readonly %a) local_unnamed_addr #5 { entry: %cmp4 = icmp sgt i64 %n, 0 br i1 %cmp4, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %entry %min.iters.check = icmp ult i64 %n, 4 br i1 %min.iters.check, label %for.body.preheader9, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %n, -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> [ <i64 -1152921504606846976, i64 -1152921504606846976>, %vector.ph ], [ %2, %vector.body ] %vec.phi7 = phi <2 x i64> [ <i64 -1152921504606846976, i64 -1152921504606846976>, %vector.ph ], [ %3, %vector.body ] %0 = getelementptr inbounds i64, ptr %a, i64 %index %wide.load = load <2 x i64>, ptr %0, align 8, !tbaa !5 %1 = getelementptr inbounds i64, ptr %0, i64 2 %wide.load8 = load <2 x i64>, ptr %1, align 8, !tbaa !5 %2 = tail call <2 x i64> @llvm.smax.v2i64(<2 x i64> %vec.phi, <2 x i64> %wide.load) %3 = tail call <2 x i64> @llvm.smax.v2i64(<2 x i64> %vec.phi7, <2 x i64> %wide.load8) %index.next = add nuw i64 %index, 4 %4 = icmp eq i64 %index.next, %n.vec br i1 %4, label %middle.block, label %vector.body, !llvm.loop !14 middle.block: ; preds = %vector.body %rdx.minmax = tail call <2 x i64> @llvm.smax.v2i64(<2 x i64> %2, <2 x i64> %3) %5 = tail call i64 @llvm.vector.reduce.smax.v2i64(<2 x i64> %rdx.minmax) %cmp.n = icmp eq i64 %n.vec, %n br i1 %cmp.n, label %for.cond.cleanup, label %for.body.preheader9 for.body.preheader9: ; preds = %for.body.preheader, %middle.block %i.06.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] %b.05.ph = phi i64 [ -1152921504606846976, %for.body.preheader ], [ %5, %middle.block ] br label %for.body for.cond.cleanup: ; preds = %for.body, %middle.block, %entry %b.0.lcssa = phi i64 [ -1152921504606846976, %entry ], [ %5, %middle.block ], [ %cond.i, %for.body ] ret i64 %b.0.lcssa for.body: ; preds = %for.body.preheader9, %for.body %i.06 = phi i64 [ %inc, %for.body ], [ %i.06.ph, %for.body.preheader9 ] %b.05 = phi i64 [ %cond.i, %for.body ], [ %b.05.ph, %for.body.preheader9 ] %arrayidx = getelementptr inbounds i64, ptr %a, i64 %i.06 %6 = load i64, ptr %arrayidx, align 8, !tbaa !5 %cond.i = tail call i64 @llvm.smax.i64(i64 %b.05, i64 %6) %inc = add nuw nsw i64 %i.06, 1 %exitcond.not = icmp eq i64 %inc, %n br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !15 } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @POW(i64 noundef %a, i64 noundef %b) local_unnamed_addr #6 { entry: %cmp3 = icmp sgt i64 %b, 0 br i1 %cmp3, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %entry %xtraiter = and i64 %b, 7 %0 = icmp ult i64 %b, 8 br i1 %0, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %b, -8 br label %for.body for.cond.cleanup.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %mul.lcssa.ph = phi i64 [ undef, %for.body.preheader ], [ %mul.7, %for.body ] %c.04.unr = phi i64 [ 1, %for.body.preheader ], [ %mul.7, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup, label %for.body.epil for.body.epil: ; preds = %for.cond.cleanup.loopexit.unr-lcssa, %for.body.epil %c.04.epil = phi i64 [ %mul.epil, %for.body.epil ], [ %c.04.unr, %for.cond.cleanup.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.cond.cleanup.loopexit.unr-lcssa ] %mul.epil = mul nsw i64 %c.04.epil, %a %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.cond.cleanup, label %for.body.epil, !llvm.loop !16 for.cond.cleanup: ; preds = %for.cond.cleanup.loopexit.unr-lcssa, %for.body.epil, %entry %c.0.lcssa = phi i64 [ 1, %entry ], [ %mul.lcssa.ph, %for.cond.cleanup.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ] ret i64 %c.0.lcssa for.body: ; preds = %for.body, %for.body.preheader.new %c.04 = phi i64 [ 1, %for.body.preheader.new ], [ %mul.7, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.7, %for.body ] %mul = mul nsw i64 %c.04, %a %mul.1 = mul nsw i64 %mul, %a %mul.2 = mul nsw i64 %mul.1, %a %mul.3 = mul nsw i64 %mul.2, %a %mul.4 = mul nsw i64 %mul.3, %a %mul.5 = mul nsw i64 %mul.4, %a %mul.6 = mul nsw i64 %mul.5, %a %mul.7 = mul nsw i64 %mul.6, %a %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body, !llvm.loop !18 } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local double @POW_d(double noundef %a, double noundef %b) local_unnamed_addr #6 { entry: %cmp4 = fcmp ogt double %b, 0.000000e+00 br i1 %cmp4, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry %c.0.lcssa = phi double [ 1.000000e+00, %entry ], [ %mul, %for.body ] ret double %c.0.lcssa for.body: ; preds = %entry, %for.body %i.06 = phi i64 [ %inc, %for.body ], [ 0, %entry ] %c.05 = phi double [ %mul, %for.body ], [ 1.000000e+00, %entry ] %mul = fmul double %c.05, %a %inc = add nuw nsw i64 %i.06, 1 %conv = sitofp i64 %inc to double %cmp = fcmp olt double %conv, %b br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !19 } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @gcd(i64 noundef %a, i64 noundef %b) local_unnamed_addr #6 { 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 @lcm(i64 noundef %a, i64 noundef %b) local_unnamed_addr #6 { entry: %tobool.not4.i = icmp eq i64 %b, 0 br i1 %tobool.not4.i, label %gcd.exit, label %cond.true.i cond.true.i: ; preds = %entry, %cond.true.i %b.tr6.i = phi i64 [ %rem.i, %cond.true.i ], [ %b, %entry ] %a.tr5.i = phi i64 [ %b.tr6.i, %cond.true.i ], [ %a, %entry ] %rem.i = srem i64 %a.tr5.i, %b.tr6.i %tobool.not.i = icmp eq i64 %rem.i, 0 br i1 %tobool.not.i, label %gcd.exit, label %cond.true.i gcd.exit: ; preds = %cond.true.i, %entry %a.tr.lcssa.i = phi i64 [ %a, %entry ], [ %b.tr6.i, %cond.true.i ] %div = sdiv i64 %a, %a.tr.lcssa.i %mul = mul nsw i64 %div, %b ret i64 %mul } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @mod_MOD1(i64 noundef %n) local_unnamed_addr #7 { entry: %cmp = icmp slt i64 %n, 0 br i1 %cmp, label %cond.true, label %cond.end cond.true: ; preds = %entry %n.nonneg = sub i64 0, %n %0 = urem i64 %n.nonneg, 1000000007 %1 = add nsw i64 %0, %n %mul = sub i64 1000000007, %1 br label %cond.end cond.end: ; preds = %entry, %cond.true %cond = phi i64 [ %mul, %cond.true ], [ 0, %entry ] %add1 = add nsw i64 %cond, %n %rem = srem i64 %add1, 1000000007 ret i64 %rem } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @mod_p(i64 noundef %n, i64 noundef %p) local_unnamed_addr #7 { entry: %cmp = icmp slt i64 %n, 0 br i1 %cmp, label %cond.true, label %cond.end cond.true: ; preds = %entry %div7 = sdiv i64 %n, %p %add = sub i64 1, %div7 %mul = mul nsw i64 %add, %p br label %cond.end cond.end: ; preds = %entry, %cond.true %cond = phi i64 [ %mul, %cond.true ], [ 0, %entry ] %add1 = add nsw i64 %cond, %n %rem = srem i64 %add1, %p ret i64 %rem } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i64 @change_into_num(ptr nocapture noundef readonly %s, i64 noundef %len, i64 noundef %p) local_unnamed_addr #8 { entry: %tobool.not11 = icmp eq i64 %p, 0 br i1 %tobool.not11, label %cond.end, label %cond.false.preheader cond.false.preheader: ; preds = %entry %0 = add i64 %p, -2 br label %cond.false cond.false: ; preds = %cond.false.preheader, %POW.exit %indvar = phi i64 [ 0, %cond.false.preheader ], [ %indvar.next, %POW.exit ] %p.tr13 = phi i64 [ %p, %cond.false.preheader ], [ %sub, %POW.exit ] %accumulator.tr12 = phi i64 [ 0, %cond.false.preheader ], [ %add, %POW.exit ] %1 = xor i64 %indvar, -1 %2 = add i64 %1, %p %sub = add nsw i64 %p.tr13, -1 %cmp3.i = icmp sgt i64 %p.tr13, 1 br i1 %cmp3.i, label %for.body.i.preheader, label %POW.exit for.body.i.preheader: ; preds = %cond.false %3 = sub i64 %0, %indvar %xtraiter = and i64 %2, 7 %4 = icmp ult i64 %3, 7 br i1 %4, label %POW.exit.loopexit.unr-lcssa, label %for.body.i.preheader.new for.body.i.preheader.new: ; preds = %for.body.i.preheader %unroll_iter = and i64 %2, -8 br label %for.body.i for.body.i: ; preds = %for.body.i, %for.body.i.preheader.new %c.04.i = phi i64 [ 1, %for.body.i.preheader.new ], [ %mul.i.7, %for.body.i ] %niter = phi i64 [ 0, %for.body.i.preheader.new ], [ %niter.next.7, %for.body.i ] %mul.i.7 = mul i64 %c.04.i, 100000000 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %POW.exit.loopexit.unr-lcssa, label %for.body.i, !llvm.loop !18 POW.exit.loopexit.unr-lcssa: ; preds = %for.body.i, %for.body.i.preheader %mul.i.lcssa.ph = phi i64 [ undef, %for.body.i.preheader ], [ %mul.i.7, %for.body.i ] %c.04.i.unr = phi i64 [ 1, %for.body.i.preheader ], [ %mul.i.7, %for.body.i ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %POW.exit, label %for.body.i.epil for.body.i.epil: ; preds = %POW.exit.loopexit.unr-lcssa, %for.body.i.epil %c.04.i.epil = phi i64 [ %mul.i.epil, %for.body.i.epil ], [ %c.04.i.unr, %POW.exit.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.i.epil ], [ 0, %POW.exit.loopexit.unr-lcssa ] %mul.i.epil = mul nsw i64 %c.04.i.epil, 10 %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 %POW.exit, label %for.body.i.epil, !llvm.loop !20 POW.exit: ; preds = %POW.exit.loopexit.unr-lcssa, %for.body.i.epil, %cond.false %c.0.lcssa.i = phi i64 [ 1, %cond.false ], [ %mul.i.lcssa.ph, %POW.exit.loopexit.unr-lcssa ], [ %mul.i.epil, %for.body.i.epil ] %sub1 = sub nsw i64 %len, %p.tr13 %arrayidx = getelementptr inbounds i8, ptr %s, i64 %sub1 %5 = load i8, ptr %arrayidx, align 1, !tbaa !21 %conv = sext i8 %5 to i64 %sub2 = add nsw i64 %conv, -48 %mul = mul nsw i64 %sub2, %c.0.lcssa.i %add = add nsw i64 %mul, %accumulator.tr12 %tobool.not = icmp eq i64 %sub, 0 %indvar.next = add i64 %indvar, 1 br i1 %tobool.not, label %cond.end, label %cond.false cond.end: ; preds = %POW.exit, %entry %accumulator.tr.lcssa = phi i64 [ 0, %entry ], [ %add, %POW.exit ] ret i64 %accumulator.tr.lcssa } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: none) uwtable define dso_local void @lr_lower(ptr nocapture noundef %l, ptr nocapture noundef %r, i64 noundef %am, i64 noundef %val, i32 noundef %type) local_unnamed_addr #9 { entry: %cmp = icmp slt i32 %type, 3 %0 = load i32, ptr %l, align 4, !tbaa !22 %1 = load i32, ptr %r, align 4, !tbaa !22 %add = add nsw i32 %1, %0 %div = sdiv i32 %add, 2 %cmp1 = icmp slt i64 %am, %val %l.r = select i1 %cmp1, ptr %l, ptr %r %cmp6.not = icmp sgt i64 %am, %val %r.l = select i1 %cmp6.not, ptr %r, ptr %l %l.sink = select i1 %cmp, ptr %l.r, ptr %r.l store i32 %div, ptr %l.sink, align 4, !tbaa !22 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: none) uwtable define dso_local void @lr_upper(ptr nocapture noundef %l, ptr nocapture noundef %r, i64 noundef %am, i64 noundef %val, i32 noundef %type) local_unnamed_addr #9 { entry: %cmp = icmp slt i32 %type, 3 %0 = load i32, ptr %l, align 4, !tbaa !22 %1 = load i32, ptr %r, align 4, !tbaa !22 %add3 = add nsw i32 %1, %0 %div4 = sdiv i32 %add3, 2 %cmp1.not = icmp sgt i64 %am, %val %r.l = select i1 %cmp1.not, ptr %r, ptr %l %cmp6 = icmp slt i64 %am, %val %l.r = select i1 %cmp6, ptr %l, ptr %r %l.sink = select i1 %cmp, ptr %r.l, ptr %l.r store i32 %div4, ptr %l.sink, align 4, !tbaa !22 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @cmp_lower(i64 noundef %a, i64 noundef %b, i32 noundef %type) local_unnamed_addr #7 { entry: switch i32 %type, label %cond.false6 [ i32 1, label %cond.true i32 2, label %cond.true3 ] cond.true: ; preds = %entry %cmp1 = icmp eq i64 %a, %b br label %cond.end10 cond.true3: ; preds = %entry %cmp4.not = icmp sge i64 %a, %b br label %cond.end10 cond.false6: ; preds = %entry %cmp7 = icmp sgt i64 %a, %b br label %cond.end10 cond.end10: ; preds = %cond.true3, %cond.false6, %cond.true %cond11.in = phi i1 [ %cmp1, %cond.true ], [ %cmp4.not, %cond.true3 ], [ %cmp7, %cond.false6 ] %cond11 = zext i1 %cond11.in to i32 ret i32 %cond11 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @cmp_upper(i64 noundef %a, i64 noundef %b, i32 noundef %type) local_unnamed_addr #7 { entry: switch i32 %type, label %cond.false6 [ i32 1, label %cond.true i32 2, label %cond.true3 ] cond.true: ; preds = %entry %cmp1 = icmp eq i64 %a, %b br label %cond.end10 cond.true3: ; preds = %entry %cmp4.not = icmp sle i64 %a, %b br label %cond.end10 cond.false6: ; preds = %entry %cmp7 = icmp slt i64 %a, %b br label %cond.end10 cond.end10: ; preds = %cond.true3, %cond.false6, %cond.true %cond11.in = phi i1 [ %cmp1, %cond.true ], [ %cmp4.not, %cond.true3 ], [ %cmp7, %cond.false6 ] %cond11 = zext i1 %cond11.in to i32 ret i32 %cond11 } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i64 @lower_bound(ptr nocapture noundef readonly %a, i32 noundef %l, i32 noundef %r, i64 noundef %val, i32 noundef %type) local_unnamed_addr #8 { entry: %sub34 = sub nsw i32 %r, %l %cmp35 = icmp sgt i32 %sub34, 1 br i1 %cmp35, label %while.body.lr.ph, label %while.end while.body.lr.ph: ; preds = %entry %cmp.i = icmp slt i32 %type, 3 br i1 %cmp.i, label %while.body.us, label %while.body while.body.us: ; preds = %while.body.lr.ph, %while.body.us %l.addr.0 = phi i32 [ %spec.select, %while.body.us ], [ %l, %while.body.lr.ph ] %r.addr.0 = phi i32 [ %spec.select51, %while.body.us ], [ %r, %while.body.lr.ph ] %add.us = add nsw i32 %l.addr.0, %r.addr.0 %div.us = sdiv i32 %add.us, 2 %idxprom.us = sext i32 %div.us to i64 %arrayidx.us = getelementptr inbounds i64, ptr %a, i64 %idxprom.us %0 = load i64, ptr %arrayidx.us, align 8, !tbaa !5 %cmp1.i.us = icmp slt i64 %0, %val %spec.select = select i1 %cmp1.i.us, i32 %div.us, i32 %l.addr.0 %spec.select51 = select i1 %cmp1.i.us, i32 %r.addr.0, i32 %div.us %sub.us = sub nsw i32 %spec.select51, %spec.select %cmp.us = icmp sgt i32 %sub.us, 1 br i1 %cmp.us, label %while.body.us, label %while.end, !llvm.loop !24 while.body: ; preds = %while.body.lr.ph, %while.body %l.addr.2 = phi i32 [ %spec.select52, %while.body ], [ %l, %while.body.lr.ph ] %r.addr.2 = phi i32 [ %spec.select53, %while.body ], [ %r, %while.body.lr.ph ] %add = add nsw i32 %l.addr.2, %r.addr.2 %div = sdiv i32 %add, 2 %idxprom = sext i32 %div to i64 %arrayidx = getelementptr inbounds i64, ptr %a, i64 %idxprom %1 = load i64, ptr %arrayidx, align 8, !tbaa !5 %cmp6.not.i = icmp sgt i64 %1, %val %spec.select52 = select i1 %cmp6.not.i, i32 %l.addr.2, i32 %div %spec.select53 = select i1 %cmp6.not.i, i32 %div, i32 %r.addr.2 %sub = sub nsw i32 %spec.select53, %spec.select52 %cmp = icmp sgt i32 %sub, 1 br i1 %cmp, label %while.body, label %while.end, !llvm.loop !24 while.end: ; preds = %while.body, %while.body.us, %entry %r.addr.0..lcssa = phi i32 [ %r, %entry ], [ %spec.select51, %while.body.us ], [ %spec.select53, %while.body ] %l.addr.0..lcssa = phi i32 [ %l, %entry ], [ %spec.select, %while.body.us ], [ %spec.select52, %while.body ] %idxprom1 = sext i32 %l.addr.0..lcssa to i64 %arrayidx2 = getelementptr inbounds i64, ptr %a, i64 %idxprom1 %2 = load i64, ptr %arrayidx2, align 8, !tbaa !5 switch i32 %type, label %cmp_lower.exit [ i32 1, label %cond.true.i i32 2, label %cond.true3.i ] cond.true.i: ; preds = %while.end %cmp1.i17 = icmp eq i64 %2, %val br i1 %cmp1.i17, label %cond.end9, label %cond.false.thread cond.false.thread: ; preds = %cond.true.i %idxprom345 = sext i32 %r.addr.0..lcssa to i64 %arrayidx446 = getelementptr inbounds i64, ptr %a, i64 %idxprom345 %3 = load i64, ptr %arrayidx446, align 8, !tbaa !5 %cmp1.i23 = icmp eq i64 %3, %val br label %cmp_lower.exit26 cond.true3.i: ; preds = %while.end %cmp4.not.i.not = icmp slt i64 %2, %val br i1 %cmp4.not.i.not, label %cond.false.thread47, label %cond.end9 cond.false.thread47: ; preds = %cond.true3.i %idxprom348 = sext i32 %r.addr.0..lcssa to i64 %arrayidx449 = getelementptr inbounds i64, ptr %a, i64 %idxprom348 %4 = load i64, ptr %arrayidx449, align 8, !tbaa !5 %cmp4.not.i19 = icmp sge i64 %4, %val br label %cmp_lower.exit26 cmp_lower.exit: ; preds = %while.end %cmp7.i = icmp sgt i64 %2, %val br i1 %cmp7.i, label %cond.end9, label %cond.false cond.false: ; preds = %cmp_lower.exit %idxprom3 = sext i32 %r.addr.0..lcssa to i64 %arrayidx4 = getelementptr inbounds i64, ptr %a, i64 %idxprom3 %5 = load i64, ptr %arrayidx4, align 8, !tbaa !5 %cmp7.i25 = icmp sgt i64 %5, %val br label %cmp_lower.exit26 cmp_lower.exit26: ; preds = %cond.false.thread, %cond.false.thread47, %cond.false %cond11.in.i20 = phi i1 [ %cmp1.i23, %cond.false.thread ], [ %cmp4.not.i19, %cond.false.thread47 ], [ %cmp7.i25, %cond.false ] %6 = sext i32 %r.addr.0..lcssa to i64 %.pre = select i1 %cond11.in.i20, i64 %6, i64 -1 br label %cond.end9 cond.end9: ; preds = %cond.true3.i, %cond.true.i, %cmp_lower.exit, %cmp_lower.exit26 %conv.pre-phi = phi i64 [ %idxprom1, %cmp_lower.exit ], [ %.pre, %cmp_lower.exit26 ], [ %idxprom1, %cond.true.i ], [ %idxprom1, %cond.true3.i ] ret i64 %conv.pre-phi } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i64 @upper_bound(ptr nocapture noundef readonly %a, i32 noundef %l, i32 noundef %r, i64 noundef %val, i32 noundef %type) local_unnamed_addr #8 { entry: %sub33 = sub nsw i32 %r, %l %cmp34 = icmp sgt i32 %sub33, 1 br i1 %cmp34, label %while.body.lr.ph, label %while.end while.body.lr.ph: ; preds = %entry %cmp.i = icmp slt i32 %type, 3 br i1 %cmp.i, label %while.body.us, label %while.body while.body.us: ; preds = %while.body.lr.ph, %while.body.us %l.addr.0 = phi i32 [ %spec.select, %while.body.us ], [ %l, %while.body.lr.ph ] %r.addr.0 = phi i32 [ %spec.select50, %while.body.us ], [ %r, %while.body.lr.ph ] %add.us = add nsw i32 %l.addr.0, %r.addr.0 %div.us = sdiv i32 %add.us, 2 %idxprom.us = sext i32 %div.us to i64 %arrayidx.us = getelementptr inbounds i64, ptr %a, i64 %idxprom.us %0 = load i64, ptr %arrayidx.us, align 8, !tbaa !5 %cmp1.not.i.us = icmp sgt i64 %0, %val %spec.select = select i1 %cmp1.not.i.us, i32 %l.addr.0, i32 %div.us %spec.select50 = select i1 %cmp1.not.i.us, i32 %div.us, i32 %r.addr.0 %sub.us = sub nsw i32 %spec.select50, %spec.select %cmp.us = icmp sgt i32 %sub.us, 1 br i1 %cmp.us, label %while.body.us, label %while.end, !llvm.loop !25 while.body: ; preds = %while.body.lr.ph, %while.body %l.addr.2 = phi i32 [ %spec.select51, %while.body ], [ %l, %while.body.lr.ph ] %r.addr.2 = phi i32 [ %spec.select52, %while.body ], [ %r, %while.body.lr.ph ] %add = add nsw i32 %l.addr.2, %r.addr.2 %div = sdiv i32 %add, 2 %idxprom = sext i32 %div to i64 %arrayidx = getelementptr inbounds i64, ptr %a, i64 %idxprom %1 = load i64, ptr %arrayidx, align 8, !tbaa !5 %cmp6.i = icmp slt i64 %1, %val %spec.select51 = select i1 %cmp6.i, i32 %div, i32 %l.addr.2 %spec.select52 = select i1 %cmp6.i, i32 %r.addr.2, i32 %div %sub = sub nsw i32 %spec.select52, %spec.select51 %cmp = icmp sgt i32 %sub, 1 br i1 %cmp, label %while.body, label %while.end, !llvm.loop !25 while.end: ; preds = %while.body, %while.body.us, %entry %r.addr.0..lcssa = phi i32 [ %r, %entry ], [ %spec.select50, %while.body.us ], [ %spec.select52, %while.body ] %l.addr.0..lcssa = phi i32 [ %l, %entry ], [ %spec.select, %while.body.us ], [ %spec.select51, %while.body ] %idxprom1 = sext i32 %r.addr.0..lcssa to i64 %arrayidx2 = getelementptr inbounds i64, ptr %a, i64 %idxprom1 %2 = load i64, ptr %arrayidx2, align 8, !tbaa !5 switch i32 %type, label %cmp_upper.exit [ i32 1, label %cond.true.i i32 2, label %cond.true3.i ] cond.true.i: ; preds = %while.end %cmp1.i = icmp eq i64 %2, %val br i1 %cmp1.i, label %cond.end9, label %cond.false.thread cond.false.thread: ; preds = %cond.true.i %idxprom344 = sext i32 %l.addr.0..lcssa to i64 %arrayidx445 = getelementptr inbounds i64, ptr %a, i64 %idxprom344 %3 = load i64, ptr %arrayidx445, align 8, !tbaa !5 %cmp1.i22 = icmp eq i64 %3, %val br label %cmp_upper.exit25 cond.true3.i: ; preds = %while.end %cmp4.not.i.not = icmp sgt i64 %2, %val br i1 %cmp4.not.i.not, label %cond.false.thread46, label %cond.end9 cond.false.thread46: ; preds = %cond.true3.i %idxprom347 = sext i32 %l.addr.0..lcssa to i64 %arrayidx448 = getelementptr inbounds i64, ptr %a, i64 %idxprom347 %4 = load i64, ptr %arrayidx448, align 8, !tbaa !5 %cmp4.not.i18 = icmp sle i64 %4, %val br label %cmp_upper.exit25 cmp_upper.exit: ; preds = %while.end %cmp7.i = icmp slt i64 %2, %val br i1 %cmp7.i, label %cond.end9, label %cond.false cond.false: ; preds = %cmp_upper.exit %idxprom3 = sext i32 %l.addr.0..lcssa to i64 %arrayidx4 = getelementptr inbounds i64, ptr %a, i64 %idxprom3 %5 = load i64, ptr %arrayidx4, align 8, !tbaa !5 %cmp7.i24 = icmp slt i64 %5, %val br label %cmp_upper.exit25 cmp_upper.exit25: ; preds = %cond.false.thread, %cond.false.thread46, %cond.false %cond11.in.i19 = phi i1 [ %cmp1.i22, %cond.false.thread ], [ %cmp4.not.i18, %cond.false.thread46 ], [ %cmp7.i24, %cond.false ] %6 = sext i32 %l.addr.0..lcssa to i64 %.pre = select i1 %cond11.in.i19, i64 %6, i64 -1 br label %cond.end9 cond.end9: ; preds = %cond.true3.i, %cond.true.i, %cmp_upper.exit, %cmp_upper.exit25 %conv.pre-phi = phi i64 [ %idxprom1, %cmp_upper.exit ], [ %.pre, %cmp_upper.exit25 ], [ %idxprom1, %cond.true.i ], [ %idxprom1, %cond.true3.i ] ret i64 %conv.pre-phi } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i64 @count(ptr nocapture noundef readonly %a, i32 noundef %l, i32 noundef %r, i64 noundef %x) local_unnamed_addr #8 { entry: %sub34.i = sub nsw i32 %r, %l %cmp35.i = icmp sgt i32 %sub34.i, 1 br i1 %cmp35.i, label %while.body.us.i, label %while.end.i while.body.us.i: ; preds = %entry, %while.body.us.i %l.addr.0.i = phi i32 [ %spec.select.i, %while.body.us.i ], [ %l, %entry ] %r.addr.0.i = phi i32 [ %spec.select51.i, %while.body.us.i ], [ %r, %entry ] %add.us.i = add nsw i32 %r.addr.0.i, %l.addr.0.i %div.us.i = sdiv i32 %add.us.i, 2 %idxprom.us.i = sext i32 %div.us.i to i64 %arrayidx.us.i = getelementptr inbounds i64, ptr %a, i64 %idxprom.us.i %0 = load i64, ptr %arrayidx.us.i, align 8, !tbaa !5 %cmp1.i.us.i = icmp slt i64 %0, %x %spec.select.i = select i1 %cmp1.i.us.i, i32 %div.us.i, i32 %l.addr.0.i %spec.select51.i = select i1 %cmp1.i.us.i, i32 %r.addr.0.i, i32 %div.us.i %sub.us.i = sub nsw i32 %spec.select51.i, %spec.select.i %cmp.us.i = icmp sgt i32 %sub.us.i, 1 br i1 %cmp.us.i, label %while.body.us.i, label %while.end.i, !llvm.loop !24 while.end.i: ; preds = %while.body.us.i, %entry %r.addr.0..lcssa.i = phi i32 [ %r, %entry ], [ %spec.select51.i, %while.body.us.i ] %l.addr.0..lcssa.i = phi i32 [ %l, %entry ], [ %spec.select.i, %while.body.us.i ] %idxprom1.i = sext i32 %l.addr.0..lcssa.i to i64 %arrayidx2.i = getelementptr inbounds i64, ptr %a, i64 %idxprom1.i %1 = load i64, ptr %arrayidx2.i, align 8, !tbaa !5 %cmp1.i17.i = icmp eq i64 %1, %x br i1 %cmp1.i17.i, label %lower_bound.exit, label %cond.false.thread.i cond.false.thread.i: ; preds = %while.end.i %idxprom345.i = sext i32 %r.addr.0..lcssa.i to i64 %arrayidx446.i = getelementptr inbounds i64, ptr %a, i64 %idxprom345.i %2 = load i64, ptr %arrayidx446.i, align 8, !tbaa !5 %cmp1.i23.i = icmp eq i64 %2, %x %.pre.i = select i1 %cmp1.i23.i, i64 %idxprom345.i, i64 -1 br label %lower_bound.exit lower_bound.exit: ; preds = %while.end.i, %cond.false.thread.i %conv.pre-phi.i = phi i64 [ %.pre.i, %cond.false.thread.i ], [ %idxprom1.i, %while.end.i ] %conv = trunc i64 %conv.pre-phi.i to i32 %cmp = icmp eq i32 %conv, -1 br i1 %cmp, label %cond.end, label %cond.false cond.false: ; preds = %lower_bound.exit %sub33.i = sub nsw i32 %r, %conv %cmp34.i = icmp sgt i32 %sub33.i, 1 br i1 %cmp34.i, label %while.body.us.i18, label %while.end.i9 while.body.us.i18: ; preds = %cond.false, %while.body.us.i18 %l.addr.0.i19 = phi i32 [ %spec.select.i25, %while.body.us.i18 ], [ %conv, %cond.false ] %r.addr.0.i20 = phi i32 [ %spec.select50.i, %while.body.us.i18 ], [ %r, %cond.false ] %add.us.i21 = add nsw i32 %r.addr.0.i20, %l.addr.0.i19 %div.us.i22 = sdiv i32 %add.us.i21, 2 %idxprom.us.i23 = sext i32 %div.us.i22 to i64 %arrayidx.us.i24 = getelementptr inbounds i64, ptr %a, i64 %idxprom.us.i23 %3 = load i64, ptr %arrayidx.us.i24, align 8, !tbaa !5 %cmp1.not.i.us.i = icmp sgt i64 %3, %x %spec.select.i25 = select i1 %cmp1.not.i.us.i, i32 %l.addr.0.i19, i32 %div.us.i22 %spec.select50.i = select i1 %cmp1.not.i.us.i, i32 %div.us.i22, i32 %r.addr.0.i20 %sub.us.i26 = sub nsw i32 %spec.select50.i, %spec.select.i25 %cmp.us.i27 = icmp sgt i32 %sub.us.i26, 1 br i1 %cmp.us.i27, label %while.body.us.i18, label %while.end.i9, !llvm.loop !25 while.end.i9: ; preds = %while.body.us.i18, %cond.false %r.addr.0..lcssa.i10 = phi i32 [ %r, %cond.false ], [ %spec.select50.i, %while.body.us.i18 ] %l.addr.0..lcssa.i11 = phi i32 [ %conv, %cond.false ], [ %spec.select.i25, %while.body.us.i18 ] %idxprom1.i12 = sext i32 %r.addr.0..lcssa.i10 to i64 %arrayidx2.i13 = getelementptr inbounds i64, ptr %a, i64 %idxprom1.i12 %4 = load i64, ptr %arrayidx2.i13, align 8, !tbaa !5 %cmp1.i.i = icmp eq i64 %4, %x br i1 %cmp1.i.i, label %upper_bound.exit, label %cond.false.thread.i14 cond.false.thread.i14: ; preds = %while.end.i9 %idxprom344.i = sext i32 %l.addr.0..lcssa.i11 to i64 %arrayidx445.i = getelementptr inbounds i64, ptr %a, i64 %idxprom344.i %5 = load i64, ptr %arrayidx445.i, align 8, !tbaa !5 %cmp1.i22.i = icmp eq i64 %5, %x %.pre.i15 = select i1 %cmp1.i22.i, i64 %idxprom344.i, i64 -1 br label %upper_bound.exit upper_bound.exit: ; preds = %while.end.i9, %cond.false.thread.i14 %conv.pre-phi.i16 = phi i64 [ %.pre.i15, %cond.false.thread.i14 ], [ %idxprom1.i12, %while.end.i9 ] %reass.sub = sub nsw i64 %conv.pre-phi.i16, %conv.pre-phi.i %add = add nsw i64 %reass.sub, 1 br label %cond.end cond.end: ; preds = %lower_bound.exit, %upper_bound.exit %cond = phi i64 [ %add, %upper_bound.exit ], [ 0, %lower_bound.exit ] ret i64 %cond } ; Function Attrs: nounwind uwtable define dso_local i64 @factor_pre() local_unnamed_addr #10 { entry: %0 = load i64, ptr @is_factor_prepared, align 8, !tbaa !5 %inc = add nsw i64 %0, 1 store i64 %inc, ptr @is_factor_prepared, align 8, !tbaa !5 %tobool.not = icmp eq i64 %0, 0 br i1 %tobool.not, label %for.body6.peel.next, label %return for.body6.peel.next: ; preds = %entry %1 = tail call ptr @llvm.stacksave.p0() %vla116 = alloca [500001 x i64], align 16 store i64 2, ptr %vla116, align 16, !tbaa !5 br label %vector.body vector.body: ; preds = %vector.body, %for.body6.peel.next %index = phi i64 [ 0, %for.body6.peel.next ], [ %index.next.1, %vector.body ] %vec.ind = phi <2 x i64> [ <i64 1, i64 2>, %for.body6.peel.next ], [ %vec.ind.next.1, %vector.body ] %offset.idx = or i64 %index, 1 %2 = shl nuw nsw <2 x i64> %vec.ind, <i64 1, i64 1> %step.add = shl <2 x i64> %vec.ind, <i64 1, i64 1> %3 = or <2 x i64> %2, <i64 1, i64 1> %4 = add <2 x i64> %step.add, <i64 5, i64 5> %5 = getelementptr inbounds i64, ptr %vla116, i64 %offset.idx store <2 x i64> %3, ptr %5, align 8, !tbaa !5 %6 = getelementptr inbounds i64, ptr %5, i64 2 store <2 x i64> %4, ptr %6, align 8, !tbaa !5 %vec.ind.next = add <2 x i64> %vec.ind, <i64 4, i64 4> %offset.idx.1 = or i64 %index, 5 %7 = shl nuw nsw <2 x i64> %vec.ind.next, <i64 1, i64 1> %step.add.1 = shl <2 x i64> %vec.ind.next, <i64 1, i64 1> %8 = or <2 x i64> %7, <i64 1, i64 1> %9 = add <2 x i64> %step.add.1, <i64 5, i64 5> %10 = getelementptr inbounds i64, ptr %vla116, i64 %offset.idx.1 store <2 x i64> %8, ptr %10, align 8, !tbaa !5 %11 = getelementptr inbounds i64, ptr %10, i64 2 store <2 x i64> %9, ptr %11, align 8, !tbaa !5 %index.next.1 = add nuw nsw i64 %index, 8 %vec.ind.next.1 = add <2 x i64> %vec.ind, <i64 8, i64 8> %12 = icmp eq i64 %index.next.1, 500000 br i1 %12, label %for.body16, label %vector.body, !llvm.loop !26 for.body16: ; preds = %vector.body, %for.inc43 %i12.0124 = phi i64 [ %inc44, %for.inc43 ], [ 1, %vector.body ] %arrayidx17 = getelementptr inbounds i64, ptr %vla116, i64 %i12.0124 %13 = load i64, ptr %arrayidx17, align 8, !tbaa !5 %tobool18.not = icmp eq i64 %13, 0 br i1 %tobool18.not, label %for.inc43, label %for.cond20.preheader for.cond20.preheader: ; preds = %for.body16 %mul21 = shl nuw nsw i64 %i12.0124, 1 %add22 = or i64 %mul21, 1 %div = udiv i64 500001, %add22 %cmp24.not122 = icmp ugt i64 %add22, 166667 br i1 %cmp24.not122, label %for.inc43, label %for.body26 for.body26: ; preds = %for.cond20.preheader, %for.inc38 %j.0123 = phi i64 [ %add39, %for.inc38 ], [ 3, %for.cond20.preheader ] %mul29 = mul nuw nsw i64 %j.0123, %add22 %cmp30 = icmp ult i64 %mul29, 500001 br i1 %cmp30, label %if.then31, label %for.inc38 if.then31: ; preds = %for.body26 %14 = trunc i64 %mul29 to i32 %div35.lhs.trunc = add nsw i32 %14, -1 %div35120 = sdiv i32 %div35.lhs.trunc, 2 %div35.sext = zext i32 %div35120 to i64 %arrayidx36 = getelementptr inbounds i64, ptr %vla116, i64 %div35.sext store i64 0, ptr %arrayidx36, align 8, !tbaa !5 br label %for.inc38 for.inc38: ; preds = %for.body26, %if.then31 %add39 = add nuw nsw i64 %j.0123, 2 %cmp24.not = icmp ugt i64 %add39, %div br i1 %cmp24.not, label %for.inc43, label %for.body26, !llvm.loop !28 for.inc43: ; preds = %for.inc38, %for.cond20.preheader, %for.body16 %inc44 = add nuw nsw i64 %i12.0124, 1 %exitcond128.not = icmp eq i64 %inc44, 500001 br i1 %exitcond128.not, label %for.body51, label %for.body16, !llvm.loop !29 for.cond.cleanup50: ; preds = %for.inc83 tail call void @llvm.stackrestore.p0(ptr %1) br label %return for.body51: ; preds = %for.inc43, %for.inc83 %i47.0126 = phi i64 [ %inc84, %for.inc83 ], [ 0, %for.inc43 ] %arrayidx52 = getelementptr inbounds i64, ptr %vla116, i64 %i47.0126 %15 = load i64, ptr %arrayidx52, align 8, !tbaa !5 %tobool53.not = icmp eq i64 %15, 0 br i1 %tobool53.not, label %for.inc83, label %cond.end75.1 cond.end75.1: ; preds = %for.body51 %16 = load ptr, ptr @factors, align 16, !tbaa !30 %17 = load i64, ptr @fac_cnt, align 8, !tbaa !5 %add61 = shl i64 %17, 3 %mul62 = add i64 %add61, 8 %call = tail call ptr @realloc(ptr noundef %16, i64 noundef %mul62) #19 store ptr %call, ptr @factors, align 16, !tbaa !30 %18 = load i64, ptr @fac_cnt, align 8, !tbaa !5 %arrayidx77 = getelementptr inbounds i64, ptr %call, i64 %18 store i64 %15, ptr %arrayidx77, align 8, !tbaa !5 %19 = load ptr, ptr getelementptr inbounds ([2 x ptr], ptr @factors, i64 0, i64 1), align 8, !tbaa !30 %add61.1 = shl i64 %18, 3 %mul62.1 = add i64 %add61.1, 8 %call.1 = tail call ptr @realloc(ptr noundef %19, i64 noundef %mul62.1) #19 store ptr %call.1, ptr getelementptr inbounds ([2 x ptr], ptr @factors, i64 0, i64 1), align 8, !tbaa !30 %20 = load i64, ptr @fac_cnt, align 8, !tbaa !5 %inc73.1 = add nsw i64 %20, 1 store i64 %inc73.1, ptr @fac_cnt, align 8, !tbaa !5 %arrayidx77.1 = getelementptr inbounds i64, ptr %call.1, i64 %20 store i64 0, ptr %arrayidx77.1, align 8, !tbaa !5 br label %for.inc83 for.inc83: ; preds = %cond.end75.1, %for.body51 %inc84 = add nuw nsw i64 %i47.0126, 1 %exitcond129.not = icmp eq i64 %inc84, 500001 br i1 %exitcond129.not, label %for.cond.cleanup50, label %for.body51, !llvm.loop !32 return: ; preds = %entry, %for.cond.cleanup50 ret i64 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #11 ; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite) declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #12 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #11 ; Function Attrs: nounwind uwtable define dso_local i64 @factor(i64 noundef %n, i64 noundef %new_common_plus) local_unnamed_addr #10 { entry: %call = tail call i64 @factor_pre() %0 = load i64, ptr @fac_cnt, align 8, !tbaa !5 %cmp52 = icmp sgt i64 %0, 0 br i1 %cmp52, label %for.cond1.preheader.lr.ph, label %cleanup30 for.cond1.preheader.lr.ph: ; preds = %entry %1 = load ptr, ptr @factors, align 16, !tbaa !30 %2 = load ptr, ptr getelementptr inbounds ([2 x ptr], ptr @factors, i64 0, i64 1), align 8 br label %for.cond1.preheader for.cond: ; preds = %cond.end22 %inc29 = add nuw nsw i64 %i.054, 1 %3 = load i64, ptr @fac_cnt, align 8, !tbaa !5 %cmp = icmp slt i64 %inc29, %3 br i1 %cmp, label %for.cond1.preheader, label %cleanup30, !llvm.loop !33 for.cond1.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.cond %i.054 = phi i64 [ 0, %for.cond1.preheader.lr.ph ], [ %inc29, %for.cond ] %n.addr.053 = phi i64 [ %n, %for.cond1.preheader.lr.ph ], [ %n.addr.3, %for.cond ] %arrayidx = getelementptr inbounds i64, ptr %1, i64 %i.054 %4 = load i64, ptr %arrayidx, align 8, !tbaa !5 br label %while.cond while.cond: ; preds = %for.cond1.preheader, %land.rhs %n.addr.2 = phi i64 [ %div, %land.rhs ], [ %n.addr.053, %for.cond1.preheader ] %cnt.1 = phi i64 [ %add, %land.rhs ], [ 0, %for.cond1.preheader ] %rem = srem i64 %n.addr.2, %4 %div = sdiv i64 %n.addr.2, %4 %cmp5 = icmp eq i64 %rem, 0 %conv = zext i1 %cmp5 to i64 %add = add nuw nsw i64 %cnt.1, %conv %tobool.not = icmp eq i64 %add, 0 br i1 %tobool.not, label %for.inc, label %land.rhs land.rhs: ; preds = %while.cond %rem8 = srem i64 %div, %4 %cmp9 = icmp eq i64 %rem8, 0 br i1 %cmp9, label %while.cond, label %for.inc, !llvm.loop !34 for.inc: ; preds = %land.rhs, %while.cond %n.addr.3 = phi i64 [ %div, %land.rhs ], [ %n.addr.2, %while.cond ] switch i64 %new_common_plus, label %cond.false18 [ i64 1, label %cond.end22 i64 2, label %cond.true15 ] cond.true15: ; preds = %for.inc %arrayidx16 = getelementptr inbounds i64, ptr %2, i64 %i.054 %5 = load i64, ptr %arrayidx16, align 8, !tbaa !5 %cond.i = tail call i64 @llvm.smax.i64(i64 %5, i64 %add) br label %cond.end22 cond.false18: ; preds = %for.inc %arrayidx19 = getelementptr inbounds i64, ptr %2, i64 %i.054 %6 = load i64, ptr %arrayidx19, align 8, !tbaa !5 %add20 = add nsw i64 %6, %add br label %cond.end22 cond.end22: ; preds = %for.inc, %cond.true15, %cond.false18 %cond23 = phi i64 [ %cond.i, %cond.true15 ], [ %add20, %cond.false18 ], [ %add, %for.inc ] %arrayidx24 = getelementptr inbounds i64, ptr %2, i64 %i.054 store i64 %cond23, ptr %arrayidx24, align 8, !tbaa !5 %7 = load i64, ptr %arrayidx, align 8, !tbaa !5 %cmp26.not = icmp sgt i64 %7, %n.addr.3 br i1 %cmp26.not, label %cleanup30, label %for.cond cleanup30: ; preds = %cond.end22, %for.cond, %entry %n.addr.4 = phi i64 [ %n, %entry ], [ %n.addr.3, %for.cond ], [ %n.addr.3, %cond.end22 ] ret i64 %n.addr.4 } ; Function Attrs: nounwind uwtable define dso_local i64 @judge_prime(i64 noundef %n) local_unnamed_addr #10 { entry: %call = tail call i64 @factor_pre() %0 = load i64, ptr @fac_cnt, align 8, !tbaa !5 %cmp20 = icmp sgt i64 %0, 0 br i1 %cmp20, label %for.body.lr.ph, label %cleanup for.body.lr.ph: ; preds = %entry %1 = load ptr, ptr @factors, align 16, !tbaa !30 br label %for.body for.body: ; preds = %for.body.lr.ph, %if.else %i.022 = phi i64 [ 0, %for.body.lr.ph ], [ %inc, %if.else ] %n.addr.021 = phi i64 [ %n, %for.body.lr.ph ], [ %spec.select, %if.else ] %arrayidx = getelementptr inbounds i64, ptr %1, i64 %i.022 %2 = load i64, ptr %arrayidx, align 8, !tbaa !5 %mul = mul nsw i64 %2, %2 %cmp2 = icmp slt i64 %n.addr.021, %mul %cmp4 = icmp eq i64 %n.addr.021, %2 %or.cond = or i1 %cmp4, %cmp2 br i1 %or.cond, label %cleanup, label %if.else if.else: ; preds = %for.body %rem = srem i64 %n.addr.021, %2 %cmp6 = icmp eq i64 %rem, 0 %spec.select = select i1 %cmp6, i64 1, i64 %n.addr.021 %inc = add nuw nsw i64 %i.022, 1 %exitcond.not = icmp eq i64 %inc, %0 br i1 %exitcond.not, label %cleanup, label %for.body, !llvm.loop !35 cleanup: ; preds = %if.else, %for.body, %entry %n.addr.0.lcssa = phi i64 [ %n, %entry ], [ %n.addr.021, %for.body ], [ %spec.select, %if.else ] %cmp9 = icmp ne i64 %n.addr.0.lcssa, 1 %conv = zext i1 %cmp9 to i64 ret i64 %conv } ; Function Attrs: nounwind uwtable define dso_local i64 @makeinv(i64 noundef %n, i64 noundef %mod) local_unnamed_addr #10 { entry: %0 = load i64, ptr @is_minv_made, align 8, !tbaa !5 %inc = add nsw i64 %0, 1 store i64 %inc, ptr @is_minv_made, align 8, !tbaa !5 %tobool.not = icmp eq i64 %0, 0 br i1 %tobool.not, label %for.end, label %return for.end: ; preds = %entry %1 = load ptr, ptr @inv_arr, align 8, !tbaa !30 %call = tail call dereferenceable_or_null(16) ptr @realloc(ptr noundef %1, i64 noundef 16) #19 store ptr %call, ptr @inv_arr, align 8, !tbaa !30 %2 = load ptr, ptr @finv_arr, align 8, !tbaa !30 %call2 = tail call dereferenceable_or_null(16) ptr @realloc(ptr noundef %2, i64 noundef 16) #19 store ptr %call2, ptr @finv_arr, align 8, !tbaa !30 %3 = load ptr, ptr @inv_arr, align 8, !tbaa !30 %arrayidx = getelementptr inbounds i64, ptr %3, i64 1 store i64 1, ptr %arrayidx, align 8, !tbaa !5 %arrayidx3 = getelementptr inbounds i64, ptr %call2, i64 1 store i64 1, ptr %arrayidx3, align 8, !tbaa !5 store i64 1, ptr %call2, align 8, !tbaa !5 %cmp7.not43 = icmp slt i64 %n, 2 br i1 %cmp7.not43, label %return, label %for.body9 for.body9: ; preds = %for.end, %for.body9 %4 = phi ptr [ %6, %for.body9 ], [ %3, %for.end ] %i5.044 = phi i64 [ %add10, %for.body9 ], [ 2, %for.end ] %add10 = add nuw nsw i64 %i5.044, 1 %mul = shl i64 %add10, 3 %call11 = tail call ptr @realloc(ptr noundef nonnull %4, i64 noundef %mul) #19 store ptr %call11, ptr @inv_arr, align 8, !tbaa !30 %5 = load ptr, ptr @finv_arr, align 8, !tbaa !30 %call14 = tail call ptr @realloc(ptr noundef %5, i64 noundef %mul) #19 store ptr %call14, ptr @finv_arr, align 8, !tbaa !30 %6 = load ptr, ptr @inv_arr, align 8, !tbaa !30 %rem = srem i64 %mod, %i5.044 %arrayidx15 = getelementptr inbounds i64, ptr %6, i64 %rem %7 = load i64, ptr %arrayidx15, align 8, !tbaa !5 %div = sdiv i64 %mod, %i5.044 %mul16 = mul nsw i64 %div, %7 %rem17 = srem i64 %mul16, %mod %sub = sub nsw i64 %mod, %rem17 %arrayidx18 = getelementptr inbounds i64, ptr %6, i64 %i5.044 store i64 %sub, ptr %arrayidx18, align 8, !tbaa !5 %8 = getelementptr i64, ptr %call14, i64 %i5.044 %arrayidx20 = getelementptr i64, ptr %8, i64 -1 %9 = load i64, ptr %arrayidx20, align 8, !tbaa !5 %mul22 = mul nsw i64 %9, %sub %rem23 = srem i64 %mul22, %mod store i64 %rem23, ptr %8, align 8, !tbaa !5 %exitcond.not = icmp eq i64 %i5.044, %n br i1 %exitcond.not, label %return, label %for.body9, !llvm.loop !36 return: ; preds = %for.body9, %for.end, %entry ret i64 0 } ; Function Attrs: nounwind uwtable define dso_local i64 @make_mf(i64 noundef %n, i64 noundef %mod) local_unnamed_addr #10 { entry: %0 = load i64, ptr @is_mf_made, align 8, !tbaa !5 %inc = add nsw i64 %0, 1 store i64 %inc, ptr @is_mf_made, align 8, !tbaa !5 %tobool.not = icmp eq i64 %0, 0 br i1 %tobool.not, label %for.end, label %return for.end: ; preds = %entry %1 = load ptr, ptr @mf_arr, align 8, !tbaa !30 %call = tail call dereferenceable_or_null(16) ptr @realloc(ptr noundef %1, i64 noundef 16) #19 store ptr %call, ptr @mf_arr, align 8, !tbaa !30 %arrayidx = getelementptr inbounds i64, ptr %call, i64 1 store i64 1, ptr %arrayidx, align 8, !tbaa !5 store i64 1, ptr %call, align 8, !tbaa !5 %cmp5.not24 = icmp slt i64 %n, 2 br i1 %cmp5.not24, label %return, label %for.body7 for.body7: ; preds = %for.end, %for.body7 %2 = phi ptr [ %call10, %for.body7 ], [ %call, %for.end ] %i3.026 = phi i64 [ %add8, %for.body7 ], [ 2, %for.end ] %x.025 = phi i64 [ %rem, %for.body7 ], [ 1, %for.end ] %mul = mul nsw i64 %i3.026, %x.025 %rem = srem i64 %mul, %mod %add8 = add nuw nsw i64 %i3.026, 1 %mul9 = shl i64 %add8, 3 %call10 = tail call ptr @realloc(ptr noundef nonnull %2, i64 noundef %mul9) #19 %arrayidx11 = getelementptr inbounds i64, ptr %call10, i64 %i3.026 store i64 %rem, ptr %arrayidx11, align 8, !tbaa !5 %exitcond.not = icmp eq i64 %i3.026, %n br i1 %exitcond.not, label %return.loopexit, label %for.body7, !llvm.loop !37 return.loopexit: ; preds = %for.body7 store ptr %call10, ptr @mf_arr, align 8, !tbaa !30 br label %return return: ; preds = %return.loopexit, %for.end, %entry ret i64 0 } ; Function Attrs: nounwind uwtable define dso_local i64 @m_inv(i64 noundef %x, i64 noundef %mod, i64 noundef %is_fac) local_unnamed_addr #10 { entry: %call = tail call i64 @makeinv(i64 noundef 2000010, i64 noundef %mod) %tobool.not = icmp eq i64 %is_fac, 0 %inv_arr.val = load ptr, ptr @inv_arr, align 8 %finv_arr.val = load ptr, ptr @finv_arr, align 8 %.pn = select i1 %tobool.not, ptr %inv_arr.val, ptr %finv_arr.val %cond.in = getelementptr inbounds i64, ptr %.pn, i64 %x %cond = load i64, ptr %cond.in, align 8, !tbaa !5 ret i64 %cond } ; Function Attrs: nounwind uwtable define dso_local i64 @m_f(i64 noundef %x, i64 noundef %mod) local_unnamed_addr #10 { entry: %0 = load i64, ptr @is_mf_made, align 8, !tbaa !5 %inc.i = add nsw i64 %0, 1 store i64 %inc.i, ptr @is_mf_made, align 8, !tbaa !5 %tobool.not.i = icmp eq i64 %0, 0 %.pre = load ptr, ptr @mf_arr, align 8, !tbaa !30 br i1 %tobool.not.i, label %for.end.i, label %make_mf.exit for.end.i: ; preds = %entry %call.i = tail call dereferenceable_or_null(16) ptr @realloc(ptr noundef %.pre, i64 noundef 16) #19 %arrayidx.i = getelementptr inbounds i64, ptr %call.i, i64 1 store i64 1, ptr %arrayidx.i, align 8, !tbaa !5 store i64 1, ptr %call.i, align 8, !tbaa !5 br label %for.body7.i for.body7.i: ; preds = %for.body7.i, %for.end.i %1 = phi ptr [ %call10.i, %for.body7.i ], [ %call.i, %for.end.i ] %i3.026.i = phi i64 [ %add8.i, %for.body7.i ], [ 2, %for.end.i ] %x.025.i = phi i64 [ %rem.i, %for.body7.i ], [ 1, %for.end.i ] %mul.i = mul nsw i64 %x.025.i, %i3.026.i %rem.i = srem i64 %mul.i, %mod %add8.i = add nuw nsw i64 %i3.026.i, 1 %mul9.i = shl i64 %add8.i, 3 %call10.i = tail call ptr @realloc(ptr noundef nonnull %1, i64 noundef %mul9.i) #19 %arrayidx11.i = getelementptr inbounds i64, ptr %call10.i, i64 %i3.026.i store i64 %rem.i, ptr %arrayidx11.i, align 8, !tbaa !5 %exitcond.not.i = icmp eq i64 %i3.026.i, 2000010 br i1 %exitcond.not.i, label %return.loopexit.i, label %for.body7.i, !llvm.loop !37 return.loopexit.i: ; preds = %for.body7.i store ptr %call10.i, ptr @mf_arr, align 8, !tbaa !30 br label %make_mf.exit make_mf.exit: ; preds = %entry, %return.loopexit.i %2 = phi ptr [ %.pre, %entry ], [ %call10.i, %return.loopexit.i ] %arrayidx = getelementptr inbounds i64, ptr %2, i64 %x %3 = load i64, ptr %arrayidx, align 8, !tbaa !5 ret i64 %3 } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @m_p(i64 noundef %r, i64 noundef %n, i64 noundef %mod) local_unnamed_addr #6 { entry: %cmp16 = icmp sgt i64 %n, 0 br i1 %cmp16, label %while.body, label %while.end while.body: ; preds = %entry, %cond.end %s.019 = phi i64 [ %rem2, %cond.end ], [ %r, %entry ] %t.018 = phi i64 [ %cond, %cond.end ], [ 1, %entry ] %n.addr.017 = phi i64 [ %shr, %cond.end ], [ %n, %entry ] %and = and i64 %n.addr.017, 1 %tobool.not = icmp eq i64 %and, 0 br i1 %tobool.not, label %cond.end, label %cond.true cond.true: ; preds = %while.body %mul = mul nsw i64 %s.019, %t.018 %rem = srem i64 %mul, %mod br label %cond.end cond.end: ; preds = %while.body, %cond.true %cond = phi i64 [ %rem, %cond.true ], [ %t.018, %while.body ] %mul1 = mul nsw i64 %s.019, %s.019 %rem2 = srem i64 %mul1, %mod %shr = lshr i64 %n.addr.017, 1 %cmp.not = icmp ult i64 %n.addr.017, 2 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !38 while.end: ; preds = %cond.end, %entry %t.0.lcssa = phi i64 [ 1, %entry ], [ %cond, %cond.end ] %tobool3.not = icmp eq i64 %r, 0 %cond7 = select i1 %tobool3.not, i64 0, i64 %t.0.lcssa ret i64 %cond7 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @m_mul2(i64 noundef %a, i64 noundef %b, i64 noundef %mod) local_unnamed_addr #7 { entry: %mul = mul nsw i64 %b, %a %rem = srem i64 %mul, %mod ret i64 %rem } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @m_mul3(i64 noundef %a, i64 noundef %b, i64 noundef %c, i64 noundef %mod) local_unnamed_addr #7 { entry: %mul = mul nsw i64 %b, %a %rem = srem i64 %mul, %mod %mul.i = mul nsw i64 %rem, %c %rem.i = srem i64 %mul.i, %mod ret i64 %rem.i } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @m_mul4(i64 noundef %a, i64 noundef %b, i64 noundef %c, i64 noundef %d, i64 noundef %mod) local_unnamed_addr #7 { entry: %mul = mul nsw i64 %b, %a %rem = srem i64 %mul, %mod %mul.i = mul nsw i64 %rem, %c %rem.i = srem i64 %mul.i, %mod %mul.i.i = mul nsw i64 %rem.i, %d %rem.i.i = srem i64 %mul.i.i, %mod ret i64 %rem.i.i } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @m_mul5(i64 noundef %a, i64 noundef %b, i64 noundef %c, i64 noundef %d, i64 noundef %e, i64 noundef %mod) local_unnamed_addr #7 { entry: %mul = mul nsw i64 %b, %a %rem = srem i64 %mul, %mod %mul.i = mul nsw i64 %rem, %c %rem.i = srem i64 %mul.i, %mod %mul.i.i = mul nsw i64 %rem.i, %d %rem.i.i = srem i64 %mul.i.i, %mod %mul.i.i.i = mul nsw i64 %rem.i.i, %e %rem.i.i.i = srem i64 %mul.i.i.i, %mod ret i64 %rem.i.i.i } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @upll(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #13 { entry: %0 = load i64, ptr %a, align 8, !tbaa !5 %1 = load i64, ptr %b, align 8, !tbaa !5 %cmp = icmp slt i64 %0, %1 %cmp1 = icmp sgt i64 %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 @downll(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #13 { entry: %0 = load i64, ptr %a, align 8, !tbaa !5 %1 = load i64, ptr %b, align 8, !tbaa !5 %cmp = icmp slt i64 %0, %1 %cmp1 = icmp sgt i64 %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 @cmp_string(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #14 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %a, ptr noundef nonnull dereferenceable(1) %b) #20 ret i32 %call } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #15 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @cmp_char(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #13 { entry: %0 = load i8, ptr %a, align 1, !tbaa !21 %conv = sext i8 %0 to i32 %1 = load i8, ptr %b, align 1, !tbaa !21 %conv1 = sext i8 %1 to i32 %sub = sub nsw i32 %conv, %conv1 ret i32 %sub } ; Function Attrs: nofree nounwind uwtable define dso_local void @sortup(ptr noundef %a, i32 noundef %n) local_unnamed_addr #2 { entry: %conv = sext i32 %n to i64 tail call void @qsort(ptr noundef %a, i64 noundef %conv, i64 noundef 8, ptr noundef nonnull @upll) #21 ret void } ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #16 ; Function Attrs: nofree nounwind uwtable define dso_local void @sortdown(ptr noundef %a, i32 noundef %n) local_unnamed_addr #2 { entry: %conv = sext i32 %n to i64 tail call void @qsort(ptr noundef %a, i64 noundef %conv, i64 noundef 8, ptr noundef nonnull @downll) #21 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @sort_string(i32 noundef %n, i32 noundef %size, ptr noundef %s) local_unnamed_addr #2 { entry: %0 = zext i32 %size to i64 %conv = sext i32 %n to i64 tail call void @qsort(ptr noundef %s, i64 noundef %conv, i64 noundef %0, ptr noundef nonnull @cmp_string) #21 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @sort_char(ptr noundef %s) local_unnamed_addr #2 { entry: %call = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #20 tail call void @qsort(ptr noundef %s, i64 noundef %call, i64 noundef 1, ptr noundef nonnull @cmp_char) #21 ret void } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #15 ; Function Attrs: nofree nounwind memory(argmem: read) uwtable define dso_local i64 @unique_string(i64 noundef %n, i64 noundef %size, ptr nocapture noundef readonly %s) local_unnamed_addr #17 { entry: %cmp8 = icmp sgt i64 %n, 1 br i1 %cmp8, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry %ans.0.lcssa = phi i64 [ 1, %entry ], [ %spec.select, %for.body ] ret i64 %ans.0.lcssa for.body: ; preds = %entry, %for.body %i.010 = phi i64 [ %inc2, %for.body ], [ 1, %entry ] %ans.09 = phi i64 [ %spec.select, %for.body ], [ 1, %entry ] %0 = mul nsw i64 %i.010, %size %arrayidx = getelementptr inbounds i8, ptr %s, i64 %0 %sub = add nsw i64 %i.010, -1 %1 = mul nsw i64 %sub, %size %arrayidx1 = getelementptr inbounds i8, ptr %s, i64 %1 %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx, ptr noundef nonnull dereferenceable(1) %arrayidx1) #20 %tobool.not = icmp ne i32 %call, 0 %inc = zext i1 %tobool.not to i64 %spec.select = add nuw nsw i64 %ans.09, %inc %inc2 = add nuw nsw i64 %i.010, 1 %exitcond.not = icmp eq i64 %inc2, %n br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !39 } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i64 @unique_num(i64 noundef %n, ptr nocapture noundef readonly %a) local_unnamed_addr #8 { entry: %cmp9 = icmp sgt i64 %n, 1 br i1 %cmp9, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %entry %0 = add i64 %n, -1 %min.iters.check = icmp ult i64 %n, 5 br i1 %min.iters.check, label %for.body.preheader16, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %0, -4 %ind.end = or i64 %n.vec, 1 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <2 x i64> [ <i64 1, i64 0>, %vector.ph ], [ %9, %vector.body ] %vec.phi12 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %10, %vector.body ] %offset.idx = or i64 %index, 1 %1 = getelementptr inbounds i64, ptr %a, i64 %offset.idx %wide.load = load <2 x i64>, ptr %1, align 8, !tbaa !5 %2 = getelementptr inbounds i64, ptr %1, i64 2 %wide.load13 = load <2 x i64>, ptr %2, align 8, !tbaa !5 %3 = getelementptr i64, ptr %1, i64 -1 %wide.load14 = load <2 x i64>, ptr %3, align 8, !tbaa !5 %4 = getelementptr i64, ptr %1, i64 1 %wide.load15 = load <2 x i64>, ptr %4, align 8, !tbaa !5 %5 = icmp ne <2 x i64> %wide.load, %wide.load14 %6 = icmp ne <2 x i64> %wide.load13, %wide.load15 %7 = zext <2 x i1> %5 to <2 x i64> %8 = zext <2 x i1> %6 to <2 x i64> %9 = add <2 x i64> %vec.phi, %7 %10 = add <2 x i64> %vec.phi12, %8 %index.next = add nuw i64 %index, 4 %11 = icmp eq i64 %index.next, %n.vec br i1 %11, label %middle.block, label %vector.body, !llvm.loop !40 middle.block: ; preds = %vector.body %bin.rdx = add <2 x i64> %10, %9 %12 = tail call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx) %cmp.n = icmp eq i64 %0, %n.vec br i1 %cmp.n, label %for.cond.cleanup, label %for.body.preheader16 for.body.preheader16: ; preds = %for.body.preheader, %middle.block %i.011.ph = phi i64 [ 1, %for.body.preheader ], [ %ind.end, %middle.block ] %ans.010.ph = phi i64 [ 1, %for.body.preheader ], [ %12, %middle.block ] br label %for.body for.cond.cleanup: ; preds = %for.body, %middle.block, %entry %ans.0.lcssa = phi i64 [ 1, %entry ], [ %12, %middle.block ], [ %spec.select, %for.body ] ret i64 %ans.0.lcssa for.body: ; preds = %for.body.preheader16, %for.body %i.011 = phi i64 [ %inc3, %for.body ], [ %i.011.ph, %for.body.preheader16 ] %ans.010 = phi i64 [ %spec.select, %for.body ], [ %ans.010.ph, %for.body.preheader16 ] %arrayidx = getelementptr inbounds i64, ptr %a, i64 %i.011 %13 = load i64, ptr %arrayidx, align 8, !tbaa !5 %arrayidx1 = getelementptr i64, ptr %arrayidx, i64 -1 %14 = load i64, ptr %arrayidx1, align 8, !tbaa !5 %cmp2.not = icmp ne i64 %13, %14 %inc = zext i1 %cmp2.not to i64 %spec.select = add nuw nsw i64 %ans.010, %inc %inc3 = add nuw nsw i64 %i.011, 1 %exitcond.not = icmp eq i64 %inc3, %n br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !41 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @cmp1(ptr nocapture noundef readonly %p, ptr nocapture noundef readonly %q) #13 { entry: %0 = load i64, ptr %p, align 8, !tbaa !42 %1 = load i64, ptr %q, align 8, !tbaa !42 %sub = sub nsw i64 %0, %1 %conv = trunc i64 %sub to i32 ret i32 %conv } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @cmp2(ptr nocapture noundef readonly %p, ptr nocapture noundef readonly %q) #13 { entry: %0 = load i64, ptr %q, align 8, !tbaa !42 %1 = load i64, ptr %p, align 8, !tbaa !42 %sub = sub nsw i64 %0, %1 %conv = trunc i64 %sub to i32 ret i32 %conv } ; Function Attrs: nofree nounwind uwtable define dso_local void @strsortup(ptr noundef %a, i32 noundef %n) local_unnamed_addr #2 { entry: %conv = sext i32 %n to i64 tail call void @qsort(ptr noundef %a, i64 noundef %conv, i64 noundef 16, ptr noundef nonnull @cmp1) #21 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @strsortdown(ptr noundef %a, i32 noundef %n) local_unnamed_addr #2 { entry: %conv = sext i32 %n to i64 tail call void @qsort(ptr noundef %a, i64 noundef %conv, i64 noundef 16, ptr noundef nonnull @cmp2) #21 ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @digits(i64 noundef %a, i64 noundef %b) local_unnamed_addr #6 { entry: br label %tailrecurse tailrecurse: ; preds = %tailrecurse, %entry %accumulator.tr = phi i64 [ 0, %entry ], [ %add, %tailrecurse ] %a.tr = phi i64 [ %a, %entry ], [ %div, %tailrecurse ] %div = sdiv i64 %a.tr, %b %tobool.not = icmp eq i64 %div, 0 %add = add nuw nsw i64 %accumulator.tr, 1 br i1 %tobool.not, label %cond.end, label %tailrecurse cond.end: ; preds = %tailrecurse ret i64 %add } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @base(i64 noundef %n, i64 noundef %a, i64 noundef %i) local_unnamed_addr #6 { entry: %cmp5 = icmp eq i64 %i, 1 br i1 %cmp5, label %cond.true, label %cond.false.preheader cond.false.preheader: ; preds = %entry %0 = add i64 %i, 3 %1 = add i64 %i, -2 %xtraiter = and i64 %0, 3 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %cond.false.prol.loopexit, label %cond.false.prol cond.false.prol: ; preds = %cond.false.preheader, %cond.false.prol %i.tr7.prol = phi i64 [ %sub.prol, %cond.false.prol ], [ %i, %cond.false.preheader ] %n.tr6.prol = phi i64 [ %div.prol, %cond.false.prol ], [ %n, %cond.false.preheader ] %prol.iter = phi i64 [ %prol.iter.next, %cond.false.prol ], [ 0, %cond.false.preheader ] %div.prol = sdiv i64 %n.tr6.prol, %a %sub.prol = add nsw i64 %i.tr7.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 %cond.false.prol.loopexit, label %cond.false.prol, !llvm.loop !44 cond.false.prol.loopexit: ; preds = %cond.false.prol, %cond.false.preheader %div.lcssa.unr = phi i64 [ undef, %cond.false.preheader ], [ %div.prol, %cond.false.prol ] %i.tr7.unr = phi i64 [ %i, %cond.false.preheader ], [ %sub.prol, %cond.false.prol ] %n.tr6.unr = phi i64 [ %n, %cond.false.preheader ], [ %div.prol, %cond.false.prol ] %2 = icmp ult i64 %1, 3 br i1 %2, label %cond.true, label %cond.false cond.true: ; preds = %cond.false.prol.loopexit, %cond.false, %entry %n.tr.lcssa = phi i64 [ %n, %entry ], [ %div.lcssa.unr, %cond.false.prol.loopexit ], [ %div.3, %cond.false ] %rem = srem i64 %n.tr.lcssa, %a ret i64 %rem cond.false: ; preds = %cond.false.prol.loopexit, %cond.false %i.tr7 = phi i64 [ %sub.3, %cond.false ], [ %i.tr7.unr, %cond.false.prol.loopexit ] %n.tr6 = phi i64 [ %div.3, %cond.false ], [ %n.tr6.unr, %cond.false.prol.loopexit ] %div = sdiv i64 %n.tr6, %a %div.1 = sdiv i64 %div, %a %div.2 = sdiv i64 %div.1, %a %div.3 = sdiv i64 %div.2, %a %sub.3 = add nsw i64 %i.tr7, -4 %cmp.3 = icmp eq i64 %sub.3, 1 br i1 %cmp.3, label %cond.true, label %cond.false } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %s = alloca [1151154 x i8], align 16 %n = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 1151154, ptr nonnull %s) #21 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #21 %call.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s) br label %vector.body vector.body: ; preds = %vector.body, %entry %index = phi i64 [ 0, %entry ], [ %index.next.4, %vector.body ] %0 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 0, i64 %index store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %0, align 16, !tbaa !5 %1 = getelementptr inbounds i64, ptr %0, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %1, align 16, !tbaa !5 %index.next = add nuw nsw i64 %index, 4 %2 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 0, i64 %index.next store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %2, align 16, !tbaa !5 %3 = getelementptr inbounds i64, ptr %2, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %3, align 16, !tbaa !5 %index.next.1 = add nuw nsw i64 %index, 8 %4 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 0, i64 %index.next.1 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %4, align 16, !tbaa !5 %5 = getelementptr inbounds i64, ptr %4, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %5, align 16, !tbaa !5 %index.next.2 = add nuw nsw i64 %index, 12 %6 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 0, i64 %index.next.2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %6, align 16, !tbaa !5 %7 = getelementptr inbounds i64, ptr %6, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %7, align 16, !tbaa !5 %index.next.3 = add nuw nsw i64 %index, 16 %8 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 0, i64 %index.next.3 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %8, align 16, !tbaa !5 %9 = getelementptr inbounds i64, ptr %8, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %9, align 16, !tbaa !5 %index.next.4 = add nuw nsw i64 %index, 20 %10 = icmp eq i64 %index.next.4, 300000 br i1 %10, label %vector.body101, label %vector.body, !llvm.loop !45 vector.body108: ; preds = %vector.body101, %vector.body108 %index109 = phi i64 [ %index.next110.4, %vector.body108 ], [ 0, %vector.body101 ] %11 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 2, i64 %index109 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %11, align 16, !tbaa !5 %12 = getelementptr inbounds i64, ptr %11, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %12, align 16, !tbaa !5 %index.next110 = add nuw nsw i64 %index109, 4 %13 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 2, i64 %index.next110 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %13, align 16, !tbaa !5 %14 = getelementptr inbounds i64, ptr %13, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %14, align 16, !tbaa !5 %index.next110.1 = add nuw nsw i64 %index109, 8 %15 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 2, i64 %index.next110.1 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %15, align 16, !tbaa !5 %16 = getelementptr inbounds i64, ptr %15, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %16, align 16, !tbaa !5 %index.next110.2 = add nuw nsw i64 %index109, 12 %17 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 2, i64 %index.next110.2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %17, align 16, !tbaa !5 %18 = getelementptr inbounds i64, ptr %17, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %18, align 16, !tbaa !5 %index.next110.3 = add nuw nsw i64 %index109, 16 %19 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 2, i64 %index.next110.3 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %19, align 16, !tbaa !5 %20 = getelementptr inbounds i64, ptr %19, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %20, align 16, !tbaa !5 %index.next110.4 = add nuw nsw i64 %index109, 20 %21 = icmp eq i64 %index.next110.4, 300000 br i1 %21, label %vector.body115, label %vector.body108, !llvm.loop !46 vector.body115: ; preds = %vector.body108, %vector.body115 %index116 = phi i64 [ %index.next117.4, %vector.body115 ], [ 0, %vector.body108 ] %22 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 3, i64 %index116 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %22, align 16, !tbaa !5 %23 = getelementptr inbounds i64, ptr %22, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %23, align 16, !tbaa !5 %index.next117 = add nuw nsw i64 %index116, 4 %24 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 3, i64 %index.next117 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %24, align 16, !tbaa !5 %25 = getelementptr inbounds i64, ptr %24, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %25, align 16, !tbaa !5 %index.next117.1 = add nuw nsw i64 %index116, 8 %26 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 3, i64 %index.next117.1 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %26, align 16, !tbaa !5 %27 = getelementptr inbounds i64, ptr %26, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %27, align 16, !tbaa !5 %index.next117.2 = add nuw nsw i64 %index116, 12 %28 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 3, i64 %index.next117.2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %28, align 16, !tbaa !5 %29 = getelementptr inbounds i64, ptr %28, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %29, align 16, !tbaa !5 %index.next117.3 = add nuw nsw i64 %index116, 16 %30 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 3, i64 %index.next117.3 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %30, align 16, !tbaa !5 %31 = getelementptr inbounds i64, ptr %30, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %31, align 16, !tbaa !5 %index.next117.4 = add nuw nsw i64 %index116, 20 %32 = icmp eq i64 %index.next117.4, 300000 br i1 %32, label %vector.body122, label %vector.body115, !llvm.loop !47 vector.body122: ; preds = %vector.body115, %vector.body122 %index123 = phi i64 [ %index.next124.4, %vector.body122 ], [ 0, %vector.body115 ] %33 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 4, i64 %index123 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %33, align 16, !tbaa !5 %34 = getelementptr inbounds i64, ptr %33, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %34, align 16, !tbaa !5 %index.next124 = add nuw nsw i64 %index123, 4 %35 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 4, i64 %index.next124 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %35, align 16, !tbaa !5 %36 = getelementptr inbounds i64, ptr %35, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %36, align 16, !tbaa !5 %index.next124.1 = add nuw nsw i64 %index123, 8 %37 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 4, i64 %index.next124.1 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %37, align 16, !tbaa !5 %38 = getelementptr inbounds i64, ptr %37, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %38, align 16, !tbaa !5 %index.next124.2 = add nuw nsw i64 %index123, 12 %39 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 4, i64 %index.next124.2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %39, align 16, !tbaa !5 %40 = getelementptr inbounds i64, ptr %39, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %40, align 16, !tbaa !5 %index.next124.3 = add nuw nsw i64 %index123, 16 %41 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 4, i64 %index.next124.3 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %41, align 16, !tbaa !5 %42 = getelementptr inbounds i64, ptr %41, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %42, align 16, !tbaa !5 %index.next124.4 = add nuw nsw i64 %index123, 20 %43 = icmp eq i64 %index.next124.4, 300000 br i1 %43, label %vector.body129, label %vector.body122, !llvm.loop !48 vector.body129: ; preds = %vector.body122, %vector.body129 %index130 = phi i64 [ %index.next131.4, %vector.body129 ], [ 0, %vector.body122 ] %44 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 5, i64 %index130 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %44, align 16, !tbaa !5 %45 = getelementptr inbounds i64, ptr %44, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %45, align 16, !tbaa !5 %index.next131 = add nuw nsw i64 %index130, 4 %46 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 5, i64 %index.next131 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %46, align 16, !tbaa !5 %47 = getelementptr inbounds i64, ptr %46, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %47, align 16, !tbaa !5 %index.next131.1 = add nuw nsw i64 %index130, 8 %48 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 5, i64 %index.next131.1 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %48, align 16, !tbaa !5 %49 = getelementptr inbounds i64, ptr %48, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %49, align 16, !tbaa !5 %index.next131.2 = add nuw nsw i64 %index130, 12 %50 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 5, i64 %index.next131.2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %50, align 16, !tbaa !5 %51 = getelementptr inbounds i64, ptr %50, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %51, align 16, !tbaa !5 %index.next131.3 = add nuw nsw i64 %index130, 16 %52 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 5, i64 %index.next131.3 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %52, align 16, !tbaa !5 %53 = getelementptr inbounds i64, ptr %52, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %53, align 16, !tbaa !5 %index.next131.4 = add nuw nsw i64 %index130, 20 %54 = icmp eq i64 %index.next131.4, 300000 br i1 %54, label %vector.body136, label %vector.body129, !llvm.loop !49 vector.body136: ; preds = %vector.body129, %vector.body136 %index137 = phi i64 [ %index.next138.4, %vector.body136 ], [ 0, %vector.body129 ] %55 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 6, i64 %index137 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %55, align 16, !tbaa !5 %56 = getelementptr inbounds i64, ptr %55, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %56, align 16, !tbaa !5 %index.next138 = add nuw nsw i64 %index137, 4 %57 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 6, i64 %index.next138 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %57, align 16, !tbaa !5 %58 = getelementptr inbounds i64, ptr %57, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %58, align 16, !tbaa !5 %index.next138.1 = add nuw nsw i64 %index137, 8 %59 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 6, i64 %index.next138.1 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %59, align 16, !tbaa !5 %60 = getelementptr inbounds i64, ptr %59, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %60, align 16, !tbaa !5 %index.next138.2 = add nuw nsw i64 %index137, 12 %61 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 6, i64 %index.next138.2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %61, align 16, !tbaa !5 %62 = getelementptr inbounds i64, ptr %61, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %62, align 16, !tbaa !5 %index.next138.3 = add nuw nsw i64 %index137, 16 %63 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 6, i64 %index.next138.3 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %63, align 16, !tbaa !5 %64 = getelementptr inbounds i64, ptr %63, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %64, align 16, !tbaa !5 %index.next138.4 = add nuw nsw i64 %index137, 20 %65 = icmp eq i64 %index.next138.4, 300000 br i1 %65, label %vector.body143, label %vector.body136, !llvm.loop !50 vector.body143: ; preds = %vector.body136, %vector.body143 %index144 = phi i64 [ %index.next145.4, %vector.body143 ], [ 0, %vector.body136 ] %66 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 7, i64 %index144 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %66, align 16, !tbaa !5 %67 = getelementptr inbounds i64, ptr %66, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %67, align 16, !tbaa !5 %index.next145 = add nuw nsw i64 %index144, 4 %68 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 7, i64 %index.next145 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %68, align 16, !tbaa !5 %69 = getelementptr inbounds i64, ptr %68, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %69, align 16, !tbaa !5 %index.next145.1 = add nuw nsw i64 %index144, 8 %70 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 7, i64 %index.next145.1 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %70, align 16, !tbaa !5 %71 = getelementptr inbounds i64, ptr %70, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %71, align 16, !tbaa !5 %index.next145.2 = add nuw nsw i64 %index144, 12 %72 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 7, i64 %index.next145.2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %72, align 16, !tbaa !5 %73 = getelementptr inbounds i64, ptr %72, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %73, align 16, !tbaa !5 %index.next145.3 = add nuw nsw i64 %index144, 16 %74 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 7, i64 %index.next145.3 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %74, align 16, !tbaa !5 %75 = getelementptr inbounds i64, ptr %74, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %75, align 16, !tbaa !5 %index.next145.4 = add nuw nsw i64 %index144, 20 %76 = icmp eq i64 %index.next145.4, 300000 br i1 %76, label %vector.body150, label %vector.body143, !llvm.loop !51 vector.body150: ; preds = %vector.body143, %vector.body150 %index151 = phi i64 [ %index.next152.4, %vector.body150 ], [ 0, %vector.body143 ] %77 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 8, i64 %index151 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %77, align 16, !tbaa !5 %78 = getelementptr inbounds i64, ptr %77, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %78, align 16, !tbaa !5 %index.next152 = add nuw nsw i64 %index151, 4 %79 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 8, i64 %index.next152 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %79, align 16, !tbaa !5 %80 = getelementptr inbounds i64, ptr %79, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %80, align 16, !tbaa !5 %index.next152.1 = add nuw nsw i64 %index151, 8 %81 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 8, i64 %index.next152.1 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %81, align 16, !tbaa !5 %82 = getelementptr inbounds i64, ptr %81, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %82, align 16, !tbaa !5 %index.next152.2 = add nuw nsw i64 %index151, 12 %83 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 8, i64 %index.next152.2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %83, align 16, !tbaa !5 %84 = getelementptr inbounds i64, ptr %83, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %84, align 16, !tbaa !5 %index.next152.3 = add nuw nsw i64 %index151, 16 %85 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 8, i64 %index.next152.3 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %85, align 16, !tbaa !5 %86 = getelementptr inbounds i64, ptr %85, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %86, align 16, !tbaa !5 %index.next152.4 = add nuw nsw i64 %index151, 20 %87 = icmp eq i64 %index.next152.4, 300000 br i1 %87, label %vector.body157, label %vector.body150, !llvm.loop !52 vector.body157: ; preds = %vector.body150, %vector.body157 %index158 = phi i64 [ %index.next159.4, %vector.body157 ], [ 0, %vector.body150 ] %88 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 9, i64 %index158 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %88, align 16, !tbaa !5 %89 = getelementptr inbounds i64, ptr %88, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %89, align 16, !tbaa !5 %index.next159 = add nuw nsw i64 %index158, 4 %90 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 9, i64 %index.next159 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %90, align 16, !tbaa !5 %91 = getelementptr inbounds i64, ptr %90, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %91, align 16, !tbaa !5 %index.next159.1 = add nuw nsw i64 %index158, 8 %92 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 9, i64 %index.next159.1 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %92, align 16, !tbaa !5 %93 = getelementptr inbounds i64, ptr %92, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %93, align 16, !tbaa !5 %index.next159.2 = add nuw nsw i64 %index158, 12 %94 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 9, i64 %index.next159.2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %94, align 16, !tbaa !5 %95 = getelementptr inbounds i64, ptr %94, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %95, align 16, !tbaa !5 %index.next159.3 = add nuw nsw i64 %index158, 16 %96 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 9, i64 %index.next159.3 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %96, align 16, !tbaa !5 %97 = getelementptr inbounds i64, ptr %96, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %97, align 16, !tbaa !5 %index.next159.4 = add nuw nsw i64 %index158, 20 %98 = icmp eq i64 %index.next159.4, 300000 br i1 %98, label %for.cond.cleanup3.9, label %vector.body157, !llvm.loop !53 for.cond.cleanup3.9: ; preds = %vector.body157 %99 = load i64, ptr %n, align 8, !tbaa !5 %cmp1186 = icmp sgt i64 %99, 0 br i1 %cmp1186, label %for.body13.preheader, label %base.exit.preheader for.body13.preheader: ; preds = %for.cond.cleanup3.9 %xtraiter = and i64 %99, 1 %100 = icmp eq i64 %99, 1 br i1 %100, label %base.exit.preheader.loopexit.unr-lcssa, label %for.body13.preheader.new for.body13.preheader.new: ; preds = %for.body13.preheader %unroll_iter = and i64 %99, -2 br label %for.body13 base.exit.preheader.loopexit.unr-lcssa: ; preds = %for.body13, %for.body13.preheader %i9.087.unr = phi i64 [ 0, %for.body13.preheader ], [ %inc21.1, %for.body13 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %base.exit.preheader, label %for.body13.epil for.body13.epil: ; preds = %base.exit.preheader.loopexit.unr-lcssa %arrayidx14.epil = getelementptr inbounds [1151154 x i8], ptr %s, i64 0, i64 %i9.087.unr %101 = load i8, ptr %arrayidx14.epil, align 1, !tbaa !21 %conv.epil = sext i8 %101 to i64 %sub.epil = add nsw i64 %conv.epil, -48 %arrayidx17.epil = getelementptr inbounds [10 x i64], ptr @cnt, i64 0, i64 %sub.epil %102 = load i64, ptr %arrayidx17.epil, align 8, !tbaa !5 %inc18.epil = add nsw i64 %102, 1 store i64 %inc18.epil, ptr %arrayidx17.epil, align 8, !tbaa !5 %arrayidx19.epil = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 %sub.epil, i64 %102 store i64 %i9.087.unr, ptr %arrayidx19.epil, align 8, !tbaa !5 br label %base.exit.preheader base.exit.preheader: ; preds = %for.body13.epil, %base.exit.preheader.loopexit.unr-lcssa, %for.cond.cleanup3.9 br label %base.exit vector.body101: ; preds = %vector.body, %vector.body101 %index102 = phi i64 [ %index.next103.4, %vector.body101 ], [ 0, %vector.body ] %103 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 1, i64 %index102 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %103, align 16, !tbaa !5 %104 = getelementptr inbounds i64, ptr %103, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %104, align 16, !tbaa !5 %index.next103 = add nuw nsw i64 %index102, 4 %105 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 1, i64 %index.next103 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %105, align 16, !tbaa !5 %106 = getelementptr inbounds i64, ptr %105, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %106, align 16, !tbaa !5 %index.next103.1 = add nuw nsw i64 %index102, 8 %107 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 1, i64 %index.next103.1 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %107, align 16, !tbaa !5 %108 = getelementptr inbounds i64, ptr %107, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %108, align 16, !tbaa !5 %index.next103.2 = add nuw nsw i64 %index102, 12 %109 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 1, i64 %index.next103.2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %109, align 16, !tbaa !5 %110 = getelementptr inbounds i64, ptr %109, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %110, align 16, !tbaa !5 %index.next103.3 = add nuw nsw i64 %index102, 16 %111 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 1, i64 %index.next103.3 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %111, align 16, !tbaa !5 %112 = getelementptr inbounds i64, ptr %111, i64 2 store <2 x i64> <i64 1152921504606846976, i64 1152921504606846976>, ptr %112, align 16, !tbaa !5 %index.next103.4 = add nuw nsw i64 %index102, 20 %113 = icmp eq i64 %index.next103.4, 300000 br i1 %113, label %vector.body108, label %vector.body101, !llvm.loop !54 for.body13: ; preds = %for.body13, %for.body13.preheader.new %i9.087 = phi i64 [ 0, %for.body13.preheader.new ], [ %inc21.1, %for.body13 ] %niter = phi i64 [ 0, %for.body13.preheader.new ], [ %niter.next.1, %for.body13 ] %arrayidx14 = getelementptr inbounds [1151154 x i8], ptr %s, i64 0, i64 %i9.087 %114 = load i8, ptr %arrayidx14, align 2, !tbaa !21 %conv = sext i8 %114 to i64 %sub = add nsw i64 %conv, -48 %arrayidx17 = getelementptr inbounds [10 x i64], ptr @cnt, i64 0, i64 %sub %115 = load i64, ptr %arrayidx17, align 8, !tbaa !5 %inc18 = add nsw i64 %115, 1 store i64 %inc18, ptr %arrayidx17, align 8, !tbaa !5 %arrayidx19 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 %sub, i64 %115 store i64 %i9.087, ptr %arrayidx19, align 8, !tbaa !5 %inc21 = or i64 %i9.087, 1 %arrayidx14.1 = getelementptr inbounds [1151154 x i8], ptr %s, i64 0, i64 %inc21 %116 = load i8, ptr %arrayidx14.1, align 1, !tbaa !21 %conv.1 = sext i8 %116 to i64 %sub.1 = add nsw i64 %conv.1, -48 %arrayidx17.1 = getelementptr inbounds [10 x i64], ptr @cnt, i64 0, i64 %sub.1 %117 = load i64, ptr %arrayidx17.1, align 8, !tbaa !5 %inc18.1 = add nsw i64 %117, 1 store i64 %inc18.1, ptr %arrayidx17.1, align 8, !tbaa !5 %arrayidx19.1 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 %sub.1, i64 %117 store i64 %inc21, ptr %arrayidx19.1, align 8, !tbaa !5 %inc21.1 = add nuw nsw i64 %i9.087, 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 %base.exit.preheader.loopexit.unr-lcssa, label %for.body13, !llvm.loop !55 for.cond.cleanup27: ; preds = %cleanup53 %call59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %ans.1.lcssa) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #21 call void @llvm.lifetime.end.p0(i64 1151154, ptr nonnull %s) #21 ret i32 0 base.exit: ; preds = %base.exit.preheader, %cleanup53 %ans.092 = phi i64 [ %ans.1.lcssa, %cleanup53 ], [ 0, %base.exit.preheader ] %i23.091 = phi i64 [ %inc56, %cleanup53 ], [ 0, %base.exit.preheader ] %div.i.195 = udiv i64 %i23.091, 100 %rem.i = urem i64 %div.i.195, 10 %arrayidx36 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 %rem.i br label %while.body.us.i while.body.us.i: ; preds = %while.body.us.i, %base.exit %l.addr.0.i = phi i32 [ %spec.select.i, %while.body.us.i ], [ 0, %base.exit ] %r.addr.0.i = phi i32 [ %spec.select51.i, %while.body.us.i ], [ 300000, %base.exit ] %add.us.i = add nsw i32 %r.addr.0.i, %l.addr.0.i %div.us.i = sdiv i32 %add.us.i, 2 %idxprom.us.i = sext i32 %div.us.i to i64 %arrayidx.us.i = getelementptr inbounds i64, ptr %arrayidx36, i64 %idxprom.us.i %118 = load i64, ptr %arrayidx.us.i, align 8, !tbaa !5 %cmp1.i.us.i = icmp slt i64 %118, 0 %spec.select.i = select i1 %cmp1.i.us.i, i32 %div.us.i, i32 %l.addr.0.i %spec.select51.i = select i1 %cmp1.i.us.i, i32 %r.addr.0.i, i32 %div.us.i %sub.us.i = sub nsw i32 %spec.select51.i, %spec.select.i %cmp.us.i = icmp sgt i32 %sub.us.i, 1 br i1 %cmp.us.i, label %while.body.us.i, label %while.end.i, !llvm.loop !24 while.end.i: ; preds = %while.body.us.i %idxprom1.i = sext i32 %spec.select.i to i64 %arrayidx2.i = getelementptr inbounds i64, ptr %arrayidx36, i64 %idxprom1.i %119 = load i64, ptr %arrayidx2.i, align 8, !tbaa !5 %cmp4.not.i.not.i = icmp slt i64 %119, 0 br i1 %cmp4.not.i.not.i, label %cond.false.thread47.i, label %lower_bound.exit cond.false.thread47.i: ; preds = %while.end.i %idxprom348.i = sext i32 %spec.select51.i to i64 %arrayidx449.i = getelementptr inbounds i64, ptr %arrayidx36, i64 %idxprom348.i %120 = load i64, ptr %arrayidx449.i, align 8, !tbaa !5 %cmp4.not.i19.i.not.inv = icmp sgt i64 %120, -1 %.pre.i = select i1 %cmp4.not.i19.i.not.inv, i64 %idxprom348.i, i64 -1 br label %lower_bound.exit lower_bound.exit: ; preds = %while.end.i, %cond.false.thread47.i %conv.pre-phi.i = phi i64 [ %.pre.i, %cond.false.thread47.i ], [ %idxprom1.i, %while.end.i ] %arrayidx40 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 %rem.i, i64 %conv.pre-phi.i %121 = load i64, ptr %arrayidx40, align 8, !tbaa !5 %cmp42 = icmp slt i64 %121, 100000001 br i1 %cmp42, label %base.exit.1, label %cleanup53 base.exit.1: ; preds = %lower_bound.exit %div.i.1.udiv = udiv i64 %i23.091, 10 %rem.i.2.urem = urem i64 %i23.091, 10 %rem.i.1 = urem i64 %div.i.1.udiv, 10 %arrayidx36.1 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 %rem.i.1 br label %while.body.us.i.1 while.body.us.i.1: ; preds = %while.body.us.i.1, %base.exit.1 %l.addr.0.i.1 = phi i32 [ %spec.select.i.1, %while.body.us.i.1 ], [ 0, %base.exit.1 ] %r.addr.0.i.1 = phi i32 [ %spec.select51.i.1, %while.body.us.i.1 ], [ 300000, %base.exit.1 ] %add.us.i.1 = add nsw i32 %r.addr.0.i.1, %l.addr.0.i.1 %div.us.i.1 = sdiv i32 %add.us.i.1, 2 %idxprom.us.i.1 = sext i32 %div.us.i.1 to i64 %arrayidx.us.i.1 = getelementptr inbounds i64, ptr %arrayidx36.1, i64 %idxprom.us.i.1 %122 = load i64, ptr %arrayidx.us.i.1, align 8, !tbaa !5 %cmp1.i.us.i.1.not = icmp sgt i64 %122, %121 %spec.select.i.1 = select i1 %cmp1.i.us.i.1.not, i32 %l.addr.0.i.1, i32 %div.us.i.1 %spec.select51.i.1 = select i1 %cmp1.i.us.i.1.not, i32 %div.us.i.1, i32 %r.addr.0.i.1 %sub.us.i.1 = sub nsw i32 %spec.select51.i.1, %spec.select.i.1 %cmp.us.i.1 = icmp sgt i32 %sub.us.i.1, 1 br i1 %cmp.us.i.1, label %while.body.us.i.1, label %while.end.i.1, !llvm.loop !24 while.end.i.1: ; preds = %while.body.us.i.1 %idxprom1.i.1 = sext i32 %spec.select.i.1 to i64 %arrayidx2.i.1 = getelementptr inbounds i64, ptr %arrayidx36.1, i64 %idxprom1.i.1 %123 = load i64, ptr %arrayidx2.i.1, align 8, !tbaa !5 %cmp4.not.i.not.i.1.not = icmp sgt i64 %123, %121 br i1 %cmp4.not.i.not.i.1.not, label %lower_bound.exit.1, label %cond.false.thread47.i.1 cond.false.thread47.i.1: ; preds = %while.end.i.1 %idxprom348.i.1 = sext i32 %spec.select51.i.1 to i64 %arrayidx449.i.1 = getelementptr inbounds i64, ptr %arrayidx36.1, i64 %idxprom348.i.1 %124 = load i64, ptr %arrayidx449.i.1, align 8, !tbaa !5 %cmp4.not.i19.i.not.1.not = icmp sgt i64 %124, %121 %.pre.i.1 = select i1 %cmp4.not.i19.i.not.1.not, i64 %idxprom348.i.1, i64 -1 br label %lower_bound.exit.1 lower_bound.exit.1: ; preds = %cond.false.thread47.i.1, %while.end.i.1 %conv.pre-phi.i.1 = phi i64 [ %.pre.i.1, %cond.false.thread47.i.1 ], [ %idxprom1.i.1, %while.end.i.1 ] %arrayidx40.1 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 %rem.i.1, i64 %conv.pre-phi.i.1 %125 = load i64, ptr %arrayidx40.1, align 8, !tbaa !5 %cmp42.1 = icmp slt i64 %125, 100000001 br i1 %cmp42.1, label %base.exit.2, label %cleanup53 base.exit.2: ; preds = %lower_bound.exit.1 %arrayidx36.2 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 %rem.i.2.urem br label %while.body.us.i.2 while.body.us.i.2: ; preds = %while.body.us.i.2, %base.exit.2 %l.addr.0.i.2 = phi i32 [ %spec.select.i.2, %while.body.us.i.2 ], [ 0, %base.exit.2 ] %r.addr.0.i.2 = phi i32 [ %spec.select51.i.2, %while.body.us.i.2 ], [ 300000, %base.exit.2 ] %add.us.i.2 = add nsw i32 %r.addr.0.i.2, %l.addr.0.i.2 %div.us.i.2 = sdiv i32 %add.us.i.2, 2 %idxprom.us.i.2 = sext i32 %div.us.i.2 to i64 %arrayidx.us.i.2 = getelementptr inbounds i64, ptr %arrayidx36.2, i64 %idxprom.us.i.2 %126 = load i64, ptr %arrayidx.us.i.2, align 8, !tbaa !5 %cmp1.i.us.i.2.not = icmp sgt i64 %126, %125 %spec.select.i.2 = select i1 %cmp1.i.us.i.2.not, i32 %l.addr.0.i.2, i32 %div.us.i.2 %spec.select51.i.2 = select i1 %cmp1.i.us.i.2.not, i32 %div.us.i.2, i32 %r.addr.0.i.2 %sub.us.i.2 = sub nsw i32 %spec.select51.i.2, %spec.select.i.2 %cmp.us.i.2 = icmp sgt i32 %sub.us.i.2, 1 br i1 %cmp.us.i.2, label %while.body.us.i.2, label %while.end.i.2, !llvm.loop !24 while.end.i.2: ; preds = %while.body.us.i.2 %idxprom1.i.2 = sext i32 %spec.select.i.2 to i64 %arrayidx2.i.2 = getelementptr inbounds i64, ptr %arrayidx36.2, i64 %idxprom1.i.2 %127 = load i64, ptr %arrayidx2.i.2, align 8, !tbaa !5 %cmp4.not.i.not.i.2.not = icmp sgt i64 %127, %125 br i1 %cmp4.not.i.not.i.2.not, label %lower_bound.exit.2, label %cond.false.thread47.i.2 cond.false.thread47.i.2: ; preds = %while.end.i.2 %idxprom348.i.2 = sext i32 %spec.select51.i.2 to i64 %arrayidx449.i.2 = getelementptr inbounds i64, ptr %arrayidx36.2, i64 %idxprom348.i.2 %128 = load i64, ptr %arrayidx449.i.2, align 8, !tbaa !5 %cmp4.not.i19.i.not.2.not = icmp sgt i64 %128, %125 %.pre.i.2 = select i1 %cmp4.not.i19.i.not.2.not, i64 %idxprom348.i.2, i64 -1 br label %lower_bound.exit.2 lower_bound.exit.2: ; preds = %cond.false.thread47.i.2, %while.end.i.2 %conv.pre-phi.i.2 = phi i64 [ %.pre.i.2, %cond.false.thread47.i.2 ], [ %idxprom1.i.2, %while.end.i.2 ] %arrayidx40.2 = getelementptr inbounds [10 x [300000 x i64]], ptr @num, i64 0, i64 %rem.i.2.urem, i64 %conv.pre-phi.i.2 %129 = load i64, ptr %arrayidx40.2, align 8, !tbaa !5 %cmp42.2 = icmp slt i64 %129, 100000001 %ans.2.2 = zext i1 %cmp42.2 to i64 %spec.select = add nsw i64 %ans.092, %ans.2.2 br label %cleanup53 cleanup53: ; preds = %lower_bound.exit.2, %lower_bound.exit.1, %lower_bound.exit %ans.1.lcssa = phi i64 [ %ans.092, %lower_bound.exit ], [ %ans.092, %lower_bound.exit.1 ], [ %spec.select, %lower_bound.exit.2 ] %inc56 = add nuw nsw i64 %i23.091, 1 %exitcond96.not = icmp eq i64 %inc56, 1000 br i1 %exitcond96.not, label %for.cond.cleanup27, label %base.exit, !llvm.loop !56 } ; 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 i64 @llvm.smax.i64(i64, i64) #18 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #18 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <2 x i64> @llvm.smin.v2i64(<2 x i64>, <2 x i64>) #18 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.vector.reduce.smin.v2i64(<2 x i64>) #18 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <2 x i64> @llvm.smax.v2i64(<2 x i64>, <2 x i64>) #18 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.vector.reduce.smax.v2i64(<2 x i64>) #18 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #18 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="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 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 #5 = { 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 #6 = { 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 #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 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 #9 = { mustprogress nofree norecurse nosync nounwind willreturn memory(write, argmem: 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 #10 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-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 nocallback nofree nosync nounwind willreturn } attributes #12 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) 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 #13 = { 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 #14 = { 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 #15 = { 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 #16 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #17 = { 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 #18 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #19 = { nounwind allocsize(1) } attributes #20 = { nounwind willreturn memory(read) } attributes #21 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{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, !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, !11, !12} !15 = distinct !{!15, !10, !12, !11} !16 = distinct !{!16, !17} !17 = !{!"llvm.loop.unroll.disable"} !18 = distinct !{!18, !10} !19 = distinct !{!19, !10} !20 = distinct !{!20, !17} !21 = !{!7, !7, i64 0} !22 = !{!23, !23, i64 0} !23 = !{!"int", !7, i64 0} !24 = distinct !{!24, !10} !25 = distinct !{!25, !10} !26 = distinct !{!26, !10, !27, !11, !12} !27 = !{!"llvm.loop.peeled.count", i32 1} !28 = distinct !{!28, !10} !29 = distinct !{!29, !10} !30 = !{!31, !31, i64 0} !31 = !{!"any pointer", !7, i64 0} !32 = distinct !{!32, !10} !33 = distinct !{!33, !10} !34 = distinct !{!34, !10} !35 = distinct !{!35, !10} !36 = distinct !{!36, !10} !37 = distinct !{!37, !10} !38 = distinct !{!38, !10} !39 = distinct !{!39, !10} !40 = distinct !{!40, !10, !11, !12} !41 = distinct !{!41, !10, !12, !11} !42 = !{!43, !6, i64 0} !43 = !{!"", !6, i64 0, !6, i64 8} !44 = distinct !{!44, !17} !45 = distinct !{!45, !10, !11, !12} !46 = distinct !{!46, !10, !11, !12} !47 = distinct !{!47, !10, !11, !12} !48 = distinct !{!48, !10, !11, !12} !49 = distinct !{!49, !10, !11, !12} !50 = distinct !{!50, !10, !11, !12} !51 = distinct !{!51, !10, !11, !12} !52 = distinct !{!52, !10, !11, !12} !53 = distinct !{!53, !10, !11, !12} !54 = distinct !{!54, !10, !11, !12} !55 = distinct !{!55, !10} !56 = distinct !{!56, !10}
// 三井住友信託銀行プログラミングコンテスト2019-D // 2019.12.1 bal4u #include <stdio.h> int N; char S[30005]; char a[1000]; int n[10], n10[100]; int main() { int i, j, x, ans; scanf("%d%s", &N, S+1); for (i = 1; i <= N; ++i) { x = S[i] & 0xf; if (!n[x]) n[x] = i; for (j = 0; j < 10; ++j) if (n[j] > 0 && n[j] < i && !n10[10*j+x]) { n10[10*j+x] = i; } for (j = 0; j < 100; ++j) if (n10[j] > 0 && n10[j] < i) { a[j*10+x] = 1; } } ans = 0; for (i = 0; i < 1000; ++i) if (a[i]) ++ans; printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158151/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158151/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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%s\00", align 1 @N = dso_local global i32 0, align 4 @S = dso_local global [30005 x i8] zeroinitializer, align 16 @n = dso_local local_unnamed_addr global [10 x i32] zeroinitializer, align 16 @n10 = dso_local local_unnamed_addr global [100 x i32] zeroinitializer, align 16 @a = dso_local local_unnamed_addr global [1000 x i8] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @N, ptr noundef nonnull getelementptr inbounds ([30005 x i8], ptr @S, i64 0, i64 1)) %0 = load i32, ptr @N, align 4, !tbaa !5 %cmp.not94 = icmp slt i32 %0, 1 br i1 %cmp.not94, label %vector.body.preheader, label %for.body.preheader for.body.preheader: ; preds = %entry %1 = add nuw i32 %0, 1 %wide.trip.count = zext i32 %1 to i64 br label %for.body vector.body: ; preds = %vector.body.1, %vector.body.preheader %index = phi i64 [ 0, %vector.body.preheader ], [ %index.next.1, %vector.body.1 ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.body.preheader ], [ %17, %vector.body.1 ] %vec.phi112 = phi <4 x i32> [ zeroinitializer, %vector.body.preheader ], [ %18, %vector.body.1 ] %2 = getelementptr inbounds [1000 x i8], ptr @a, i64 0, i64 %index %wide.load = load <4 x i8>, ptr %2, align 16, !tbaa !9 %3 = getelementptr inbounds i8, ptr %2, i64 4 %wide.load113 = load <4 x i8>, ptr %3, align 4, !tbaa !9 %4 = icmp ne <4 x i8> %wide.load, zeroinitializer %5 = icmp ne <4 x i8> %wide.load113, zeroinitializer %6 = zext <4 x i1> %4 to <4 x i32> %7 = zext <4 x i1> %5 to <4 x i32> %8 = add <4 x i32> %vec.phi, %6 %9 = add <4 x i32> %vec.phi112, %7 %index.next = or i64 %index, 8 %10 = icmp eq i64 %index.next, 1000 br i1 %10, label %middle.block, label %vector.body.1, !llvm.loop !10 vector.body.1: ; preds = %vector.body %11 = getelementptr inbounds [1000 x i8], ptr @a, i64 0, i64 %index.next %wide.load.1 = load <4 x i8>, ptr %11, align 8, !tbaa !9 %12 = getelementptr inbounds i8, ptr %11, i64 4 %wide.load113.1 = load <4 x i8>, ptr %12, align 4, !tbaa !9 %13 = icmp ne <4 x i8> %wide.load.1, zeroinitializer %14 = icmp ne <4 x i8> %wide.load113.1, zeroinitializer %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> %8, %15 %18 = add <4 x i32> %9, %16 %index.next.1 = add nuw nsw i64 %index, 16 br label %vector.body middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %9, %8 %19 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %call65 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %19) ret i32 0 for.body: ; preds = %for.body.preheader, %for.inc49 %indvars.iv104 = phi i64 [ 1, %for.body.preheader ], [ %indvars.iv.next105, %for.inc49 ] %arrayidx = getelementptr inbounds [30005 x i8], ptr @S, i64 0, i64 %indvars.iv104 %20 = load i8, ptr %arrayidx, align 1, !tbaa !9 %21 = and i8 %20, 15 %idxprom1 = zext i8 %21 to i64 %arrayidx2 = getelementptr inbounds [10 x i32], ptr @n, i64 0, i64 %idxprom1 %22 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %tobool.not = icmp eq i32 %22, 0 br i1 %tobool.not, label %if.then, label %if.end if.then: ; preds = %for.body %23 = trunc i64 %indvars.iv104 to i32 store i32 %23, ptr %arrayidx2, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %for.body %24 = zext i8 %21 to i64 %25 = load i32, ptr @n, align 16, !tbaa !5 %cmp11 = icmp sgt i32 %25, 0 %26 = sext i32 %25 to i64 %cmp15 = icmp sgt i64 %indvars.iv104, %26 %or.cond = and i1 %cmp11, %cmp15 br i1 %or.cond, label %land.lhs.true17, label %for.inc land.lhs.true17: ; preds = %if.end %arrayidx19 = getelementptr inbounds [100 x i32], ptr @n10, i64 0, i64 %24 %27 = load i32, ptr %arrayidx19, align 4, !tbaa !5 %tobool20.not = icmp eq i32 %27, 0 br i1 %tobool20.not, label %if.then21, label %for.inc if.then21: ; preds = %land.lhs.true17 %28 = trunc i64 %indvars.iv104 to i32 store i32 %28, ptr %arrayidx19, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %if.end, %land.lhs.true17, %if.then21 %29 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @n, i64 0, i64 1), align 4, !tbaa !5 %cmp11.1 = icmp sgt i32 %29, 0 %30 = sext i32 %29 to i64 %cmp15.1 = icmp sgt i64 %indvars.iv104, %30 %or.cond.1 = and i1 %cmp11.1, %cmp15.1 br i1 %or.cond.1, label %land.lhs.true17.1, label %for.inc.1 land.lhs.true17.1: ; preds = %for.inc %31 = add nuw nsw i64 %24, 10 %arrayidx19.1 = getelementptr inbounds [100 x i32], ptr @n10, i64 0, i64 %31 %32 = load i32, ptr %arrayidx19.1, align 4, !tbaa !5 %tobool20.not.1 = icmp eq i32 %32, 0 br i1 %tobool20.not.1, label %if.then21.1, label %for.inc.1 if.then21.1: ; preds = %land.lhs.true17.1 %33 = trunc i64 %indvars.iv104 to i32 store i32 %33, ptr %arrayidx19.1, align 4, !tbaa !5 br label %for.inc.1 for.inc.1: ; preds = %if.then21.1, %land.lhs.true17.1, %for.inc %34 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @n, i64 0, i64 2), align 8, !tbaa !5 %cmp11.2 = icmp sgt i32 %34, 0 %35 = sext i32 %34 to i64 %cmp15.2 = icmp sgt i64 %indvars.iv104, %35 %or.cond.2 = and i1 %cmp11.2, %cmp15.2 br i1 %or.cond.2, label %land.lhs.true17.2, label %for.inc.2 land.lhs.true17.2: ; preds = %for.inc.1 %36 = add nuw nsw i64 %24, 20 %arrayidx19.2 = getelementptr inbounds [100 x i32], ptr @n10, i64 0, i64 %36 %37 = load i32, ptr %arrayidx19.2, align 4, !tbaa !5 %tobool20.not.2 = icmp eq i32 %37, 0 br i1 %tobool20.not.2, label %if.then21.2, label %for.inc.2 if.then21.2: ; preds = %land.lhs.true17.2 %38 = trunc i64 %indvars.iv104 to i32 store i32 %38, ptr %arrayidx19.2, align 4, !tbaa !5 br label %for.inc.2 for.inc.2: ; preds = %if.then21.2, %land.lhs.true17.2, %for.inc.1 %39 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @n, i64 0, i64 3), align 4, !tbaa !5 %cmp11.3 = icmp sgt i32 %39, 0 %40 = sext i32 %39 to i64 %cmp15.3 = icmp sgt i64 %indvars.iv104, %40 %or.cond.3 = and i1 %cmp11.3, %cmp15.3 br i1 %or.cond.3, label %land.lhs.true17.3, label %for.inc.3 land.lhs.true17.3: ; preds = %for.inc.2 %41 = add nuw nsw i64 %24, 30 %arrayidx19.3 = getelementptr inbounds [100 x i32], ptr @n10, i64 0, i64 %41 %42 = load i32, ptr %arrayidx19.3, align 4, !tbaa !5 %tobool20.not.3 = icmp eq i32 %42, 0 br i1 %tobool20.not.3, label %if.then21.3, label %for.inc.3 if.then21.3: ; preds = %land.lhs.true17.3 %43 = trunc i64 %indvars.iv104 to i32 store i32 %43, ptr %arrayidx19.3, align 4, !tbaa !5 br label %for.inc.3 for.inc.3: ; preds = %if.then21.3, %land.lhs.true17.3, %for.inc.2 %44 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @n, i64 0, i64 4), align 16, !tbaa !5 %cmp11.4 = icmp sgt i32 %44, 0 %45 = sext i32 %44 to i64 %cmp15.4 = icmp sgt i64 %indvars.iv104, %45 %or.cond.4 = and i1 %cmp11.4, %cmp15.4 br i1 %or.cond.4, label %land.lhs.true17.4, label %for.inc.4 land.lhs.true17.4: ; preds = %for.inc.3 %46 = add nuw nsw i64 %24, 40 %arrayidx19.4 = getelementptr inbounds [100 x i32], ptr @n10, i64 0, i64 %46 %47 = load i32, ptr %arrayidx19.4, align 4, !tbaa !5 %tobool20.not.4 = icmp eq i32 %47, 0 br i1 %tobool20.not.4, label %if.then21.4, label %for.inc.4 if.then21.4: ; preds = %land.lhs.true17.4 %48 = trunc i64 %indvars.iv104 to i32 store i32 %48, ptr %arrayidx19.4, align 4, !tbaa !5 br label %for.inc.4 for.inc.4: ; preds = %if.then21.4, %land.lhs.true17.4, %for.inc.3 %49 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @n, i64 0, i64 5), align 4, !tbaa !5 %cmp11.5 = icmp sgt i32 %49, 0 %50 = sext i32 %49 to i64 %cmp15.5 = icmp sgt i64 %indvars.iv104, %50 %or.cond.5 = and i1 %cmp11.5, %cmp15.5 br i1 %or.cond.5, label %land.lhs.true17.5, label %for.inc.5 land.lhs.true17.5: ; preds = %for.inc.4 %51 = add nuw nsw i64 %24, 50 %arrayidx19.5 = getelementptr inbounds [100 x i32], ptr @n10, i64 0, i64 %51 %52 = load i32, ptr %arrayidx19.5, align 4, !tbaa !5 %tobool20.not.5 = icmp eq i32 %52, 0 br i1 %tobool20.not.5, label %if.then21.5, label %for.inc.5 if.then21.5: ; preds = %land.lhs.true17.5 %53 = trunc i64 %indvars.iv104 to i32 store i32 %53, ptr %arrayidx19.5, align 4, !tbaa !5 br label %for.inc.5 for.inc.5: ; preds = %if.then21.5, %land.lhs.true17.5, %for.inc.4 %54 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @n, i64 0, i64 6), align 8, !tbaa !5 %cmp11.6 = icmp sgt i32 %54, 0 %55 = sext i32 %54 to i64 %cmp15.6 = icmp sgt i64 %indvars.iv104, %55 %or.cond.6 = and i1 %cmp11.6, %cmp15.6 br i1 %or.cond.6, label %land.lhs.true17.6, label %for.inc.6 land.lhs.true17.6: ; preds = %for.inc.5 %56 = add nuw nsw i64 %24, 60 %arrayidx19.6 = getelementptr inbounds [100 x i32], ptr @n10, i64 0, i64 %56 %57 = load i32, ptr %arrayidx19.6, align 4, !tbaa !5 %tobool20.not.6 = icmp eq i32 %57, 0 br i1 %tobool20.not.6, label %if.then21.6, label %for.inc.6 if.then21.6: ; preds = %land.lhs.true17.6 %58 = trunc i64 %indvars.iv104 to i32 store i32 %58, ptr %arrayidx19.6, align 4, !tbaa !5 br label %for.inc.6 for.inc.6: ; preds = %if.then21.6, %land.lhs.true17.6, %for.inc.5 %59 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @n, i64 0, i64 7), align 4, !tbaa !5 %cmp11.7 = icmp sgt i32 %59, 0 %60 = sext i32 %59 to i64 %cmp15.7 = icmp sgt i64 %indvars.iv104, %60 %or.cond.7 = and i1 %cmp11.7, %cmp15.7 br i1 %or.cond.7, label %land.lhs.true17.7, label %for.inc.7 land.lhs.true17.7: ; preds = %for.inc.6 %61 = add nuw nsw i64 %24, 70 %arrayidx19.7 = getelementptr inbounds [100 x i32], ptr @n10, i64 0, i64 %61 %62 = load i32, ptr %arrayidx19.7, align 4, !tbaa !5 %tobool20.not.7 = icmp eq i32 %62, 0 br i1 %tobool20.not.7, label %if.then21.7, label %for.inc.7 if.then21.7: ; preds = %land.lhs.true17.7 %63 = trunc i64 %indvars.iv104 to i32 store i32 %63, ptr %arrayidx19.7, align 4, !tbaa !5 br label %for.inc.7 for.inc.7: ; preds = %if.then21.7, %land.lhs.true17.7, %for.inc.6 %64 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @n, i64 0, i64 8), align 16, !tbaa !5 %cmp11.8 = icmp sgt i32 %64, 0 %65 = sext i32 %64 to i64 %cmp15.8 = icmp sgt i64 %indvars.iv104, %65 %or.cond.8 = and i1 %cmp11.8, %cmp15.8 br i1 %or.cond.8, label %land.lhs.true17.8, label %for.inc.8 land.lhs.true17.8: ; preds = %for.inc.7 %66 = or i64 %24, 80 %arrayidx19.8 = getelementptr inbounds [100 x i32], ptr @n10, i64 0, i64 %66 %67 = load i32, ptr %arrayidx19.8, align 4, !tbaa !5 %tobool20.not.8 = icmp eq i32 %67, 0 br i1 %tobool20.not.8, label %if.then21.8, label %for.inc.8 if.then21.8: ; preds = %land.lhs.true17.8 %68 = trunc i64 %indvars.iv104 to i32 store i32 %68, ptr %arrayidx19.8, align 4, !tbaa !5 br label %for.inc.8 for.inc.8: ; preds = %if.then21.8, %land.lhs.true17.8, %for.inc.7 %69 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @n, i64 0, i64 9), align 4, !tbaa !5 %cmp11.9 = icmp sgt i32 %69, 0 %70 = sext i32 %69 to i64 %cmp15.9 = icmp sgt i64 %indvars.iv104, %70 %or.cond.9 = and i1 %cmp11.9, %cmp15.9 br i1 %or.cond.9, label %land.lhs.true17.9, label %for.body30.preheader land.lhs.true17.9: ; preds = %for.inc.8 %71 = add nuw nsw i64 %24, 90 %arrayidx19.9 = getelementptr inbounds [100 x i32], ptr @n10, i64 0, i64 %71 %72 = load i32, ptr %arrayidx19.9, align 4, !tbaa !5 %tobool20.not.9 = icmp eq i32 %72, 0 br i1 %tobool20.not.9, label %if.then21.9, label %for.body30.preheader if.then21.9: ; preds = %land.lhs.true17.9 %73 = trunc i64 %indvars.iv104 to i32 store i32 %73, ptr %arrayidx19.9, align 4, !tbaa !5 br label %for.body30.preheader for.body30.preheader: ; preds = %if.then21.9, %land.lhs.true17.9, %for.inc.8 br label %for.body30 for.body30: ; preds = %for.inc46.1, %for.body30.preheader %indvars.iv = phi i64 [ 0, %for.body30.preheader ], [ %indvars.iv.next.1, %for.inc46.1 ] %arrayidx32 = getelementptr inbounds [100 x i32], ptr @n10, i64 0, i64 %indvars.iv %74 = load i32, ptr %arrayidx32, align 8, !tbaa !5 %cmp33 = icmp sgt i32 %74, 0 %75 = sext i32 %74 to i64 %cmp38 = icmp sgt i64 %indvars.iv104, %75 %or.cond91 = and i1 %cmp33, %cmp38 br i1 %or.cond91, label %if.then40, label %for.inc46 if.then40: ; preds = %for.body30 %76 = mul nuw nsw i64 %indvars.iv, 10 %77 = add nuw nsw i64 %76, %24 %arrayidx44 = getelementptr inbounds [1000 x i8], ptr @a, i64 0, i64 %77 store i8 1, ptr %arrayidx44, align 1, !tbaa !9 br label %for.inc46 for.inc46: ; preds = %for.body30, %if.then40 %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx32.1 = getelementptr inbounds [100 x i32], ptr @n10, i64 0, i64 %indvars.iv.next %78 = load i32, ptr %arrayidx32.1, align 4, !tbaa !5 %cmp33.1 = icmp sgt i32 %78, 0 %79 = sext i32 %78 to i64 %cmp38.1 = icmp sgt i64 %indvars.iv104, %79 %or.cond91.1 = and i1 %cmp33.1, %cmp38.1 br i1 %or.cond91.1, label %if.then40.1, label %for.inc46.1 if.then40.1: ; preds = %for.inc46 %80 = mul nuw nsw i64 %indvars.iv.next, 10 %81 = add nuw nsw i64 %80, %24 %arrayidx44.1 = getelementptr inbounds [1000 x i8], ptr @a, i64 0, i64 %81 store i8 1, ptr %arrayidx44.1, align 1, !tbaa !9 br label %for.inc46.1 for.inc46.1: ; preds = %if.then40.1, %for.inc46 %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, 100 br i1 %exitcond.not.1, label %for.inc49, label %for.body30, !llvm.loop !14 for.inc49: ; preds = %for.inc46.1 %indvars.iv.next105 = add nuw nsw i64 %indvars.iv104, 1 %exitcond107.not = icmp eq i64 %indvars.iv.next105, %wide.trip.count br i1 %exitcond107.not, label %vector.body.preheader, label %for.body, !llvm.loop !15 vector.body.preheader: ; preds = %for.inc49, %entry br label %vector.body } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11, !12, !13} !11 = !{!"llvm.loop.mustprogress"} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !11} !15 = distinct !{!15, !11}
#include <stdio.h> int main(void) { long int inputN, answer = 0; scanf("%ld", &inputN); for (int count = 1; count < inputN; count++) { answer += count; } printf("%ld", answer); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158201/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158201/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [4 x i8] c"%ld\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %inputN = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %inputN) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %inputN) %0 = load i64, ptr %inputN, align 8, !tbaa !5 %cmp7 = icmp sgt i64 %0, 1 br i1 %cmp7, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %entry %1 = shl nuw i64 %0, 1 %2 = add nsw i64 %0, -2 %3 = zext i64 %2 to i65 %4 = add nsw i64 %0, -3 %5 = zext i64 %4 to i65 %6 = mul i65 %3, %5 %7 = lshr i65 %6, 1 %8 = trunc i65 %7 to i64 %9 = add i64 %1, %8 %10 = add i64 %9, -3 br label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body.preheader, %entry %answer.0.lcssa = phi i64 [ 0, %entry ], [ %10, %for.body.preheader ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %answer.0.lcssa) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %inputN) #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 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { long int n; scanf("%ld",&n); printf("%ld",n*(n-1)/2); // your code goes here return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158245/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158245/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [4 x i8] c"%ld\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i64, ptr %n, align 8, !tbaa !5 %sub = add nsw i64 %0, -1 %mul = mul nsw i64 %sub, %0 %div = sdiv i64 %mul, 2 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %div) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ long n; long ans; scanf("%ld",&n); ans=(n*(n-1))/2; printf("%ld",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158289/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158289/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [4 x i8] c"%ld\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i64, ptr %n, align 8, !tbaa !5 %sub = add nsw i64 %0, -1 %mul = mul nsw i64 %sub, %0 %div = sdiv i64 %mul, 2 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %div) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void){ int N; scanf("%d",&N); long long int sum = 0; for(int i=0;i<N;i++){ sum += i; } printf("%lld",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158339/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158339/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %cmp5 = icmp sgt i32 %0, 0 br i1 %cmp5, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %entry %1 = add nsw i32 %0, -1 %2 = zext i32 %1 to i64 %3 = add nsw i32 %0, -2 %4 = zext i32 %3 to i64 %5 = mul nuw nsw i64 %2, %4 %6 = lshr i64 %5, 1 %7 = zext i32 %1 to i64 %8 = add nuw nsw i64 %6, %7 br label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body.preheader, %entry %sum.0.lcssa = phi i64 [ 0, %entry ], [ %8, %for.body.preheader ] %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %sum.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: 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> #include <stdlib.h> #define MAXN 110 int main(){ int n, i, j, k; int a[MAXN]; scanf("%d", &n ); for( i = 1; i <= n; i++ ) scanf("%d", &a[i] ); for( i = 1; i <= n; i++ ){ for( j = 1; j <= n; j++ ){ if( i == j ) continue; for( k = 1; k <= n; k++ ){ if( j == k ) continue; if( a[i] == (a[j]+a[k]) ){ printf("%d %d %d", i, j, k ); return 0; } } } } printf("-1"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15839/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15839/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"-1\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 [110 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 440, 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 %cmp.not58 = icmp slt i32 %0, 1 br i1 %cmp.not58, label %for.end33, label %for.body for.cond2.preheader: ; preds = %for.body %cmp3.not65 = icmp slt i32 %2, 1 br i1 %cmp3.not65, label %for.end33, label %for.cond5.preheader.preheader for.cond5.preheader.preheader: ; preds = %for.cond2.preheader %1 = add nuw i32 %2, 1 %wide.trip.count83 = zext i32 %1 to i64 br label %for.cond5.preheader for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 1, %entry ] %arrayidx = getelementptr inbounds [110 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 %2 = load i32, ptr %n, align 4, !tbaa !5 %3 = sext i32 %2 to i64 %cmp.not.not = icmp slt i64 %indvars.iv, %3 br i1 %cmp.not.not, label %for.body, label %for.cond2.preheader, !llvm.loop !9 for.cond5.preheader: ; preds = %for.cond5.preheader.preheader, %for.cond5.for.inc31_crit_edge.split %indvars.iv80 = phi i64 [ 1, %for.cond5.preheader.preheader ], [ %indvars.iv.next81, %for.cond5.for.inc31_crit_edge.split ] %arrayidx16 = getelementptr inbounds [110 x i32], ptr %a, i64 0, i64 %indvars.iv80 br label %for.body7 for.body7: ; preds = %for.cond5.preheader, %for.inc28 %indvars.iv75 = phi i64 [ 1, %for.cond5.preheader ], [ %indvars.iv.next76, %for.inc28 ] %cmp8 = icmp eq i64 %indvars.iv80, %indvars.iv75 br i1 %cmp8, label %for.inc28, label %for.cond9.preheader for.cond9.preheader: ; preds = %for.body7 %arrayidx18 = getelementptr inbounds [110 x i32], ptr %a, i64 0, i64 %indvars.iv75 br label %for.body11 for.body11: ; preds = %for.cond9.preheader, %for.inc25 %indvars.iv72 = phi i64 [ 1, %for.cond9.preheader ], [ %indvars.iv.next73, %for.inc25 ] %cmp12 = icmp eq i64 %indvars.iv75, %indvars.iv72 br i1 %cmp12, label %for.inc25, label %if.end14 if.end14: ; preds = %for.body11 %4 = load i32, ptr %arrayidx16, align 4, !tbaa !5 %5 = load i32, ptr %arrayidx18, align 4, !tbaa !5 %arrayidx20 = getelementptr inbounds [110 x i32], ptr %a, i64 0, i64 %indvars.iv72 %6 = load i32, ptr %arrayidx20, align 4, !tbaa !5 %add = add nsw i32 %6, %5 %cmp21 = icmp eq i32 %4, %add br i1 %cmp21, label %if.then22, label %for.inc25 if.then22: ; preds = %if.end14 %7 = trunc i64 %indvars.iv80 to i32 %8 = trunc i64 %indvars.iv75 to i32 %9 = trunc i64 %indvars.iv72 to i32 %call23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %7, i32 noundef %8, i32 noundef %9) br label %cleanup for.inc25: ; preds = %if.end14, %for.body11 %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1 %exitcond.not = icmp eq i64 %indvars.iv.next73, %wide.trip.count83 br i1 %exitcond.not, label %for.inc28, label %for.body11, !llvm.loop !11 for.inc28: ; preds = %for.inc25, %for.body7 %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1 %exitcond79.not = icmp eq i64 %indvars.iv.next76, %wide.trip.count83 br i1 %exitcond79.not, label %for.cond5.for.inc31_crit_edge.split, label %for.body7, !llvm.loop !12 for.cond5.for.inc31_crit_edge.split: ; preds = %for.inc28 %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1 %exitcond84.not = icmp eq i64 %indvars.iv.next81, %wide.trip.count83 br i1 %exitcond84.not, label %for.end33, label %for.cond5.preheader, !llvm.loop !13 for.end33: ; preds = %for.cond5.for.inc31_crit_edge.split, %entry, %for.cond2.preheader %call34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2) br label %cleanup cleanup: ; preds = %for.end33, %if.then22 call void @llvm.lifetime.end.p0(i64 440, ptr nonnull %a) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include<stdio.h> int main(){ int t;scanf("%d",&t); while(t--){ int n;scanf("%d",&n); for(int i=4;i-1<=n;i <<= 1){ if(n%(i-1)==0){ printf("%d\n",n/(i-1)); break; } } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15844/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15844/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %dec14 = add nsw i32 %0, -1 store i32 %dec14, ptr %t, align 4, !tbaa !5 %tobool.not15 = icmp eq i32 %0, 0 br i1 %tobool.not15, label %while.end, label %while.body while.body: ; preds = %entry, %cleanup call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not11 = icmp slt i32 %1, 3 br i1 %cmp.not11, label %cleanup, label %for.body for.cond: ; preds = %for.body %shl = shl i32 %i.012, 1 %sub = add nsw i32 %shl, -1 %cmp.not = icmp sgt i32 %sub, %1 br i1 %cmp.not, label %cleanup, label %for.body, !llvm.loop !9 for.body: ; preds = %while.body, %for.cond %sub13 = phi i32 [ %sub, %for.cond ], [ 3, %while.body ] %i.012 = phi i32 [ %shl, %for.cond ], [ 4, %while.body ] %rem = srem i32 %1, %sub13 %div = sdiv i32 %1, %sub13 %cmp3 = icmp eq i32 %rem, 0 br i1 %cmp3, label %if.then, label %for.cond if.then: ; preds = %for.body %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div) br label %cleanup cleanup: ; preds = %for.cond, %while.body, %if.then call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 %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 !11 while.end: ; preds = %cleanup, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> #include <stdlib.h> #define int long long typedef struct { int t; int d; }pair; signed compair(const void *a, const void *b){ pair pa = *(pair *)a, pb = *(pair *)b; int sub = pa.d - pb.d; if(sub < 0){ return 1; } else if(sub == 0){ return 0; } else{ return -1; } } int max(int a, int b){ return a >= b ? a : b; } signed main(){ int N, K, i, j, k; scanf("%lld%lld", &N, &K); pair *ps = (pair *)malloc(sizeof(pair) * 2 * N); for(i = 0; i < N; i++){ ps[i] = (pair){i, 0}; } for(i = N; i < 2 * N; i++){ scanf("%lld%lld", &ps[i].t, &ps[i].d); ps[i].t--; } qsort(ps, 2 * N, sizeof(pair), compair); int *t_num = (int *)malloc(sizeof(int) * N); for(i = 0; i < N; i++){ t_num[i] = 0; } int *A = (int *)malloc(sizeof(int) * 2 * N); int *B = (int *)malloc(sizeof(int) * 2 * N); int sum = 0, t_count = 0; for(i = 0, j = 0, k = 0; i < N; i++){ if(i < K){ sum += ps[i].d; if(t_num[ps[i].t] == 0){ t_count++; } else{ A[j] = ps[i].d; j++; } } else{ if(t_num[ps[i].t] == 0){ B[k] = ps[i].d; k++; } } t_num[ps[i].t]++; } int NA = j, NB = k, ans = sum + t_count * t_count; for(i = 0; i < NA && i < NB; i++){ sum -= A[NA - 1 - i]; sum += B[i]; t_count++; ans = max(ans, sum + t_count * t_count); } printf("%lld\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158483/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158483/source.c" target datalayout = "e-m:e-p270: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.pair = type { i64, i64 } @.str = private unnamed_addr constant [9 x i8] c"%lld%lld\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compair(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #0 { entry: %pa.sroa.3.0..sroa_idx = getelementptr inbounds i8, ptr %a, i64 8 %pa.sroa.3.0.copyload = load i64, ptr %pa.sroa.3.0..sroa_idx, align 8, !tbaa.struct !5 %pb.sroa.3.0..sroa_idx = getelementptr inbounds i8, ptr %b, i64 8 %pb.sroa.3.0.copyload = load i64, ptr %pb.sroa.3.0..sroa_idx, align 8, !tbaa.struct !5 %cmp = icmp slt i64 %pa.sroa.3.0.copyload, %pb.sroa.3.0.copyload %cmp3 = icmp ne i64 %pa.sroa.3.0.copyload, %pb.sroa.3.0.copyload %. = sext i1 %cmp3 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @max(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cond = tail call i64 @llvm.smax.i64(i64 %a, i64 %b) ret i64 %cond } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %N = alloca i64, align 8 %K = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %N) #9 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %K) #9 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %K) %0 = load i64, ptr %N, align 8, !tbaa !6 %mul = shl i64 %0, 5 %call1 = call noalias ptr @malloc(i64 noundef %mul) #10 %cmp140 = icmp sgt i64 %0, 0 br i1 %cmp140, label %for.body.preheader, label %for.cond2.preheader for.body.preheader: ; preds = %entry %xtraiter = and i64 %0, 3 %1 = icmp ult i64 %0, 4 br i1 %1, label %for.cond2.preheader.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %0, -4 br label %for.body for.cond2.preheader.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %i.0141.unr = phi i64 [ 0, %for.body.preheader ], [ %inc.3, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond2.preheader, label %for.body.epil for.body.epil: ; preds = %for.cond2.preheader.loopexit.unr-lcssa, %for.body.epil %i.0141.epil = phi i64 [ %inc.epil, %for.body.epil ], [ %i.0141.unr, %for.cond2.preheader.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.cond2.preheader.loopexit.unr-lcssa ] %arrayidx.epil = getelementptr inbounds %struct.pair, ptr %call1, i64 %i.0141.epil store i64 %i.0141.epil, ptr %arrayidx.epil, align 8, !tbaa.struct !10 %.compoundliteral.sroa.2.0.arrayidx.sroa_idx.epil = getelementptr inbounds i8, ptr %arrayidx.epil, i64 8 store i64 0, ptr %.compoundliteral.sroa.2.0.arrayidx.sroa_idx.epil, align 8, !tbaa.struct !5 %inc.epil = add nuw nsw i64 %i.0141.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.cond2.preheader, label %for.body.epil, !llvm.loop !11 for.cond2.preheader: ; preds = %for.cond2.preheader.loopexit.unr-lcssa, %for.body.epil, %entry %mul3142 = shl nsw i64 %0, 1 %cmp4143 = icmp slt i64 %0, %mul3142 br i1 %cmp4143, label %for.body5, label %for.end15 for.body: ; preds = %for.body, %for.body.preheader.new %i.0141 = phi i64 [ 0, %for.body.preheader.new ], [ %inc.3, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.3, %for.body ] %arrayidx = getelementptr inbounds %struct.pair, ptr %call1, i64 %i.0141 store i64 %i.0141, ptr %arrayidx, align 8, !tbaa.struct !10 %.compoundliteral.sroa.2.0.arrayidx.sroa_idx = getelementptr inbounds i8, ptr %arrayidx, i64 8 store i64 0, ptr %.compoundliteral.sroa.2.0.arrayidx.sroa_idx, align 8, !tbaa.struct !5 %inc = or i64 %i.0141, 1 %arrayidx.1 = getelementptr inbounds %struct.pair, ptr %call1, i64 %inc store i64 %inc, ptr %arrayidx.1, align 8, !tbaa.struct !10 %.compoundliteral.sroa.2.0.arrayidx.sroa_idx.1 = getelementptr inbounds i8, ptr %arrayidx.1, i64 8 store i64 0, ptr %.compoundliteral.sroa.2.0.arrayidx.sroa_idx.1, align 8, !tbaa.struct !5 %inc.1 = or i64 %i.0141, 2 %arrayidx.2 = getelementptr inbounds %struct.pair, ptr %call1, i64 %inc.1 store i64 %inc.1, ptr %arrayidx.2, align 8, !tbaa.struct !10 %.compoundliteral.sroa.2.0.arrayidx.sroa_idx.2 = getelementptr inbounds i8, ptr %arrayidx.2, i64 8 store i64 0, ptr %.compoundliteral.sroa.2.0.arrayidx.sroa_idx.2, align 8, !tbaa.struct !5 %inc.2 = or i64 %i.0141, 3 %arrayidx.3 = getelementptr inbounds %struct.pair, ptr %call1, i64 %inc.2 store i64 %inc.2, ptr %arrayidx.3, align 8, !tbaa.struct !10 %.compoundliteral.sroa.2.0.arrayidx.sroa_idx.3 = getelementptr inbounds i8, ptr %arrayidx.3, i64 8 store i64 0, ptr %.compoundliteral.sroa.2.0.arrayidx.sroa_idx.3, align 8, !tbaa.struct !5 %inc.3 = add nuw nsw i64 %i.0141, 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.cond2.preheader.loopexit.unr-lcssa, label %for.body, !llvm.loop !13 for.body5: ; preds = %for.cond2.preheader, %for.body5 %i.1144 = phi i64 [ %inc14, %for.body5 ], [ %0, %for.cond2.preheader ] %arrayidx6 = getelementptr inbounds %struct.pair, ptr %call1, i64 %i.1144 %d9 = getelementptr inbounds %struct.pair, ptr %call1, i64 %i.1144, i32 1 %call10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef %arrayidx6, ptr noundef nonnull %d9) %2 = load i64, ptr %arrayidx6, align 8, !tbaa !15 %dec = add nsw i64 %2, -1 store i64 %dec, ptr %arrayidx6, align 8, !tbaa !15 %inc14 = add nsw i64 %i.1144, 1 %3 = load i64, ptr %N, align 8, !tbaa !6 %mul3 = shl nsw i64 %3, 1 %cmp4 = icmp slt i64 %inc14, %mul3 br i1 %cmp4, label %for.body5, label %for.end15, !llvm.loop !17 for.end15: ; preds = %for.body5, %for.cond2.preheader %mul3.lcssa = phi i64 [ %mul3142, %for.cond2.preheader ], [ %mul3, %for.body5 ] call void @qsort(ptr noundef %call1, i64 noundef %mul3.lcssa, i64 noundef 16, ptr noundef nonnull @compair) #9 %4 = load i64, ptr %N, align 8, !tbaa !6 %mul17 = shl i64 %4, 3 %call18 = call noalias ptr @malloc(i64 noundef %mul17) #10 %cmp20145 = icmp sgt i64 %4, 0 br i1 %cmp20145, label %for.body21.preheader, label %for.end25 for.body21.preheader: ; preds = %for.end15 call void @llvm.memset.p0.i64(ptr align 8 %call18, i8 0, i64 %mul17, i1 false), !tbaa !6 br label %for.end25 for.end25: ; preds = %for.body21.preheader, %for.end15 %mul26 = shl i64 %4, 4 %call27 = call noalias ptr @malloc(i64 noundef %mul26) #10 %call29 = call noalias ptr @malloc(i64 noundef %mul26) #10 br i1 %cmp20145, label %for.body32.lr.ph, label %for.end64 for.body32.lr.ph: ; preds = %for.end25 %5 = load i64, ptr %K, align 8, !tbaa !6 br label %for.body32 for.body32: ; preds = %for.body32.lr.ph, %if.end57 %i.3152 = phi i64 [ 0, %for.body32.lr.ph ], [ %inc63, %if.end57 ] %j.0151 = phi i64 [ 0, %for.body32.lr.ph ], [ %j.1, %if.end57 ] %t_count.0150 = phi i64 [ 0, %for.body32.lr.ph ], [ %t_count.1, %if.end57 ] %sum.0149 = phi i64 [ 0, %for.body32.lr.ph ], [ %sum.1, %if.end57 ] %k.0148 = phi i64 [ 0, %for.body32.lr.ph ], [ %14, %if.end57 ] %cmp33 = icmp slt i64 %i.3152, %5 %arrayidx34 = getelementptr inbounds %struct.pair, ptr %call1, i64 %i.3152 br i1 %cmp33, label %if.then, label %if.else46 if.then: ; preds = %for.body32 %d35 = getelementptr inbounds %struct.pair, ptr %call1, i64 %i.3152, i32 1 %6 = load i64, ptr %d35, align 8, !tbaa !18 %add = add nsw i64 %6, %sum.0149 %7 = load i64, ptr %arrayidx34, align 8, !tbaa !15 %arrayidx38 = getelementptr inbounds i64, ptr %call18, i64 %7 %8 = load i64, ptr %arrayidx38, align 8, !tbaa !6 %cmp39 = icmp eq i64 %8, 0 br i1 %cmp39, label %if.then40, label %if.else if.then40: ; preds = %if.then %inc41 = add nsw i64 %t_count.0150, 1 br label %if.end57 if.else: ; preds = %if.then %arrayidx44 = getelementptr inbounds i64, ptr %call27, i64 %j.0151 store i64 %6, ptr %arrayidx44, align 8, !tbaa !6 %inc45 = add nsw i64 %j.0151, 1 br label %if.end57 if.else46: ; preds = %for.body32 %9 = load i64, ptr %arrayidx34, align 8, !tbaa !15 %arrayidx49 = getelementptr inbounds i64, ptr %call18, i64 %9 %10 = load i64, ptr %arrayidx49, align 8, !tbaa !6 %cmp50 = icmp eq i64 %10, 0 br i1 %cmp50, label %if.then51, label %if.end57 if.then51: ; preds = %if.else46 %d53 = getelementptr inbounds %struct.pair, ptr %call1, i64 %i.3152, i32 1 %11 = load i64, ptr %d53, align 8, !tbaa !18 %arrayidx54 = getelementptr inbounds i64, ptr %call29, i64 %k.0148 store i64 %11, ptr %arrayidx54, align 8, !tbaa !6 %inc55 = add nsw i64 %k.0148, 1 br label %if.end57 if.end57: ; preds = %if.else46, %if.then51, %if.then40, %if.else %12 = phi i64 [ 0, %if.then40 ], [ %8, %if.else ], [ 0, %if.then51 ], [ %10, %if.else46 ] %13 = phi i64 [ %7, %if.then40 ], [ %7, %if.else ], [ %9, %if.then51 ], [ %9, %if.else46 ] %k.1 = phi i64 [ %k.0148, %if.then40 ], [ %k.0148, %if.else ], [ %inc55, %if.then51 ], [ %k.0148, %if.else46 ] %sum.1 = phi i64 [ %add, %if.then40 ], [ %add, %if.else ], [ %sum.0149, %if.then51 ], [ %sum.0149, %if.else46 ] %t_count.1 = phi i64 [ %inc41, %if.then40 ], [ %t_count.0150, %if.else ], [ %t_count.0150, %if.then51 ], [ %t_count.0150, %if.else46 ] %j.1 = phi i64 [ %j.0151, %if.then40 ], [ %inc45, %if.else ], [ %j.0151, %if.then51 ], [ %j.0151, %if.else46 ] %14 = freeze i64 %k.1 %arrayidx60 = getelementptr inbounds i64, ptr %call18, i64 %13 %inc61 = add nsw i64 %12, 1 store i64 %inc61, ptr %arrayidx60, align 8, !tbaa !6 %inc63 = add nuw nsw i64 %i.3152, 1 %exitcond163.not = icmp eq i64 %inc63, %4 br i1 %exitcond163.not, label %for.end64, label %for.body32, !llvm.loop !19 for.end64: ; preds = %if.end57, %for.end25 %k.0.lcssa = phi i64 [ 0, %for.end25 ], [ %14, %if.end57 ] %sum.0.lcssa = phi i64 [ 0, %for.end25 ], [ %sum.1, %if.end57 ] %t_count.0.lcssa = phi i64 [ 0, %for.end25 ], [ %t_count.1, %if.end57 ] %j.0.lcssa = phi i64 [ 0, %for.end25 ], [ %j.1, %if.end57 ] %mul65 = mul nsw i64 %t_count.0.lcssa, %t_count.0.lcssa %add66 = add nsw i64 %mul65, %sum.0.lcssa %invariant.smin = call i64 @llvm.smin.i64(i64 %j.0.lcssa, i64 %k.0.lcssa) %15 = icmp sgt i64 %invariant.smin, 0 br i1 %15, label %for.body70.lr.ph, label %for.end82 for.body70.lr.ph: ; preds = %for.end64 %16 = getelementptr i64, ptr %call27, i64 %j.0.lcssa %xtraiter168 = and i64 %invariant.smin, 1 %17 = icmp eq i64 %invariant.smin, 1 br i1 %17, label %for.end82.loopexit.unr-lcssa, label %for.body70.lr.ph.new for.body70.lr.ph.new: ; preds = %for.body70.lr.ph %unroll_iter172 = and i64 %invariant.smin, -2 br label %for.body70 for.body70: ; preds = %for.body70, %for.body70.lr.ph.new %ans.0160 = phi i64 [ %add66, %for.body70.lr.ph.new ], [ %cond.i.1, %for.body70 ] %i.4159 = phi i64 [ 0, %for.body70.lr.ph.new ], [ %inc81.1, %for.body70 ] %t_count.2158 = phi i64 [ %t_count.0.lcssa, %for.body70.lr.ph.new ], [ %inc76.1, %for.body70 ] %sum.2157 = phi i64 [ %sum.0.lcssa, %for.body70.lr.ph.new ], [ %add75.1, %for.body70 ] %niter173 = phi i64 [ 0, %for.body70.lr.ph.new ], [ %niter173.next.1, %for.body70 ] %18 = xor i64 %i.4159, -1 %arrayidx72 = getelementptr i64, ptr %16, i64 %18 %19 = load i64, ptr %arrayidx72, align 8, !tbaa !6 %sub73 = sub nsw i64 %sum.2157, %19 %arrayidx74 = getelementptr inbounds i64, ptr %call29, i64 %i.4159 %20 = load i64, ptr %arrayidx74, align 8, !tbaa !6 %add75 = add nsw i64 %sub73, %20 %inc76 = add nsw i64 %t_count.2158, 1 %mul77 = mul nsw i64 %inc76, %inc76 %add78 = add nsw i64 %add75, %mul77 %cond.i = call i64 @llvm.smax.i64(i64 %ans.0160, i64 %add78) %inc81 = or i64 %i.4159, 1 %21 = xor i64 %i.4159, -2 %arrayidx72.1 = getelementptr i64, ptr %16, i64 %21 %22 = load i64, ptr %arrayidx72.1, align 8, !tbaa !6 %sub73.1 = sub nsw i64 %add75, %22 %arrayidx74.1 = getelementptr inbounds i64, ptr %call29, i64 %inc81 %23 = load i64, ptr %arrayidx74.1, align 8, !tbaa !6 %add75.1 = add nsw i64 %sub73.1, %23 %inc76.1 = add nsw i64 %t_count.2158, 2 %mul77.1 = mul nsw i64 %inc76.1, %inc76.1 %add78.1 = add nsw i64 %add75.1, %mul77.1 %cond.i.1 = call i64 @llvm.smax.i64(i64 %cond.i, i64 %add78.1) %inc81.1 = add nuw nsw i64 %i.4159, 2 %niter173.next.1 = add i64 %niter173, 2 %niter173.ncmp.1 = icmp eq i64 %niter173.next.1, %unroll_iter172 br i1 %niter173.ncmp.1, label %for.end82.loopexit.unr-lcssa, label %for.body70, !llvm.loop !20 for.end82.loopexit.unr-lcssa: ; preds = %for.body70, %for.body70.lr.ph %cond.i.lcssa.ph = phi i64 [ undef, %for.body70.lr.ph ], [ %cond.i.1, %for.body70 ] %ans.0160.unr = phi i64 [ %add66, %for.body70.lr.ph ], [ %cond.i.1, %for.body70 ] %i.4159.unr = phi i64 [ 0, %for.body70.lr.ph ], [ %inc81.1, %for.body70 ] %t_count.2158.unr = phi i64 [ %t_count.0.lcssa, %for.body70.lr.ph ], [ %inc76.1, %for.body70 ] %sum.2157.unr = phi i64 [ %sum.0.lcssa, %for.body70.lr.ph ], [ %add75.1, %for.body70 ] %lcmp.mod170.not = icmp eq i64 %xtraiter168, 0 br i1 %lcmp.mod170.not, label %for.end82, label %for.body70.epil for.body70.epil: ; preds = %for.end82.loopexit.unr-lcssa %24 = xor i64 %i.4159.unr, -1 %arrayidx72.epil = getelementptr i64, ptr %16, i64 %24 %25 = load i64, ptr %arrayidx72.epil, align 8, !tbaa !6 %sub73.epil = sub nsw i64 %sum.2157.unr, %25 %arrayidx74.epil = getelementptr inbounds i64, ptr %call29, i64 %i.4159.unr %26 = load i64, ptr %arrayidx74.epil, align 8, !tbaa !6 %add75.epil = add nsw i64 %sub73.epil, %26 %inc76.epil = add nsw i64 %t_count.2158.unr, 1 %mul77.epil = mul nsw i64 %inc76.epil, %inc76.epil %add78.epil = add nsw i64 %add75.epil, %mul77.epil %cond.i.epil = call i64 @llvm.smax.i64(i64 %ans.0160.unr, i64 %add78.epil) br label %for.end82 for.end82: ; preds = %for.body70.epil, %for.end82.loopexit.unr-lcssa, %for.end64 %ans.0.lcssa = phi i64 [ %add66, %for.end64 ], [ %cond.i.lcssa.ph, %for.end82.loopexit.unr-lcssa ], [ %cond.i.epil, %for.body70.epil ] %call83 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %ans.0.lcssa) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %K) #9 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %N) #9 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #5 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #6 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #7 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #7 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #8 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress 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 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #8 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #9 = { nounwind } attributes #10 = { nounwind allocsize(0) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{i64 0, i64 8, !6} !6 = !{!7, !7, i64 0} !7 = !{!"long long", !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{i64 0, i64 8, !6, i64 8, i64 8, !6} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.unroll.disable"} !13 = distinct !{!13, !14} !14 = !{!"llvm.loop.mustprogress"} !15 = !{!16, !7, i64 0} !16 = !{!"", !7, i64 0, !7, i64 8} !17 = distinct !{!17, !14} !18 = !{!16, !7, i64 8} !19 = distinct !{!19, !14} !20 = distinct !{!20, !14}
#include<stdio.h> int main(void){ long long a, b, c; scanf("%lld %lld %lld", &a, &b, &c); if(c-a-b>=0 && 4*a*b<(c-a-b)*(c-a-b)) puts("Yes"); else puts("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158533/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158533/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [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 i64, align 8 %b = alloca i64, align 8 %c = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %c) #3 %call = 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 %c, align 8, !tbaa !5 %1 = load i64, ptr %a, align 8, !tbaa !5 %2 = load i64, ptr %b, align 8, !tbaa !5 %3 = add i64 %1, %2 %sub1 = sub i64 %0, %3 %cmp = icmp sgt i64 %sub1, -1 br i1 %cmp, label %land.lhs.true, label %if.else land.lhs.true: ; preds = %entry %mul = shl nsw i64 %1, 2 %mul2 = mul nsw i64 %mul, %2 %mul7 = mul nsw i64 %sub1, %sub1 %cmp8 = icmp slt i64 %mul2, %mul7 br i1 %cmp8, label %if.end, label %if.else if.else: ; preds = %land.lhs.true, %entry br label %if.end if.end: ; preds = %land.lhs.true, %if.else %.str.2.sink = phi ptr [ @.str.2, %if.else ], [ @.str.1, %land.lhs.true ] %call10 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @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 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> int main(){ long int a,b,c,tmp1,tmp2; scanf("%ld %ld %ld",&a,&b,&c); tmp1 = 4*a*b; c -= a+b; if(c < 0) c = 0; tmp2 = c*c; if(tmp1 < tmp2) printf("Yes\n"); else printf("No\n"); // printf("%Lf %Lf %Lf %Lf\n",ans_a,ans_b,ans_ab,ans_c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158577/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158577/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [12 x i8] c"%ld %ld %ld\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 i64, align 8 %b = alloca i64, align 8 %c = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #5 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #5 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %c) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i64, ptr %a, align 8, !tbaa !5 %mul = shl nsw i64 %0, 2 %1 = load i64, ptr %b, align 8, !tbaa !5 %mul1 = mul nsw i64 %mul, %1 %2 = load i64, ptr %c, align 8, !tbaa !5 %3 = add i64 %1, %0 %sub = sub i64 %2, %3 %spec.store.select = call i64 @llvm.smax.i64(i64 %sub, i64 0) store i64 %spec.store.select, ptr %c, align 8 %mul2 = mul nsw i64 %spec.store.select, %spec.store.select %cmp3 = icmp slt i64 %mul1, %mul2 %str.3.str = select i1 %cmp3, ptr @str.3, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %c) #5 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #5 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #3 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } 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 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ int q; scanf("%d", &q); while(q--){ int n, m = 4, i = 2; scanf("%d", &n); while(n % (m - 1) != 0){ m *= 2; i++; } printf("%d\n", n / (m - 1)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15862/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15862/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %q = alloca i32, align 4 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %q) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %q) %0 = load i32, ptr %q, align 4, !tbaa !5 %dec9 = add nsw i32 %0, -1 store i32 %dec9, ptr %q, align 4, !tbaa !5 %tobool.not10 = icmp eq i32 %0, 0 br i1 %tobool.not10, label %while.end6, label %while.body while.body: ; preds = %entry, %while.end call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 br label %while.cond2 while.cond2: ; preds = %while.cond2, %while.body %m.0 = phi i32 [ 4, %while.body ], [ %mul, %while.cond2 ] %sub = add nsw i32 %m.0, -1 %rem = srem i32 %1, %sub %div = sdiv i32 %1, %sub %cmp.not = icmp eq i32 %rem, 0 %mul = shl nsw i32 %m.0, 1 br i1 %cmp.not, label %while.end, label %while.cond2, !llvm.loop !9 while.end: ; preds = %while.cond2 %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 %2 = load i32, ptr %q, align 4, !tbaa !5 %dec = add nsw i32 %2, -1 store i32 %dec, ptr %q, align 4, !tbaa !5 %tobool.not = icmp eq i32 %2, 0 br i1 %tobool.not, label %while.end6, label %while.body, !llvm.loop !11 while.end6: ; preds = %while.end, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %q) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
//set many funcs template //Ver.20190820 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #include<assert.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){if(a<b){return a;}return b;} int zt(int a,int b){return max(a,b)-min(a,b);} int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} int ceil(int a,int b){if(a%b==0){return a/b;}return (a/b)+1;} int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;} int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} int nHr(int a,int b){return nCr(a+b-1,b);} int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;} int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;} int sankaku(int x){return ((1+x)*x)/2;} void swap(int *a,int *b){int c;c=(*a);(*a)=(*b);(*b)=c;} long long llmax(long long a,long long b){if(a>b){return a;}return b;} long long llmin(long long a,long long b){if(a<b){return a;}return b;} long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);} long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;} long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;} long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;} long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} long long llnHr(long long a,long long b){return llnCr(a+b-1,b);} long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;} long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;} long long llsankaku(long long x){return ((1+x)*x)/2;} void llswap(long long *a,long long *b){long long c;c=(*a);(*a)=(*b);(*b)=c;} double dbmax(double a,double b){if(a>b){return a;}return b;} double dbmin(double a,double b){if(a<b){return a;}return b;} double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);} void dbswap(double *a,double *b){double c;c=(*a);(*a)=(*b);(*b)=c;} void chswap(char *a,char *b){char c;c=(*a);(*a)=(*b);(*b)=c;} int sortfncsj(const void *a,const void *b){if(*(int *)a>*(int *)b){return 1;}if(*(int *)a==*(int *)b){return 0;}return -1;} int sortfnckj(const void *a,const void *b){if(*(int *)a<*(int *)b){return 1;}if(*(int *)a==*(int *)b){return 0;}return -1;} int llsortfncsj(const void *a,const void *b){if(*(long long *)a>*(long long *)b){return 1;}if(*(long long *)a==*(long long *)b){return 0;}return -1;} int llsortfnckj(const void *a,const void *b){if(*(long long *)a<*(long long *)b){return 1;}if(*(long long *)a==*(long long *)b){return 0;}return -1;} int dbsortfncsj(const void *a,const void *b){if(*(double *)a>*(double *)b){return 1;}if(*(double *)a==*(double *)b){return 0;}return -1;} int dbsortfnckj(const void *a,const void *b){if(*(double *)a<*(double *)b){return 1;}if(*(double *)a==*(double *)b){return 0;}return -1;} int strsortfncsj(const void *a,const void *b){return strcmp((char *)a,(char *)b);} int strsortfnckj(const void *a,const void *b){return strcmp((char *)b,(char *)a);} int chsortfncsj(const void *a,const void *b){if(*(char *)a>*(char *)b){return 1;}if(*(char *)a==*(char *)b){return 0;}return -1;} int chsortfnckj(const void *a,const void *b){if(*(char *)a<*(char *)b){return 1;}if(*(char *)a==*(char *)b){return 0;}return -1;} void shuffledget(int x[],int n){ int i,b[524288],p,c; for(i=0;i<n;i++){ b[i]=i; } for(i=n;i>=1;i--){ p=rand()%i; c=b[i-1];b[i-1]=b[p];b[p]=c; } for(i=0;i<n;i++){ scanf("%d",&x[b[i]]); } } int dx4[4]={1,-1,0,0}; int dy4[4]={0,0,1,-1}; int dx8[8]={-1,-1,-1,0,0,1,1,1}; int dy8[8]={-1,0,1,-1,1,-1,0,1}; int search(int x,int a[],int n){ int st=0,fi=n-1,te; while(st<=fi){ te=(st+fi)/2; if(a[te]<x){st=te+1;}else{fi=te-1;} } return st; } void prarr(int arr[],int n){ int i; for(i=0;i<n;i++){ if(i){printf(" ");} printf("%d",arr[i]); } printf("\n"); return; } void getperm(int a[],int n){ int i,p; for(i=0;i<n;i++){ a[i]=i; } for(i=n-1;i>=1;i--){ p=rand()%(i+1); swap(&a[p],&a[i]); } } typedef struct{ int val; int node; }sd; int sdsortfnc(const void *a,const void *b){ if(((sd*)a)->val < ((sd*)b)->val){return -1;} if(((sd*)a)->val > ((sd*)b)->val){return 1;} return 0; } void coordinate_comp(int a[],int n){ int i,c=0; sd dat[524288]; for(i=0;i<n;i++){ dat[i].val=a[i]; dat[i].node=i; } qsort(dat,n,sizeof(dat[0]),sdsortfnc); a[dat[0].node]=c; for(i=1;i<n;i++){ if(dat[i-1].val!=dat[i].val){c++;} a[dat[i].node]=c; } } //2D-Ruisekiwa Simple int bsum[16][1024]={0}; int cbz(int fx,int fy,int tx,int ty){ if(fx>tx || fy>ty){return 0;} if(fx==0 && fy == 0){return bsum[tx][ty];} else if(fx==0){ return bsum[tx][ty]-bsum[tx][fy-1]; } else if(fy==0){ return bsum[tx][ty]-bsum[fx-1][ty]; } else{ return bsum[tx][ty]-bsum[tx][fy-1]-bsum[fx-1][ty]+bsum[fx-1][fy-1]; } } int main(void){ int i,j,n,m,k,a[16],b[16],c,h,w,r=inf,l,t,kk; int st; char s[16][1024]; int bf[16][1024]; scanf("%d%d%d",&h,&w,&kk); for(i=0;i<h;i++){ scanf("%s",s[i]); for(j=0;j<w;j++){ bf[i][j]=(s[i][j]-'0'); } } for(i=0;i<h;i++){ for(j=0;j<w;j++){ if(j==0){ bsum[i][j]=bf[i][j]; } else{ bsum[i][j]=bsum[i][j-1]+bf[i][j]; } } } for(i=0;i<h;i++){ for(j=0;j<w;j++){ if(i!=0){ bsum[i][j]=bsum[i-1][j]+bsum[i][j]; } } } for(i=0;i<(1<<(h-1));i++){ c=dsumb(i,2); a[0]=0;t=0; for(j=0;j<h-1;j++){ if((i&(1<<j))!=0){ b[t]=j; t++; a[t]=j+1; } } b[t]=h-1;t++; st=0; for(j=0;j<w;j++){ for(k=0;k<t;k++){ if(cbz(a[k],st,b[k],j)>kk){ c++; st=j; } if(cbz(a[k],st,b[k],j)>kk){c=inf;} } } //printf("%d:%d\n",i,c); r=min(c,r); } printf("%d\n",r); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158663/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158663/source.c" target datalayout = "e-m:e-p270: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.sd = type { i32, i32 } @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @dx4 = dso_local local_unnamed_addr global [4 x i32] [i32 1, i32 -1, i32 0, i32 0], align 16 @dy4 = dso_local local_unnamed_addr global [4 x i32] [i32 0, i32 0, i32 1, i32 -1], align 16 @dx8 = dso_local local_unnamed_addr global [8 x i32] [i32 -1, i32 -1, i32 -1, i32 0, i32 0, i32 1, i32 1, i32 1], align 16 @dy8 = dso_local local_unnamed_addr global [8 x i32] [i32 -1, i32 0, i32 1, i32 -1, i32 1, i32 -1, i32 0, i32 1], align 16 @bsum = dso_local local_unnamed_addr global [16 x [1024 x i32]] zeroinitializer, align 16 @.str.3 = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.4 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.5 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @max(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i32 @llvm.smax.i32(i32 %a, i32 %b) ret i32 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @min(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i32 @llvm.smin.i32(i32 %a, i32 %b) ret i32 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @zt(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %sub5 = sub nsw i32 %a, %b %sub = tail call i32 @llvm.abs.i32(i32 %sub5, i1 true) ret i32 %sub } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @round(i32 noundef %a, i32 noundef %b) local_unnamed_addr #1 { entry: %rem = srem i32 %a, %b %mul = shl nsw i32 %rem, 1 %cmp.not = icmp sge i32 %mul, %b %div1 = sdiv i32 %a, %b %add = zext i1 %cmp.not to i32 %retval.0 = add nsw i32 %div1, %add ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @ceil(i32 noundef %a, i32 noundef %b) local_unnamed_addr #1 { entry: %rem = srem i32 %a, %b %cmp = icmp ne i32 %rem, 0 %div = sdiv i32 %a, %b %add = zext i1 %cmp to i32 %retval.0 = add nsw i32 %div, %add ret i32 %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %cmp.not4 = icmp eq i32 %b, 0 br i1 %cmp.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %a.addr.06 = phi i32 [ %b.addr.05, %while.body ], [ %a, %entry ] %b.addr.05 = phi i32 [ %rem, %while.body ], [ %b, %entry ] %rem = srem i32 %a.addr.06, %b.addr.05 %cmp.not = icmp eq i32 %rem, 0 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !5 while.end: ; preds = %while.body, %entry %a.addr.0.lcssa = phi i32 [ %a, %entry ], [ %b.addr.05, %while.body ] ret i32 %a.addr.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @lcm(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %cmp.not4.i = icmp eq i32 %b, 0 br i1 %cmp.not4.i, label %gcd.exit, label %while.body.i while.body.i: ; preds = %entry, %while.body.i %a.addr.06.i = phi i32 [ %b.addr.05.i, %while.body.i ], [ %a, %entry ] %b.addr.05.i = phi i32 [ %rem.i, %while.body.i ], [ %b, %entry ] %rem.i = srem i32 %a.addr.06.i, %b.addr.05.i %cmp.not.i = icmp eq i32 %rem.i, 0 br i1 %cmp.not.i, label %gcd.exit, label %while.body.i, !llvm.loop !5 gcd.exit: ; preds = %while.body.i, %entry %a.addr.0.lcssa.i = phi i32 [ %a, %entry ], [ %b.addr.05.i, %while.body.i ] %div = sdiv i32 %a, %a.addr.0.lcssa.i %mul = mul nsw i32 %div, %b ret i32 %mul } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @nCr(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %cmp.not6 = icmp slt i32 %b, 1 br i1 %cmp.not6, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %add = add nsw i32 %a, 1 %xtraiter = and i32 %b, 1 %0 = icmp eq i32 %b, 1 br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.lr.ph.new for.body.lr.ph.new: ; preds = %for.body.lr.ph %unroll_iter = and i32 %b, -2 br label %for.body for.body: ; preds = %for.body, %for.body.lr.ph.new %r.08 = phi i32 [ 1, %for.body.lr.ph.new ], [ %div.1, %for.body ] %i.07 = phi i32 [ 1, %for.body.lr.ph.new ], [ %inc.1, %for.body ] %niter = phi i32 [ 0, %for.body.lr.ph.new ], [ %niter.next.1, %for.body ] %sub = sub i32 %add, %i.07 %mul = mul nsw i32 %r.08, %sub %div = sdiv i32 %mul, %i.07 %inc = add nuw i32 %i.07, 1 %sub.1 = sub i32 %add, %inc %mul.1 = mul nsw i32 %div, %sub.1 %div.1 = sdiv i32 %mul.1, %inc %inc.1 = add nuw i32 %i.07, 2 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !7 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph %div.lcssa.ph = phi i32 [ undef, %for.body.lr.ph ], [ %div.1, %for.body ] %r.08.unr = phi i32 [ 1, %for.body.lr.ph ], [ %div.1, %for.body ] %i.07.unr = phi i32 [ 1, %for.body.lr.ph ], [ %inc.1, %for.body ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %sub.epil = sub i32 %add, %i.07.unr %mul.epil = mul nsw i32 %r.08.unr, %sub.epil %div.epil = sdiv i32 %mul.epil, %i.07.unr br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %r.0.lcssa = phi i32 [ 1, %entry ], [ %div.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %div.epil, %for.body.epil ] ret i32 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @nHr(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %add = add nsw i32 %b, %a %cmp.not6.i = icmp slt i32 %b, 1 br i1 %cmp.not6.i, label %nCr.exit, label %for.body.i.preheader for.body.i.preheader: ; preds = %entry %xtraiter = and i32 %b, 1 %0 = icmp eq i32 %b, 1 br i1 %0, label %nCr.exit.loopexit.unr-lcssa, label %for.body.i.preheader.new for.body.i.preheader.new: ; preds = %for.body.i.preheader %unroll_iter = and i32 %b, -2 br label %for.body.i for.body.i: ; preds = %for.body.i, %for.body.i.preheader.new %r.08.i = phi i32 [ 1, %for.body.i.preheader.new ], [ %div.i.1, %for.body.i ] %i.07.i = phi i32 [ 1, %for.body.i.preheader.new ], [ %inc.i.1, %for.body.i ] %niter = phi i32 [ 0, %for.body.i.preheader.new ], [ %niter.next.1, %for.body.i ] %sub.i = sub i32 %add, %i.07.i %mul.i = mul nsw i32 %sub.i, %r.08.i %div.i = sdiv i32 %mul.i, %i.07.i %inc.i = add nuw i32 %i.07.i, 1 %sub.i.1 = sub i32 %add, %inc.i %mul.i.1 = mul nsw i32 %sub.i.1, %div.i %div.i.1 = sdiv i32 %mul.i.1, %inc.i %inc.i.1 = add nuw i32 %i.07.i, 2 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %nCr.exit.loopexit.unr-lcssa, label %for.body.i, !llvm.loop !7 nCr.exit.loopexit.unr-lcssa: ; preds = %for.body.i, %for.body.i.preheader %div.i.lcssa.ph = phi i32 [ undef, %for.body.i.preheader ], [ %div.i.1, %for.body.i ] %r.08.i.unr = phi i32 [ 1, %for.body.i.preheader ], [ %div.i.1, %for.body.i ] %i.07.i.unr = phi i32 [ 1, %for.body.i.preheader ], [ %inc.i.1, %for.body.i ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %nCr.exit, label %for.body.i.epil for.body.i.epil: ; preds = %nCr.exit.loopexit.unr-lcssa %sub.i.epil = sub i32 %add, %i.07.i.unr %mul.i.epil = mul nsw i32 %sub.i.epil, %r.08.i.unr %div.i.epil = sdiv i32 %mul.i.epil, %i.07.i.unr br label %nCr.exit nCr.exit: ; preds = %for.body.i.epil, %nCr.exit.loopexit.unr-lcssa, %entry %r.0.lcssa.i = phi i32 [ 1, %entry ], [ %div.i.lcssa.ph, %nCr.exit.loopexit.unr-lcssa ], [ %div.i.epil, %for.body.i.epil ] ret i32 %r.0.lcssa.i } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @fact(i32 noundef %a) local_unnamed_addr #2 { entry: %cmp.not4 = icmp slt i32 %a, 1 br i1 %cmp.not4, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %min.iters.check = icmp ult i32 %a, 8 br i1 %min.iters.check, label %for.body.preheader9, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i32 %a, -8 %ind.end = or i32 %n.vec, 1 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %0, %vector.body ] %vec.phi7 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %1, %vector.body ] %vec.ind = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph ], [ %vec.ind.next, %vector.body ] %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4> %0 = mul <4 x i32> %vec.phi, %vec.ind %1 = mul <4 x i32> %vec.phi7, %step.add %index.next = add nuw i32 %index, 8 %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8> %2 = icmp eq i32 %index.next, %n.vec br i1 %2, label %middle.block, label %vector.body, !llvm.loop !8 middle.block: ; preds = %vector.body %bin.rdx = mul <4 x i32> %1, %0 %3 = tail call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %n.vec, %a br i1 %cmp.n, label %for.end, label %for.body.preheader9 for.body.preheader9: ; preds = %for.body.preheader, %middle.block %r.06.ph = phi i32 [ 1, %for.body.preheader ], [ %3, %middle.block ] %i.05.ph = phi i32 [ 1, %for.body.preheader ], [ %ind.end, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader9, %for.body %r.06 = phi i32 [ %mul, %for.body ], [ %r.06.ph, %for.body.preheader9 ] %i.05 = phi i32 [ %inc, %for.body ], [ %i.05.ph, %for.body.preheader9 ] %mul = mul nsw i32 %r.06, %i.05 %inc = add nuw i32 %i.05, 1 %exitcond.not = icmp eq i32 %i.05, %a br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !11 for.end: ; preds = %for.body, %middle.block, %entry %r.0.lcssa = phi i32 [ 1, %entry ], [ %3, %middle.block ], [ %mul, %for.body ] ret i32 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @pow(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %cmp.not3 = icmp slt i32 %b, 1 br i1 %cmp.not3, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %min.iters.check = icmp ult i32 %b, 8 br i1 %min.iters.check, label %for.body.preheader7, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i32 %b, -8 %ind.end = or i32 %n.vec, 1 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %a, 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> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %0, %vector.body ] %vec.phi6 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %1, %vector.body ] %0 = mul <4 x i32> %vec.phi, %broadcast.splat %1 = mul <4 x i32> %vec.phi6, %broadcast.splat %index.next = add nuw i32 %index, 8 %2 = icmp eq i32 %index.next, %n.vec br i1 %2, label %middle.block, label %vector.body, !llvm.loop !12 middle.block: ; preds = %vector.body %bin.rdx = mul <4 x i32> %1, %0 %3 = tail call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %n.vec, %b br i1 %cmp.n, label %for.end, label %for.body.preheader7 for.body.preheader7: ; preds = %for.body.preheader, %middle.block %r.05.ph = phi i32 [ 1, %for.body.preheader ], [ %3, %middle.block ] %i.04.ph = phi i32 [ 1, %for.body.preheader ], [ %ind.end, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader7, %for.body %r.05 = phi i32 [ %mul, %for.body ], [ %r.05.ph, %for.body.preheader7 ] %i.04 = phi i32 [ %inc, %for.body ], [ %i.04.ph, %for.body.preheader7 ] %mul = mul nsw i32 %r.05, %a %inc = add nuw i32 %i.04, 1 %exitcond.not = icmp eq i32 %i.04, %b br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !13 for.end: ; preds = %for.body, %middle.block, %entry %r.0.lcssa = phi i32 [ 1, %entry ], [ %3, %middle.block ], [ %mul, %for.body ] ret i32 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @dsum(i32 noundef %x) local_unnamed_addr #2 { entry: %tobool.not4 = icmp eq i32 %x, 0 br i1 %tobool.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %r.06 = phi i32 [ %add, %while.body ], [ 0, %entry ] %x.addr.05 = phi i32 [ %div, %while.body ], [ %x, %entry ] %rem = srem i32 %x.addr.05, 10 %add = add nsw i32 %r.06, %rem %div = sdiv i32 %x.addr.05, 10 %x.addr.05.off = add i32 %x.addr.05, 9 %tobool.not = icmp ult i32 %x.addr.05.off, 19 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !14 while.end: ; preds = %while.body, %entry %r.0.lcssa = phi i32 [ 0, %entry ], [ %add, %while.body ] ret i32 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @dsumb(i32 noundef %x, i32 noundef %b) local_unnamed_addr #2 { entry: %tobool.not5 = icmp eq i32 %x, 0 br i1 %tobool.not5, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %r.07 = phi i32 [ %add, %while.body ], [ 0, %entry ] %x.addr.06 = phi i32 [ %div, %while.body ], [ %x, %entry ] %rem = srem i32 %x.addr.06, %b %add = add nsw i32 %rem, %r.07 %div = sdiv i32 %x.addr.06, %b %tobool.not = icmp eq i32 %div, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !15 while.end: ; preds = %while.body, %entry %r.0.lcssa = phi i32 [ 0, %entry ], [ %add, %while.body ] ret i32 %r.0.lcssa } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @sankaku(i32 noundef %x) local_unnamed_addr #1 { entry: %add = add nsw i32 %x, 1 %mul = mul nsw i32 %add, %x %div = sdiv i32 %mul, 2 ret i32 %div } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @swap(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #4 { entry: %0 = load i32, ptr %a, align 4, !tbaa !16 %1 = load i32, ptr %b, align 4, !tbaa !16 store i32 %1, ptr %a, align 4, !tbaa !16 store i32 %0, ptr %b, align 4, !tbaa !16 ret void } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llmax(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i64 @llvm.smax.i64(i64 %a, i64 %b) ret i64 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llmin(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i64 @llvm.smin.i64(i64 %a, i64 %b) ret i64 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llzt(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %sub5 = sub nsw i64 %a, %b %sub = tail call i64 @llvm.abs.i64(i64 %sub5, i1 true) ret i64 %sub } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llround(i64 noundef %a, i64 noundef %b) local_unnamed_addr #1 { entry: %rem = srem i64 %a, %b %mul = shl nsw i64 %rem, 1 %cmp.not = icmp sge i64 %mul, %b %div1 = sdiv i64 %a, %b %add = zext i1 %cmp.not to i64 %retval.0 = add nsw i64 %div1, %add ret i64 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llceil(i64 noundef %a, i64 noundef %b) local_unnamed_addr #1 { entry: %rem = srem i64 %a, %b %cmp = icmp ne i64 %rem, 0 %div = sdiv i64 %a, %b %add = zext i1 %cmp to i64 %retval.0 = add nsw i64 %div, %add ret i64 %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llgcd(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cmp.not4 = icmp eq i64 %b, 0 br i1 %cmp.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %a.addr.06 = phi i64 [ %b.addr.05, %while.body ], [ %a, %entry ] %b.addr.05 = phi i64 [ %rem, %while.body ], [ %b, %entry ] %rem = srem i64 %a.addr.06, %b.addr.05 %cmp.not = icmp eq i64 %rem, 0 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !20 while.end: ; preds = %while.body, %entry %a.addr.0.lcssa = phi i64 [ %a, %entry ], [ %b.addr.05, %while.body ] ret i64 %a.addr.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @lllcm(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cmp.not4.i = icmp eq i64 %b, 0 br i1 %cmp.not4.i, label %llgcd.exit, label %while.body.i while.body.i: ; preds = %entry, %while.body.i %a.addr.06.i = phi i64 [ %b.addr.05.i, %while.body.i ], [ %a, %entry ] %b.addr.05.i = phi i64 [ %rem.i, %while.body.i ], [ %b, %entry ] %rem.i = srem i64 %a.addr.06.i, %b.addr.05.i %cmp.not.i = icmp eq i64 %rem.i, 0 br i1 %cmp.not.i, label %llgcd.exit, label %while.body.i, !llvm.loop !20 llgcd.exit: ; preds = %while.body.i, %entry %a.addr.0.lcssa.i = phi i64 [ %a, %entry ], [ %b.addr.05.i, %while.body.i ] %div = sdiv i64 %a, %a.addr.0.lcssa.i %mul = mul nsw i64 %div, %b ret i64 %mul } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llnCr(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cmp.not6 = icmp slt i64 %b, 1 br i1 %cmp.not6, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %add = add nsw i64 %a, 1 %xtraiter = and i64 %b, 1 %0 = icmp eq i64 %b, 1 br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.lr.ph.new for.body.lr.ph.new: ; preds = %for.body.lr.ph %unroll_iter = and i64 %b, -2 br label %for.body for.body: ; preds = %for.body, %for.body.lr.ph.new %r.08 = phi i64 [ 1, %for.body.lr.ph.new ], [ %div.1, %for.body ] %i.07 = phi i64 [ 1, %for.body.lr.ph.new ], [ %inc.1, %for.body ] %niter = phi i64 [ 0, %for.body.lr.ph.new ], [ %niter.next.1, %for.body ] %sub = sub i64 %add, %i.07 %mul = mul nsw i64 %r.08, %sub %div = sdiv i64 %mul, %i.07 %inc = add nuw i64 %i.07, 1 %sub.1 = sub i64 %add, %inc %mul.1 = mul nsw i64 %div, %sub.1 %div.1 = sdiv i64 %mul.1, %inc %inc.1 = add nuw i64 %i.07, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !21 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph %div.lcssa.ph = phi i64 [ undef, %for.body.lr.ph ], [ %div.1, %for.body ] %r.08.unr = phi i64 [ 1, %for.body.lr.ph ], [ %div.1, %for.body ] %i.07.unr = phi i64 [ 1, %for.body.lr.ph ], [ %inc.1, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %sub.epil = sub i64 %add, %i.07.unr %mul.epil = mul nsw i64 %r.08.unr, %sub.epil %div.epil = sdiv i64 %mul.epil, %i.07.unr br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %r.0.lcssa = phi i64 [ 1, %entry ], [ %div.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %div.epil, %for.body.epil ] ret i64 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llnHr(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %add = add nsw i64 %b, %a %cmp.not6.i = icmp slt i64 %b, 1 br i1 %cmp.not6.i, label %llnCr.exit, label %for.body.i.preheader for.body.i.preheader: ; preds = %entry %xtraiter = and i64 %b, 1 %0 = icmp eq i64 %b, 1 br i1 %0, label %llnCr.exit.loopexit.unr-lcssa, label %for.body.i.preheader.new for.body.i.preheader.new: ; preds = %for.body.i.preheader %unroll_iter = and i64 %b, -2 br label %for.body.i for.body.i: ; preds = %for.body.i, %for.body.i.preheader.new %r.08.i = phi i64 [ 1, %for.body.i.preheader.new ], [ %div.i.1, %for.body.i ] %i.07.i = phi i64 [ 1, %for.body.i.preheader.new ], [ %inc.i.1, %for.body.i ] %niter = phi i64 [ 0, %for.body.i.preheader.new ], [ %niter.next.1, %for.body.i ] %sub.i = sub i64 %add, %i.07.i %mul.i = mul nsw i64 %sub.i, %r.08.i %div.i = sdiv i64 %mul.i, %i.07.i %inc.i = add nuw i64 %i.07.i, 1 %sub.i.1 = sub i64 %add, %inc.i %mul.i.1 = mul nsw i64 %sub.i.1, %div.i %div.i.1 = sdiv i64 %mul.i.1, %inc.i %inc.i.1 = add nuw i64 %i.07.i, 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 %llnCr.exit.loopexit.unr-lcssa, label %for.body.i, !llvm.loop !21 llnCr.exit.loopexit.unr-lcssa: ; preds = %for.body.i, %for.body.i.preheader %div.i.lcssa.ph = phi i64 [ undef, %for.body.i.preheader ], [ %div.i.1, %for.body.i ] %r.08.i.unr = phi i64 [ 1, %for.body.i.preheader ], [ %div.i.1, %for.body.i ] %i.07.i.unr = phi i64 [ 1, %for.body.i.preheader ], [ %inc.i.1, %for.body.i ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %llnCr.exit, label %for.body.i.epil for.body.i.epil: ; preds = %llnCr.exit.loopexit.unr-lcssa %sub.i.epil = sub i64 %add, %i.07.i.unr %mul.i.epil = mul nsw i64 %sub.i.epil, %r.08.i.unr %div.i.epil = sdiv i64 %mul.i.epil, %i.07.i.unr br label %llnCr.exit llnCr.exit: ; preds = %for.body.i.epil, %llnCr.exit.loopexit.unr-lcssa, %entry %r.0.lcssa.i = phi i64 [ 1, %entry ], [ %div.i.lcssa.ph, %llnCr.exit.loopexit.unr-lcssa ], [ %div.i.epil, %for.body.i.epil ] ret i64 %r.0.lcssa.i } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llfact(i64 noundef %a) local_unnamed_addr #2 { entry: %cmp.not4 = icmp slt i64 %a, 1 br i1 %cmp.not4, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %xtraiter = and i64 %a, 7 %0 = icmp ult i64 %a, 8 br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %a, -8 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %r.06 = phi i64 [ 1, %for.body.preheader.new ], [ %mul.7, %for.body ] %i.05 = phi i64 [ 1, %for.body.preheader.new ], [ %inc.7, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.7, %for.body ] %mul = mul nsw i64 %r.06, %i.05 %inc = add nuw nsw i64 %i.05, 1 %mul.1 = mul nsw i64 %mul, %inc %inc.1 = add nuw nsw i64 %i.05, 2 %mul.2 = mul nsw i64 %mul.1, %inc.1 %inc.2 = add nuw nsw i64 %i.05, 3 %mul.3 = mul nsw i64 %mul.2, %inc.2 %inc.3 = add nuw nsw i64 %i.05, 4 %mul.4 = mul nsw i64 %mul.3, %inc.3 %inc.4 = add nuw nsw i64 %i.05, 5 %mul.5 = mul nsw i64 %mul.4, %inc.4 %inc.5 = add nuw nsw i64 %i.05, 6 %mul.6 = mul nsw i64 %mul.5, %inc.5 %inc.6 = add nuw i64 %i.05, 7 %mul.7 = mul nsw i64 %mul.6, %inc.6 %inc.7 = add nuw i64 %i.05, 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 !22 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %mul.lcssa.ph = phi i64 [ undef, %for.body.preheader ], [ %mul.7, %for.body ] %r.06.unr = phi i64 [ 1, %for.body.preheader ], [ %mul.7, %for.body ] %i.05.unr = phi i64 [ 1, %for.body.preheader ], [ %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 %r.06.epil = phi i64 [ %mul.epil, %for.body.epil ], [ %r.06.unr, %for.end.loopexit.unr-lcssa ] %i.05.epil = phi i64 [ %inc.epil, %for.body.epil ], [ %i.05.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 nsw i64 %r.06.epil, %i.05.epil %inc.epil = add nuw i64 %i.05.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 !23 for.end: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil, %entry %r.0.lcssa = phi i64 [ 1, %entry ], [ %mul.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ] ret i64 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llpow(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cmp.not3 = icmp slt i64 %b, 1 br i1 %cmp.not3, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %xtraiter = and i64 %b, 7 %0 = icmp ult i64 %b, 8 br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %b, -8 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %r.05 = phi i64 [ 1, %for.body.preheader.new ], [ %mul.7, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.7, %for.body ] %mul = mul nsw i64 %r.05, %a %mul.1 = mul nsw i64 %mul, %a %mul.2 = mul nsw i64 %mul.1, %a %mul.3 = mul nsw i64 %mul.2, %a %mul.4 = mul nsw i64 %mul.3, %a %mul.5 = mul nsw i64 %mul.4, %a %mul.6 = mul nsw i64 %mul.5, %a %mul.7 = mul nsw i64 %mul.6, %a %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !25 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %mul.lcssa.ph = phi i64 [ undef, %for.body.preheader ], [ %mul.7, %for.body ] %r.05.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 %r.05.epil = phi i64 [ %mul.epil, %for.body.epil ], [ %r.05.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 nsw i64 %r.05.epil, %a %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.end, label %for.body.epil, !llvm.loop !26 for.end: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil, %entry %r.0.lcssa = phi i64 [ 1, %entry ], [ %mul.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ] ret i64 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @lldsum(i64 noundef %x) local_unnamed_addr #2 { entry: %tobool.not4 = icmp eq i64 %x, 0 br i1 %tobool.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %r.06 = phi i64 [ %add, %while.body ], [ 0, %entry ] %x.addr.05 = phi i64 [ %div, %while.body ], [ %x, %entry ] %rem = srem i64 %x.addr.05, 10 %add = add nsw i64 %r.06, %rem %div = sdiv i64 %x.addr.05, 10 %x.addr.05.off = add i64 %x.addr.05, 9 %tobool.not = icmp ult i64 %x.addr.05.off, 19 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !27 while.end: ; preds = %while.body, %entry %r.0.lcssa = phi i64 [ 0, %entry ], [ %add, %while.body ] ret i64 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @lldsumb(i64 noundef %x, i64 noundef %b) local_unnamed_addr #2 { entry: %tobool.not5 = icmp eq i64 %x, 0 br i1 %tobool.not5, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %r.07 = phi i64 [ %add, %while.body ], [ 0, %entry ] %x.addr.06 = phi i64 [ %div, %while.body ], [ %x, %entry ] %rem = srem i64 %x.addr.06, %b %add = add nsw i64 %rem, %r.07 %div = sdiv i64 %x.addr.06, %b %tobool.not = icmp eq i64 %div, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !28 while.end: ; preds = %while.body, %entry %r.0.lcssa = phi i64 [ 0, %entry ], [ %add, %while.body ] ret i64 %r.0.lcssa } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llsankaku(i64 noundef %x) local_unnamed_addr #1 { entry: %add = add nsw i64 %x, 1 %mul = mul nsw i64 %add, %x %div = sdiv i64 %mul, 2 ret i64 %div } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @llswap(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #4 { entry: %0 = load i64, ptr %a, align 8, !tbaa !29 %1 = load i64, ptr %b, align 8, !tbaa !29 store i64 %1, ptr %a, align 8, !tbaa !29 store i64 %0, ptr %b, align 8, !tbaa !29 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local double @dbmax(double noundef %a, double noundef %b) local_unnamed_addr #1 { entry: %cmp = fcmp ogt double %a, %b %a.b = select i1 %cmp, double %a, double %b ret double %a.b } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local double @dbmin(double noundef %a, double noundef %b) local_unnamed_addr #1 { entry: %cmp = fcmp olt double %a, %b %a.b = select i1 %cmp, double %a, double %b ret double %a.b } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local double @dbzt(double noundef %a, double noundef %b) local_unnamed_addr #1 { entry: %cmp.i = fcmp ogt double %a, %b %a.b.i = select i1 %cmp.i, double %a, double %b %cmp.i4 = fcmp olt double %a, %b %a.b.i5 = select i1 %cmp.i4, double %a, double %b %sub = fsub double %a.b.i, %a.b.i5 ret double %sub } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @dbswap(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #4 { entry: %0 = load double, ptr %a, align 8, !tbaa !31 %1 = load double, ptr %b, align 8, !tbaa !31 store double %1, ptr %a, align 8, !tbaa !31 store double %0, ptr %b, align 8, !tbaa !31 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @chswap(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #4 { entry: %0 = load i8, ptr %a, align 1, !tbaa !33 %1 = load i8, ptr %b, align 1, !tbaa !33 store i8 %1, ptr %a, align 1, !tbaa !33 store i8 %0, ptr %b, align 1, !tbaa !33 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @sortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %0 = load i32, ptr %a, align 4, !tbaa !16 %1 = load i32, ptr %b, align 4, !tbaa !16 %cmp = icmp sgt i32 %0, %1 %cmp1 = icmp ne i32 %0, %1 %. = sext 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 @sortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %0 = load i32, ptr %a, align 4, !tbaa !16 %1 = load i32, ptr %b, align 4, !tbaa !16 %cmp = icmp slt i32 %0, %1 %cmp1 = icmp ne i32 %0, %1 %. = sext 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 @llsortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %0 = load i64, ptr %a, align 8, !tbaa !29 %1 = load i64, ptr %b, align 8, !tbaa !29 %cmp = icmp sgt i64 %0, %1 %cmp1 = icmp ne i64 %0, %1 %. = sext 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 @llsortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %0 = load i64, ptr %a, align 8, !tbaa !29 %1 = load i64, ptr %b, align 8, !tbaa !29 %cmp = icmp slt i64 %0, %1 %cmp1 = icmp ne i64 %0, %1 %. = sext 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 @dbsortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %0 = load double, ptr %a, align 8, !tbaa !31 %1 = load double, ptr %b, align 8, !tbaa !31 %cmp = fcmp ogt double %0, %1 %cmp1 = fcmp une double %0, %1 %. = sext 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 @dbsortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %0 = load double, ptr %a, align 8, !tbaa !31 %1 = load double, ptr %b, align 8, !tbaa !31 %cmp = fcmp olt double %0, %1 %cmp1 = fcmp une double %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @strsortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #6 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %a, ptr noundef nonnull dereferenceable(1) %b) #17 ret i32 %call } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #7 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @strsortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #6 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %b, ptr noundef nonnull dereferenceable(1) %a) #17 ret i32 %call } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @chsortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %0 = load i8, ptr %a, align 1, !tbaa !33 %1 = load i8, ptr %b, align 1, !tbaa !33 %cmp = icmp sgt i8 %0, %1 %cmp5 = icmp ne i8 %0, %1 %. = sext 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 @chsortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %0 = load i8, ptr %a, align 1, !tbaa !33 %1 = load i8, ptr %b, align 1, !tbaa !33 %cmp = icmp slt i8 %0, %1 %cmp5 = icmp ne i8 %0, %1 %. = sext i1 %cmp5 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: nounwind uwtable define dso_local void @shuffledget(ptr noundef %x, i32 noundef %n) local_unnamed_addr #8 { entry: %b = alloca [524288 x i32], align 16 call void @llvm.lifetime.start.p0(i64 2097152, ptr nonnull %b) #18 %cmp40 = icmp sgt i32 %n, 0 br i1 %cmp40, label %for.body.preheader, label %for.end25 for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %n to i64 %min.iters.check = icmp ult i32 %n, 8 br i1 %min.iters.check, label %for.body.preheader57, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %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 [524288 x i32], ptr %b, i64 0, i64 %index store <4 x i32> %vec.ind, ptr %0, align 16, !tbaa !16 %1 = getelementptr inbounds i32, ptr %0, i64 4 store <4 x i32> %step.add, ptr %1, align 16, !tbaa !16 %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 !34 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.cond1.preheader, label %for.body.preheader57 for.body.preheader57: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.cond1.preheader: ; preds = %for.body, %middle.block br i1 %cmp40, label %for.body3.preheader, label %for.end25 for.body3.preheader: ; preds = %for.cond1.preheader %3 = zext i32 %n to i64 br label %for.body3 for.body: ; preds = %for.body.preheader57, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader57 ] %arrayidx = getelementptr inbounds [524288 x i32], ptr %b, i64 0, i64 %indvars.iv %4 = trunc i64 %indvars.iv to i32 store i32 %4, ptr %arrayidx, align 4, !tbaa !16 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond1.preheader, label %for.body, !llvm.loop !35 for.cond15.preheader: ; preds = %for.body3 br i1 %cmp40, label %for.body17.preheader, label %for.end25 for.body17.preheader: ; preds = %for.cond15.preheader %wide.trip.count54 = zext i32 %n to i64 br label %for.body17 for.body3: ; preds = %for.body3.preheader, %for.body3 %indvars.iv47 = phi i64 [ %3, %for.body3.preheader ], [ %indvars.iv.next48, %for.body3 ] %call = tail call i32 @rand() #18 %5 = trunc i64 %indvars.iv47 to i32 %rem = srem i32 %call, %5 %indvars.iv.next48 = add nsw i64 %indvars.iv47, -1 %idxprom4 = and i64 %indvars.iv.next48, 4294967295 %arrayidx5 = getelementptr inbounds [524288 x i32], ptr %b, i64 0, i64 %idxprom4 %6 = load i32, ptr %arrayidx5, align 4, !tbaa !16 %idxprom6 = sext i32 %rem to i64 %arrayidx7 = getelementptr inbounds [524288 x i32], ptr %b, i64 0, i64 %idxprom6 %7 = load i32, ptr %arrayidx7, align 4, !tbaa !16 store i32 %7, ptr %arrayidx5, align 4, !tbaa !16 store i32 %6, ptr %arrayidx7, align 4, !tbaa !16 %cmp2 = icmp ugt i64 %indvars.iv47, 1 br i1 %cmp2, label %for.body3, label %for.cond15.preheader, !llvm.loop !36 for.body17: ; preds = %for.body17.preheader, %for.body17 %indvars.iv50 = phi i64 [ 0, %for.body17.preheader ], [ %indvars.iv.next51, %for.body17 ] %arrayidx19 = getelementptr inbounds [524288 x i32], ptr %b, i64 0, i64 %indvars.iv50 %8 = load i32, ptr %arrayidx19, align 4, !tbaa !16 %idxprom20 = sext i32 %8 to i64 %arrayidx21 = getelementptr inbounds i32, ptr %x, i64 %idxprom20 %call22 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef %arrayidx21) %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1 %exitcond55.not = icmp eq i64 %indvars.iv.next51, %wide.trip.count54 br i1 %exitcond55.not, label %for.end25, label %for.body17, !llvm.loop !37 for.end25: ; preds = %for.body17, %entry, %for.cond1.preheader, %for.cond15.preheader call void @llvm.lifetime.end.p0(i64 2097152, ptr nonnull %b) #18 ret void } ; Function Attrs: nounwind declare i32 @rand() local_unnamed_addr #9 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #10 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @search(i32 noundef %x, ptr nocapture noundef readonly %a, i32 noundef %n) local_unnamed_addr #11 { entry: %cmp.not9 = icmp slt i32 %n, 1 br i1 %cmp.not9, label %while.end, label %while.body.preheader while.body.preheader: ; preds = %entry %sub = add nsw i32 %n, -1 br label %while.body while.body: ; preds = %while.body.preheader, %while.body %st.011 = phi i32 [ %st.1, %while.body ], [ 0, %while.body.preheader ] %fi.010 = phi i32 [ %fi.1, %while.body ], [ %sub, %while.body.preheader ] %add = add nsw i32 %st.011, %fi.010 %div = sdiv i32 %add, 2 %idxprom = sext i32 %div to i64 %arrayidx = getelementptr inbounds i32, ptr %a, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !16 %cmp1 = icmp slt i32 %0, %x %add2 = add nsw i32 %div, 1 %sub3 = add nsw i32 %div, -1 %fi.1 = select i1 %cmp1, i32 %fi.010, i32 %sub3 %st.1 = select i1 %cmp1, i32 %add2, i32 %st.011 %cmp.not = icmp sgt i32 %st.1, %fi.1 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !38 while.end: ; preds = %while.body, %entry %st.0.lcssa = phi i32 [ 0, %entry ], [ %st.1, %while.body ] ret i32 %st.0.lcssa } ; Function Attrs: nofree nounwind uwtable define dso_local void @prarr(ptr nocapture noundef readonly %arr, i32 noundef %n) local_unnamed_addr #12 { entry: %cmp7 = icmp sgt i32 %n, 0 br i1 %cmp7, label %if.end.peel, label %for.end if.end.peel: ; preds = %entry %wide.trip.count = zext i32 %n to i64 %.pre = load i32, ptr %arr, align 4, !tbaa !16 %call1.peel = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.pre) %exitcond.peel.not = icmp eq i32 %n, 1 br i1 %exitcond.peel.not, label %for.end, label %if.end if.end: ; preds = %if.end.peel, %if.end %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 1, %if.end.peel ] %putchar6 = tail call i32 @putchar(i32 32) %arrayidx = getelementptr inbounds i32, ptr %arr, i64 %indvars.iv %0 = load i32, ptr %arrayidx, align 4, !tbaa !16 %call1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end, label %if.end, !llvm.loop !39 for.end: ; preds = %if.end, %if.end.peel, %entry %putchar = tail call i32 @putchar(i32 10) ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #10 ; Function Attrs: nounwind uwtable define dso_local void @getperm(ptr nocapture noundef %a, i32 noundef %n) local_unnamed_addr #8 { entry: %cmp20 = icmp sgt i32 %n, 0 br i1 %cmp20, label %for.body.preheader, label %for.end9 for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %n to i64 %min.iters.check = icmp ult i32 %n, 8 br i1 %min.iters.check, label %for.body.preheader30, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %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 %a, i64 %index store <4 x i32> %vec.ind, ptr %0, align 4, !tbaa !16 %1 = getelementptr inbounds i32, ptr %0, i64 4 store <4 x i32> %step.add, ptr %1, align 4, !tbaa !16 %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 !41 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.cond1.preheader, label %for.body.preheader30 for.body.preheader30: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.cond1.preheader: ; preds = %for.body, %middle.block %cmp222 = icmp sgt i32 %n, 1 br i1 %cmp222, label %for.body3.preheader, label %for.end9 for.body3.preheader: ; preds = %for.cond1.preheader %3 = zext i32 %n to i64 br label %for.body3 for.body: ; preds = %for.body.preheader30, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader30 ] %arrayidx = getelementptr inbounds i32, ptr %a, i64 %indvars.iv %4 = trunc i64 %indvars.iv to i32 store i32 %4, ptr %arrayidx, align 4, !tbaa !16 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond1.preheader, label %for.body, !llvm.loop !42 for.body3: ; preds = %for.body3.preheader, %for.body3 %indvars.iv25 = phi i64 [ %3, %for.body3.preheader ], [ %indvars.iv.next26, %for.body3 ] %indvars.iv.next26 = add nsw i64 %indvars.iv25, -1 %call = tail call i32 @rand() #18 %5 = trunc i64 %indvars.iv25 to i32 %rem = srem i32 %call, %5 %idxprom4 = sext i32 %rem to i64 %arrayidx5 = getelementptr inbounds i32, ptr %a, i64 %idxprom4 %idxprom6 = and i64 %indvars.iv.next26, 4294967295 %arrayidx7 = getelementptr inbounds i32, ptr %a, i64 %idxprom6 %6 = load i32, ptr %arrayidx5, align 4, !tbaa !16 %7 = load i32, ptr %arrayidx7, align 4, !tbaa !16 store i32 %7, ptr %arrayidx5, align 4, !tbaa !16 store i32 %6, ptr %arrayidx7, align 4, !tbaa !16 %cmp2 = icmp ugt i64 %indvars.iv25, 2 br i1 %cmp2, label %for.body3, label %for.end9, !llvm.loop !43 for.end9: ; preds = %for.body3, %entry, %for.cond1.preheader ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @sdsortfnc(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #5 { entry: %0 = load i32, ptr %a, align 4, !tbaa !44 %1 = load i32, ptr %b, align 4, !tbaa !44 %cmp = icmp slt i32 %0, %1 %cmp4 = icmp sgt i32 %0, %1 %. = zext i1 %cmp4 to i32 %retval.0 = select i1 %cmp, i32 -1, i32 %. ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local void @coordinate_comp(ptr nocapture noundef %a, i32 noundef %n) local_unnamed_addr #12 { entry: %dat = alloca [524288 x %struct.sd], align 16 call void @llvm.lifetime.start.p0(i64 4194304, ptr nonnull %dat) #18 %cmp46 = icmp sgt i32 %n, 0 br i1 %cmp46, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %n to i64 %min.iters.check = icmp ult i32 %n, 4 br i1 %min.iters.check, label %for.body.preheader61, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %wide.trip.count, 4294967292 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.ind = phi <2 x i32> [ <i32 0, i32 1>, %vector.ph ], [ %vec.ind.next, %vector.body ] %step.add = add <2 x i32> %vec.ind, <i32 2, i32 2> %0 = or i64 %index, 2 %1 = getelementptr inbounds i32, ptr %a, i64 %index %wide.load = load <2 x i32>, ptr %1, align 4, !tbaa !16 %2 = getelementptr inbounds i32, ptr %1, i64 2 %wide.load59 = load <2 x i32>, ptr %2, align 4, !tbaa !16 %3 = getelementptr inbounds [524288 x %struct.sd], ptr %dat, i64 0, i64 %index %4 = getelementptr inbounds [524288 x %struct.sd], ptr %dat, i64 0, i64 %0 %interleaved.vec = shufflevector <2 x i32> %wide.load, <2 x i32> %vec.ind, <4 x i32> <i32 0, i32 2, i32 1, i32 3> store <4 x i32> %interleaved.vec, ptr %3, align 16, !tbaa !16 %interleaved.vec60 = shufflevector <2 x i32> %wide.load59, <2 x i32> %step.add, <4 x i32> <i32 0, i32 2, i32 1, i32 3> store <4 x i32> %interleaved.vec60, ptr %4, align 16, !tbaa !16 %index.next = add nuw i64 %index, 4 %vec.ind.next = add <2 x i32> %vec.ind, <i32 4, i32 4> %5 = icmp eq i64 %index.next, %n.vec br i1 %5, label %middle.block, label %vector.body, !llvm.loop !46 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.end, label %for.body.preheader61 for.body.preheader61: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader61, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader61 ] %arrayidx = getelementptr inbounds i32, ptr %a, i64 %indvars.iv %6 = load i32, ptr %arrayidx, align 4, !tbaa !16 %arrayidx2 = getelementptr inbounds [524288 x %struct.sd], ptr %dat, i64 0, i64 %indvars.iv store i32 %6, ptr %arrayidx2, align 8, !tbaa !44 %node = getelementptr inbounds [524288 x %struct.sd], ptr %dat, i64 0, i64 %indvars.iv, i32 1 %7 = trunc i64 %indvars.iv to i32 store i32 %7, ptr %node, align 4, !tbaa !47 %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 !48 for.end: ; preds = %for.body, %middle.block, %entry %conv = sext i32 %n to i64 call void @qsort(ptr noundef nonnull %dat, i64 noundef %conv, i64 noundef 8, ptr noundef nonnull @sdsortfnc) #18 %node6 = getelementptr inbounds %struct.sd, ptr %dat, i64 0, i32 1 %8 = load i32, ptr %node6, align 4, !tbaa !47 %idxprom7 = sext i32 %8 to i64 %arrayidx8 = getelementptr inbounds i32, ptr %a, i64 %idxprom7 store i32 0, ptr %arrayidx8, align 4, !tbaa !16 %cmp1048 = icmp sgt i32 %n, 1 br i1 %cmp1048, label %for.body12.preheader, label %for.end29 for.body12.preheader: ; preds = %for.end %wide.trip.count56 = zext i32 %n to i64 %.pre = load i32, ptr %dat, align 16, !tbaa !44 %9 = add nsw i64 %wide.trip.count56, -1 %xtraiter = and i64 %9, 1 %10 = icmp eq i32 %n, 2 br i1 %10, label %for.end29.loopexit.unr-lcssa, label %for.body12.preheader.new for.body12.preheader.new: ; preds = %for.body12.preheader %unroll_iter = and i64 %9, -2 br label %for.body12 for.body12: ; preds = %for.body12, %for.body12.preheader.new %11 = phi i32 [ %.pre, %for.body12.preheader.new ], [ %14, %for.body12 ] %indvars.iv52 = phi i64 [ 1, %for.body12.preheader.new ], [ %indvars.iv.next53.1, %for.body12 ] %c.050 = phi i32 [ 0, %for.body12.preheader.new ], [ %spec.select.1, %for.body12 ] %niter = phi i64 [ 0, %for.body12.preheader.new ], [ %niter.next.1, %for.body12 ] %arrayidx17 = getelementptr inbounds [524288 x %struct.sd], ptr %dat, i64 0, i64 %indvars.iv52 %12 = load i32, ptr %arrayidx17, align 8, !tbaa !44 %cmp19.not = icmp ne i32 %11, %12 %inc21 = zext i1 %cmp19.not to i32 %spec.select = add nuw nsw i32 %c.050, %inc21 %node24 = getelementptr inbounds [524288 x %struct.sd], ptr %dat, i64 0, i64 %indvars.iv52, i32 1 %13 = load i32, ptr %node24, align 4, !tbaa !47 %idxprom25 = sext i32 %13 to i64 %arrayidx26 = getelementptr inbounds i32, ptr %a, i64 %idxprom25 store i32 %spec.select, ptr %arrayidx26, align 4, !tbaa !16 %indvars.iv.next53 = add nuw nsw i64 %indvars.iv52, 1 %arrayidx17.1 = getelementptr inbounds [524288 x %struct.sd], ptr %dat, i64 0, i64 %indvars.iv.next53 %14 = load i32, ptr %arrayidx17.1, align 8, !tbaa !44 %cmp19.not.1 = icmp ne i32 %12, %14 %inc21.1 = zext i1 %cmp19.not.1 to i32 %spec.select.1 = add nuw nsw i32 %spec.select, %inc21.1 %node24.1 = getelementptr inbounds [524288 x %struct.sd], ptr %dat, i64 0, i64 %indvars.iv.next53, i32 1 %15 = load i32, ptr %node24.1, align 4, !tbaa !47 %idxprom25.1 = sext i32 %15 to i64 %arrayidx26.1 = getelementptr inbounds i32, ptr %a, i64 %idxprom25.1 store i32 %spec.select.1, ptr %arrayidx26.1, align 4, !tbaa !16 %indvars.iv.next53.1 = add nuw nsw i64 %indvars.iv52, 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.end29.loopexit.unr-lcssa, label %for.body12, !llvm.loop !49 for.end29.loopexit.unr-lcssa: ; preds = %for.body12, %for.body12.preheader %.unr = phi i32 [ %.pre, %for.body12.preheader ], [ %14, %for.body12 ] %indvars.iv52.unr = phi i64 [ 1, %for.body12.preheader ], [ %indvars.iv.next53.1, %for.body12 ] %c.050.unr = phi i32 [ 0, %for.body12.preheader ], [ %spec.select.1, %for.body12 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end29, label %for.body12.epil for.body12.epil: ; preds = %for.end29.loopexit.unr-lcssa %arrayidx17.epil = getelementptr inbounds [524288 x %struct.sd], ptr %dat, i64 0, i64 %indvars.iv52.unr %16 = load i32, ptr %arrayidx17.epil, align 8, !tbaa !44 %cmp19.not.epil = icmp ne i32 %.unr, %16 %inc21.epil = zext i1 %cmp19.not.epil to i32 %spec.select.epil = add nuw nsw i32 %c.050.unr, %inc21.epil %node24.epil = getelementptr inbounds [524288 x %struct.sd], ptr %dat, i64 0, i64 %indvars.iv52.unr, i32 1 %17 = load i32, ptr %node24.epil, align 4, !tbaa !47 %idxprom25.epil = sext i32 %17 to i64 %arrayidx26.epil = getelementptr inbounds i32, ptr %a, i64 %idxprom25.epil store i32 %spec.select.epil, ptr %arrayidx26.epil, align 4, !tbaa !16 br label %for.end29 for.end29: ; preds = %for.body12.epil, %for.end29.loopexit.unr-lcssa, %for.end call void @llvm.lifetime.end.p0(i64 4194304, ptr nonnull %dat) #18 ret void } ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #13 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @cbz(i32 noundef %fx, i32 noundef %fy, i32 noundef %tx, i32 noundef %ty) local_unnamed_addr #14 { entry: %cmp = icmp sgt i32 %fx, %tx %cmp1 = icmp sgt i32 %fy, %ty %or.cond76 = or i1 %cmp, %cmp1 br i1 %or.cond76, label %return, label %if.end if.end: ; preds = %entry %cmp3 = icmp eq i32 %fy, 0 %0 = or i32 %fy, %fx %or.cond = icmp eq i32 %0, 0 br i1 %or.cond, label %if.then4, label %if.else if.then4: ; preds = %if.end %idxprom = sext i32 %tx to i64 %idxprom5 = sext i32 %ty to i64 %arrayidx6 = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom, i64 %idxprom5 %1 = load i32, ptr %arrayidx6, align 4, !tbaa !16 br label %return if.else: ; preds = %if.end %cmp2 = icmp eq i32 %fx, 0 %idxprom9 = sext i32 %tx to i64 %idxprom11 = sext i32 %ty to i64 %arrayidx12 = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom9, i64 %idxprom11 %2 = load i32, ptr %arrayidx12, align 4, !tbaa !16 br i1 %cmp2, label %if.then8, label %if.else18 if.then8: ; preds = %if.else %sub = add nsw i32 %fy, -1 %idxprom15 = sext i32 %sub to i64 %arrayidx16 = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom9, i64 %idxprom15 %3 = load i32, ptr %arrayidx16, align 4, !tbaa !16 %sub17 = sub nsw i32 %2, %3 br label %return if.else18: ; preds = %if.else br i1 %cmp3, label %if.then20, label %if.else31 if.then20: ; preds = %if.else18 %sub25 = add nsw i32 %fx, -1 %idxprom26 = sext i32 %sub25 to i64 %arrayidx29 = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom26, i64 %idxprom11 %4 = load i32, ptr %arrayidx29, align 4, !tbaa !16 %sub30 = sub nsw i32 %2, %4 br label %return if.else31: ; preds = %if.else18 %sub38 = add nsw i32 %fy, -1 %idxprom39 = sext i32 %sub38 to i64 %arrayidx40 = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom9, i64 %idxprom39 %5 = load i32, ptr %arrayidx40, align 4, !tbaa !16 %sub42 = add nsw i32 %fx, -1 %idxprom43 = sext i32 %sub42 to i64 %arrayidx46 = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom43, i64 %idxprom11 %6 = load i32, ptr %arrayidx46, align 4, !tbaa !16 %arrayidx53 = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom43, i64 %idxprom39 %7 = load i32, ptr %arrayidx53, align 4, !tbaa !16 %8 = add i32 %5, %6 %sub47 = sub i32 %2, %8 %add = add nsw i32 %sub47, %7 br label %return return: ; preds = %entry, %if.else31, %if.then20, %if.then8, %if.then4 %retval.0 = phi i32 [ %1, %if.then4 ], [ %sub17, %if.then8 ], [ %sub30, %if.then20 ], [ %add, %if.else31 ], [ 0, %entry ] ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #12 { entry: %a = alloca [16 x i32], align 16 %b = alloca [16 x i32], align 16 %h = alloca i32, align 4 %w = alloca i32, align 4 %kk = alloca i32, align 4 %s = alloca [16 x [1024 x i8]], align 16 %bf = alloca [16 x [1024 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %a) #18 call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %b) #18 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #18 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #18 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %kk) #18 call void @llvm.lifetime.start.p0(i64 16384, ptr nonnull %s) #18 call void @llvm.lifetime.start.p0(i64 65536, ptr nonnull %bf) #18 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %h, ptr noundef nonnull %w, ptr noundef nonnull %kk) %0 = load i32, ptr %h, align 4, !tbaa !16 %cmp260 = icmp sgt i32 %0, 0 br i1 %cmp260, label %for.body, label %for.cond85.preheader for.cond16.preheader: ; preds = %for.inc13 %cmp17264 = icmp sgt i32 %20, 0 br i1 %cmp17264, label %for.cond20.preheader.lr.ph, label %for.cond85.preheader for.cond20.preheader.lr.ph: ; preds = %for.cond16.preheader %1 = load i32, ptr %w, align 4, !tbaa !16 %cmp21262 = icmp sgt i32 %1, 0 br i1 %cmp21262, label %for.cond20.preheader.us.preheader, label %for.cond85.preheader for.cond20.preheader.us.preheader: ; preds = %for.cond20.preheader.lr.ph %wide.trip.count314 = zext i32 %20 to i64 %wide.trip.count308 = zext i32 %1 to i64 %exitcond309.peel.not = icmp eq i32 %1, 1 %2 = add nsw i64 %wide.trip.count308, -1 %xtraiter = and i64 %2, 1 %3 = icmp eq i32 %1, 2 %unroll_iter = and i64 %2, -2 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br label %for.inc47.us.peel for.inc47.us.peel: ; preds = %for.cond20.preheader.us.preheader, %for.cond20.for.inc50_crit_edge.us %indvars.iv311 = phi i64 [ 0, %for.cond20.preheader.us.preheader ], [ %indvars.iv.next312, %for.cond20.for.inc50_crit_edge.us ] %arrayidx31.us = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %indvars.iv311 %arrayidx27.us = getelementptr inbounds [16 x [1024 x i32]], ptr %bf, i64 0, i64 %indvars.iv311 %4 = load i32, ptr %arrayidx27.us, align 16, !tbaa !16 store i32 %4, ptr %arrayidx31.us, align 16, !tbaa !16 br i1 %exitcond309.peel.not, label %for.cond20.for.inc50_crit_edge.us, label %for.inc47.us.preheader for.inc47.us.preheader: ; preds = %for.inc47.us.peel %5 = shl nuw nsw i64 %indvars.iv311, 12 %scevgep = getelementptr i8, ptr @bsum, i64 %5 %load_initial = load i32, ptr %scevgep, align 16 br i1 %3, label %for.cond20.for.inc50_crit_edge.us.loopexit.unr-lcssa, label %for.inc47.us for.inc47.us: ; preds = %for.inc47.us.preheader, %for.inc47.us %store_forwarded = phi i32 [ %add.us.1, %for.inc47.us ], [ %load_initial, %for.inc47.us.preheader ] %indvars.iv304 = phi i64 [ %indvars.iv.next305.1, %for.inc47.us ], [ 1, %for.inc47.us.preheader ] %niter = phi i64 [ %niter.next.1, %for.inc47.us ], [ 0, %for.inc47.us.preheader ] %arrayidx42.us = getelementptr inbounds [16 x [1024 x i32]], ptr %bf, i64 0, i64 %indvars.iv311, i64 %indvars.iv304 %6 = load i32, ptr %arrayidx42.us, align 4, !tbaa !16 %add.us = add nsw i32 %6, %store_forwarded %arrayidx46.us = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %indvars.iv311, i64 %indvars.iv304 store i32 %add.us, ptr %arrayidx46.us, align 4, !tbaa !16 %indvars.iv.next305 = add nuw nsw i64 %indvars.iv304, 1 %arrayidx42.us.1 = getelementptr inbounds [16 x [1024 x i32]], ptr %bf, i64 0, i64 %indvars.iv311, i64 %indvars.iv.next305 %7 = load i32, ptr %arrayidx42.us.1, align 4, !tbaa !16 %add.us.1 = add nsw i32 %7, %add.us %arrayidx46.us.1 = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %indvars.iv311, i64 %indvars.iv.next305 store i32 %add.us.1, ptr %arrayidx46.us.1, align 4, !tbaa !16 %indvars.iv.next305.1 = add nuw nsw i64 %indvars.iv304, 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.cond20.for.inc50_crit_edge.us.loopexit.unr-lcssa, label %for.inc47.us, !llvm.loop !50 for.cond20.for.inc50_crit_edge.us.loopexit.unr-lcssa: ; preds = %for.inc47.us, %for.inc47.us.preheader %store_forwarded.unr = phi i32 [ %load_initial, %for.inc47.us.preheader ], [ %add.us.1, %for.inc47.us ] %indvars.iv304.unr = phi i64 [ 1, %for.inc47.us.preheader ], [ %indvars.iv.next305.1, %for.inc47.us ] br i1 %lcmp.mod.not, label %for.cond20.for.inc50_crit_edge.us, label %for.inc47.us.epil for.inc47.us.epil: ; preds = %for.cond20.for.inc50_crit_edge.us.loopexit.unr-lcssa %arrayidx42.us.epil = getelementptr inbounds [16 x [1024 x i32]], ptr %bf, i64 0, i64 %indvars.iv311, i64 %indvars.iv304.unr %8 = load i32, ptr %arrayidx42.us.epil, align 4, !tbaa !16 %add.us.epil = add nsw i32 %8, %store_forwarded.unr %arrayidx46.us.epil = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %indvars.iv311, i64 %indvars.iv304.unr store i32 %add.us.epil, ptr %arrayidx46.us.epil, align 4, !tbaa !16 br label %for.cond20.for.inc50_crit_edge.us for.cond20.for.inc50_crit_edge.us: ; preds = %for.inc47.us.epil, %for.cond20.for.inc50_crit_edge.us.loopexit.unr-lcssa, %for.inc47.us.peel %indvars.iv.next312 = add nuw nsw i64 %indvars.iv311, 1 %exitcond315.not = icmp eq i64 %indvars.iv.next312, %wide.trip.count314 br i1 %exitcond315.not, label %for.cond53.preheader, label %for.inc47.us.peel, !llvm.loop !51 for.body: ; preds = %entry, %for.inc13 %indvars.iv301 = phi i64 [ %indvars.iv.next302, %for.inc13 ], [ 0, %entry ] %arrayidx = getelementptr inbounds [16 x [1024 x i8]], ptr %s, i64 0, i64 %indvars.iv301 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %arrayidx) %9 = load i32, ptr %w, align 4, !tbaa !16 %cmp3258 = icmp sgt i32 %9, 0 br i1 %cmp3258, label %for.body4.preheader, label %for.inc13 for.body4.preheader: ; preds = %for.body %wide.trip.count = zext i32 %9 to i64 %min.iters.check = icmp ult i32 %9, 8 br i1 %min.iters.check, label %for.body4.preheader375, label %vector.ph vector.ph: ; preds = %for.body4.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %10 = getelementptr inbounds [16 x [1024 x i8]], ptr %s, i64 0, i64 %indvars.iv301, i64 %index %wide.load = load <4 x i8>, ptr %10, align 8, !tbaa !33 %11 = getelementptr inbounds i8, ptr %10, i64 4 %wide.load360 = load <4 x i8>, ptr %11, align 4, !tbaa !33 %12 = sext <4 x i8> %wide.load to <4 x i32> %13 = sext <4 x i8> %wide.load360 to <4 x i32> %14 = add nsw <4 x i32> %12, <i32 -48, i32 -48, i32 -48, i32 -48> %15 = add nsw <4 x i32> %13, <i32 -48, i32 -48, i32 -48, i32 -48> %16 = getelementptr inbounds [16 x [1024 x i32]], ptr %bf, i64 0, i64 %indvars.iv301, i64 %index store <4 x i32> %14, ptr %16, align 16, !tbaa !16 %17 = getelementptr inbounds i32, ptr %16, i64 4 store <4 x i32> %15, ptr %17, align 16, !tbaa !16 %index.next = add nuw i64 %index, 8 %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 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.inc13, label %for.body4.preheader375 for.body4.preheader375: ; preds = %for.body4.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body4.preheader ], [ %n.vec, %middle.block ] br label %for.body4 for.body4: ; preds = %for.body4.preheader375, %for.body4 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body4 ], [ %indvars.iv.ph, %for.body4.preheader375 ] %arrayidx8 = getelementptr inbounds [16 x [1024 x i8]], ptr %s, i64 0, i64 %indvars.iv301, i64 %indvars.iv %19 = load i8, ptr %arrayidx8, align 1, !tbaa !33 %conv = sext i8 %19 to i32 %sub = add nsw i32 %conv, -48 %arrayidx12 = getelementptr inbounds [16 x [1024 x i32]], ptr %bf, i64 0, i64 %indvars.iv301, i64 %indvars.iv store i32 %sub, ptr %arrayidx12, align 4, !tbaa !16 %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.inc13, label %for.body4, !llvm.loop !53 for.inc13: ; preds = %for.body4, %middle.block, %for.body %indvars.iv.next302 = add nuw nsw i64 %indvars.iv301, 1 %20 = load i32, ptr %h, align 4, !tbaa !16 %21 = sext i32 %20 to i64 %cmp = icmp slt i64 %indvars.iv.next302, %21 br i1 %cmp, label %for.body, label %for.cond16.preheader, !llvm.loop !54 for.cond53.preheader: ; preds = %for.cond20.for.inc50_crit_edge.us br i1 %cmp17264, label %for.cond57.preheader.lr.ph, label %for.cond85.preheader for.cond57.preheader.lr.ph: ; preds = %for.cond53.preheader %.pr = load i32, ptr %w, align 4, !tbaa !16 %cmp58266 = icmp sgt i32 %.pr, 0 br i1 %cmp58266, label %for.cond57.preheader.us.preheader, label %for.cond85.preheader for.cond57.preheader.us.preheader: ; preds = %for.cond57.preheader.lr.ph %wide.trip.count325 = zext i32 %20 to i64 %wide.trip.count319 = zext i32 %.pr to i64 %min.iters.check363 = icmp ult i32 %.pr, 4 %n.vec366 = and i64 %wide.trip.count319, 4294967292 %cmp.n368 = icmp eq i64 %n.vec366, %wide.trip.count319 br label %for.cond57.preheader.us for.cond57.preheader.us: ; preds = %for.cond57.preheader.us.preheader, %for.cond57.for.inc82_crit_edge.us %indvars.iv321 = phi i64 [ 0, %for.cond57.preheader.us.preheader ], [ %indvars.iv.next322, %for.cond57.for.inc82_crit_edge.us ] %cmp61.not.us = icmp eq i64 %indvars.iv321, 0 %22 = add nsw i64 %indvars.iv321, -1 br i1 %cmp61.not.us, label %for.cond57.for.inc82_crit_edge.us, label %for.body60.us270.preheader for.body60.us270.preheader: ; preds = %for.cond57.preheader.us br i1 %min.iters.check363, label %for.body60.us270.preheader374, label %vector.body369 vector.body369: ; preds = %for.body60.us270.preheader, %vector.body369 %index370 = phi i64 [ %index.next373, %vector.body369 ], [ 0, %for.body60.us270.preheader ] %23 = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %22, i64 %index370 %wide.load371 = load <4 x i32>, ptr %23, align 16, !tbaa !16 %24 = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %indvars.iv321, i64 %index370 %wide.load372 = load <4 x i32>, ptr %24, align 16, !tbaa !16 %25 = add nsw <4 x i32> %wide.load372, %wide.load371 store <4 x i32> %25, ptr %24, align 16, !tbaa !16 %index.next373 = add nuw i64 %index370, 4 %26 = icmp eq i64 %index.next373, %n.vec366 br i1 %26, label %middle.block361, label %vector.body369, !llvm.loop !55 middle.block361: ; preds = %vector.body369 br i1 %cmp.n368, label %for.cond57.for.inc82_crit_edge.us, label %for.body60.us270.preheader374 for.body60.us270.preheader374: ; preds = %for.body60.us270.preheader, %middle.block361 %indvars.iv316.ph = phi i64 [ 0, %for.body60.us270.preheader ], [ %n.vec366, %middle.block361 ] br label %for.body60.us270 for.body60.us270: ; preds = %for.body60.us270.preheader374, %for.body60.us270 %indvars.iv316 = phi i64 [ %indvars.iv.next317, %for.body60.us270 ], [ %indvars.iv316.ph, %for.body60.us270.preheader374 ] %arrayidx68.us = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %22, i64 %indvars.iv316 %27 = load i32, ptr %arrayidx68.us, align 4, !tbaa !16 %arrayidx72.us = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %indvars.iv321, i64 %indvars.iv316 %28 = load i32, ptr %arrayidx72.us, align 4, !tbaa !16 %add73.us = add nsw i32 %28, %27 store i32 %add73.us, ptr %arrayidx72.us, align 4, !tbaa !16 %indvars.iv.next317 = add nuw nsw i64 %indvars.iv316, 1 %exitcond320.not = icmp eq i64 %indvars.iv.next317, %wide.trip.count319 br i1 %exitcond320.not, label %for.cond57.for.inc82_crit_edge.us, label %for.body60.us270, !llvm.loop !56 for.cond57.for.inc82_crit_edge.us: ; preds = %for.body60.us270, %middle.block361, %for.cond57.preheader.us %indvars.iv.next322 = add nuw nsw i64 %indvars.iv321, 1 %exitcond326.not = icmp eq i64 %indvars.iv.next322, %wide.trip.count325 br i1 %exitcond326.not, label %for.cond85.preheader, label %for.cond57.preheader.us, !llvm.loop !57 for.cond85.preheader: ; preds = %for.cond57.for.inc82_crit_edge.us, %entry, %for.cond16.preheader, %for.cond20.preheader.lr.ph, %for.cond57.preheader.lr.ph, %for.cond53.preheader %.lcssa341345 = phi i32 [ %20, %for.cond53.preheader ], [ %20, %for.cond57.preheader.lr.ph ], [ %20, %for.cond20.preheader.lr.ph ], [ %20, %for.cond16.preheader ], [ %0, %entry ], [ %20, %for.cond57.for.inc82_crit_edge.us ] %sub86 = add nsw i32 %.lcssa341345, -1 %cmp87291.not = icmp eq i32 %sub86, 31 br i1 %cmp87291.not, label %for.end151, label %for.body89.lr.ph for.body89.lr.ph: ; preds = %for.cond85.preheader %shl = shl nuw i32 1, %sub86 %cmp94276 = icmp sgt i32 %.lcssa341345, 1 %29 = load i32, ptr %w, align 4, !tbaa !16 %cmp116286 = icmp slt i32 %29, 1 %30 = load i32, ptr %kk, align 4 %smax = call i32 @llvm.smax.i32(i32 %shl, i32 1) %wide.trip.count336 = zext i32 %29 to i64 br label %for.body89 for.body89: ; preds = %for.body89.lr.ph, %for.end147 %i.3293 = phi i32 [ 0, %for.body89.lr.ph ], [ %inc150, %for.end147 ] %r.0292 = phi i32 [ 1072114514, %for.body89.lr.ph ], [ %a.b.i, %for.end147 ] %tobool.not5.i = icmp eq i32 %i.3293, 0 br i1 %tobool.not5.i, label %dsumb.exit, label %while.body.i while.body.i: ; preds = %for.body89, %while.body.i %r.07.i = phi i32 [ %add.i, %while.body.i ], [ 0, %for.body89 ] %x.addr.06.i = phi i32 [ %div.i, %while.body.i ], [ %i.3293, %for.body89 ] %rem.i = srem i32 %x.addr.06.i, 2 %add.i = add nsw i32 %rem.i, %r.07.i %div.i = sdiv i32 %x.addr.06.i, 2 %x.addr.06.i.off = add nsw i32 %x.addr.06.i, 1 %tobool.not.i = icmp ult i32 %x.addr.06.i.off, 3 br i1 %tobool.not.i, label %dsumb.exit, label %while.body.i, !llvm.loop !15 dsumb.exit: ; preds = %while.body.i, %for.body89 %r.0.lcssa.i = phi i32 [ 0, %for.body89 ], [ %add.i, %while.body.i ] store i32 0, ptr %a, align 16, !tbaa !16 br i1 %cmp94276, label %for.body96, label %for.end110.thread for.body96: ; preds = %dsumb.exit, %for.inc108 %t.0278 = phi i32 [ %t.1, %for.inc108 ], [ 0, %dsumb.exit ] %j.3277 = phi i32 [ %inc109.pre-phi, %for.inc108 ], [ 0, %dsumb.exit ] %shl97 = shl nuw i32 1, %j.3277 %and = and i32 %shl97, %i.3293 %cmp98.not = icmp eq i32 %and, 0 br i1 %cmp98.not, label %for.body96.for.inc108_crit_edge, label %if.then100 for.body96.for.inc108_crit_edge: ; preds = %for.body96 %.pre = add nuw nsw i32 %j.3277, 1 br label %for.inc108 if.then100: ; preds = %for.body96 %idxprom101 = sext i32 %t.0278 to i64 %arrayidx102 = getelementptr inbounds [16 x i32], ptr %b, i64 0, i64 %idxprom101 store i32 %j.3277, ptr %arrayidx102, align 4, !tbaa !16 %inc103 = add nsw i32 %t.0278, 1 %add104 = add nuw nsw i32 %j.3277, 1 %idxprom105 = sext i32 %inc103 to i64 %arrayidx106 = getelementptr inbounds [16 x i32], ptr %a, i64 0, i64 %idxprom105 store i32 %add104, ptr %arrayidx106, align 4, !tbaa !16 br label %for.inc108 for.inc108: ; preds = %for.body96.for.inc108_crit_edge, %if.then100 %inc109.pre-phi = phi i32 [ %.pre, %for.body96.for.inc108_crit_edge ], [ %add104, %if.then100 ] %t.1 = phi i32 [ %t.0278, %for.body96.for.inc108_crit_edge ], [ %inc103, %if.then100 ] %exitcond327.not = icmp eq i32 %inc109.pre-phi, %sub86 br i1 %exitcond327.not, label %for.end110, label %for.body96, !llvm.loop !58 for.end110: ; preds = %for.inc108 %idxprom112 = sext i32 %t.1 to i64 %arrayidx113 = getelementptr inbounds [16 x i32], ptr %b, i64 0, i64 %idxprom112 store i32 %sub86, ptr %arrayidx113, align 4, !tbaa !16 %cmp120.not280 = icmp slt i32 %t.1, 0 %or.cond = or i1 %cmp116286, %cmp120.not280 br i1 %or.cond, label %for.end147, label %for.cond119.preheader.preheader for.end110.thread: ; preds = %dsumb.exit store i32 %sub86, ptr %b, align 16, !tbaa !16 br i1 %cmp116286, label %for.end147, label %for.cond119.preheader.preheader for.cond119.preheader.preheader: ; preds = %for.end110, %for.end110.thread %t.0.lcssa356359 = phi i32 [ 0, %for.end110.thread ], [ %t.1, %for.end110 ] %31 = add nuw i32 %t.0.lcssa356359, 1 %wide.trip.count331 = zext i32 %31 to i64 br label %for.cond119.preheader for.cond119.preheader: ; preds = %for.cond119.preheader.preheader, %for.cond119.for.inc145_crit_edge %indvars.iv333 = phi i64 [ 0, %for.cond119.preheader.preheader ], [ %indvars.iv.next334, %for.cond119.for.inc145_crit_edge ] %st.0289 = phi i32 [ 0, %for.cond119.preheader.preheader ], [ %spec.select213, %for.cond119.for.inc145_crit_edge ] %c.0288 = phi i32 [ %r.0.lcssa.i, %for.cond119.preheader.preheader ], [ %c.3, %for.cond119.for.inc145_crit_edge ] %32 = trunc i64 %indvars.iv333 to i32 br label %for.body122 for.body122: ; preds = %for.cond119.preheader, %cbz.exit252 %indvars.iv328 = phi i64 [ 0, %for.cond119.preheader ], [ %indvars.iv.next329, %cbz.exit252 ] %st.1283 = phi i32 [ %st.0289, %for.cond119.preheader ], [ %spec.select213, %cbz.exit252 ] %c.1282 = phi i32 [ %c.0288, %for.cond119.preheader ], [ %c.3, %cbz.exit252 ] %arrayidx124 = getelementptr inbounds [16 x i32], ptr %a, i64 0, i64 %indvars.iv328 %33 = load i32, ptr %arrayidx124, align 4, !tbaa !16 %arrayidx126 = getelementptr inbounds [16 x i32], ptr %b, i64 0, i64 %indvars.iv328 %34 = load i32, ptr %arrayidx126, align 4, !tbaa !16 %cmp.i = icmp sgt i32 %33, %34 %35 = sext i32 %st.1283 to i64 %cmp1.i = icmp slt i64 %indvars.iv333, %35 %or.cond76.i = or i1 %cmp1.i, %cmp.i br i1 %or.cond76.i, label %cbz.exit, label %if.end.i if.end.i: ; preds = %for.body122 %cmp3.i = icmp eq i32 %st.1283, 0 %36 = or i32 %33, %st.1283 %or.cond.i = icmp eq i32 %36, 0 br i1 %or.cond.i, label %if.then4.i, label %if.else.i if.then4.i: ; preds = %if.end.i %idxprom.i = sext i32 %34 to i64 %arrayidx6.i = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom.i, i64 %indvars.iv333 %37 = load i32, ptr %arrayidx6.i, align 4, !tbaa !16 br label %cbz.exit if.else.i: ; preds = %if.end.i %cmp2.i = icmp eq i32 %33, 0 %idxprom9.i = sext i32 %34 to i64 %arrayidx12.i = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom9.i, i64 %indvars.iv333 %38 = load i32, ptr %arrayidx12.i, align 4, !tbaa !16 br i1 %cmp2.i, label %if.then8.i, label %if.else18.i if.then8.i: ; preds = %if.else.i %sub.i = add nsw i32 %st.1283, -1 %idxprom15.i = sext i32 %sub.i to i64 %arrayidx16.i = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom9.i, i64 %idxprom15.i %39 = load i32, ptr %arrayidx16.i, align 4, !tbaa !16 %sub17.i = sub nsw i32 %38, %39 br label %cbz.exit if.else18.i: ; preds = %if.else.i br i1 %cmp3.i, label %if.then20.i, label %if.else31.i if.then20.i: ; preds = %if.else18.i %sub25.i = add nsw i32 %33, -1 %idxprom26.i = sext i32 %sub25.i to i64 %arrayidx29.i = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom26.i, i64 %indvars.iv333 %40 = load i32, ptr %arrayidx29.i, align 4, !tbaa !16 %sub30.i = sub nsw i32 %38, %40 br label %cbz.exit if.else31.i: ; preds = %if.else18.i %sub38.i = add nsw i32 %st.1283, -1 %idxprom39.i = sext i32 %sub38.i to i64 %arrayidx40.i = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom9.i, i64 %idxprom39.i %41 = load i32, ptr %arrayidx40.i, align 4, !tbaa !16 %sub42.i = add nsw i32 %33, -1 %idxprom43.i = sext i32 %sub42.i to i64 %arrayidx46.i = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom43.i, i64 %indvars.iv333 %42 = load i32, ptr %arrayidx46.i, align 4, !tbaa !16 %arrayidx53.i = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom43.i, i64 %idxprom39.i %43 = load i32, ptr %arrayidx53.i, align 4, !tbaa !16 %44 = add i32 %41, %42 %sub47.i = sub i32 %38, %44 %add.i214 = add nsw i32 %sub47.i, %43 br label %cbz.exit cbz.exit: ; preds = %for.body122, %if.then4.i, %if.then8.i, %if.then20.i, %if.else31.i %retval.0.i = phi i32 [ %37, %if.then4.i ], [ %sub17.i, %if.then8.i ], [ %sub30.i, %if.then20.i ], [ %add.i214, %if.else31.i ], [ 0, %for.body122 ] %cmp128 = icmp sgt i32 %retval.0.i, %30 %inc131 = zext i1 %cmp128 to i32 %spec.select = add nsw i32 %c.1282, %inc131 %spec.select213 = select i1 %cmp128, i32 %32, i32 %st.1283 %45 = sext i32 %spec.select213 to i64 %cmp1.i216 = icmp slt i64 %indvars.iv333, %45 %or.cond76.i217 = or i1 %cmp.i, %cmp1.i216 br i1 %or.cond76.i217, label %cbz.exit252, label %if.end.i218 if.end.i218: ; preds = %cbz.exit %cmp3.i219 = icmp eq i32 %spec.select213, 0 %46 = or i32 %spec.select213, %33 %or.cond.i220 = icmp eq i32 %46, 0 br i1 %or.cond.i220, label %if.then4.i248, label %if.else.i221 if.then4.i248: ; preds = %if.end.i218 %idxprom.i249 = sext i32 %34 to i64 %arrayidx6.i251 = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom.i249, i64 %indvars.iv333 %47 = load i32, ptr %arrayidx6.i251, align 4, !tbaa !16 br label %cbz.exit252 if.else.i221: ; preds = %if.end.i218 %cmp2.i222 = icmp eq i32 %33, 0 %idxprom9.i223 = sext i32 %34 to i64 %arrayidx12.i225 = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom9.i223, i64 %indvars.iv333 %48 = load i32, ptr %arrayidx12.i225, align 4, !tbaa !16 br i1 %cmp2.i222, label %if.then8.i243, label %if.else18.i226 if.then8.i243: ; preds = %if.else.i221 %sub.i244 = add nsw i32 %spec.select213, -1 %idxprom15.i245 = sext i32 %sub.i244 to i64 %arrayidx16.i246 = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom9.i223, i64 %idxprom15.i245 %49 = load i32, ptr %arrayidx16.i246, align 4, !tbaa !16 %sub17.i247 = sub nsw i32 %48, %49 br label %cbz.exit252 if.else18.i226: ; preds = %if.else.i221 br i1 %cmp3.i219, label %if.then20.i238, label %if.else31.i227 if.then20.i238: ; preds = %if.else18.i226 %sub25.i239 = add nsw i32 %33, -1 %idxprom26.i240 = sext i32 %sub25.i239 to i64 %arrayidx29.i241 = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom26.i240, i64 %indvars.iv333 %50 = load i32, ptr %arrayidx29.i241, align 4, !tbaa !16 %sub30.i242 = sub nsw i32 %48, %50 br label %cbz.exit252 if.else31.i227: ; preds = %if.else18.i226 %sub38.i228 = add nsw i32 %spec.select213, -1 %idxprom39.i229 = sext i32 %sub38.i228 to i64 %arrayidx40.i230 = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom9.i223, i64 %idxprom39.i229 %51 = load i32, ptr %arrayidx40.i230, align 4, !tbaa !16 %sub42.i231 = add nsw i32 %33, -1 %idxprom43.i232 = sext i32 %sub42.i231 to i64 %arrayidx46.i233 = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom43.i232, i64 %indvars.iv333 %52 = load i32, ptr %arrayidx46.i233, align 4, !tbaa !16 %arrayidx53.i234 = getelementptr inbounds [16 x [1024 x i32]], ptr @bsum, i64 0, i64 %idxprom43.i232, i64 %idxprom39.i229 %53 = load i32, ptr %arrayidx53.i234, align 4, !tbaa !16 %54 = add i32 %51, %52 %sub47.i235 = sub i32 %48, %54 %add.i236 = add nsw i32 %sub47.i235, %53 br label %cbz.exit252 cbz.exit252: ; preds = %cbz.exit, %if.then4.i248, %if.then8.i243, %if.then20.i238, %if.else31.i227 %retval.0.i237 = phi i32 [ %47, %if.then4.i248 ], [ %sub17.i247, %if.then8.i243 ], [ %sub30.i242, %if.then20.i238 ], [ %add.i236, %if.else31.i227 ], [ 0, %cbz.exit ] %cmp138 = icmp sgt i32 %retval.0.i237, %30 %c.3 = select i1 %cmp138, i32 1072114514, i32 %spec.select %indvars.iv.next329 = add nuw nsw i64 %indvars.iv328, 1 %exitcond332.not = icmp eq i64 %indvars.iv.next329, %wide.trip.count331 br i1 %exitcond332.not, label %for.cond119.for.inc145_crit_edge, label %for.body122, !llvm.loop !59 for.cond119.for.inc145_crit_edge: ; preds = %cbz.exit252 %indvars.iv.next334 = add nuw nsw i64 %indvars.iv333, 1 %exitcond337.not = icmp eq i64 %indvars.iv.next334, %wide.trip.count336 br i1 %exitcond337.not, label %for.end147, label %for.cond119.preheader, !llvm.loop !60 for.end147: ; preds = %for.cond119.for.inc145_crit_edge, %for.end110.thread, %for.end110 %c.0.lcssa = phi i32 [ %r.0.lcssa.i, %for.end110 ], [ %r.0.lcssa.i, %for.end110.thread ], [ %c.3, %for.cond119.for.inc145_crit_edge ] %a.b.i = call i32 @llvm.smin.i32(i32 %c.0.lcssa, i32 %r.0292) %inc150 = add nuw nsw i32 %i.3293, 1 %exitcond338.not = icmp eq i32 %inc150, %smax br i1 %exitcond338.not, label %for.end151, label %for.body89, !llvm.loop !61 for.end151: ; preds = %for.end147, %for.cond85.preheader %r.0.lcssa = phi i32 [ 1072114514, %for.cond85.preheader ], [ %a.b.i, %for.end147 ] %call152 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %r.0.lcssa) call void @llvm.lifetime.end.p0(i64 65536, ptr nonnull %bf) #18 call void @llvm.lifetime.end.p0(i64 16384, ptr nonnull %s) #18 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %kk) #18 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #18 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #18 call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %b) #18 call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %a) #18 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #15 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #16 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #16 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #16 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #16 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #16 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.abs.i64(i64, i1 immarg) #16 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.mul.v4i32(<4 x i32>) #16 attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #4 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { 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 #7 = { 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 #8 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #10 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #11 = { 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 #12 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #13 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #14 = { mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #15 = { nofree nounwind } attributes #16 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #17 = { nounwind willreturn memory(read) } attributes #18 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = distinct !{!5, !6} !6 = !{!"llvm.loop.mustprogress"} !7 = distinct !{!7, !6} !8 = distinct !{!8, !6, !9, !10} !9 = !{!"llvm.loop.isvectorized", i32 1} !10 = !{!"llvm.loop.unroll.runtime.disable"} !11 = distinct !{!11, !6, !10, !9} !12 = distinct !{!12, !6, !9, !10} !13 = distinct !{!13, !6, !10, !9} !14 = distinct !{!14, !6} !15 = distinct !{!15, !6} !16 = !{!17, !17, i64 0} !17 = !{!"int", !18, i64 0} !18 = !{!"omnipotent char", !19, i64 0} !19 = !{!"Simple C/C++ TBAA"} !20 = distinct !{!20, !6} !21 = distinct !{!21, !6} !22 = distinct !{!22, !6} !23 = distinct !{!23, !24} !24 = !{!"llvm.loop.unroll.disable"} !25 = distinct !{!25, !6} !26 = distinct !{!26, !24} !27 = distinct !{!27, !6} !28 = distinct !{!28, !6} !29 = !{!30, !30, i64 0} !30 = !{!"long long", !18, i64 0} !31 = !{!32, !32, i64 0} !32 = !{!"double", !18, i64 0} !33 = !{!18, !18, i64 0} !34 = distinct !{!34, !6, !9, !10} !35 = distinct !{!35, !6, !10, !9} !36 = distinct !{!36, !6} !37 = distinct !{!37, !6} !38 = distinct !{!38, !6} !39 = distinct !{!39, !6, !40} !40 = !{!"llvm.loop.peeled.count", i32 1} !41 = distinct !{!41, !6, !9, !10} !42 = distinct !{!42, !6, !10, !9} !43 = distinct !{!43, !6} !44 = !{!45, !17, i64 0} !45 = !{!"", !17, i64 0, !17, i64 4} !46 = distinct !{!46, !6, !9, !10} !47 = !{!45, !17, i64 4} !48 = distinct !{!48, !6, !10, !9} !49 = distinct !{!49, !6} !50 = distinct !{!50, !6, !40} !51 = distinct !{!51, !6} !52 = distinct !{!52, !6, !9, !10} !53 = distinct !{!53, !6, !10, !9} !54 = distinct !{!54, !6} !55 = distinct !{!55, !6, !9, !10} !56 = distinct !{!56, !6, !10, !9} !57 = distinct !{!57, !6} !58 = distinct !{!58, !6} !59 = distinct !{!59, !6} !60 = distinct !{!60, !6} !61 = distinct !{!61, !6}
#include <stdio.h> #include <string.h> int main(void){ char a[102],b[102]; int A,B,i; scanf("%s\n%s",a,b); A=strlen(a); B=strlen(b); if(A>B) printf("GREATER"); else if (A<B) printf("LESS"); else{ for(i=0;i<=A-1;i++){ if(a[i]>b[i]){ printf("GREATER"); break; } if(a[i]<b[i]){ printf("LESS"); break; } if(i==A-1) printf("EQUAL"); } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158706/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158706/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%s\0A%s\00", align 1 @.str.1 = private unnamed_addr constant [8 x i8] c"GREATER\00", align 1 @.str.2 = private unnamed_addr constant [5 x i8] c"LESS\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"EQUAL\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca [102 x i8], align 16 %b = alloca [102 x i8], align 16 call void @llvm.lifetime.start.p0(i64 102, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 102, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %call3 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %a) #5 %conv = trunc i64 %call3 to i32 %call5 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %b) #5 %conv6 = trunc i64 %call5 to i32 %cmp = icmp sgt i32 %conv, %conv6 br i1 %cmp, label %if.end42.sink.split, label %if.else if.else: ; preds = %entry %cmp9 = icmp slt i32 %conv, %conv6 br i1 %cmp9, label %if.end42.sink.split, label %for.cond.preheader for.cond.preheader: ; preds = %if.else %cmp14.not.not53 = icmp sgt i32 %conv, 0 br i1 %cmp14.not.not53, label %for.body.preheader, label %if.end42 for.body.preheader: ; preds = %for.cond.preheader %sub = add i64 %call3, 4294967295 %0 = and i64 %sub, 4294967295 %wide.trip.count = and i64 %call3, 4294967295 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 [102 x i8], ptr %a, i64 0, i64 %indvars.iv %1 = load i8, ptr %arrayidx, align 1, !tbaa !5 %arrayidx18 = getelementptr inbounds [102 x i8], ptr %b, i64 0, i64 %indvars.iv %2 = load i8, ptr %arrayidx18, align 1, !tbaa !5 %cmp20 = icmp sgt i8 %1, %2 br i1 %cmp20, label %if.end42.sink.split, label %if.end if.end: ; preds = %for.body %cmp30 = icmp slt i8 %1, %2 br i1 %cmp30, label %if.end42.sink.split, label %if.end34 if.end34: ; preds = %if.end %cmp36 = icmp eq i64 %indvars.iv, %0 br i1 %cmp36, label %if.then38, label %for.inc if.then38: ; preds = %if.end34 %call39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3) br label %for.inc for.inc: ; preds = %if.end34, %if.then38 %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 %if.end42, label %for.body, !llvm.loop !8 if.end42.sink.split: ; preds = %if.end, %for.body, %if.else, %entry %.str.2.sink = phi ptr [ @.str.1, %entry ], [ @.str.2, %if.else ], [ @.str.1, %for.body ], [ @.str.2, %if.end ] %call12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) br label %if.end42 if.end42: ; preds = %for.inc, %if.end42.sink.split, %for.cond.preheader call void @llvm.lifetime.end.p0(i64 102, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 102, 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(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } attributes #5 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main() { int t,l,n,i,j,k; long long sum1,sum2; scanf("%d",&t); for(l=1;l<=t;l++){ scanf("%d",&n); long long a[n]; if(n%4==0){ printf("YES\n"); sum1=0; sum2=0; k=2; j=1; for(i=0;i<(n/2);i++){ a[i]=k; sum1+=k; k+=2; } for(i=(n/2);i<(n-1);i++){ a[i]=j; sum2+=j; j+=2; } a[n-1]=sum1-sum2; for(i=0;i<n;i++) printf("%lld ",a[i]); printf("\n"); } else printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15875/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15875/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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.2 = private unnamed_addr constant [6 x i8] c"%lld \00", align 1 @str = private unnamed_addr constant [3 x i8] c"NO\00", align 1 @str.5 = 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) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %cmp.not72 = icmp slt i32 %0, 1 br i1 %cmp.not72, label %for.end41, label %for.body for.body: ; preds = %entry, %if.end %l.073 = phi i32 [ %inc40, %if.end ], [ 1, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = zext i32 %1 to i64 %3 = call ptr @llvm.stacksave.p0() %vla = alloca i64, i64 %2, align 16 %4 = load i32, ptr %n, align 4, !tbaa !5 %5 = and i32 %4, 3 %cmp2 = icmp eq i32 %5, 0 br i1 %cmp2, label %if.then, label %if.else if.then: ; preds = %for.body %puts57 = call i32 @puts(ptr nonnull dereferenceable(1) @str.5) %6 = load i32, ptr %n, align 4, !tbaa !5 %div = sdiv i32 %6, 2 %cmp558 = icmp sgt i32 %6, 1 br i1 %cmp558, label %for.body6.preheader, label %for.cond10.preheader for.body6.preheader: ; preds = %if.then %wide.trip.count = zext i32 %div to i64 %min.iters.check97 = icmp ult i32 %div, 4 br i1 %min.iters.check97, label %for.body6.preheader117, label %vector.ph98 vector.ph98: ; preds = %for.body6.preheader %n.vec100 = and i64 %wide.trip.count, 4294967292 %7 = shl nuw nsw i64 %n.vec100, 1 %ind.end101 = or i64 %7, 2 br label %vector.body105 vector.body105: ; preds = %vector.body105, %vector.ph98 %index106 = phi i64 [ 0, %vector.ph98 ], [ %index.next113, %vector.body105 ] %vec.ind107 = phi <2 x i64> [ <i64 2, i64 4>, %vector.ph98 ], [ %vec.ind.next110, %vector.body105 ] %vec.phi111 = phi <2 x i64> [ zeroinitializer, %vector.ph98 ], [ %10, %vector.body105 ] %vec.phi112 = phi <2 x i64> [ zeroinitializer, %vector.ph98 ], [ %11, %vector.body105 ] %step.add108 = add <2 x i64> %vec.ind107, <i64 4, i64 4> %8 = getelementptr inbounds i64, ptr %vla, i64 %index106 store <2 x i64> %vec.ind107, ptr %8, align 16, !tbaa !9 %9 = getelementptr inbounds i64, ptr %8, i64 2 store <2 x i64> %step.add108, ptr %9, align 16, !tbaa !9 %10 = add <2 x i64> %vec.phi111, %vec.ind107 %11 = add <2 x i64> %vec.phi112, %step.add108 %index.next113 = add nuw i64 %index106, 4 %vec.ind.next110 = add <2 x i64> %vec.ind107, <i64 8, i64 8> %12 = icmp eq i64 %index.next113, %n.vec100 br i1 %12, label %middle.block95, label %vector.body105, !llvm.loop !11 middle.block95: ; preds = %vector.body105 %bin.rdx114 = add <2 x i64> %11, %10 %13 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx114) %cmp.n104 = icmp eq i64 %n.vec100, %wide.trip.count br i1 %cmp.n104, label %for.cond10.preheader, label %for.body6.preheader117 for.body6.preheader117: ; preds = %for.body6.preheader, %middle.block95 %indvars.iv74.ph = phi i64 [ 2, %for.body6.preheader ], [ %ind.end101, %middle.block95 ] %indvars.iv.ph = phi i64 [ 0, %for.body6.preheader ], [ %n.vec100, %middle.block95 ] %sum1.060.ph = phi i64 [ 0, %for.body6.preheader ], [ %13, %middle.block95 ] br label %for.body6 for.cond10.preheader: ; preds = %for.body6, %middle.block95, %if.then %sum1.0.lcssa = phi i64 [ 0, %if.then ], [ %13, %middle.block95 ], [ %add, %for.body6 ] %sub = add nsw i32 %6, -1 %cmp1164 = icmp slt i32 %div, %sub br i1 %cmp1164, label %for.body13.preheader, label %for.cond10.preheader.for.end22_crit_edge for.cond10.preheader.for.end22_crit_edge: ; preds = %for.cond10.preheader %.pre = sext i32 %sub to i64 br label %for.end22 for.body13.preheader: ; preds = %for.cond10.preheader %14 = sext i32 %div to i64 %wide.trip.count86 = sext i32 %sub to i64 %15 = sub nsw i64 %wide.trip.count86, %14 %min.iters.check = icmp ult i64 %15, 4 br i1 %min.iters.check, label %for.body13.preheader116, label %vector.ph vector.ph: ; preds = %for.body13.preheader %n.vec = and i64 %15, -4 %16 = shl nsw i64 %n.vec, 1 %ind.end = or i64 %16, 1 %ind.end91 = add nsw i64 %n.vec, %14 %invariant.gep = getelementptr i64, ptr %vla, i64 %14 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.ind = phi <2 x i64> [ <i64 1, i64 3>, %vector.ph ], [ %vec.ind.next, %vector.body ] %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %18, %vector.body ] %vec.phi94 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %19, %vector.body ] %step.add = add <2 x i64> %vec.ind, <i64 4, i64 4> %gep = getelementptr i64, ptr %invariant.gep, i64 %index store <2 x i64> %vec.ind, ptr %gep, align 8, !tbaa !9 %17 = getelementptr inbounds i64, ptr %gep, i64 2 store <2 x i64> %step.add, ptr %17, align 8, !tbaa !9 %18 = add <2 x i64> %vec.phi, %vec.ind %19 = add <2 x i64> %vec.phi94, %step.add %index.next = add nuw i64 %index, 4 %vec.ind.next = add <2 x i64> %vec.ind, <i64 8, i64 8> %20 = icmp eq i64 %index.next, %n.vec br i1 %20, label %middle.block, label %vector.body, !llvm.loop !15 middle.block: ; preds = %vector.body %bin.rdx = add <2 x i64> %19, %18 %21 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx) %cmp.n = icmp eq i64 %15, %n.vec br i1 %cmp.n, label %for.end22, label %for.body13.preheader116 for.body13.preheader116: ; preds = %for.body13.preheader, %middle.block %indvars.iv81.ph = phi i64 [ 1, %for.body13.preheader ], [ %ind.end, %middle.block ] %indvars.iv79.ph = phi i64 [ %14, %for.body13.preheader ], [ %ind.end91, %middle.block ] %sum2.066.ph = phi i64 [ 0, %for.body13.preheader ], [ %21, %middle.block ] br label %for.body13 for.body6: ; preds = %for.body6.preheader117, %for.body6 %indvars.iv74 = phi i64 [ %indvars.iv.next75, %for.body6 ], [ %indvars.iv74.ph, %for.body6.preheader117 ] %indvars.iv = phi i64 [ %indvars.iv.next, %for.body6 ], [ %indvars.iv.ph, %for.body6.preheader117 ] %sum1.060 = phi i64 [ %add, %for.body6 ], [ %sum1.060.ph, %for.body6.preheader117 ] %arrayidx = getelementptr inbounds i64, ptr %vla, i64 %indvars.iv store i64 %indvars.iv74, ptr %arrayidx, align 8, !tbaa !9 %add = add nuw nsw i64 %sum1.060, %indvars.iv74 %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 2 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond10.preheader, label %for.body6, !llvm.loop !16 for.body13: ; preds = %for.body13.preheader116, %for.body13 %indvars.iv81 = phi i64 [ %indvars.iv.next82, %for.body13 ], [ %indvars.iv81.ph, %for.body13.preheader116 ] %indvars.iv79 = phi i64 [ %indvars.iv.next80, %for.body13 ], [ %indvars.iv79.ph, %for.body13.preheader116 ] %sum2.066 = phi i64 [ %add18, %for.body13 ], [ %sum2.066.ph, %for.body13.preheader116 ] %arrayidx16 = getelementptr inbounds i64, ptr %vla, i64 %indvars.iv79 store i64 %indvars.iv81, ptr %arrayidx16, align 8, !tbaa !9 %add18 = add nuw nsw i64 %sum2.066, %indvars.iv81 %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 2 %indvars.iv.next80 = add nsw i64 %indvars.iv79, 1 %exitcond87.not = icmp eq i64 %indvars.iv.next80, %wide.trip.count86 br i1 %exitcond87.not, label %for.end22, label %for.body13, !llvm.loop !17 for.end22: ; preds = %for.body13, %middle.block, %for.cond10.preheader.for.end22_crit_edge %idxprom25.pre-phi = phi i64 [ %.pre, %for.cond10.preheader.for.end22_crit_edge ], [ %wide.trip.count86, %middle.block ], [ %wide.trip.count86, %for.body13 ] %sum2.0.lcssa = phi i64 [ 0, %for.cond10.preheader.for.end22_crit_edge ], [ %21, %middle.block ], [ %add18, %for.body13 ] %sub23 = sub nsw i64 %sum1.0.lcssa, %sum2.0.lcssa %arrayidx26 = getelementptr inbounds i64, ptr %vla, i64 %idxprom25.pre-phi store i64 %sub23, ptr %arrayidx26, align 8, !tbaa !9 %cmp2870 = icmp sgt i32 %6, 0 br i1 %cmp2870, label %for.body30, label %for.end36 for.body30: ; preds = %for.end22, %for.body30 %indvars.iv88 = phi i64 [ %indvars.iv.next89, %for.body30 ], [ 0, %for.end22 ] %arrayidx32 = getelementptr inbounds i64, ptr %vla, i64 %indvars.iv88 %22 = load i64, ptr %arrayidx32, align 8, !tbaa !9 %call33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %22) %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1 %23 = load i32, ptr %n, align 4, !tbaa !5 %24 = sext i32 %23 to i64 %cmp28 = icmp slt i64 %indvars.iv.next89, %24 br i1 %cmp28, label %for.body30, label %for.end36, !llvm.loop !18 for.end36: ; preds = %for.body30, %for.end22 %putchar = call i32 @putchar(i32 10) br label %if.end if.else: ; preds = %for.body %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end if.end: ; preds = %if.else, %for.end36 call void @llvm.stackrestore.p0(ptr %3) %inc40 = add nuw nsw i32 %l.073, 1 %25 = load i32, ptr %t, align 4, !tbaa !5 %cmp.not.not = icmp slt i32 %l.073, %25 br i1 %cmp.not.not, label %for.body, label %for.end41, !llvm.loop !19 for.end41: ; preds = %if.end, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #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 nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #5 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nofree nounwind } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"long long", !7, i64 0} !11 = distinct !{!11, !12, !13, !14} !12 = !{!"llvm.loop.mustprogress"} !13 = !{!"llvm.loop.isvectorized", i32 1} !14 = !{!"llvm.loop.unroll.runtime.disable"} !15 = distinct !{!15, !12, !13, !14} !16 = distinct !{!16, !12, !14, !13} !17 = distinct !{!17, !12, !14, !13} !18 = distinct !{!18, !12} !19 = distinct !{!19, !12}
#include <stdio.h> #include <string.h> int main() { char A[110], B[110]; int Alength, Blength; int i; scanf("%s %s", A, B); Alength = strlen(A); Blength = strlen(B); if(Alength < Blength) { printf("LESS\n"); return 0; } else if(Alength > Blength) { printf("GREATER\n"); return 0; } else { for(i = 0; i < Alength; i++) { if(A[i] < B[i]) { printf("LESS\n"); return 0; } else if(A[i] > B[i]) { printf("GREATER\n"); return 0; } } } printf("EQUAL\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158807/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158807/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%s %s\00", align 1 @str = private unnamed_addr constant [6 x i8] c"EQUAL\00", align 1 @str.6 = private unnamed_addr constant [8 x i8] c"GREATER\00", align 1 @str.7 = private unnamed_addr constant [5 x i8] c"LESS\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %A = alloca [110 x i8], align 16 %B = alloca [110 x i8], align 16 call void @llvm.lifetime.start.p0(i64 110, ptr nonnull %A) #5 call void @llvm.lifetime.start.p0(i64 110, ptr nonnull %B) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B) %call3 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %A) #6 %conv = trunc i64 %call3 to i32 %call5 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %B) #6 %conv6 = trunc i64 %call5 to i32 %cmp = icmp slt i32 %conv, %conv6 br i1 %cmp, label %cleanup, label %if.else if.else: ; preds = %entry %cmp9 = icmp sgt i32 %conv, %conv6 br i1 %cmp9, label %cleanup, label %for.cond.preheader for.cond.preheader: ; preds = %if.else %cmp1455 = icmp sgt i32 %conv, 0 br i1 %cmp1455, label %for.body.preheader, label %cleanup for.body.preheader: ; preds = %for.cond.preheader %wide.trip.count = and i64 %call3, 4294967295 br label %for.body for.cond: ; preds = %if.else24 %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 %cleanup, label %for.body, !llvm.loop !5 for.body: ; preds = %for.body.preheader, %for.cond %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.cond ] %arrayidx = getelementptr inbounds [110 x i8], ptr %A, i64 0, i64 %indvars.iv %0 = load i8, ptr %arrayidx, align 1, !tbaa !7 %arrayidx18 = getelementptr inbounds [110 x i8], ptr %B, i64 0, i64 %indvars.iv %1 = load i8, ptr %arrayidx18, align 1, !tbaa !7 %cmp20 = icmp slt i8 %0, %1 br i1 %cmp20, label %cleanup, label %if.else24 if.else24: ; preds = %for.body %cmp31 = icmp sgt i8 %0, %1 br i1 %cmp31, label %cleanup, label %for.cond cleanup: ; preds = %for.cond, %if.else24, %for.body, %for.cond.preheader, %if.else, %entry %str.sink = phi ptr [ @str.7, %entry ], [ @str.6, %if.else ], [ @str, %for.cond.preheader ], [ @str.7, %for.body ], [ @str.6, %if.else24 ], [ @str, %for.cond ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 110, ptr nonnull %B) #5 call void @llvm.lifetime.end.p0(i64 110, ptr nonnull %A) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } attributes #6 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = distinct !{!5, !6} !6 = !{!"llvm.loop.mustprogress"} !7 = !{!8, !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> int in(void){ int i;scanf("%d",&i); return i; } long long llin(void){ long long i;scanf("%lld",&i); return i; } void print(int a){ printf("%d\n",a); } void llprint(long long a){ printf("%lld\n",a); } void print2(int a,int b){ printf("%d %d\n",a,b); } long long max(long long a,long long b){ return a>b?a:b; } long long min(long long a,long long b){ return a<b?a:b; } int main(void){ char a[102],b[102]; scanf("%s",a); scanf("%s",b); if(strlen(a)!=strlen(b)){ puts(strlen(a)>strlen(b)?"GREATER":"LESS"); } else{ int i; for(i=0;i<strlen(a);i++){ if(a[i]!=b[i]){ puts(a[i]>b[i]?"GREATER":"LESS"); break; } }if(i==strlen(a))puts("EQUAL"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158865/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158865/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 @.str.4 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 @.str.5 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.6 = private unnamed_addr constant [8 x i8] c"GREATER\00", align 1 @.str.7 = private unnamed_addr constant [5 x i8] c"LESS\00", align 1 @.str.8 = private unnamed_addr constant [6 x i8] c"EQUAL\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @in() local_unnamed_addr #0 { entry: %i = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %i) %0 = load i32, ptr %i, align 4, !tbaa !5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #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 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 i64 @llin() local_unnamed_addr #0 { entry: %i = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %i) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %i) %0 = load i64, ptr %i, align 8, !tbaa !9 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %i) #6 ret i64 %0 } ; Function Attrs: nofree nounwind uwtable define dso_local void @print(i32 noundef %a) local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %a) ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local void @llprint(i64 noundef %a) local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %a) ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @print2(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %a, i32 noundef %b) ret void } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @max(i64 noundef %a, i64 noundef %b) local_unnamed_addr #3 { entry: %cond = tail call i64 @llvm.smax.i64(i64 %a, i64 %b) ret i64 %cond } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @min(i64 noundef %a, i64 noundef %b) local_unnamed_addr #3 { entry: %cond = tail call i64 @llvm.smin.i64(i64 %a, i64 %b) ret i64 %cond } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca [102 x i8], align 16 %b = alloca [102 x i8], align 16 call void @llvm.lifetime.start.p0(i64 102, ptr nonnull %a) #6 call void @llvm.lifetime.start.p0(i64 102, ptr nonnull %b) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %a) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %b) %call4 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %a) #7 %call6 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %b) #7 %cmp.not = icmp eq i64 %call4, %call6 br i1 %cmp.not, label %for.cond.preheader, label %if.then for.cond.preheader: ; preds = %entry %cmp1552.not = icmp eq i64 %call4, 0 br i1 %cmp1552.not, label %for.end, label %for.body if.then: ; preds = %entry %cmp11 = icmp ugt i64 %call4, %call6 %cond = select i1 %cmp11, ptr @.str.6, ptr @.str.7 br label %if.end42.sink.split for.cond: ; preds = %for.body %indvars.iv.next = add nuw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %call4 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !11 for.body: ; preds = %for.cond.preheader, %for.cond %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond ], [ 0, %for.cond.preheader ] %arrayidx = getelementptr inbounds [102 x i8], ptr %a, i64 0, i64 %indvars.iv %0 = load i8, ptr %arrayidx, align 1, !tbaa !13 %arrayidx19 = getelementptr inbounds [102 x i8], ptr %b, i64 0, i64 %indvars.iv %1 = load i8, ptr %arrayidx19, align 1, !tbaa !13 %cmp21.not = icmp eq i8 %0, %1 br i1 %cmp21.not, label %for.cond, label %if.then23 if.then23: ; preds = %for.body %cmp30 = icmp sgt i8 %0, %1 %cond32 = select i1 %cmp30, ptr @.str.6, ptr @.str.7 %call33 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %cond32) br label %for.end for.end: ; preds = %for.cond, %for.cond.preheader, %if.then23 %conv50 = phi i64 [ %indvars.iv, %if.then23 ], [ 0, %for.cond.preheader ], [ %call4, %for.cond ] %call36 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %a) #7 %cmp37 = icmp eq i64 %call36, %conv50 br i1 %cmp37, label %if.end42.sink.split, label %if.end42 if.end42.sink.split: ; preds = %for.end, %if.then %.str.8.sink = phi ptr [ %cond, %if.then ], [ @.str.8, %for.end ] %call40 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.8.sink) br label %if.end42 if.end42: ; preds = %if.end42.sink.split, %for.end call void @llvm.lifetime.end.p0(i64 102, ptr nonnull %b) #6 call void @llvm.lifetime.end.p0(i64 102, ptr nonnull %a) #6 ret i32 0 } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #5 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } attributes #7 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"long long", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = !{!7, !7, i64 0}
#include <stdio.h> #include <math.h> int main(void) { double x = 0; double y = 0; int t_now = 90; int len; int theta; while (1) { scanf("%d,%d", &len, &theta); if (len == 0 && theta == 0) break; x += len * cos(t_now * M_PI / 180); y += len * sin(t_now * M_PI / 180); t_now += theta * -1; } printf("%d\n", (int)x); printf("%d\n", (int)y); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158922/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158922/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %len = alloca i32, align 4 %theta = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %len) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %theta) #5 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %len, ptr noundef nonnull %theta) %0 = load i32, ptr %len, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %theta, 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 %if.end if.end: ; preds = %entry, %if.end %2 = phi i32 [ %12, %if.end ], [ %0, %entry ] %t_now.026 = phi i32 [ %add, %if.end ], [ 90, %entry ] %3 = phi <2 x double> [ %10, %if.end ], [ zeroinitializer, %entry ] %conv2 = sitofp i32 %t_now.026 to double %mul = fmul double %conv2, 0x400921FB54442D18 %div = fdiv double %mul, 1.800000e+02 %call3 = call double @cos(double noundef %div) #5 %4 = load i32, ptr %len, align 4, !tbaa !5 %5 = insertelement <2 x i32> poison, i32 %2, i64 0 %6 = insertelement <2 x i32> %5, i32 %4, i64 1 %7 = sitofp <2 x i32> %6 to <2 x double> %call9 = call double @sin(double noundef %div) #5 %8 = insertelement <2 x double> poison, double %call3, i64 0 %9 = insertelement <2 x double> %8, double %call9, i64 1 %10 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %7, <2 x double> %9, <2 x double> %3) %11 = load i32, ptr %theta, align 4, !tbaa !5 %add = sub i32 %t_now.026, %11 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %len, ptr noundef nonnull %theta) %12 = load i32, ptr %len, align 4, !tbaa !5 %cmp = icmp eq i32 %12, 0 %13 = load i32, ptr %theta, align 4 %cmp1 = icmp eq i32 %13, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end.loopexit, label %if.end while.end.loopexit: ; preds = %if.end %14 = fptosi <2 x double> %10 to <2 x i32> br label %while.end while.end: ; preds = %while.end.loopexit, %entry %15 = phi <2 x i32> [ zeroinitializer, %entry ], [ %14, %while.end.loopexit ] %16 = extractelement <2 x i32> %15, i64 0 %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %16) %17 = extractelement <2 x i32> %15, i64 1 %call15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %17) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %theta) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %len) #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(write) declare double @cos(double noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) declare double @sin(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 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #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(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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <math.h> int main(void) { int d,t; double x=0.0,y=0.0; int ang=90.0; while(1) { scanf("%d,%d",&d,&t); if(d==0 && t==0) break; x+=(double)d*cos((double)ang*M_PI/180.0); y+=(double)d*sin((double)ang*M_PI/180.0); ang-=(double)t; } printf("%d\n%d\n",(int)x,(int)y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158988/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158988/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"%d\0A%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %d = alloca i32, align 4 %t = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #5 %call21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %d, ptr noundef nonnull %t) %0 = load i32, ptr %d, align 4, !tbaa !5 %cmp22 = icmp eq i32 %0, 0 %1 = load i32, ptr %t, align 4 %cmp123 = icmp eq i32 %1, 0 %or.cond24 = select i1 %cmp22, i1 %cmp123, i1 false br i1 %or.cond24, label %while.end, label %if.end if.end: ; preds = %entry, %if.end %2 = phi i32 [ %12, %if.end ], [ %0, %entry ] %ang.027 = phi i32 [ %conv13, %if.end ], [ 90, %entry ] %3 = phi <2 x double> [ %10, %if.end ], [ zeroinitializer, %entry ] %conv2 = sitofp i32 %ang.027 to double %mul = fmul double %conv2, 0x400921FB54442D18 %div = fdiv double %mul, 1.800000e+02 %call3 = call double @cos(double noundef %div) #5 %4 = load i32, ptr %d, align 4, !tbaa !5 %5 = insertelement <2 x i32> poison, i32 %2, i64 0 %6 = insertelement <2 x i32> %5, i32 %4, i64 1 %7 = sitofp <2 x i32> %6 to <2 x double> %call9 = call double @sin(double noundef %div) #5 %8 = insertelement <2 x double> poison, double %call3, i64 0 %9 = insertelement <2 x double> %8, double %call9, i64 1 %10 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %7, <2 x double> %9, <2 x double> %3) %11 = load i32, ptr %t, align 4, !tbaa !5 %conv11 = sitofp i32 %11 to double %sub = fsub double %conv2, %conv11 %conv13 = fptosi double %sub to i32 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %d, ptr noundef nonnull %t) %12 = load i32, ptr %d, align 4, !tbaa !5 %cmp = icmp eq i32 %12, 0 %13 = load i32, ptr %t, align 4 %cmp1 = icmp eq i32 %13, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end.loopexit, label %if.end while.end.loopexit: ; preds = %if.end %14 = fptosi <2 x double> %10 to <2 x i32> br label %while.end while.end: ; preds = %while.end.loopexit, %entry %15 = phi <2 x i32> [ zeroinitializer, %entry ], [ %14, %while.end.loopexit ] %16 = extractelement <2 x i32> %15, i64 0 %17 = extractelement <2 x i32> %15, i64 1 %call16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %16, i32 noundef %17) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #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(write) declare double @cos(double noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) declare double @sin(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 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #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(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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <math.h> //#define DEBUG int main(void) { FILE* fp; #ifdef DEBUG fp=fopen("input.txt","r"); #else fp=stdin; #endif double x=0,y=0,theta=M_PI/2.0; while(1){ //input int hosu,degree; fscanf(fp,"%d,%d\n",&hosu,&degree); if(hosu==0 && degree==0){ break; } //next position x+=(double)hosu*cos(theta); y+=(double)hosu*sin(theta); theta+=-(double)degree*M_PI/180.0; } //result printf("%d\n%d\n",(int)x,(int)y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159037/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159037/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unnamed_addr global ptr, align 8 @.str = private unnamed_addr constant [7 x i8] c"%d,%d\0A\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c"%d\0A%d\0A\00", align 1 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %hosu = alloca i32, align 4 %degree = alloca i32, align 4 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %hosu) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %degree) #6 %call25 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull %hosu, ptr noundef nonnull %degree) #6 %1 = load i32, ptr %hosu, align 4, !tbaa !9 %cmp26 = icmp eq i32 %1, 0 %2 = load i32, ptr %degree, align 4 %cmp127 = icmp eq i32 %2, 0 %or.cond28 = select i1 %cmp26, i1 %cmp127, i1 false br i1 %or.cond28, label %while.end, label %cleanup cleanup: ; preds = %entry, %cleanup %3 = phi i32 [ %14, %cleanup ], [ %1, %entry ] %theta.031 = phi double [ %13, %cleanup ], [ 0x3FF921FB54442D18, %entry ] %4 = phi <2 x double> [ %11, %cleanup ], [ zeroinitializer, %entry ] %call2 = call double @cos(double noundef %theta.031) #6 %5 = load i32, ptr %hosu, align 4, !tbaa !9 %6 = insertelement <2 x i32> poison, i32 %3, i64 0 %7 = insertelement <2 x i32> %6, i32 %5, i64 1 %8 = sitofp <2 x i32> %7 to <2 x double> %call4 = call double @sin(double noundef %theta.031) #6 %9 = insertelement <2 x double> poison, double %call2, i64 0 %10 = insertelement <2 x double> %9, double %call4, i64 1 %11 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %8, <2 x double> %10, <2 x double> %4) %12 = load i32, ptr %degree, align 4, !tbaa !9 %conv5 = sitofp i32 %12 to double %mul = fmul double %conv5, 0x400921FB54442D18 %div = fdiv double %mul, 1.800000e+02 %13 = fsub double %theta.031, %div call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %degree) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %hosu) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %hosu) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %degree) #6 %call = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull %hosu, ptr noundef nonnull %degree) #6 %14 = load i32, ptr %hosu, align 4, !tbaa !9 %cmp = icmp eq i32 %14, 0 %15 = load i32, ptr %degree, align 4 %cmp1 = icmp eq i32 %15, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end.loopexit, label %cleanup while.end.loopexit: ; preds = %cleanup %16 = fptosi <2 x double> %11 to <2 x i32> br label %while.end while.end: ; preds = %while.end.loopexit, %entry %17 = phi <2 x i32> [ zeroinitializer, %entry ], [ %16, %while.end.loopexit ] call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %degree) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %hosu) #6 %18 = extractelement <2 x i32> %17, i64 0 %19 = extractelement <2 x i32> %17, i64 1 %call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %18, i32 noundef %19) ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) declare double @cos(double noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) declare double @sin(double noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { "no-trapping-math"="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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{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> #include<math.h> #define PI 3.14159 int main() { int d,r,t=90; double x = 0,y = 0; do{ scanf("%d%*c%d",&d,&r); x+=d*cos(t/180.0*PI); y+=d*sin(t/180.0*PI); t-=r; }while(d||r); printf("%d\n%d\n",(int)x,(int)y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159101/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159101/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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%*c%d\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c"%d\0A%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %d = alloca i32, align 4 %r = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %r) #5 br label %do.body do.body: ; preds = %do.body, %entry %t.0 = phi i32 [ 90, %entry ], [ %sub, %do.body ] %0 = phi <2 x double> [ zeroinitializer, %entry ], [ %8, %do.body ] %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %d, ptr noundef nonnull %r) %1 = load i32, ptr %d, align 4, !tbaa !5 %conv1 = sitofp i32 %t.0 to double %div = fdiv double %conv1, 1.800000e+02 %mul = fmul double %div, 3.141590e+00 %call2 = call double @cos(double noundef %mul) #5 %2 = load i32, ptr %d, align 4, !tbaa !5 %3 = insertelement <2 x i32> poison, i32 %1, i64 0 %4 = insertelement <2 x i32> %3, i32 %2, i64 1 %5 = sitofp <2 x i32> %4 to <2 x double> %call8 = call double @sin(double noundef %mul) #5 %6 = insertelement <2 x double> poison, double %call2, i64 0 %7 = insertelement <2 x double> %6, double %call8, i64 1 %8 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %5, <2 x double> %7, <2 x double> %0) %9 = load i32, ptr %r, align 4 %sub = sub nsw i32 %t.0, %9 %10 = load i32, ptr %d, align 4, !tbaa !5 %tobool = icmp ne i32 %10, 0 %tobool10 = icmp ne i32 %9, 0 %11 = select i1 %tobool, i1 true, i1 %tobool10 br i1 %11, label %do.body, label %do.end, !llvm.loop !9 do.end: ; preds = %do.body %12 = extractelement <2 x double> %8, i64 0 %conv11 = fptosi double %12 to i32 %13 = extractelement <2 x double> %8, i64 1 %conv12 = fptosi double %13 to i32 %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv11, i32 noundef %conv12) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %r) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #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(write) declare double @cos(double noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) declare double @sin(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 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #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(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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int swap(int x, int y) { int temp; temp = x; x = y; y = temp; return x, y; } int main(void) { int x, y, r; scanf("%d %d", &x, &y); if ( x < y) { swap(x, y); } while ( y > 0) { r = x % y; x = y; y = r; } printf("%d\n", x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159145/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159145/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @swap(i32 noundef returned %x, i32 noundef %y) local_unnamed_addr #0 { entry: ret i32 %x } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #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) %.pr = load i32, ptr %y, align 4, !tbaa !5 %x.promoted = load i32, ptr %x, align 4, !tbaa !5 %cmp26 = icmp sgt i32 %.pr, 0 br i1 %cmp26, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %0 = phi i32 [ %rem, %while.body ], [ %.pr, %entry ] %1 = phi i32 [ %0, %while.body ], [ %x.promoted, %entry ] %rem = srem i32 %1, %0 %cmp2 = icmp sgt i32 %rem, 0 br i1 %cmp2, label %while.body, label %while.cond.while.end_crit_edge, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 %0, ptr %x, align 4, !tbaa !5 store i32 %rem, ptr %y, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %entry %2 = phi i32 [ %0, %while.cond.while.end_crit_edge ], [ %x.promoted, %entry ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<math.h> int main() { long long int t, i, j, p,x; scanf("%lli\n", &t) ; for(i=0;i<t;i++) { scanf("%lli", &x) ; p=3; for(j=2;x%p!=0;j++) p+=pow(2,j); printf("%lli\n",x/p); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15921/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15921/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%lli\0A\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lli\00", align 1 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i64, align 8 %x = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %t) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i64, ptr %t, align 8, !tbaa !5 %cmp21 = icmp sgt i64 %0, 0 br i1 %cmp21, label %for.body, label %for.end11 for.body: ; preds = %entry, %for.end %i.022 = phi i64 [ %inc10, %for.end ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %1 = load i64, ptr %x, align 8, !tbaa !5 %rem16 = srem i64 %1, 3 %cmp3.not17 = icmp eq i64 %rem16, 0 br i1 %cmp3.not17, label %for.end, label %for.body4 for.body4: ; preds = %for.body, %for.body4 %p.019 = phi i64 [ %conv7, %for.body4 ], [ 3, %for.body ] %j.018 = phi i64 [ %inc, %for.body4 ], [ 2, %for.body ] %conv = sitofp i64 %j.018 to double %exp2 = call double @exp2(double %conv) #3 %conv6 = sitofp i64 %p.019 to double %add = fadd double %exp2, %conv6 %conv7 = fptosi double %add to i64 %inc = add nuw nsw i64 %j.018, 1 %2 = load i64, ptr %x, align 8, !tbaa !5 %rem = srem i64 %2, %conv7 %cmp3.not = icmp eq i64 %rem, 0 br i1 %cmp3.not, label %for.end, label %for.body4, !llvm.loop !9 for.end: ; preds = %for.body4, %for.body %p.0.lcssa = phi i64 [ 3, %for.body ], [ %conv7, %for.body4 ] %.lcssa = phi i64 [ %1, %for.body ], [ %2, %for.body4 ] %div = sdiv i64 %.lcssa, %p.0.lcssa %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %div) %inc10 = add nuw nsw i64 %i.022, 1 %3 = load i64, ptr %t, align 8, !tbaa !5 %cmp = icmp slt i64 %inc10, %3 br i1 %cmp, label %for.body, label %for.end11, !llvm.loop !11 for.end11: ; preds = %for.end, %entry call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %x) #3 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %t) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 declare double @exp2(double) local_unnamed_addr 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 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{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}
#include<stdio.h> int gcd(int x, int y){ int r; while(1){ r=x%y; if(r==0)break; x=y; y=r; } return y; } int main(){ int x,y,m; scanf("%d %d",&x,&y); m=gcd(x,y); printf("%d\n",m); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159268/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159268/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\0A\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %x, i32 noundef %y) local_unnamed_addr #0 { entry: br label %while.cond while.cond: ; preds = %while.cond, %entry %y.addr.0 = phi i32 [ %y, %entry ], [ %rem, %while.cond ] %x.addr.0 = phi i32 [ %x, %entry ], [ %y.addr.0, %while.cond ] %rem = srem i32 %x.addr.0, %y.addr.0 %cmp = icmp eq i32 %rem, 0 br i1 %cmp, label %while.end, label %while.cond while.end: ; preds = %while.cond ret i32 %y.addr.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #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 br label %while.cond.i while.cond.i: ; preds = %while.cond.i, %entry %y.addr.0.i = phi i32 [ %1, %entry ], [ %rem.i, %while.cond.i ] %x.addr.0.i = phi i32 [ %0, %entry ], [ %y.addr.0.i, %while.cond.i ] %rem.i = srem i32 %x.addr.0.i, %y.addr.0.i %cmp.i = icmp eq i32 %rem.i, 0 br i1 %cmp.i, label %gcd.exit, label %while.cond.i gcd.exit: ; preds = %while.cond.i %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %y.addr.0.i) 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: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 attributes #0 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!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 1000000000 int gcd(int x,int y){ int r; int temp; if(x < y){ temp = x; x = y; y = temp; } while(y > 0){ r = x%y; x = y; y = r; } return x; } int main(){ int x; int y; scanf("%d",&x); scanf("%d",&y); if(x < 1 || x > MAX || y < 1 || y > MAX){ return -1; } printf("%d\n",gcd(x,y)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159310/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159310/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @gcd(i32 noundef %x, i32 noundef %y) local_unnamed_addr #0 { entry: %spec.select = tail call i32 @llvm.smin.i32(i32 %x, i32 %y) %spec.select9 = tail call i32 @llvm.smax.i32(i32 %x, i32 %y) %cmp110 = icmp sgt i32 %spec.select, 0 br i1 %cmp110, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %x.addr.112 = phi i32 [ %y.addr.111, %while.body ], [ %spec.select9, %entry ] %y.addr.111 = phi i32 [ %rem, %while.body ], [ %spec.select, %entry ] %rem = srem i32 %x.addr.112, %y.addr.111 %cmp1 = icmp sgt i32 %rem, 0 br i1 %cmp1, label %while.body, label %while.end, !llvm.loop !5 while.end: ; preds = %while.body, %entry %x.addr.1.lcssa = phi i32 [ %spec.select9, %entry ], [ %y.addr.111, %while.body ] ret i32 %x.addr.1.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 nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4 %1 = add i32 %0, -1000000001 %or.cond = icmp ult i32 %1, -1000000000 %2 = load i32, ptr %y, align 4 %cmp4 = icmp slt i32 %2, 1 %or.cond10 = select i1 %or.cond, i1 true, i1 %cmp4 %cmp6 = icmp sgt i32 %2, 1000000000 %or.cond11 = select i1 %or.cond10, i1 true, i1 %cmp6 br i1 %or.cond11, label %cleanup, label %if.end if.end: ; preds = %entry %spec.select.i = call i32 @llvm.smin.i32(i32 %0, i32 %2) %spec.select9.i = call i32 @llvm.smax.i32(i32 %0, i32 %2) br label %while.body.i while.body.i: ; preds = %if.end, %while.body.i %x.addr.112.i = phi i32 [ %y.addr.111.i, %while.body.i ], [ %spec.select9.i, %if.end ] %y.addr.111.i = phi i32 [ %rem.i, %while.body.i ], [ %spec.select.i, %if.end ] %rem.i = srem i32 %x.addr.112.i, %y.addr.111.i %cmp1.i = icmp sgt i32 %rem.i, 0 br i1 %cmp1.i, label %while.body.i, label %gcd.exit, !llvm.loop !5 gcd.exit: ; preds = %while.body.i %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %y.addr.111.i) br label %cleanup cleanup: ; preds = %entry, %gcd.exit %retval.0 = phi i32 [ 0, %gcd.exit ], [ -1, %entry ] call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #5 ret i32 %retval.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.smin.i32(i32, i32) #4 ; 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"}
#include<stdio.h> int main() { int x,y,r; scanf("%d%d",&x,&y); while(y>0){ r = x%y; x = y; y = r; } printf("%d\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159354/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159354/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %.pr = load i32, ptr %y, align 4, !tbaa !5 %x.promoted = load i32, ptr %x, align 4, !tbaa !5 %cmp2 = icmp sgt i32 %.pr, 0 br i1 %cmp2, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %0 = phi i32 [ %rem, %while.body ], [ %.pr, %entry ] %1 = phi i32 [ %0, %while.body ], [ %x.promoted, %entry ] %rem = srem i32 %1, %0 %cmp = icmp sgt i32 %rem, 0 br i1 %cmp, label %while.body, label %while.cond.while.end_crit_edge, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 %0, ptr %x, align 4, !tbaa !5 store i32 %rem, ptr %y, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %entry %2 = phi i32 [ %0, %while.cond.while.end_crit_edge ], [ %x.promoted, %entry ] %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(){ int x,y,r; scanf("%d%d",&x,&y); if(y<x){ while(y>0){ r=x%y; x=y; y=r; } } if(x<y){ while(x>0){ r=y%x; y=x; x=r; } } if(y<x) printf("%d\n",x); else printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159398/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159398/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %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 %y, align 4 %1 = load i32, ptr %x, align 4 %cmp = icmp slt i32 %0, %1 %cmp1 = icmp sgt i32 %0, 0 %or.cond = and i1 %cmp1, %cmp br i1 %or.cond, label %while.body, label %if.end while.body: ; preds = %entry, %while.body %rem19 = phi i32 [ %rem, %while.body ], [ %0, %entry ] %2 = phi i32 [ %rem19, %while.body ], [ %1, %entry ] %rem = srem i32 %2, %rem19 %cmp1.old = icmp sgt i32 %rem, 0 br i1 %cmp1.old, label %while.body, label %if.end.loopexit if.end.loopexit: ; preds = %while.body store i32 %rem19, ptr %x, align 4, !tbaa !5 store i32 %rem, ptr %y, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.end.loopexit, %entry %y.promoted20 = phi i32 [ %rem, %if.end.loopexit ], [ %0, %entry ] %x.promoted22 = phi i32 [ %rem19, %if.end.loopexit ], [ %1, %entry ] %cmp2 = icmp slt i32 %x.promoted22, %y.promoted20 %cmp5 = icmp sgt i32 %x.promoted22, 0 %or.cond16 = and i1 %cmp5, %cmp2 br i1 %or.cond16, label %while.body6, label %if.end9 while.body6: ; preds = %if.end, %while.body6 %rem723 = phi i32 [ %rem7, %while.body6 ], [ %x.promoted22, %if.end ] %3 = phi i32 [ %rem723, %while.body6 ], [ %y.promoted20, %if.end ] %rem7 = srem i32 %3, %rem723 %cmp5.old = icmp sgt i32 %rem7, 0 br i1 %cmp5.old, label %while.body6, label %if.end9.loopexit if.end9.loopexit: ; preds = %while.body6 store i32 %rem723, ptr %y, align 4, !tbaa !5 store i32 %rem7, ptr %x, align 4, !tbaa !5 br label %if.end9 if.end9: ; preds = %if.end9.loopexit, %if.end %4 = phi i32 [ %rem7, %if.end9.loopexit ], [ %x.promoted22, %if.end ] %5 = phi i32 [ %rem723, %if.end9.loopexit ], [ %y.promoted20, %if.end ] %. = call i32 @llvm.smax.i32(i32 %5, i32 %4) %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.) 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: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main() { int x,y,temp,r; scanf("%d %d",&x,&y); if(x<y) { temp = x; x = y; y = temp; } while(y>0) { r = x % y; x = y; y = r; } printf("%d\n",x); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159448/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159448/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %x, align 4, !tbaa !5 store i32 %0, ptr %y, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %x.promoted = phi i32 [ %1, %if.then ], [ %0, %entry ] %.pr = phi i32 [ %0, %if.then ], [ %1, %entry ] %cmp15 = icmp sgt i32 %.pr, 0 br i1 %cmp15, label %while.body, label %while.end while.body: ; preds = %if.end, %while.body %2 = phi i32 [ %rem, %while.body ], [ %.pr, %if.end ] %3 = phi i32 [ %2, %while.body ], [ %x.promoted, %if.end ] %rem = srem i32 %3, %2 %cmp1 = icmp sgt i32 %rem, 0 br i1 %cmp1, label %while.body, label %while.cond.while.end_crit_edge, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 %2, ptr %x, align 4, !tbaa !5 store i32 %rem, ptr %y, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %if.end %4 = phi i32 [ %2, %while.cond.while.end_crit_edge ], [ %x.promoted, %if.end ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int gcd(int a, int b) { while (b > 0) { int n; n = a % b; a = b; b = n; } return a; } int main() { int a, b, c; scanf ("%d %d", &a, &b); c = gcd(a, b); printf("%d\n", c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159491/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159491/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\0A\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %cmp4 = icmp sgt i32 %b, 0 br i1 %cmp4, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %a.addr.06 = phi i32 [ %b.addr.05, %while.body ], [ %a, %entry ] %b.addr.05 = phi i32 [ %rem, %while.body ], [ %b, %entry ] %rem = srem i32 %a.addr.06, %b.addr.05 %cmp = icmp sgt i32 %rem, 0 br i1 %cmp, label %while.body, label %while.end, !llvm.loop !5 while.end: ; preds = %while.body, %entry %a.addr.0.lcssa = phi i32 [ %a, %entry ], [ %b.addr.05, %while.body ] ret i32 %a.addr.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %a = alloca 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 !7 %1 = load i32, ptr %b, align 4, !tbaa !7 %cmp4.i = icmp sgt i32 %1, 0 br i1 %cmp4.i, label %while.body.i, label %gcd.exit while.body.i: ; preds = %entry, %while.body.i %a.addr.06.i = phi i32 [ %b.addr.05.i, %while.body.i ], [ %0, %entry ] %b.addr.05.i = phi i32 [ %rem.i, %while.body.i ], [ %1, %entry ] %rem.i = srem i32 %a.addr.06.i, %b.addr.05.i %cmp.i = icmp sgt i32 %rem.i, 0 br i1 %cmp.i, label %while.body.i, label %gcd.exit, !llvm.loop !5 gcd.exit: ; preds = %while.body.i, %entry %a.addr.0.lcssa.i = phi i32 [ %0, %entry ], [ %b.addr.05.i, %while.body.i ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %a.addr.0.lcssa.i) 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: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 attributes #0 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = distinct !{!5, !6} !6 = !{!"llvm.loop.mustprogress"} !7 = !{!8, !8, i64 0} !8 = !{!"int", !9, i64 0} !9 = !{!"omnipotent char", !10, i64 0} !10 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int Euclidean(int a, int b); int main(void){ int a, b, gcd; scanf("%d%d", &a, &b); gcd = Euclidean(a, b); printf("%d\n", gcd); return 0; } int Euclidean(int a, int b){ int r; if(a < b){ r = a; a = b; b = r; } while(b != 0){ r = a % b; a = b; b = r; } return a; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159534/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159534/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #5 %call = 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 %spec.select.i = call i32 @llvm.smax.i32(i32 %0, i32 %1) %spec.select10.i = call i32 @llvm.smin.i32(i32 %0, i32 %1) %cmp1.not11.i = icmp eq i32 %spec.select10.i, 0 br i1 %cmp1.not11.i, label %Euclidean.exit, label %while.body.i while.body.i: ; preds = %entry, %while.body.i %b.addr.113.i = phi i32 [ %rem.i, %while.body.i ], [ %spec.select10.i, %entry ] %a.addr.112.i = phi i32 [ %b.addr.113.i, %while.body.i ], [ %spec.select.i, %entry ] %rem.i = srem i32 %a.addr.112.i, %b.addr.113.i %cmp1.not.i = icmp eq i32 %rem.i, 0 br i1 %cmp1.not.i, label %Euclidean.exit, label %while.body.i, !llvm.loop !9 Euclidean.exit: ; preds = %while.body.i, %entry %a.addr.1.lcssa.i = phi i32 [ %spec.select.i, %entry ], [ %b.addr.113.i, %while.body.i ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %a.addr.1.lcssa.i) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nosync nounwind memory(none) uwtable define dso_local i32 @Euclidean(i32 noundef %a, i32 noundef %b) local_unnamed_addr #3 { entry: %spec.select = tail call i32 @llvm.smax.i32(i32 %a, i32 %b) %spec.select10 = tail call i32 @llvm.smin.i32(i32 %a, i32 %b) %cmp1.not11 = icmp eq i32 %spec.select10, 0 br i1 %cmp1.not11, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %b.addr.113 = phi i32 [ %rem, %while.body ], [ %spec.select10, %entry ] %a.addr.112 = phi i32 [ %b.addr.113, %while.body ], [ %spec.select, %entry ] %rem = srem i32 %a.addr.112, %b.addr.113 %cmp1.not = icmp eq i32 %rem, 0 br i1 %cmp1.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %while.body, %entry %a.addr.1.lcssa = phi i32 [ %spec.select, %entry ], [ %b.addr.113, %while.body ] ret i32 %a.addr.1.lcssa } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(){ int i, a, b, temp; scanf("%d%d", &a, &b); if(a == b){ printf("%d\n", a); return 0; } if(a<b){ temp = a; a = b; b = temp; } temp = a%b; while(1){ a = b; b = temp; temp = a%b; if(temp == 0) break; } printf("%d\n", b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159578/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159578/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp eq i32 %0, %1 br i1 %cmp, label %cleanup, label %if.end if.end: ; preds = %entry %spec.select = call i32 @llvm.smin.i32(i32 %0, i32 %1) %spec.select18 = call i32 @llvm.smax.i32(i32 %0, i32 %1) %rem = srem i32 %spec.select18, %spec.select br label %while.cond while.cond: ; preds = %while.cond, %if.end %temp.016 = phi i32 [ %spec.select, %if.end ], [ %temp.0, %while.cond ] %temp.0 = phi i32 [ %rem, %if.end ], [ %rem5, %while.cond ] %rem5 = srem i32 %temp.016, %temp.0 %cmp6 = icmp eq i32 %rem5, 0 br i1 %cmp6, label %while.end, label %while.cond while.end: ; preds = %while.cond store i32 %temp.0, ptr %b, align 4, !tbaa !5 store i32 %temp.016, ptr %a, align 4, !tbaa !5 br label %cleanup cleanup: ; preds = %entry, %while.end %temp.0.lcssa.sink = phi i32 [ %temp.0, %while.end ], [ %0, %entry ] %call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %temp.0.lcssa.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ int x,y,amari,tmp; scanf("%d%d",&x,&y); if(x<y){ tmp=x; x=y; y=tmp; } amari=x%y; while(amari!=0){ x=y; y=amari; amari=x%y; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159620/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159620/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %x, align 4, !tbaa !5 store i32 %0, ptr %y, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %0, %if.then ], [ %1, %entry ] %3 = phi i32 [ %1, %if.then ], [ %0, %entry ] %rem = srem i32 %3, %2 %cmp1.not7 = icmp eq i32 %rem, 0 br i1 %cmp1.not7, label %while.end, label %while.body while.body: ; preds = %if.end, %while.body %amari.09 = phi i32 [ %rem2, %while.body ], [ %rem, %if.end ] %amari.068 = phi i32 [ %amari.09, %while.body ], [ %2, %if.end ] %rem2 = srem i32 %amari.068, %amari.09 %cmp1.not = icmp eq i32 %rem2, 0 br i1 %cmp1.not, label %while.cond.while.end_crit_edge, label %while.body, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 %amari.068, ptr %x, align 4, !tbaa !5 store i32 %amari.09, ptr %y, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %if.end %4 = phi i32 [ %amari.09, %while.cond.while.end_crit_edge ], [ %2, %if.end ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(){ int a,b,c,i,num; scanf("%d %d",&a,&b); c=b; for(i=1;i<=c;i++){ num=b; b=a%b; a=num; if(b==0)break; } printf("%d\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159664/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159664/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\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 %b, align 4, !tbaa !5 %a.promoted = load i32, ptr %a, align 4, !tbaa !5 %cmp.not6 = icmp slt i32 %0, 1 br i1 %cmp.not6, label %for.end, label %for.body for.cond: ; preds = %for.body %inc = add nuw i32 %i.09, 1 %exitcond.not = icmp eq i32 %i.09, %0 br i1 %exitcond.not, label %for.cond.for.end_crit_edge, label %for.body, !llvm.loop !9 for.body: ; preds = %entry, %for.cond %i.09 = phi i32 [ %inc, %for.cond ], [ 1, %entry ] %rem48 = phi i32 [ %rem, %for.cond ], [ %0, %entry ] %rem457 = phi i32 [ %rem48, %for.cond ], [ %a.promoted, %entry ] %rem = srem i32 %rem457, %rem48 %cmp1 = icmp eq i32 %rem, 0 br i1 %cmp1, label %for.body.for.end_crit_edge, label %for.cond for.body.for.end_crit_edge: ; preds = %for.body store i32 0, ptr %b, align 4, !tbaa !5 store i32 %rem48, ptr %a, align 4, !tbaa !5 br label %for.end for.cond.for.end_crit_edge: ; preds = %for.cond store i32 %rem, ptr %b, align 4, !tbaa !5 store i32 %rem48, ptr %a, align 4, !tbaa !5 br label %for.end for.end: ; preds = %for.cond.for.end_crit_edge, %for.body.for.end_crit_edge, %entry %1 = phi i32 [ %rem48, %for.cond.for.end_crit_edge ], [ %rem48, %for.body.for.end_crit_edge ], [ %a.promoted, %entry ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> void swap(int *x, int *y) { int temp; temp = *x; *x = *y; *y = temp; } int main(void) { int x,y; scanf("%d %d",&x,&y); if(x<y) swap(&x, &y); while (y) { x = x % y; swap(&x, &y); } printf("%d\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159714/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159714/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\0A\00", align 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 !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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #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 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %x, align 4, !tbaa !5 store i32 %0, ptr %y, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %x.promoted = phi i32 [ %1, %if.then ], [ %0, %entry ] %.pr = phi i32 [ %0, %if.then ], [ %1, %entry ] %tobool.not2 = icmp eq i32 %.pr, 0 br i1 %tobool.not2, label %while.end, label %while.body while.body: ; preds = %if.end, %while.body %2 = phi i32 [ %rem, %while.body ], [ %.pr, %if.end ] %3 = phi i32 [ %2, %while.body ], [ %x.promoted, %if.end ] %rem = srem i32 %3, %2 %tobool.not = icmp eq i32 %rem, 0 br i1 %tobool.not, label %while.cond.while.end_crit_edge, label %while.body, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 %2, ptr %x, align 4, !tbaa !5 store i32 0, ptr %y, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %if.end %4 = phi i32 [ %2, %while.cond.while.end_crit_edge ], [ %x.promoted, %if.end ] %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) 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: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(void) { int a,b,c,r; scanf("%d %d", &a, &b); if(a < b) { c = b; b = a; a = c; } while(b > 0) { r = a % b; a = b; b = r; } printf("%d\n", a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159758/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159758/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\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 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %0, ptr %b, align 4, !tbaa !5 store i32 %1, ptr %a, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %a.promoted = phi i32 [ %1, %if.then ], [ %0, %entry ] %.pr = phi i32 [ %0, %if.then ], [ %1, %entry ] %cmp15 = icmp sgt i32 %.pr, 0 br i1 %cmp15, label %while.body, label %while.end while.body: ; preds = %if.end, %while.body %2 = phi i32 [ %rem, %while.body ], [ %.pr, %if.end ] %3 = phi i32 [ %2, %while.body ], [ %a.promoted, %if.end ] %rem = srem i32 %3, %2 %cmp1 = icmp sgt i32 %rem, 0 br i1 %cmp1, label %while.body, label %while.cond.while.end_crit_edge, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 %2, ptr %a, align 4, !tbaa !5 store i32 %rem, ptr %b, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %if.end %4 = phi i32 [ %2, %while.cond.while.end_crit_edge ], [ %a.promoted, %if.end ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(){ int x,y,z,r; scanf("%d%d",&x,&y); if(x<y){ z=x; x=y; y=z; } r=x%y; while(r!=0){ x=y; y=r; r=x%y; if(r==0) break; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159800/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159800/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %x, align 4, !tbaa !5 store i32 %0, ptr %y, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %y.promoted = phi i32 [ %0, %if.then ], [ %1, %entry ] %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %rem = srem i32 %2, %y.promoted %cmp1.old.not = icmp eq i32 %rem, 0 br i1 %cmp1.old.not, label %while.end, label %while.body while.body: ; preds = %if.end, %while.body %r.011 = phi i32 [ %r.0, %while.body ], [ %y.promoted, %if.end ] %r.0 = phi i32 [ %rem2, %while.body ], [ %rem, %if.end ] %rem2 = srem i32 %r.011, %r.0 %cmp3.not = icmp eq i32 %rem2, 0 br i1 %cmp3.not, label %while.end.loopexit, label %while.body, !llvm.loop !9 while.end.loopexit: ; preds = %while.body store i32 %r.0, ptr %y, align 4, !tbaa !5 store i32 %r.011, ptr %x, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.end.loopexit, %if.end %3 = phi i32 [ %r.0, %while.end.loopexit ], [ %y.promoted, %if.end ] %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %3) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> /* 再帰関数による最大公約数 */ int gcd(int x, int y) { return y ? gcd(y, x % y) : x; } int main() { int a, b; scanf("%d %d", &a, &b); printf("%d\n", gcd(a, b)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159844/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159844/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\0A\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %x, i32 noundef %y) local_unnamed_addr #0 { entry: %tobool.not4 = icmp eq i32 %y, 0 br i1 %tobool.not4, label %cond.end, label %cond.true cond.true: ; preds = %entry, %cond.true %y.tr6 = phi i32 [ %rem, %cond.true ], [ %y, %entry ] %x.tr5 = phi i32 [ %y.tr6, %cond.true ], [ %x, %entry ] %rem = srem i32 %x.tr5, %y.tr6 %tobool.not = icmp eq i32 %rem, 0 br i1 %tobool.not, label %cond.end, label %cond.true cond.end: ; preds = %cond.true, %entry %x.tr.lcssa = phi i32 [ %x, %entry ], [ %y.tr6, %cond.true ] ret i32 %x.tr.lcssa } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %tobool.not4.i = icmp eq i32 %1, 0 br i1 %tobool.not4.i, label %gcd.exit, label %cond.true.i cond.true.i: ; preds = %entry, %cond.true.i %y.tr6.i = phi i32 [ %rem.i, %cond.true.i ], [ %1, %entry ] %x.tr5.i = phi i32 [ %y.tr6.i, %cond.true.i ], [ %0, %entry ] %rem.i = srem i32 %x.tr5.i, %y.tr6.i %tobool.not.i = icmp eq i32 %rem.i, 0 br i1 %tobool.not.i, label %gcd.exit, label %cond.true.i gcd.exit: ; preds = %cond.true.i, %entry %x.tr.lcssa.i = phi i32 [ %0, %entry ], [ %y.tr6.i, %cond.true.i ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %x.tr.lcssa.i) 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) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 attributes #0 = { 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 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~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 gcd(int a,int b); int main(int argc, const char * argv[]) { int a,b; scanf("%d %d",&a,&b); printf("%d\n",gcd(a,b)); } int gcd(int a,int b){ int r; while((r = a % b) != 0){ a = b; b = r; } return b; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159888/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159888/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\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) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 br label %while.cond.i while.cond.i: ; preds = %while.cond.i, %entry %b.addr.0.i = phi i32 [ %1, %entry ], [ %rem.i, %while.cond.i ] %a.addr.0.i = phi i32 [ %0, %entry ], [ %b.addr.0.i, %while.cond.i ] %rem.i = srem i32 %a.addr.0.i, %b.addr.0.i %cmp.not.i = icmp eq i32 %rem.i, 0 br i1 %cmp.not.i, label %gcd.exit, label %while.cond.i, !llvm.loop !9 gcd.exit: ; preds = %while.cond.i %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %b.addr.0.i) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #3 { entry: br label %while.cond while.cond: ; preds = %while.cond, %entry %b.addr.0 = phi i32 [ %b, %entry ], [ %rem, %while.cond ] %a.addr.0 = phi i32 [ %a, %entry ], [ %b.addr.0, %while.cond ] %rem = srem i32 %a.addr.0, %b.addr.0 %cmp.not = icmp eq i32 %rem, 0 br i1 %cmp.not, label %while.end, label %while.cond, !llvm.loop !9 while.end: ; preds = %while.cond ret i32 %b.addr.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { 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 #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(){ int a, b, c, work; a=b=c=work=0; scanf("%d%d", &a, &b); if(a<b){ work=a; a=b; b=work; } c=a%b; while(c!=0){ a=b; b=c; c=a%b; } printf("%d\n", b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159930/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159930/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 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 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %0, %if.then ], [ %1, %entry ] %3 = phi i32 [ %1, %if.then ], [ %0, %entry ] %rem = srem i32 %3, %2 %cmp1.not7 = icmp eq i32 %rem, 0 br i1 %cmp1.not7, label %while.end, label %while.body while.body: ; preds = %if.end, %while.body %c.09 = phi i32 [ %rem2, %while.body ], [ %rem, %if.end ] %c.068 = phi i32 [ %c.09, %while.body ], [ %2, %if.end ] %rem2 = srem i32 %c.068, %c.09 %cmp1.not = icmp eq i32 %rem2, 0 br i1 %cmp1.not, label %while.cond.while.end_crit_edge, label %while.body, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 %c.068, ptr %a, align 4, !tbaa !5 store i32 %c.09, ptr %b, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %if.end %4 = phi i32 [ %c.09, %while.cond.while.end_crit_edge ], [ %2, %if.end ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main() { int x,i,y,c,d; scanf("%d%d",&x,&y); while(1){ d=x%y; if(d==0)break; x=y; y=d; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159974/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159974/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %x.promoted = load i32, ptr %x, align 4, !tbaa !5 %y.promoted = load i32, ptr %y, align 4, !tbaa !5 %rem4 = srem i32 %x.promoted, %y.promoted %cmp5 = icmp eq i32 %rem4, 0 br i1 %cmp5, label %while.end, label %if.end if.end: ; preds = %entry, %if.end %rem7 = phi i32 [ %rem, %if.end ], [ %rem4, %entry ] %rem36 = phi i32 [ %rem7, %if.end ], [ %y.promoted, %entry ] %rem = srem i32 %rem36, %rem7 %cmp = icmp eq i32 %rem, 0 br i1 %cmp, label %while.cond.while.end_crit_edge, label %if.end while.cond.while.end_crit_edge: ; preds = %if.end store i32 %rem36, ptr %x, align 4, !tbaa !5 store i32 %rem7, ptr %y, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %entry %.lcssa = phi i32 [ %rem7, %while.cond.while.end_crit_edge ], [ %y.promoted, %entry ] %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <stdlib.h> int gcd(int a,int b); int main(int argc, char** argv) { int a; int b; scanf("%d", &a); scanf("%d", &b); printf("%d\n", gcd(a,b)); return 0; } int gcd(int a,int b){ if(a%b==0) return b; return gcd(b,a%b); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160022/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160022/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %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 br label %tailrecurse.i tailrecurse.i: ; preds = %tailrecurse.i, %entry %a.tr.i = phi i32 [ %0, %entry ], [ %b.tr.i, %tailrecurse.i ] %b.tr.i = phi i32 [ %1, %entry ], [ %rem.i, %tailrecurse.i ] %rem.i = srem i32 %a.tr.i, %b.tr.i %cmp.i = icmp eq i32 %rem.i, 0 br i1 %cmp.i, label %gcd.exit, label %tailrecurse.i gcd.exit: ; preds = %tailrecurse.i %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %b.tr.i) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #3 { entry: br label %tailrecurse tailrecurse: ; preds = %tailrecurse, %entry %a.tr = phi i32 [ %a, %entry ], [ %b.tr, %tailrecurse ] %b.tr = phi i32 [ %b, %entry ], [ %rem, %tailrecurse ] %rem = srem i32 %a.tr, %b.tr %cmp = icmp eq i32 %rem, 0 br i1 %cmp, label %return, label %tailrecurse return: ; preds = %tailrecurse ret i32 %b.tr } ; 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 = { 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 #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(){ int x,y,i,n; scanf("%d %d",&x,&y); if(x<y){ i = x; x = y; y = i; } n = x % y; while(n != 0){ x = y; y = n; n = x % y; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160066/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160066/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %x, align 4, !tbaa !5 store i32 %0, ptr %y, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %0, %if.then ], [ %1, %entry ] %3 = phi i32 [ %1, %if.then ], [ %0, %entry ] %rem = srem i32 %3, %2 %cmp1.not7 = icmp eq i32 %rem, 0 br i1 %cmp1.not7, label %while.end, label %while.body while.body: ; preds = %if.end, %while.body %n.09 = phi i32 [ %rem2, %while.body ], [ %rem, %if.end ] %n.068 = phi i32 [ %n.09, %while.body ], [ %2, %if.end ] %rem2 = srem i32 %n.068, %n.09 %cmp1.not = icmp eq i32 %rem2, 0 br i1 %cmp1.not, label %while.cond.while.end_crit_edge, label %while.body, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 %n.068, ptr %x, align 4, !tbaa !5 store i32 %n.09, ptr %y, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %if.end %4 = phi i32 [ %n.09, %while.cond.while.end_crit_edge ], [ %2, %if.end ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <stdlib.h> int main (){ int x,y,i,v; scanf("%d%d",&x,&y); if(x < 1 || y < 1 || x > 1000000000 || y > 1000000000){ printf("Please type 1 to 1000000000."); exit(1); } if(x > y){ v = x; x = y; y = v; } for(i=1; i<=x/2;i++){ if(x%i == 0 && y%i == 0){ v = i; } } if(x == y)v=x; printf("%d\n",v); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160109/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160109/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [29 x i8] c"Please type 1 to 1000000000.\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: 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 %1 = load i32, ptr %y, align 4 %cmp1 = icmp slt i32 %1, 1 %2 = add i32 %0, -1000000001 %3 = icmp ult i32 %2, -1000000000 %or.cond20 = select i1 %3, i1 true, i1 %cmp1 %cmp5 = icmp sgt i32 %1, 1000000000 %or.cond21 = select i1 %or.cond20, i1 true, i1 %cmp5 br i1 %or.cond21, label %if.then, label %if.end if.then: ; preds = %entry %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1) call void @exit(i32 noundef 1) #5 unreachable if.end: ; preds = %entry %cmp7 = icmp ugt i32 %0, %1 br i1 %cmp7, label %if.then8, label %if.end9 if.then8: ; preds = %if.end store i32 %1, ptr %x, align 4, !tbaa !5 store i32 %0, ptr %y, align 4, !tbaa !5 br label %if.end9 if.end9: ; preds = %if.then8, %if.end %4 = phi i32 [ %0, %if.then8 ], [ %1, %if.end ] %5 = phi i32 [ %1, %if.then8 ], [ %0, %if.end ] %cmp10.not30 = icmp ult i32 %5, 2 br i1 %cmp10.not30, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %if.end9 %div3435 = lshr i32 %5, 1 br label %for.body for.body: ; preds = %for.body.lr.ph, %for.inc %v.132 = phi i32 [ %0, %for.body.lr.ph ], [ %v.2, %for.inc ] %i.031 = phi i32 [ 1, %for.body.lr.ph ], [ %inc, %for.inc ] %rem = srem i32 %5, %i.031 %cmp11 = icmp eq i32 %rem, 0 br i1 %cmp11, label %land.lhs.true, label %for.inc land.lhs.true: ; preds = %for.body %rem12 = srem i32 %4, %i.031 %cmp13 = icmp eq i32 %rem12, 0 %spec.select = select i1 %cmp13, i32 %i.031, i32 %v.132 br label %for.inc for.inc: ; preds = %land.lhs.true, %for.body %v.2 = phi i32 [ %v.132, %for.body ], [ %spec.select, %land.lhs.true ] %inc = add nuw nsw i32 %i.031, 1 %exitcond.not = icmp eq i32 %i.031, %div3435 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !9 for.end: ; preds = %for.inc, %if.end9 %v.1.lcssa = phi i32 [ %0, %if.end9 ], [ %v.2, %for.inc ] %cmp16 = icmp eq i32 %5, %4 %spec.select29 = select i1 %cmp16, i32 %5, i32 %v.1.lcssa %call19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %spec.select29) 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: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: noreturn nounwind declare void @exit(i32 noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } attributes #5 = { noreturn nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(void){ int n[2],sub,big,small; scanf(" %d %d",&n[0],&n[1]); if(n[1] < n[0]){ big = n[0]; small = n[1]; } else{ big = n[1]; small = n[0]; } while(1){ sub = small; small = big % small; big = sub; //printf("big = %d,small = %d\n",big,small); if(small == 0){ printf("%d\n",big); break; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160152/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160152/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c" %d %d\00", align 1 @.str.1 = private unnamed_addr constant [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 [2 x i32], align 4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #4 %arrayidx1 = getelementptr inbounds [2 x i32], ptr %n, i64 0, i64 1 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %arrayidx1) %0 = load i32, ptr %arrayidx1, align 4, !tbaa !5 %1 = load i32, ptr %n, align 4, !tbaa !5 %. = call i32 @llvm.smax.i32(i32 %0, i32 %1) %.17 = call i32 @llvm.smin.i32(i32 %0, i32 %1) br label %while.cond while.cond: ; preds = %while.cond, %entry %big.1 = phi i32 [ %., %entry ], [ %small.1, %while.cond ] %small.1 = phi i32 [ %.17, %entry ], [ %rem, %while.cond ] %rem = srem i32 %big.1, %small.1 %cmp8 = icmp eq i32 %rem, 0 br i1 %cmp8, label %if.then9, label %while.cond if.then9: ; preds = %while.cond %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %small.1) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 ; 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> #include<stdlib.h> int main(){ int a,b,c; scanf("%d %d",&a,&b); if(a<0||a>1000000000 && b<0||b>1000000000){ printf("error"); return 0; } //swap if(a<b){ c=a; a=b; b=c; } while(b>0){ c=a%b; a=b; b=c; } printf("%d\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160217/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160217/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [6 x i8] c"error\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: %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 %cmp = icmp slt i32 %0, 0 br i1 %cmp, label %if.then, label %lor.lhs.false lor.lhs.false: ; preds = %entry %cmp1 = icmp ugt i32 %0, 1000000000 %1 = load i32, ptr %b, align 4 %cmp2 = icmp slt i32 %1, 0 %or.cond = select i1 %cmp1, i1 %cmp2, i1 false %cmp4 = icmp sgt i32 %1, 1000000000 %or.cond13 = select i1 %or.cond, i1 true, i1 %cmp4 br i1 %or.cond13, label %if.then, label %if.end if.then: ; preds = %lor.lhs.false, %entry %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1) br label %cleanup if.end: ; preds = %lor.lhs.false %cmp6 = icmp slt i32 %0, %1 br i1 %cmp6, label %if.then7, label %if.end8 if.then7: ; preds = %if.end store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end8 if.end8: ; preds = %if.then7, %if.end %a.promoted = phi i32 [ %1, %if.then7 ], [ %0, %if.end ] %.pr = phi i32 [ %0, %if.then7 ], [ %1, %if.end ] %cmp917 = icmp sgt i32 %.pr, 0 br i1 %cmp917, label %while.body, label %while.end while.body: ; preds = %if.end8, %while.body %2 = phi i32 [ %rem, %while.body ], [ %.pr, %if.end8 ] %3 = phi i32 [ %2, %while.body ], [ %a.promoted, %if.end8 ] %rem = srem i32 %3, %2 %cmp9 = icmp sgt i32 %rem, 0 br i1 %cmp9, label %while.body, label %while.cond.while.end_crit_edge, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 %2, ptr %a, align 4, !tbaa !5 store i32 %rem, ptr %b, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %if.end8 %4 = phi i32 [ %2, %while.cond.while.end_crit_edge ], [ %a.promoted, %if.end8 ] %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %4) br label %cleanup cleanup: ; preds = %while.end, %if.then call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(){ int x,y; scanf("%d %d",&x,&y); int r; int cp; while(1){ if(x<y){ cp=x; x=y; y=cp; } if(y==0){ break; } x=x%y; } printf("%d\n",x); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160275/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160275/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %x.promoted = load i32, ptr %x, align 4, !tbaa !5 %y.promoted = load i32, ptr %y, align 4, !tbaa !5 br label %while.cond while.cond: ; preds = %if.end3, %entry %rem810 = phi i32 [ %rem89, %if.end3 ], [ %y.promoted, %entry ] %rem8 = phi i32 [ %rem, %if.end3 ], [ %x.promoted, %entry ] %cmp = icmp slt i32 %rem8, %rem810 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %while.cond store i32 %rem810, ptr %x, align 4, !tbaa !5 store i32 %rem8, ptr %y, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %while.cond %rem89 = phi i32 [ %rem8, %if.then ], [ %rem810, %while.cond ] %0 = phi i32 [ %rem810, %if.then ], [ %rem8, %while.cond ] %cmp1 = icmp eq i32 %rem89, 0 br i1 %cmp1, label %while.end, label %if.end3 if.end3: ; preds = %if.end %rem = srem i32 %0, %rem89 store i32 %rem, ptr %x, align 4, !tbaa !5 br label %while.cond while.end: ; preds = %if.end %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<math.h> int main(){ int a,b; scanf("%d %d",&a,&b); int temp; while(b!=0){ temp = b; b = a%b; a = temp; } printf("%d\n",temp); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160318/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160318/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\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) #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) %.pr = load i32, ptr %b, align 4, !tbaa !5 %a.promoted = load i32, ptr %a, align 4, !tbaa !5 %cmp.not3 = icmp ne i32 %.pr, 0 call void @llvm.assume(i1 %cmp.not3) br label %while.body while.body: ; preds = %entry, %while.body %0 = phi i32 [ %rem, %while.body ], [ %.pr, %entry ] %1 = phi i32 [ %0, %while.body ], [ %a.promoted, %entry ] %rem = srem i32 %1, %0 %cmp.not = icmp eq i32 %rem, 0 br i1 %cmp.not, label %while.cond.while.end_crit_edge, label %while.body, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 0, ptr %b, align 4, !tbaa !5 store i32 %0, ptr %a, align 4, !tbaa !5 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(){ int x, y, z; scanf("%d%d",&x,&y); if(x < y){ z = x; x = y; y = z; } for(z = x % y ; z != 0 ; z = x % y){ x = y; y = z; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160361/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160361/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %x, align 4, !tbaa !5 store i32 %0, ptr %y, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %0, %if.then ], [ %1, %entry ] %3 = phi i32 [ %1, %if.then ], [ %0, %entry ] %rem = srem i32 %3, %2 %cmp1.not8 = icmp eq i32 %rem, 0 br i1 %cmp1.not8, label %for.end, label %for.body for.body: ; preds = %if.end, %for.body %z.010 = phi i32 [ %rem2, %for.body ], [ %rem, %if.end ] %z.079 = phi i32 [ %z.010, %for.body ], [ %2, %if.end ] %rem2 = srem i32 %z.079, %z.010 %cmp1.not = icmp eq i32 %rem2, 0 br i1 %cmp1.not, label %for.cond.for.end_crit_edge, label %for.body, !llvm.loop !9 for.cond.for.end_crit_edge: ; preds = %for.body store i32 %z.079, ptr %x, align 4, !tbaa !5 store i32 %z.010, ptr %y, align 4, !tbaa !5 br label %for.end for.end: ; preds = %for.cond.for.end_crit_edge, %if.end %4 = phi i32 [ %z.010, %for.cond.for.end_crit_edge ], [ %2, %if.end ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main() { int a,b,c,rem; scanf("%d%d",&a,&b); if(a<b) { c = a; a = b; b = c; } rem = a % b; while(rem != 0) { a = b; b = rem; rem = a % b; } printf("%d\n",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160411/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160411/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 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 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %0, %if.then ], [ %1, %entry ] %3 = phi i32 [ %1, %if.then ], [ %0, %entry ] %rem1 = srem i32 %3, %2 %cmp2.not8 = icmp eq i32 %rem1, 0 br i1 %cmp2.not8, label %while.end, label %while.body while.body: ; preds = %if.end, %while.body %rem.010 = phi i32 [ %rem3, %while.body ], [ %rem1, %if.end ] %rem.079 = phi i32 [ %rem.010, %while.body ], [ %2, %if.end ] %rem3 = srem i32 %rem.079, %rem.010 %cmp2.not = icmp eq i32 %rem3, 0 br i1 %cmp2.not, label %while.cond.while.end_crit_edge, label %while.body, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 %rem.079, ptr %a, align 4, !tbaa !5 store i32 %rem.010, ptr %b, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %if.end %4 = phi i32 [ %rem.010, %while.cond.while.end_crit_edge ], [ %2, %if.end ] %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #define N int main() { int a,b,c,x,y; scanf("%d%d",&a,&b); if(a>=b) { x = a; y = b; } else { x = b; y = a; } while(y!=0) { c = x%y; x = y; y = c; } printf("%d\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160455/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160455/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %. = call i32 @llvm.smax.i32(i32 %0, i32 %1) %.8 = call i32 @llvm.smin.i32(i32 %0, i32 %1) %cmp1.not9 = icmp eq i32 %.8, 0 br i1 %cmp1.not9, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %y.111 = phi i32 [ %rem, %while.body ], [ %.8, %entry ] %x.110 = phi i32 [ %y.111, %while.body ], [ %., %entry ] %rem = srem i32 %x.110, %y.111 %cmp1.not = icmp eq i32 %rem, 0 br i1 %cmp1.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %while.body, %entry %x.1.lcssa = phi i32 [ %., %entry ], [ %y.111, %while.body ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %x.1.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 ; 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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> void calc(int, int); int main(){ int x,y; scanf("%d %d",&x,&y); calc(x,y); return 0; } void calc(int x, int y){ int z; if(y > x){ z=x; x=y; y=z; } while(1){ z = x%y; x = y; y = z; if(z == 0)break; } printf("%d\n",x); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160499/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160499/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\0A\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 %spec.select.i = call i32 @llvm.smax.i32(i32 %1, i32 %0) %spec.select12.i = call i32 @llvm.smin.i32(i32 %1, i32 %0) br label %while.cond.i while.cond.i: ; preds = %while.cond.i, %entry %x.addr.1.i = phi i32 [ %spec.select.i, %entry ], [ %y.addr.1.i, %while.cond.i ] %y.addr.1.i = phi i32 [ %spec.select12.i, %entry ], [ %rem.i, %while.cond.i ] %rem.i = srem i32 %x.addr.1.i, %y.addr.1.i %cmp1.i = icmp eq i32 %rem.i, 0 br i1 %cmp1.i, label %calc.exit, label %while.cond.i calc.exit: ; preds = %while.cond.i %call.i = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %y.addr.1.i) 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: nofree nounwind uwtable define dso_local void @calc(i32 noundef %x, i32 noundef %y) local_unnamed_addr #0 { entry: %spec.select = tail call i32 @llvm.smax.i32(i32 %y, i32 %x) %spec.select12 = tail call i32 @llvm.smin.i32(i32 %y, i32 %x) br label %while.cond while.cond: ; preds = %while.cond, %entry %x.addr.1 = phi i32 [ %spec.select, %entry ], [ %y.addr.1, %while.cond ] %y.addr.1 = phi i32 [ %spec.select12, %entry ], [ %rem, %while.cond ] %rem = srem i32 %x.addr.1, %y.addr.1 %cmp1 = icmp eq i32 %rem, 0 br i1 %cmp1, label %while.end, label %while.cond while.end: ; preds = %while.cond %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %y.addr.1) ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 ; 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> void gcd(int,int); int main(){ int x,y,z; scanf("%d %d",&x,&y); if(x<y){ z=y; y=x; x=z; } gcd(x,y); return 0; } void gcd(int x,int y){ int z=y; while(z!=0){ y=z; z=x%y; x=y; } printf("%d\n",y); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160541/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160541/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %0, ptr %y, align 4, !tbaa !5 store i32 %1, ptr %x, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %cmp.not5.i = icmp eq i32 %3, 0 br i1 %cmp.not5.i, label %gcd.exit, label %while.body.i while.body.i: ; preds = %if.end, %while.body.i %z.07.i = phi i32 [ %rem.i, %while.body.i ], [ %3, %if.end ] %x.addr.06.i = phi i32 [ %z.07.i, %while.body.i ], [ %2, %if.end ] %rem.i = srem i32 %x.addr.06.i, %z.07.i %cmp.not.i = icmp eq i32 %rem.i, 0 br i1 %cmp.not.i, label %gcd.exit, label %while.body.i, !llvm.loop !9 gcd.exit: ; preds = %while.body.i, %if.end %y.addr.0.lcssa.i = phi i32 [ 0, %if.end ], [ %z.07.i, %while.body.i ] %call.i = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %y.addr.0.lcssa.i) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local void @gcd(i32 noundef %x, i32 noundef %y) local_unnamed_addr #0 { entry: %cmp.not5 = icmp eq i32 %y, 0 br i1 %cmp.not5, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %z.07 = phi i32 [ %rem, %while.body ], [ %y, %entry ] %x.addr.06 = phi i32 [ %z.07, %while.body ], [ %x, %entry ] %rem = srem i32 %x.addr.06, %z.07 %cmp.not = icmp eq i32 %rem, 0 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %while.body, %entry %y.addr.0.lcssa = phi i32 [ 0, %entry ], [ %z.07, %while.body ] %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %y.addr.0.lcssa) ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="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 t; scanf("%d",&t); while(t--){ int s; scanf("%d",&s); int n = 1; while(s > n*n){ n = n + 1; } printf("%d\n",n); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1606/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1606/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 %s = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %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.end5, label %while.body while.body: ; preds = %entry, %while.end call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #3 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %1 = load i32, ptr %s, align 4, !tbaa !5 br label %while.cond2 while.cond2: ; preds = %while.cond2, %while.body %n.0 = phi i32 [ 1, %while.body ], [ %add, %while.cond2 ] %mul = mul nsw i32 %n.0, %n.0 %cmp = icmp sgt i32 %1, %mul %add = add nuw nsw i32 %n.0, 1 br i1 %cmp, label %while.cond2, label %while.end, !llvm.loop !9 while.end: ; preds = %while.cond2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %n.0) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #3 %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.end5, label %while.body, !llvm.loop !11 while.end5: ; preds = %while.end, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(void) { int a,b,c; scanf("%d %d",&a,&b); while(a != b){ if(a > b){ c = a - b; a = b; b = c; }else{ c = b - a; b = a; a = c; } } printf("%d\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160642/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160642/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\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) %a.promoted = load i32, ptr %a, align 4, !tbaa !5 %b.promoted = load i32, ptr %b, align 4, !tbaa !5 %cmp.not10 = icmp eq i32 %a.promoted, %b.promoted br i1 %cmp.not10, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %sub2612 = phi i32 [ %sub2.sink, %while.body ], [ %a.promoted, %entry ] %sub26811 = phi i32 [ %sub2612.sink, %while.body ], [ %b.promoted, %entry ] %cmp1 = icmp sgt i32 %sub2612, %sub26811 %sub2 = select i1 %cmp1, i32 0, i32 %sub2612 %sub2.sink = sub nsw i32 %sub26811, %sub2 %sub = select i1 %cmp1, i32 %sub26811, i32 0 %sub2612.sink = sub nsw i32 %sub2612, %sub %cmp.not = icmp eq i32 %sub2.sink, %sub2612.sink br i1 %cmp.not, label %while.end.loopexit, label %while.body, !llvm.loop !9 while.end.loopexit: ; preds = %while.body store i32 %sub2.sink, ptr %a, align 4 store i32 %sub2612.sink, ptr %b, align 4 br label %while.end while.end: ; preds = %while.end.loopexit, %entry %.lcssa = phi i32 [ %a.promoted, %entry ], [ %sub2612.sink, %while.end.loopexit ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
// Greatest Common Divisor(最大公約数) #include <stdio.h> int main(void) { int x, y, tmp; scanf("%d %d", &x, &y); if(x < y){ tmp = x; x = y; y = tmp; } int r = x % y; while( r != 0){ x = y; y = r; r = x % y; } printf("%d\n", y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160686/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160686/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %x, align 4, !tbaa !5 store i32 %0, ptr %y, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %0, %if.then ], [ %1, %entry ] %3 = phi i32 [ %1, %if.then ], [ %0, %entry ] %rem = srem i32 %3, %2 %cmp1.not7 = icmp eq i32 %rem, 0 br i1 %cmp1.not7, label %while.end, label %while.body while.body: ; preds = %if.end, %while.body %r.09 = phi i32 [ %rem2, %while.body ], [ %rem, %if.end ] %r.068 = phi i32 [ %r.09, %while.body ], [ %2, %if.end ] %rem2 = srem i32 %r.068, %r.09 %cmp1.not = icmp eq i32 %rem2, 0 br i1 %cmp1.not, label %while.cond.while.end_crit_edge, label %while.body, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 %r.068, ptr %x, align 4, !tbaa !5 store i32 %r.09, ptr %y, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %if.end %4 = phi i32 [ %r.09, %while.cond.while.end_crit_edge ], [ %2, %if.end ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(){ int x,y,r; scanf("%d %d",&x,&y); if(x < y){ r = x; x = y; y = r; } while(y > 0){ r = x % y; x = y; y = r; } printf("%d\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160729/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160729/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %x, align 4, !tbaa !5 store i32 %0, ptr %y, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %x.promoted = phi i32 [ %1, %if.then ], [ %0, %entry ] %.pr = phi i32 [ %0, %if.then ], [ %1, %entry ] %cmp16 = icmp sgt i32 %.pr, 0 br i1 %cmp16, label %while.body, label %while.end while.body: ; preds = %if.end, %while.body %2 = phi i32 [ %rem, %while.body ], [ %.pr, %if.end ] %3 = phi i32 [ %2, %while.body ], [ %x.promoted, %if.end ] %rem = srem i32 %3, %2 %cmp1 = icmp sgt i32 %rem, 0 br i1 %cmp1, label %while.body, label %while.cond.while.end_crit_edge, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 %2, ptr %x, align 4, !tbaa !5 store i32 %rem, ptr %y, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %if.end %4 = phi i32 [ %2, %while.cond.while.end_crit_edge ], [ %x.promoted, %if.end ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(){ int x,y,z,temp; scanf("%d%d",&x,&y); if(x<y){ temp = x; x = y; y = temp; } z = x%y; while(z!=0){ x = y; y = z; z = x%y; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160772/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160772/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %x, align 4, !tbaa !5 store i32 %0, ptr %y, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %0, %if.then ], [ %1, %entry ] %3 = phi i32 [ %1, %if.then ], [ %0, %entry ] %rem = srem i32 %3, %2 %cmp1.not7 = icmp eq i32 %rem, 0 br i1 %cmp1.not7, label %while.end, label %while.body while.body: ; preds = %if.end, %while.body %z.09 = phi i32 [ %rem2, %while.body ], [ %rem, %if.end ] %z.068 = phi i32 [ %z.09, %while.body ], [ %2, %if.end ] %rem2 = srem i32 %z.068, %z.09 %cmp1.not = icmp eq i32 %rem2, 0 br i1 %cmp1.not, label %while.cond.while.end_crit_edge, label %while.body, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 %z.068, ptr %x, align 4, !tbaa !5 store i32 %z.09, ptr %y, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %if.end %4 = phi i32 [ %z.09, %while.cond.while.end_crit_edge ], [ %2, %if.end ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(){ int x,y,ns,nb,d; scanf("%d%d",&x,&y); if(x<y){ ns=x; nb=y; } else if(y<x){ ns=y; nb=x; } while(1){ d=nb%ns; if(d==0) break; nb=ns; ns=d; } printf("%d\n",ns); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160815/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160815/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %cmp1 = icmp slt i32 %1, %0 %spec.select = select i1 %cmp1, i32 %0, i32 undef %spec.select13 = select i1 %cmp1, i32 %1, i32 undef %nb.0 = select i1 %cmp, i32 %1, i32 %spec.select %ns.0 = select i1 %cmp, i32 %0, i32 %spec.select13 br label %while.cond while.cond: ; preds = %while.cond, %entry %nb.1 = phi i32 [ %nb.0, %entry ], [ %ns.1, %while.cond ] %ns.1 = phi i32 [ %ns.0, %entry ], [ %rem, %while.cond ] %rem = srem i32 %nb.1, %ns.1 %cmp4 = icmp eq i32 %rem, 0 br i1 %cmp4, label %while.end, label %while.cond while.end: ; preds = %while.cond %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ns.1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(){ int x,y,mod; scanf("%d %d",&x,&y); while(1){ mod=x%y; if(mod==0){ break; }else{ x=y; y=mod; } } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160859/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160859/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %x.promoted = load i32, ptr %x, align 4, !tbaa !5 %y.promoted = load i32, ptr %y, align 4, !tbaa !5 %rem4 = srem i32 %x.promoted, %y.promoted %cmp5 = icmp eq i32 %rem4, 0 br i1 %cmp5, label %while.end, label %if.else if.else: ; preds = %entry, %if.else %rem7 = phi i32 [ %rem, %if.else ], [ %rem4, %entry ] %rem36 = phi i32 [ %rem7, %if.else ], [ %y.promoted, %entry ] %rem = srem i32 %rem36, %rem7 %cmp = icmp eq i32 %rem, 0 br i1 %cmp, label %while.cond.while.end_crit_edge, label %if.else while.cond.while.end_crit_edge: ; preds = %if.else store i32 %rem36, ptr %x, align 4, !tbaa !5 store i32 %rem7, ptr %y, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %entry %.lcssa = phi i32 [ %rem7, %while.cond.while.end_crit_edge ], [ %y.promoted, %entry ] %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int gcd(int a,int b); int main(int argc, const char * argv[]) { int a,b; scanf("%d %d",&a,&b); printf("%d\n",gcd(a,b)); } int gcd(int a,int b){ int r; while((r = a % b) != 0){ a = b; b = r; } return b; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160909/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160909/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\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) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 br label %while.cond.i while.cond.i: ; preds = %while.cond.i, %entry %b.addr.0.i = phi i32 [ %1, %entry ], [ %rem.i, %while.cond.i ] %a.addr.0.i = phi i32 [ %0, %entry ], [ %b.addr.0.i, %while.cond.i ] %rem.i = srem i32 %a.addr.0.i, %b.addr.0.i %cmp.not.i = icmp eq i32 %rem.i, 0 br i1 %cmp.not.i, label %gcd.exit, label %while.cond.i, !llvm.loop !9 gcd.exit: ; preds = %while.cond.i %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %b.addr.0.i) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #3 { entry: br label %while.cond while.cond: ; preds = %while.cond, %entry %b.addr.0 = phi i32 [ %b, %entry ], [ %rem, %while.cond ] %a.addr.0 = phi i32 [ %a, %entry ], [ %b.addr.0, %while.cond ] %rem = srem i32 %a.addr.0, %b.addr.0 %cmp.not = icmp eq i32 %rem, 0 br i1 %cmp.not, label %while.end, label %while.cond, !llvm.loop !9 while.end: ; preds = %while.cond ret i32 %b.addr.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { 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 #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(void){ int number; int human,fish; int i; int max = -1; int x = 0; scanf("%d",&number); for(i = 0;i < number;i++){ scanf("%d %d",&human,&fish); if(fish > max){ max = fish; x = human; } if((max == fish) && (x > human)){ x = human; } } printf("%d %d\n",x,max); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160952/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160952/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"%d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %number = alloca i32, align 4 %human = alloca i32, align 4 %fish = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %number) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %human) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %fish) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %number) %0 = load i32, ptr %number, align 4, !tbaa !5 %cmp15 = icmp sgt i32 %0, 0 br i1 %cmp15, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %x.018 = phi i32 [ %x.2, %for.body ], [ 0, %entry ] %max.017 = phi i32 [ %spec.select, %for.body ], [ -1, %entry ] %i.016 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %human, ptr noundef nonnull %fish) %1 = load i32, ptr %fish, align 4, !tbaa !5 %cmp2 = icmp sgt i32 %1, %max.017 %2 = load i32, ptr %human, align 4 %spec.select = call i32 @llvm.smax.i32(i32 %1, i32 %max.017) %spec.select13 = select i1 %cmp2, i32 %2, i32 %x.018 %cmp3.not = icmp slt i32 %1, %max.017 %spec.select14 = call i32 @llvm.smin.i32(i32 %spec.select13, i32 %2) %x.2 = select i1 %cmp3.not, i32 %spec.select13, i32 %spec.select14 %inc = add nuw nsw i32 %i.016, 1 %3 = load i32, ptr %number, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %3 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry %max.0.lcssa = phi i32 [ -1, %entry ], [ %spec.select, %for.body ] %x.0.lcssa = phi i32 [ 0, %entry ], [ %x.2, %for.body ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %x.0.lcssa, i32 noundef %max.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %fish) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %human) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %number) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 ; 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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(){ int b,c,d=-1,e=0; int a,i; scanf("%d",&a); for(i=0;i<a;i++){ scanf("%d %d",&b,&c); if(c>d){ d=c; e=b; }else if(c==d&&b<e)e=b; } printf("%d %d\n",e,d); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161001/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161001/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"%d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %b = alloca i32, align 4 %c = alloca i32, align 4 %a = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %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 %cmp13 = icmp sgt i32 %0, 0 br i1 %cmp13, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %i.016 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %e.015 = phi i32 [ %e.1, %for.inc ], [ 0, %entry ] %d.014 = phi i32 [ %d.1, %for.inc ], [ -1, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %b, ptr noundef nonnull %c) %1 = load i32, ptr %c, align 4, !tbaa !5 %cmp2 = icmp sgt i32 %1, %d.014 br i1 %cmp2, label %if.then, label %if.else if.then: ; preds = %for.body %2 = load i32, ptr %b, align 4, !tbaa !5 br label %for.inc if.else: ; preds = %for.body %cmp3 = icmp eq i32 %1, %d.014 br i1 %cmp3, label %land.lhs.true, label %for.inc land.lhs.true: ; preds = %if.else %3 = load i32, ptr %b, align 4, !tbaa !5 %spec.select = call i32 @llvm.smin.i32(i32 %3, i32 %e.015) br label %for.inc for.inc: ; preds = %land.lhs.true, %if.then, %if.else %d.1 = phi i32 [ %1, %if.then ], [ %d.014, %if.else ], [ %d.014, %land.lhs.true ] %e.1 = phi i32 [ %2, %if.then ], [ %e.015, %if.else ], [ %spec.select, %land.lhs.true ] %inc = add nuw nsw i32 %i.016, 1 %4 = load i32, ptr %a, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %4 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.inc, %entry %d.0.lcssa = phi i32 [ -1, %entry ], [ %d.1, %for.inc ] %e.0.lcssa = phi i32 [ 0, %entry ], [ %e.1, %for.inc ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %e.0.lcssa, i32 noundef %d.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(void){ char S[15]; scanf("%s", S); if(S[5]=='0' && S[6]<='4' &&S[6] >='1'){ printf("Heisei\n"); }else{ printf("TBD\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161052/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161052/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @str = private unnamed_addr constant [4 x i8] c"TBD\00", align 1 @str.3 = private unnamed_addr constant [7 x i8] c"Heisei\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %S = alloca [15 x i8], align 1 call void @llvm.lifetime.start.p0(i64 15, ptr nonnull %S) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S) %arrayidx = getelementptr inbounds [15 x i8], ptr %S, i64 0, i64 5 %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %cmp = icmp eq i8 %0, 48 %arrayidx2 = getelementptr inbounds [15 x i8], ptr %S, i64 0, i64 6 %1 = load i8, ptr %arrayidx2, align 1 %cmp4 = icmp slt i8 %1, 53 %or.cond = select i1 %cmp, i1 %cmp4, i1 false %cmp9 = icmp sgt i8 %1, 48 %or.cond13 = select i1 %or.cond, i1 %cmp9, i1 false %str.3.str = select i1 %or.cond13, ptr @str.3, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) call void @llvm.lifetime.end.p0(i64 15, ptr nonnull %S) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { char S[15]; scanf("%s", S); puts((S[5] == '1' || S[6] >= '5') ? "TBD" : "Heisei"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161096/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161096/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"TBD\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"Heisei\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %S = alloca [15 x i8], align 1 call void @llvm.lifetime.start.p0(i64 15, ptr nonnull %S) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %S) %arrayidx = getelementptr inbounds [15 x i8], ptr %S, i64 0, i64 5 %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %cmp = icmp eq i8 %0, 49 %arrayidx2 = getelementptr inbounds [15 x i8], ptr %S, i64 0, i64 6 %1 = load i8, ptr %arrayidx2, align 1 %cmp4 = icmp sgt i8 %1, 52 %2 = select i1 %cmp, i1 true, i1 %cmp4 %cond = select i1 %2, ptr @.str.1, ptr @.str.2 %call6 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %cond) call void @llvm.lifetime.end.p0(i64 15, ptr nonnull %S) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}