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

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

27:                                               ; preds = %21
  %28 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %29 = getelementptr inbounds i8, ptr %28, i64 1
  %30 = load i8, ptr %29, align 1, !tbaa !11
  store i8 %30, ptr %6, align 1, !tbaa !11
  %31 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %32 = getelementptr inbounds i8, ptr %31, i64 5
  %33 = load i8, ptr %32, align 1, !tbaa !11
  %34 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %35 = getelementptr inbounds i8, ptr %34, i64 1
  store i8 %33, ptr %35, align 1, !tbaa !11
  %36 = load i8, ptr %6, align 1, !tbaa !11
  %37 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %38 = getelementptr inbounds i8, ptr %37, i64 5
  store i8 %36, ptr %38, align 1, !tbaa !11
  br label %62

39:                                               ; preds = %21
  %40 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %41 = getelementptr inbounds i8, ptr %40, i64 1
  %42 = load i8, ptr %41, align 1, !tbaa !11
  store i8 %42, ptr %7, align 1, !tbaa !11
  %43 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %44 = getelementptr inbounds i8, ptr %43, i64 2
  %45 = load i8, ptr %44, align 1, !tbaa !11
  %46 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %47 = getelementptr inbounds i8, ptr %46, i64 1
  store i8 %45, ptr %47, align 1, !tbaa !11
  %48 = load i8, ptr %7, align 1, !tbaa !11
  %49 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %50 = getelementptr inbounds i8, ptr %49, i64 2
  store i8 %48, ptr %50, align 1, !tbaa !11
  %51 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %52 = getelementptr inbounds i8, ptr %51, i64 5
  %53 = load i8, ptr %52, align 1, !tbaa !11
  store i8 %53, ptr %7, align 1, !tbaa !11
  %54 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %55 = getelementptr inbounds i8, ptr %54, i64 6
  %56 = load i8, ptr %55, align 1, !tbaa !11
  %57 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %58 = getelementptr inbounds i8, ptr %57, i64 5
  store i8 %56, ptr %58, align 1, !tbaa !11
  %59 = load i8, ptr %7, align 1, !tbaa !11
  %60 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %61 = getelementptr inbounds i8, ptr %60, i64 6
  store i8 %59, ptr %61, align 1, !tbaa !11
  br label %62

62:                                               ; preds = %39, %27
  br label %105

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

69:                                               ; preds = %63
  %70 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %71 = getelementptr inbounds i16, ptr %70, i64 0
  %72 = load i16, ptr %71, align 2, !tbaa !12
  store i16 %72, ptr %8, align 2, !tbaa !12
  %73 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %74 = getelementptr inbounds i16, ptr %73, i64 1
  %75 = load i16, ptr %74, align 2, !tbaa !12
  %76 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %77 = getelementptr inbounds i16, ptr %76, i64 0
  store i16 %75, ptr %77, align 2, !tbaa !12
  %78 = load i16, ptr %8, align 2, !tbaa !12
  %79 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %80 = getelementptr inbounds i16, ptr %79, i64 1
  store i16 %78, ptr %80, align 2, !tbaa !12
  br label %104

81:                                               ; preds = %63
  %82 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %83 = getelementptr inbounds i16, ptr %82, i64 3
  %84 = load i16, ptr %83, align 2, !tbaa !12
  store i16 %84, ptr %9, align 2, !tbaa !12
  %85 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %86 = getelementptr inbounds i16, ptr %85, i64 2
  %87 = load i16, ptr %86, align 2, !tbaa !12
  %88 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %89 = getelementptr inbounds i16, ptr %88, i64 3
  store i16 %87, ptr %89, align 2, !tbaa !12
  %90 = load i16, ptr %9, align 2, !tbaa !12
  %91 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %92 = getelementptr inbounds i16, ptr %91, i64 2
  store i16 %90, ptr %92, align 2, !tbaa !12
  %93 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %94 = getelementptr inbounds i16, ptr %93, i64 0
  %95 = load i16, ptr %94, align 2, !tbaa !12
  store i16 %95, ptr %9, align 2, !tbaa !12
  %96 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %97 = getelementptr inbounds i16, ptr %96, i64 1
  %98 = load i16, ptr %97, align 2, !tbaa !12
  %99 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %100 = getelementptr inbounds i16, ptr %99, i64 0
  store i16 %98, ptr %100, align 2, !tbaa !12
  %101 = load i16, ptr %9, align 2, !tbaa !12
  %102 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %103 = getelementptr inbounds i16, ptr %102, i64 1
  store i16 %101, ptr %103, align 2, !tbaa !12
  br label %104

