; 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 i32, align 4
  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 4, 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 = xor i64 %11, 700325083
  %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 %58

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, 2
  %23 = and i64 %22, 1
  %24 = icmp ne i64 %23, 0
  br i1 %24, label %25, label %48

25:                                               ; preds = %19
  %26 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %27 = getelementptr inbounds i8, ptr %26, i64 1
  %28 = load i8, ptr %27, align 1, !tbaa !11
  store i8 %28, ptr %6, align 1, !tbaa !11
  %29 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %30 = getelementptr inbounds i8, ptr %29, i64 7
  %31 = load i8, ptr %30, align 1, !tbaa !11
  %32 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %33 = getelementptr inbounds i8, ptr %32, i64 1
  store i8 %31, ptr %33, align 1, !tbaa !11
  %34 = load i8, ptr %6, align 1, !tbaa !11
  %35 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %36 = getelementptr inbounds i8, ptr %35, i64 7
  store i8 %34, ptr %36, align 1, !tbaa !11
  %37 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %38 = getelementptr inbounds i8, ptr %37, i64 5
  %39 = load i8, ptr %38, align 1, !tbaa !11
  store i8 %39, 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 2
  %42 = load i8, ptr %41, align 1, !tbaa !11
  %43 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %44 = getelementptr inbounds i8, ptr %43, i64 5
  store i8 %42, ptr %44, align 1, !tbaa !11
  %45 = load i8, ptr %6, align 1, !tbaa !11
  %46 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %47 = getelementptr inbounds i8, ptr %46, i64 2
  store i8 %45, ptr %47, align 1, !tbaa !11
  br label %57

48:                                               ; preds = %19
  %49 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %50 = load i64, ptr %49, align 8, !tbaa !9
  %51 = lshr i64 %50, 1
  %52 = and i64 %51, 7
  %53 = or i64 %52, 1
  %54 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %55 = load i64, ptr %54, align 8, !tbaa !9
  %56 = shl i64 %55, %53
  store i64 %56, ptr %54, align 8, !tbaa !9
  br label %57

57:                                               ; preds = %48, %25
  br label %89

58:                                               ; preds = %2
  %59 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %60 = load i64, ptr %59, align 8, !tbaa !9
  %61 = lshr i64 %60, 3
  %62 = and i64 %61, 1
  %63 = icmp ne i64 %62, 0
  br i1 %63, label %64, label %76

64:                                               ; preds = %58
  %65 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %66 = getelementptr inbounds i32, ptr %65, i64 1
  %67 = load i32, ptr %66, align 4, !tbaa !12
  store i32 %67, ptr %7, align 4, !tbaa !12
  %68 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %69 = getelementptr inbounds i32, ptr %68, i64 0
  %70 = load i32, ptr %69, align 4, !tbaa !12
  %71 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %72 = getelementptr inbounds i32, ptr %71, i64 1
  store i32 %70, ptr %72, align 4, !tbaa !12
  %73 = load i32, ptr %7, align 4, !tbaa !12
  %74 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %75 = getelementptr inbounds i32, ptr %74, i64 0
  store i32 %73, ptr %75, align 4, !tbaa !12
  br label %88

76:                                               ; preds = %58
  %77 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %78 = getelementptr inbounds i32, ptr %77, i64 1
  %79 = load i32, ptr %78, align 4, !tbaa !12
  store i32 %79, ptr %8, align 4, !tbaa !12
  %80 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %81 = getelementptr inbounds i32, ptr %80, i64 0
  %82 = load i32, ptr %81, align 4, !tbaa !12
  %83 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %84 = getelementptr inbounds i32, ptr %83, i64 1
  store i32 %82, ptr %84, align 4, !tbaa !12
  %85 = load i32, ptr %8, align 4, !tbaa !12
  %86 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %87 = getelementptr inbounds i32, ptr %86, i64 0
  store i32 %85, ptr %87, align 4, !tbaa !12
  br label %88

88:                                               ; preds = %76, %64
  br label %89

89:                                               ; preds = %88, %57
  %90 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %91 = load i64, ptr %90, align 8, !tbaa !9
  %92 = shl i64 %91, 3
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = getelementptr inbounds i64, ptr %93, i64 0
  store i64 %92, ptr %94, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, 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}


