; LLVM IR from tum-i4/obfuscation-benchmarks :: tigress-generated-programs (RandomFunc)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
define dso_local void @RandomFunc(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [1 x i64], align 8
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca i16, align 2
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #2
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #2
  call void @llvm.lifetime.start.p0(i64 2, ptr %8) #2
  %9 = load ptr, ptr %3, align 8, !tbaa !5
  %10 = getelementptr inbounds i64, ptr %9, i64 0
  %11 = load i64, ptr %10, align 8, !tbaa !9
  %12 = add i64 %11, -10089659
  %13 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  store i64 %12, ptr %13, align 8, !tbaa !9
  %14 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %15 = load i64, ptr %14, align 8, !tbaa !9
  %16 = lshr i64 %15, 4
  %17 = and i64 %16, 1
  %18 = icmp ne i64 %17, 0
  br i1 %18, label %19, label %65

19:                                               ; preds = %2
  %20 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %21 = load i64, ptr %20, align 8, !tbaa !9
  %22 = lshr i64 %21, 4
  %23 = and i64 %22, 1
  %24 = icmp ne i64 %23, 0
  br i1 %24, label %25, label %53

25:                                               ; preds = %19
  %26 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %27 = load i64, ptr %26, align 8, !tbaa !9
  %28 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %29 = load i64, ptr %28, align 8, !tbaa !9
  %30 = mul i64 %29, %27
  store i64 %30, ptr %28, align 8, !tbaa !9
  %31 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %32 = getelementptr inbounds i8, ptr %31, i64 1
  %33 = load i8, ptr %32, align 1, !tbaa !11
  store i8 %33, ptr %6, align 1, !tbaa !11
  %34 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %35 = getelementptr inbounds i8, ptr %34, i64 7
  %36 = load i8, ptr %35, align 1, !tbaa !11
  %37 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %38 = getelementptr inbounds i8, ptr %37, i64 1
  store i8 %36, ptr %38, align 1, !tbaa !11
  %39 = load i8, ptr %6, align 1, !tbaa !11
  %40 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %41 = getelementptr inbounds i8, ptr %40, i64 7
  store i8 %39, ptr %41, align 1, !tbaa !11
  %42 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %43 = getelementptr inbounds i8, ptr %42, i64 5
  %44 = load i8, ptr %43, align 1, !tbaa !11
  store i8 %44, ptr %6, align 1, !tbaa !11
  %45 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %46 = getelementptr inbounds i8, ptr %45, i64 2
  %47 = load i8, ptr %46, align 1, !tbaa !11
  %48 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %49 = getelementptr inbounds i8, ptr %48, i64 5
  store i8 %47, ptr %49, align 1, !tbaa !11
  %50 = load i8, ptr %6, align 1, !tbaa !11
  %51 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %52 = getelementptr inbounds i8, ptr %51, i64 2
  store i8 %50, ptr %52, align 1, !tbaa !11
  br label %64

53:                                               ; preds = %19
  %54 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %55 = load i64, ptr %54, align 8, !tbaa !9
  %56 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %57 = load i64, ptr %56, align 8, !tbaa !9
  %58 = add i64 %57, %55
  store i64 %58, ptr %56, align 8, !tbaa !9
  %59 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %60 = load i64, ptr %59, align 8, !tbaa !9
  %61 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %62 = load i64, ptr %61, align 8, !tbaa !9
  %63 = add i64 %62, %60
  store i64 %63, ptr %61, align 8, !tbaa !9
  br label %64

64:                                               ; preds = %53, %25
  br label %112

65:                                               ; preds = %2
  %66 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %67 = load i64, ptr %66, align 8, !tbaa !9
  %68 = lshr i64 %67, 3
  %69 = and i64 %68, 1
  %70 = icmp ne i64 %69, 0
  br i1 %70, label %71, label %83

71:                                               ; preds = %65
  %72 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %73 = getelementptr inbounds i32, ptr %72, i64 1
  %74 = load i32, ptr %73, align 4, !tbaa !12
  store i32 %74, ptr %7, align 4, !tbaa !12
  %75 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %76 = getelementptr inbounds i32, ptr %75, i64 0
  %77 = load i32, ptr %76, align 4, !tbaa !12
  %78 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %79 = getelementptr inbounds i32, ptr %78, i64 1
  store i32 %77, ptr %79, align 4, !tbaa !12
  %80 = load i32, ptr %7, align 4, !tbaa !12
  %81 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %82 = getelementptr inbounds i32, ptr %81, i64 0
  store i32 %80, ptr %82, align 4, !tbaa !12
  br label %111

83:                                               ; preds = %65
  %84 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %85 = load i64, ptr %84, align 8, !tbaa !9
  %86 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %87 = load i64, ptr %86, align 8, !tbaa !9
  %88 = add i64 %87, %85
  store i64 %88, ptr %86, align 8, !tbaa !9
  %89 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %90 = getelementptr inbounds i16, ptr %89, i64 1
  %91 = load i16, ptr %90, align 2, !tbaa !14
  store i16 %91, ptr %8, align 2, !tbaa !14
  %92 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %93 = getelementptr inbounds i16, ptr %92, i64 0
  %94 = load i16, ptr %93, align 2, !tbaa !14
  %95 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %96 = getelementptr inbounds i16, ptr %95, i64 1
  store i16 %94, ptr %96, align 2, !tbaa !14
  %97 = load i16, ptr %8, align 2, !tbaa !14
  %98 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %99 = getelementptr inbounds i16, ptr %98, i64 0
  store i16 %97, ptr %99, align 2, !tbaa !14
  %100 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %101 = getelementptr inbounds i16, ptr %100, i64 2
  %102 = load i16, ptr %101, align 2, !tbaa !14
  store i16 %102, ptr %8, align 2, !tbaa !14
  %103 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %104 = getelementptr inbounds i16, ptr %103, i64 3
  %105 = load i16, ptr %104, align 2, !tbaa !14
  %106 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %107 = getelementptr inbounds i16, ptr %106, i64 2
  store i16 %105, ptr %107, align 2, !tbaa !14
  %108 = load i16, ptr %8, align 2, !tbaa !14
  %109 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %110 = getelementptr inbounds i16, ptr %109, i64 3
  store i16 %108, ptr %110, align 2, !tbaa !14
  br label %111

111:                                              ; preds = %83, %71
  br label %112

112:                                              ; preds = %111, %64
  %113 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %114 = load i64, ptr %113, align 8, !tbaa !9
  %115 = add i64 %114, 790121441
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = getelementptr inbounds i64, ptr %116, i64 0
  store i64 %115, ptr %117, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 2, ptr %8) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #2
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!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 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"short", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @RandomFunc(ptr nocapture noundef readonly %0, ptr nocapture noundef writeonly %1) local_unnamed_addr #0 {
  %3 = load i64, ptr %0, align 8, !tbaa !5
  %4 = add i64 %3, -10089659
  %.sroa.29.0.extract.shift = lshr i64 %4, 32
  %sum.shift = lshr i64 %4, 48
  %5 = and i64 %4, 16
  %.not = icmp eq i64 %5, 0
  br i1 %.not, label %8, label %6