104:                                              ; preds = %81, %69
  br label %105

105:                                              ; preds = %104, %62
  %106 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %107 = load i64, ptr %106, align 8, !tbaa !9
  %108 = mul i64 %107, 943156777
  %109 = mul i64 %108, 495144311008221650
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = getelementptr inbounds i64, ptr %110, i64 0
  store i64 %109, ptr %111, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 2, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 2, ptr %8) #2
  call void @llvm.lifetime.end.p0(i64 1, 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.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"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, 326104726
  %.sroa.0.sroa.11.0.extract.shift202221 = lshr i64 %4, 8
  %.sroa.15.0.extract.shift = lshr i64 %4, 16
  %.sroa.15.sroa.13.0.extract.shift222 = lshr i64 %4, 24
  %.sroa.21.0.extract.shift = lshr i64 %4, 32
  %.sroa.21.sroa.9.0.extract.shift223 = lshr i64 %4, 40
  %.sroa.27.0.extract.shift = lshr i64 %4, 48
  %sum.shift = lshr i64 %4, 56
  %5 = and i64 %4, 16
  %.not = icmp eq i64 %5, 0
  %6 = and i64 %4, 8
  %.not225 = icmp eq i64 %6, 0
  br i1 %.not, label %8, label %7

7:                                                ; preds = %2
  %.sroa.27.0.extract.shift..sroa.0.sroa.11.0.extract.shift202221 = select i1 %.not225, i64 %.sroa.27.0.extract.shift, i64 %.sroa.0.sroa.11.0.extract.shift202221
  %.sroa.21.sroa.9.0.extract.shift223..sroa.27.0.extract.shift = select i1 %.not225, i64 %.sroa.21.sroa.9.0.extract.shift223, i64 %.sroa.27.0.extract.shift
  %.sroa.0.sroa.11.0.extract.shift202221..sroa.15.0.extract.shift = select i1 %.not225, i64 %.sroa.0.sroa.11.0.extract.shift202221, i64 %.sroa.15.0.extract.shift
  %.sroa.15.0.extract.shift..sroa.21.sroa.9.0.extract.shift223 = select i1 %.not225, i64 %.sroa.15.0.extract.shift, i64 %.sroa.21.sroa.9.0.extract.shift223
  br label %9

8:                                                ; preds = %2
  %sum.shift..sroa.21.sroa.9.0.extract.shift223 = select i1 %.not225, i64 %sum.shift, i64 %.sroa.21.sroa.9.0.extract.shift223
  %.sroa.27.0.extract.shift..sroa.21.0.extract.shift = select i1 %.not225, i64 %.sroa.27.0.extract.shift, i64 %.sroa.21.0.extract.shift
  %.sroa.21.sroa.9.0.extract.shift223.sum.shift = select i1 %.not225, i64 %.sroa.21.sroa.9.0.extract.shift223, i64 %sum.shift
  %.sroa.21.0.extract.shift..sroa.27.0.extract.shift = select i1 %.not225, i64 %.sroa.21.0.extract.shift, i64 %.sroa.27.0.extract.shift
  br label %9

9:                                                ; preds = %8, %7
  %.sroa.21.sroa.9.0 = phi i64 [ %.sroa.27.0.extract.shift..sroa.0.sroa.11.0.extract.shift202221, %7 ], [ %sum.shift..sroa.21.sroa.9.0.extract.shift223, %8 ]
  %.sroa.21.sroa.0.0.in = phi i64 [ %.sroa.21.0.extract.shift, %7 ], [ %.sroa.27.0.extract.shift..sroa.21.0.extract.shift, %8 ]
  %.sroa.27.sroa.11.0.in = phi i64 [ %sum.shift, %7 ], [ %.sroa.21.sroa.9.0.extract.shift223.sum.shift, %8 ]
  %.sroa.27.sroa.0.0 = phi i64 [ %.sroa.21.sroa.9.0.extract.shift223..sroa.27.0.extract.shift, %7 ], [ %.sroa.21.0.extract.shift..sroa.27.0.extract.shift, %8 ]
  %.sroa.15.sroa.0.0 = phi i64 [ %.sroa.0.sroa.11.0.extract.shift202221..sroa.15.0.extract.shift, %7 ], [ %4, %8 ]
  %.sroa.15.sroa.13.0.in = phi i64 [ %.sroa.15.sroa.13.0.extract.shift222, %7 ], [ %.sroa.0.sroa.11.0.extract.shift202221, %8 ]
  %.sroa.0.sroa.0.0.in = phi i64 [ %4, %7 ], [ %.sroa.15.0.extract.shift, %8 ]
  %.sroa.0.sroa.11.0.in = phi i64 [ %.sroa.15.0.extract.shift..sroa.21.sroa.9.0.extract.shift223, %7 ], [ %.sroa.15.sroa.13.0.extract.shift222, %8 ]
  %.sroa.0.sroa.11.0.insert.ext216 = shl nuw nsw i64 %.sroa.0.sroa.11.0.in, 8
  %.sroa.0.sroa.0.0.insert.ext193 = and i64 %.sroa.0.sroa.0.0.in, 255
  %.sroa.15.sroa.13.0.insert.ext163 = shl nuw i64 %.sroa.15.sroa.13.0.in, 8
  %.sroa.15.sroa.0.0.insert.ext144 = and i64 %.sroa.15.sroa.0.0, 255
  %.sroa.21.sroa.9.0.insert.ext128 = shl nuw i64 %.sroa.21.sroa.9.0, 8
  %.sroa.21.sroa.9.0.insert.shift129 = and i64 %.sroa.21.sroa.9.0.insert.ext128, 65280
  %.sroa.21.sroa.0.0.insert.ext113 = and i64 %.sroa.21.sroa.0.0.in, 255
  %.sroa.21.sroa.0.0.insert.insert115 = or disjoint i64 %.sroa.21.sroa.9.0.insert.shift129, %.sroa.21.sroa.0.0.insert.ext113
  %.sroa.27.sroa.11.0.insert.ext97 = shl nuw nsw i64 %.sroa.27.sroa.11.0.in, 8
  %.sroa.27.sroa.0.0.insert.ext82 = and i64 %.sroa.27.sroa.0.0, 255
  %.sroa.27.sroa.11.0.insert.ext97.masked = and i64 %.sroa.27.sroa.11.0.insert.ext97, 65280
  %.sroa.27.0.insert.ext71 = or disjoint i64 %.sroa.27.sroa.11.0.insert.ext97.masked, %.sroa.27.sroa.0.0.insert.ext82
  %.sroa.27.0.insert.shift72 = shl nuw i64 %.sroa.27.0.insert.ext71, 48
  %.sroa.21.0.insert.shift53 = shl nuw nsw i64 %.sroa.21.sroa.0.0.insert.insert115, 32
  %.sroa.21.0.insert.insert55 = or disjoint i64 %.sroa.27.0.insert.shift72, %.sroa.21.0.insert.shift53
  %.sroa.15.sroa.13.0.insert.ext163.masked = and i64 %.sroa.15.sroa.13.0.insert.ext163, 65280
  %.sroa.15.0.insert.ext35 = or disjoint i64 %.sroa.15.sroa.13.0.insert.ext163.masked, %.sroa.15.sroa.0.0.insert.ext144
  %.sroa.15.0.insert.shift36 = shl nuw nsw i64 %.sroa.15.0.insert.ext35, 16
  %.sroa.15.0.insert.insert38 = or disjoint i64 %.sroa.15.0.insert.shift36, %.sroa.21.0.insert.insert55
  %.sroa.0.sroa.11.0.insert.ext216.masked = and i64 %.sroa.0.sroa.11.0.insert.ext216, 65280
  %.sroa.0.0.insert.ext17 = or disjoint i64 %.sroa.0.sroa.0.0.insert.ext193, %.sroa.0.sroa.11.0.insert.ext216.masked
  %.sroa.0.0.insert.insert19 = or disjoint i64 %.sroa.15.0.insert.insert38, %.sroa.0.0.insert.ext17
  %10 = mul i64 %.sroa.0.0.insert.insert19, -1233578815982166366
  store i64 %10, 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