; 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 = xor i64 %3, 700325083
  %.sroa.0.sroa.14.0.extract.shift216313 = lshr i64 %4, 8
  %.sroa.0.sroa.16.0.extract.shift250314 = lshr i64 %4, 16
  %.sroa.0.sroa.18.0.extract.shift284315 = lshr i64 %4, 24
  %.sroa.18.0.extract.shift = lshr i64 %3, 32
  %.sroa.18.sroa.14.0.extract.shift316 = lshr i64 %3, 40
  %.sroa.18.sroa.16.0.extract.shift317 = lshr i64 %3, 48
  %sum.shift = lshr i64 %3, 56
  %.sroa.18.sroa.16151.0.insert.shift = shl nuw nsw i64 %sum.shift, 24
  %.sroa.18.sroa.16.0.insert.ext = shl nuw nsw i64 %.sroa.18.sroa.16.0.extract.shift317, 16
  %.sroa.18.sroa.16.0.insert.shift = and i64 %.sroa.18.sroa.16.0.insert.ext, 16711680
  %.sroa.18.sroa.16.0.insert.insert = or disjoint i64 %.sroa.18.sroa.16.0.insert.shift, %.sroa.18.sroa.16151.0.insert.shift
  %.sroa.18.sroa.14.0.insert.ext = shl nuw nsw i64 %.sroa.18.sroa.14.0.extract.shift316, 8
  %.sroa.18.sroa.14.0.insert.shift = and i64 %.sroa.18.sroa.14.0.insert.ext, 65280
  %.sroa.18.sroa.0.0.insert.ext = and i64 %.sroa.18.0.extract.shift, 255
  %5 = or disjoint i64 %.sroa.18.sroa.0.0.insert.ext, %.sroa.18.sroa.14.0.insert.shift
  %.sroa.18.sroa.0.0.insert.insert = or disjoint i64 %5, %.sroa.18.sroa.16.0.insert.insert
  %.sroa.18.0.insert.shift = shl nuw i64 %.sroa.18.sroa.0.0.insert.insert, 32
  %.sroa.0.0.insert.ext = and i64 %4, 4294967295
  %.sroa.0.0.insert.insert = or disjoint i64 %.sroa.18.0.insert.shift, %.sroa.0.0.insert.ext
  %6 = and i64 %4, 16
  %.not = icmp eq i64 %6, 0
  br i1 %.not, label %14, label %7

7:                                                ; preds = %2
  %8 = and i64 %3, 4
  %.not320 = icmp eq i64 %8, 0
  br i1 %.not320, label %9, label %14

9:                                                ; preds = %7
  %10 = lshr i64 %4, 1
  %11 = and i64 %10, 4
  %12 = or disjoint i64 %11, 1
  %13 = shl i64 %.sroa.0.0.insert.insert, %12
  %.sroa.0.sroa.14.0.extract.shift234321 = lshr i64 %13, 8
  %.sroa.0.sroa.16.0.extract.shift268322 = lshr i64 %13, 16
  %.sroa.0.sroa.18.0.extract.shift302323 = lshr i64 %13, 24
  %.sroa.18.0.extract.shift44 = lshr i64 %13, 32
  %.sroa.18.sroa.14.0.extract.shift95324 = lshr i64 %13, 40
  %.sroa.18.sroa.16.0.extract.shift129325 = lshr i64 %13, 48
  %sum.shift326 = lshr i64 %13, 56
  br label %14

