; 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 i8, align 1
  %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 1, 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 %77

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 %56

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
  %48 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %49 = load i64, ptr %48, align 8, !tbaa !9
  %50 = lshr i64 %49, 1
  %51 = and i64 %50, 7
  %52 = or i64 %51, 1
  %53 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %54 = load i64, ptr %53, align 8, !tbaa !9
  %55 = shl i64 %54, %52
  store i64 %55, ptr %53, align 8, !tbaa !9
  br label %76

56:                                               ; preds = %19
  %57 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %58 = load i64, ptr %57, align 8, !tbaa !9
  %59 = lshr i64 %58, 1
  %60 = and i64 %59, 7
  %61 = or i64 %60, 1
  %62 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %63 = load i64, ptr %62, align 8, !tbaa !9
  %64 = shl i64 %63, %61
  store i64 %64, ptr %62, align 8, !tbaa !9
  %65 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %66 = getelementptr inbounds i8, ptr %65, i64 0
  %67 = load i8, ptr %66, align 1, !tbaa !11
  store i8 %67, ptr %7, align 1, !tbaa !11
  %68 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %69 = getelementptr inbounds i8, ptr %68, i64 5
  %70 = load i8, ptr %69, align 1, !tbaa !11
  %71 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %72 = getelementptr inbounds i8, ptr %71, i64 0
  store i8 %70, ptr %72, align 1, !tbaa !11
  %73 = load i8, ptr %7, align 1, !tbaa !11
  %74 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %75 = getelementptr inbounds i8, ptr %74, i64 5
  store i8 %73, ptr %75, align 1, !tbaa !11
  br label %76

76:                                               ; preds = %56, %25
  br label %108

77:                                               ; preds = %2
  %78 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %79 = load i64, ptr %78, align 8, !tbaa !9
  %80 = lshr i64 %79, 2
  %81 = and i64 %80, 7
  %82 = or i64 %81, 1
  %83 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %84 = load i64, ptr %83, align 8, !tbaa !9
  %85 = lshr i64 %84, %82
  store i64 %85, ptr %83, align 8, !tbaa !9
  %86 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %87 = getelementptr inbounds i32, ptr %86, i64 0
  %88 = load i32, ptr %87, align 4, !tbaa !12
  store i32 %88, ptr %8, align 4, !tbaa !12
  %89 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %90 = getelementptr inbounds i32, ptr %89, i64 1
  %91 = load i32, ptr %90, align 4, !tbaa !12
  %92 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %93 = getelementptr inbounds i32, ptr %92, i64 0
  store i32 %91, ptr %93, align 4, !tbaa !12
  %94 = load i32, ptr %8, align 4, !tbaa !12
  %95 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %96 = getelementptr inbounds i32, ptr %95, i64 1
  store i32 %94, ptr %96, align 4, !tbaa !12
  %97 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %98 = getelementptr inbounds i32, ptr %97, i64 1
  %99 = load i32, ptr %98, align 4, !tbaa !12
  store i32 %99, ptr %8, align 4, !tbaa !12
  %100 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %101 = getelementptr inbounds i32, ptr %100, i64 0
  %102 = load i32, ptr %101, align 4, !tbaa !12
  %103 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %104 = getelementptr inbounds i32, ptr %103, i64 1
  store i32 %102, ptr %104, align 4, !tbaa !12
  %105 = load i32, ptr %8, align 4, !tbaa !12
  %106 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %107 = getelementptr inbounds i32, ptr %106, i64 0
  store i32 %105, ptr %107, align 4, !tbaa !12
  br label %108