6:                                                ; preds = %2
  %7 = mul i64 %4, %4
  %.sroa.0.sroa.0.sroa.23.0.extract.shift724804 = lshr i64 %7, 8
  %.sroa.0.sroa.25.0.extract.shift506805 = lshr i64 %7, 16
  %.sroa.0.sroa.25.sroa.25.0.extract.shift609806 = lshr i64 %7, 24
  %.sroa.29.0.extract.shift75 = lshr i64 %7, 32
  %.sroa.29.sroa.0.sroa.23.0.extract.shift400807 = lshr i64 %7, 40
  %sum.shift808 = lshr i64 %7, 48
  %sum.shift810 = lshr i64 %7, 56
  br label %13

8:                                                ; preds = %2
  %9 = and i64 %4, 8
  %.not774 = icmp eq i64 %9, 0
  br i1 %.not774, label %11, label %10

10:                                               ; preds = %8
  %.sroa.29.sroa.0.sroa.23.0.extract.shift444796 = lshr i64 %4, 8
  %.sroa.29.sroa.25.0.extract.shift225799 = lshr i64 %4, 16
  %sum.shift797800 = lshr i64 %4, 24
  %.sroa.0.sroa.0.sroa.23.0.extract.shift704801 = lshr i64 %4, 40
  %sum.shift802 = lshr i64 %4, 56
  br label %13

11:                                               ; preds = %8
  %12 = shl i64 %4, 1
  %.sroa.0.sroa.25.0.extract.shift540776 = lshr i64 %12, 16
  %.sroa.29.0.extract.shift116 = lshr i64 %12, 32
  %sum.shift779 = lshr i64 %12, 48
  %.sroa.0.sroa.25.sroa.25.0.extract.shift653785 = lshr i64 %12, 8
  %sum.shift786 = lshr i64 %12, 24
  %sum.shift792 = lshr i64 %12, 56
  %sum.shift794 = lshr i64 %12, 40
  br label %13