14:                                               ; preds = %2, %7, %9
  %.sroa.0.sroa.0.0.in = phi i64 [ %13, %9 ], [ %4, %7 ], [ %.sroa.18.0.extract.shift, %2 ]
  %.sroa.18.sroa.16151.0.in = phi i64 [ %sum.shift326, %9 ], [ %.sroa.0.sroa.14.0.extract.shift216313, %7 ], [ %.sroa.0.sroa.18.0.extract.shift284315, %2 ]
  %.sroa.18.sroa.16.0.in = phi i64 [ %.sroa.18.sroa.16.0.extract.shift129325, %9 ], [ %.sroa.18.sroa.16.0.extract.shift317, %7 ], [ %.sroa.0.sroa.16.0.extract.shift250314, %2 ]
  %.sroa.18.sroa.14.0.in = phi i64 [ %.sroa.18.sroa.14.0.extract.shift95324, %9 ], [ %.sroa.0.sroa.16.0.extract.shift250314, %7 ], [ %.sroa.0.sroa.14.0.extract.shift216313, %2 ]
  %.sroa.18.sroa.0.0.in = phi i64 [ %.sroa.18.0.extract.shift44, %9 ], [ %.sroa.18.0.extract.shift, %7 ], [ %4, %2 ]
  %.sroa.0.sroa.14.0.in = phi i64 [ %.sroa.0.sroa.14.0.extract.shift234321, %9 ], [ %sum.shift, %7 ], [ %.sroa.18.sroa.14.0.extract.shift316, %2 ]
  %.sroa.0.sroa.16.0.in = phi i64 [ %.sroa.0.sroa.16.0.extract.shift268322, %9 ], [ %.sroa.18.sroa.14.0.extract.shift316, %7 ], [ %.sroa.18.sroa.16.0.extract.shift317, %2 ]
  %.sroa.0.sroa.18.0.in = phi i64 [ %.sroa.0.sroa.18.0.extract.shift302323, %9 ], [ %.sroa.0.sroa.18.0.extract.shift284315, %7 ], [ %sum.shift, %2 ]
  %.sroa.0.sroa.18.0.insert.ext308 = shl nuw i64 %.sroa.0.sroa.18.0.in, 24
  %.sroa.0.sroa.16.0.insert.ext274 = shl nuw i64 %.sroa.0.sroa.16.0.in, 16
  %.sroa.0.sroa.16.0.insert.shift275 = and i64 %.sroa.0.sroa.16.0.insert.ext274, 16711680
  %.sroa.0.sroa.14.0.insert.ext240 = shl nuw i64 %.sroa.0.sroa.14.0.in, 8
  %.sroa.0.sroa.14.0.insert.shift241 = and i64 %.sroa.0.sroa.14.0.insert.ext240, 65280
  %.sroa.0.sroa.0.0.insert.ext207 = and i64 %.sroa.0.sroa.0.0.in, 255
  %.sroa.18.sroa.16151.0.insert.ext170 = shl i64 %.sroa.18.sroa.16151.0.in, 24
  %.sroa.18.sroa.16.0.insert.ext135 = shl nuw i64 %.sroa.18.sroa.16.0.in, 16
  %.sroa.18.sroa.16.0.insert.shift136 = and i64 %.sroa.18.sroa.16.0.insert.ext135, 16711680
  %.sroa.18.sroa.14.0.insert.ext101 = shl nuw i64 %.sroa.18.sroa.14.0.in, 8
  %.sroa.18.sroa.14.0.insert.shift102 = and i64 %.sroa.18.sroa.14.0.insert.ext101, 65280
  %.sroa.18.sroa.0.0.insert.ext72 = and i64 %.sroa.18.sroa.0.0.in, 255
  %.sroa.18.sroa.16.0.insert.insert138.masked = or disjoint i64 %.sroa.18.sroa.16.0.insert.shift136, %.sroa.18.sroa.16151.0.insert.ext170
  %.sroa.18.sroa.14.0.insert.insert104.masked = or disjoint i64 %.sroa.18.sroa.16.0.insert.insert138.masked, %.sroa.18.sroa.14.0.insert.shift102
  %.sroa.18.0.insert.ext52 = or disjoint i64 %.sroa.18.sroa.14.0.insert.insert104.masked, %.sroa.18.sroa.0.0.insert.ext72
  %.sroa.0.sroa.18.0.insert.ext308.masked = and i64 %.sroa.0.sroa.18.0.insert.ext308, 4278190080
  %.sroa.0.sroa.14.0.insert.insert243.masked = or disjoint i64 %.sroa.0.sroa.14.0.insert.shift241, %.sroa.0.sroa.0.0.insert.ext207
  %.sroa.0.sroa.16.0.insert.insert277.masked = or disjoint i64 %.sroa.0.sroa.14.0.insert.insert243.masked, %.sroa.0.sroa.16.0.insert.shift275
  %.sroa.0.0.insert.ext24 = or disjoint i64 %.sroa.0.sroa.16.0.insert.insert277.masked, %.sroa.0.sroa.18.0.insert.ext308.masked
  %15 = shl i64 %.sroa.18.0.insert.ext52, 35
  %16 = shl nuw nsw i64 %.sroa.0.0.insert.ext24, 3
  %17 = or disjoint i64 %16, %15
  store i64 %17, 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