108:                                              ; preds = %77, %76
  %109 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %110 = load i64, ptr %109, align 8, !tbaa !9
  %111 = and i64 %110, 387166272
  %112 = and i64 %111, 913307615
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds i64, ptr %113, i64 0
  store i64 %112, ptr %114, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, 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.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 = trunc i64 %3 to i32
  %.sroa.0.sroa.0.0.extract.trunc287 = xor i32 %4, 700325083
  %5 = lshr i32 %.sroa.0.sroa.0.0.extract.trunc287, 8
  %6 = lshr i32 %.sroa.0.sroa.0.0.extract.trunc287, 16
  %.sroa.0.sroa.25.0.insert.shift427 = and i32 %.sroa.0.sroa.0.0.extract.trunc287, -16777216
  %.sroa.25.0.extract.shift = lshr i64 %3, 32
  %.sroa.25.sroa.0.0.extract.trunc = trunc nuw i64 %.sroa.25.0.extract.shift to i32
  %.sroa.25.sroa.19.0.extract.shift472 = lshr i64 %3, 40
  %.sroa.25.sroa.19.0.extract.trunc = trunc nuw nsw i64 %.sroa.25.sroa.19.0.extract.shift472 to i32
  %sum.shift = lshr i64 %3, 56
  %.sroa.25.sroa.23232.0.extract.trunc = trunc nuw nsw i64 %sum.shift to i32
  %.sroa.0.sroa.23.0.insert.ext376 = and i32 %6, 255
  %.sroa.0.sroa.23.0.insert.shift377 = shl nuw nsw i32 %.sroa.0.sroa.23.0.insert.ext376, 16
  %.sroa.0.sroa.21.0.insert.ext326 = and i32 %5, 255
  %.sroa.0.sroa.21.0.insert.shift327 = shl nuw nsw i32 %.sroa.0.sroa.21.0.insert.ext326, 8
  %7 = or disjoint i32 %.sroa.0.sroa.23.0.insert.shift377, %.sroa.0.sroa.21.0.insert.shift327
  %.sroa.0.sroa.21.0.insert.insert329 = or disjoint i32 %7, %.sroa.0.sroa.25.0.insert.shift427
  %.sroa.0.sroa.0.0.insert.ext288 = and i32 %.sroa.0.sroa.0.0.extract.trunc287, 255
  %.sroa.0.sroa.0.0.insert.insert290 = or disjoint i32 %.sroa.0.sroa.21.0.insert.insert329, %.sroa.0.sroa.0.0.insert.ext288
  %.sroa.25.sroa.23232.0.insert.shift = shl nuw i32 %.sroa.25.sroa.23232.0.extract.trunc, 24
  %.sroa.25.sroa.23.0.insert.shift = and i32 %.sroa.25.sroa.0.0.extract.trunc, 16711680
  %.sroa.25.sroa.19.0.insert.ext = and i32 %.sroa.25.sroa.19.0.extract.trunc, 255
  %.sroa.25.sroa.19.0.insert.shift = shl nuw nsw i32 %.sroa.25.sroa.19.0.insert.ext, 8
  %8 = or disjoint i32 %.sroa.25.sroa.19.0.insert.shift, %.sroa.25.sroa.23232.0.insert.shift
  %.sroa.25.sroa.19.0.insert.insert = or disjoint i32 %8, %.sroa.25.sroa.23.0.insert.shift
  %.sroa.25.sroa.0.0.insert.ext = and i32 %.sroa.25.sroa.0.0.extract.trunc, 255
  %.sroa.25.sroa.0.0.insert.insert = or disjoint i32 %.sroa.25.sroa.19.0.insert.insert, %.sroa.25.sroa.0.0.insert.ext
  %.sroa.25.0.insert.ext = zext i32 %.sroa.25.sroa.0.0.insert.insert to i64
  %.sroa.25.0.insert.shift = shl nuw i64 %.sroa.25.0.insert.ext, 32
  %.sroa.0.0.insert.ext = zext i32 %.sroa.0.sroa.0.0.insert.insert290 to i64
  %.sroa.0.0.insert.insert = or disjoint i64 %.sroa.25.0.insert.shift, %.sroa.0.0.insert.ext
  %9 = and i64 %.sroa.0.0.insert.ext, 16
  %.not = icmp eq i64 %9, 0
  br i1 %.not, label %24, label %10

10:                                               ; preds = %2
  %11 = and i64 %.sroa.0.0.insert.ext, 4
  %.not508 = icmp eq i64 %11, 0
  br i1 %.not508, label %19, label %12

12:                                               ; preds = %10
  %.sroa.0.sroa.23.0.insert.shift385 = shl nuw nsw i32 %.sroa.25.sroa.19.0.insert.ext, 16
  %.sroa.0.sroa.21.0.insert.shift335 = shl nuw nsw i32 %.sroa.25.sroa.23232.0.extract.trunc, 8
  %13 = or disjoint i32 %.sroa.0.sroa.23.0.insert.shift385, %.sroa.0.sroa.21.0.insert.shift335
  %.sroa.0.sroa.21.0.insert.insert337 = or disjoint i32 %13, %.sroa.0.sroa.25.0.insert.shift427
  %.sroa.0.sroa.0.0.insert.insert296 = or disjoint i32 %.sroa.0.sroa.21.0.insert.insert337, %.sroa.0.sroa.0.0.insert.ext288
  %.sroa.25.sroa.23232.0.insert.shift238 = shl nuw i32 %.sroa.0.sroa.21.0.insert.ext326, 24
  %.sroa.25.sroa.19.0.insert.shift137 = shl nuw nsw i32 %.sroa.0.sroa.23.0.insert.ext376, 8
  %14 = or disjoint i32 %.sroa.25.sroa.23232.0.insert.shift238, %.sroa.25.sroa.19.0.insert.shift137
  %.sroa.25.sroa.19.0.insert.insert139 = or disjoint i32 %14, %.sroa.25.sroa.23.0.insert.shift
  %.sroa.25.sroa.0.0.insert.insert102 = or disjoint i32 %.sroa.25.sroa.19.0.insert.insert139, %.sroa.25.sroa.0.0.insert.ext
  %.sroa.25.0.insert.ext51 = zext i32 %.sroa.25.sroa.0.0.insert.insert102 to i64
  %.sroa.25.0.insert.shift52 = shl nuw i64 %.sroa.25.0.insert.ext51, 32
  %.sroa.0.0.insert.ext13 = zext i32 %.sroa.0.sroa.0.0.insert.insert296 to i64
  %.sroa.0.0.insert.insert15 = or disjoint i64 %.sroa.25.0.insert.shift52, %.sroa.0.0.insert.ext13
  %15 = lshr i64 %.sroa.0.0.insert.ext13, 1
  %16 = and i64 %15, 6
  %17 = or disjoint i64 %16, 1
  %18 = shl i64 %.sroa.0.0.insert.insert15, %17
  br label %29

19:                                               ; preds = %10
  %20 = lshr i64 %.sroa.0.0.insert.ext, 1
  %21 = and i64 %20, 4
  %22 = or disjoint i64 %21, 1
  %23 = shl i64 %.sroa.0.0.insert.insert, %22
  %.sroa.25.sroa.19.0.extract.shift154512 = lshr i64 %23, 40
  br label %29

24:                                               ; preds = %2
  %25 = lshr i64 %.sroa.0.0.insert.ext, 2
  %26 = and i64 %25, 2
  %27 = or disjoint i64 %26, 1
  %28 = lshr i64 %.sroa.0.0.insert.insert, %27
  br label %29

29:                                               ; preds = %12, %19, %24
  %.sroa.0.sroa.0.0.in = phi i64 [ %18, %12 ], [ %.sroa.25.sroa.19.0.extract.shift154512, %19 ], [ %28, %24 ]
  %.sroa.25.sroa.23232.0.in.in = phi i64 [ %18, %12 ], [ %23, %19 ], [ %28, %24 ]
  %.sroa.0.sroa.21.0.insert.insert367 = and i64 %.sroa.25.sroa.23232.0.in.in, 369340416
  %.sroa.0.sroa.0.0.insert.ext315 = and i64 %.sroa.0.sroa.0.0.in, 64
  %.sroa.0.sroa.0.0.insert.insert317 = or disjoint i64 %.sroa.0.sroa.21.0.insert.insert367, %.sroa.0.sroa.0.0.insert.ext315
  store i64 %.sroa.0.sroa.0.0.insert.insert317, 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