13:                                               ; preds = %10, %11, %6
  %.sroa.0.sroa.25.sroa.0.0.in = phi i64 [ %.sroa.29.sroa.0.sroa.23.0.extract.shift400807, %6 ], [ %sum.shift, %10 ], [ %12, %11 ]
  %.sroa.29.sroa.0.sroa.23.0.in = phi i64 [ %.sroa.0.sroa.25.0.extract.shift506805, %6 ], [ %.sroa.29.sroa.0.sroa.23.0.extract.shift444796, %10 ], [ %sum.shift792, %11 ]
  %.sroa.29.sroa.0.sroa.0.0.in = phi i64 [ %.sroa.29.0.extract.shift75, %6 ], [ %4, %10 ], [ %sum.shift779, %11 ]
  %.sroa.29.sroa.25.sroa.23.0.in = phi i64 [ %.sroa.0.sroa.0.sroa.23.0.extract.shift724804, %6 ], [ %sum.shift797800, %10 ], [ %sum.shift794, %11 ]
  %.sroa.29.sroa.25.sroa.0.0.in = phi i64 [ %sum.shift808, %6 ], [ %.sroa.29.sroa.25.0.extract.shift225799, %10 ], [ %.sroa.29.0.extract.shift116, %11 ]
  %.sroa.0.sroa.25.sroa.25.0.in = phi i64 [ %.sroa.0.sroa.25.sroa.25.0.extract.shift609806, %6 ], [ %sum.shift802, %10 ], [ %.sroa.0.sroa.25.sroa.25.0.extract.shift653785, %11 ]
  %.sroa.0.sroa.0.sroa.0.0.in = phi i64 [ %7, %6 ], [ %.sroa.29.0.extract.shift, %10 ], [ %.sroa.0.sroa.25.0.extract.shift540776, %11 ]
  %.sroa.0.sroa.0.sroa.23.0.in = phi i64 [ %sum.shift810, %6 ], [ %.sroa.0.sroa.0.sroa.23.0.extract.shift704801, %10 ], [ %sum.shift786, %11 ]
  %.sroa.0.sroa.0.sroa.23.0.insert.ext760 = shl nuw nsw i64 %.sroa.0.sroa.0.sroa.23.0.in, 8
  %.sroa.0.sroa.0.sroa.0.0.insert.ext697 = and i64 %.sroa.0.sroa.0.sroa.0.0.in, 255
  %.sroa.0.sroa.25.sroa.25.0.insert.ext645 = shl nuw i64 %.sroa.0.sroa.25.sroa.25.0.in, 8
  %.sroa.0.sroa.25.sroa.0.0.insert.ext584 = and i64 %.sroa.0.sroa.25.sroa.0.0.in, 255
  %.sroa.0.sroa.25.sroa.25.0.insert.ext645.masked = and i64 %.sroa.0.sroa.25.sroa.25.0.insert.ext645, 65280
  %.sroa.0.sroa.25.0.insert.ext542 = or disjoint i64 %.sroa.0.sroa.25.sroa.25.0.insert.ext645.masked, %.sroa.0.sroa.25.sroa.0.0.insert.ext584
  %.sroa.0.sroa.25.0.insert.shift543 = shl nuw nsw i64 %.sroa.0.sroa.25.0.insert.ext542, 16
  %.sroa.0.sroa.0.sroa.23.0.insert.ext760.masked = and i64 %.sroa.0.sroa.0.sroa.23.0.insert.ext760, 65280
  %.sroa.0.sroa.0.0.insert.ext484 = or disjoint i64 %.sroa.0.sroa.0.sroa.0.0.insert.ext697, %.sroa.0.sroa.0.sroa.23.0.insert.ext760.masked
  %.sroa.29.sroa.0.sroa.23.0.insert.ext436 = shl nuw i64 %.sroa.29.sroa.0.sroa.23.0.in, 8
  %.sroa.29.sroa.0.sroa.0.0.insert.ext375 = and i64 %.sroa.29.sroa.0.sroa.0.0.in, 255
  %.sroa.29.sroa.0.sroa.23.0.insert.ext436.masked = and i64 %.sroa.29.sroa.0.sroa.23.0.insert.ext436, 65280
  %.sroa.29.sroa.0.0.insert.ext161 = or disjoint i64 %.sroa.29.sroa.0.sroa.23.0.insert.ext436.masked, %.sroa.29.sroa.0.sroa.0.0.insert.ext375
  %14 = shl i64 %.sroa.29.sroa.25.sroa.23.0.in, 56
  %.sroa.29.sroa.25.sroa.0.0.insert.ext262 = shl i64 %.sroa.29.sroa.25.sroa.0.0.in, 48
  %15 = and i64 %.sroa.29.sroa.25.sroa.0.0.insert.ext262, 71776119061217280
  %16 = shl nuw nsw i64 %.sroa.29.sroa.0.0.insert.ext161, 32
  %.sroa.0.sroa.0.0.insert.insert486 = or disjoint i64 %14, %16
  %17 = or disjoint i64 %.sroa.0.sroa.0.0.insert.insert486, %15
  %.sroa.29.0.insert.shift120 = or disjoint i64 %17, 790121441
  %.sroa.0.0.insert.insert54 = add i64 %.sroa.29.0.insert.shift120, %.sroa.0.sroa.25.0.insert.shift543
  %18 = add i64 %.sroa.0.0.insert.insert54, %.sroa.0.sroa.0.0.insert.ext484
  store i64 %18, ptr %1, align 8, !tbaa !5
  ret void
}

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" }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass