; 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 i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = 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
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #2
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds i64, ptr %12, i64 0
  %14 = load i64, ptr %13, align 8, !tbaa !9
  %15 = add i64 %14, -10089659
  %16 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  store i64 %15, ptr %16, align 8, !tbaa !9
  %17 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %18 = load i64, ptr %17, align 8, !tbaa !9
  %19 = lshr i64 %18, 4
  %20 = and i64 %19, 1
  %21 = icmp ne i64 %20, 0
  br i1 %21, label %22, label %122

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

28:                                               ; preds = %22
  %29 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %30 = load i64, ptr %29, align 8, !tbaa !9
  %31 = lshr i64 %30, 2
  %32 = and i64 %31, 1
  %33 = icmp ne i64 %32, 0
  br i1 %33, label %34, label %45

34:                                               ; preds = %28
  %35 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %36 = load i64, ptr %35, align 8, !tbaa !9
  %37 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %38 = load i64, ptr %37, align 8, !tbaa !9
  %39 = add i64 %38, %36
  store i64 %39, ptr %37, align 8, !tbaa !9
  %40 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %41 = load i64, ptr %40, align 8, !tbaa !9
  %42 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %43 = load i64, ptr %42, align 8, !tbaa !9
  %44 = add i64 %43, %41
  store i64 %44, ptr %42, align 8, !tbaa !9
  br label %62

45:                                               ; preds = %28
  %46 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %47 = load i64, ptr %46, align 8, !tbaa !9
  %48 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %49 = load i64, ptr %48, align 8, !tbaa !9
  %50 = add i64 %49, %47
  store i64 %50, ptr %48, align 8, !tbaa !9
  %51 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %52 = getelementptr inbounds i8, ptr %51, i64 1
  %53 = load i8, ptr %52, align 1, !tbaa !11
  store i8 %53, ptr %6, align 1, !tbaa !11
  %54 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %55 = getelementptr inbounds i8, ptr %54, i64 0
  %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 1
  store i8 %56, ptr %58, align 1, !tbaa !11
  %59 = load i8, ptr %6, align 1, !tbaa !11
  %60 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %61 = getelementptr inbounds i8, ptr %60, i64 0
  store i8 %59, ptr %61, align 1, !tbaa !11
  br label %62

62:                                               ; preds = %45, %34
  br label %121

63:                                               ; preds = %22
  %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 %92

69:                                               ; preds = %63
  %70 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %71 = getelementptr inbounds i32, ptr %70, i64 1
  %72 = load i32, ptr %71, align 4, !tbaa !12
  store i32 %72, ptr %7, align 4, !tbaa !12
  %73 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %74 = getelementptr inbounds i32, ptr %73, i64 0
  %75 = load i32, ptr %74, align 4, !tbaa !12
  %76 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %77 = getelementptr inbounds i32, ptr %76, i64 1
  store i32 %75, ptr %77, align 4, !tbaa !12
  %78 = load i32, ptr %7, align 4, !tbaa !12
  %79 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %80 = getelementptr inbounds i32, ptr %79, i64 0
  store i32 %78, ptr %80, align 4, !tbaa !12
  %81 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %82 = getelementptr inbounds i32, ptr %81, i64 1
  %83 = load i32, ptr %82, align 4, !tbaa !12
  store i32 %83, ptr %8, align 4, !tbaa !12
  %84 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %85 = getelementptr inbounds i32, ptr %84, i64 0
  %86 = load i32, ptr %85, align 4, !tbaa !12
  %87 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %88 = getelementptr inbounds i32, ptr %87, i64 1
  store i32 %86, ptr %88, align 4, !tbaa !12
  %89 = load i32, ptr %8, align 4, !tbaa !12
  %90 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %91 = getelementptr inbounds i32, ptr %90, i64 0
  store i32 %89, ptr %91, align 4, !tbaa !12
  br label %120

92:                                               ; preds = %63
  %93 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %94 = load i64, ptr %93, align 8, !tbaa !9
  %95 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %96 = load i64, ptr %95, align 8, !tbaa !9
  %97 = add i64 %96, %94
  store i64 %97, ptr %95, align 8, !tbaa !9
  %98 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %99 = getelementptr inbounds i8, ptr %98, i64 7
  %100 = load i8, ptr %99, align 1, !tbaa !11
  store i8 %100, ptr %9, align 1, !tbaa !11
  %101 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %102 = getelementptr inbounds i8, ptr %101, i64 2
  %103 = load i8, ptr %102, align 1, !tbaa !11
  %104 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %105 = getelementptr inbounds i8, ptr %104, i64 7
  store i8 %103, ptr %105, align 1, !tbaa !11
  %106 = load i8, ptr %9, align 1, !tbaa !11
  %107 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %108 = getelementptr inbounds i8, ptr %107, i64 2
  store i8 %106, ptr %108, align 1, !tbaa !11
  %109 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %110 = getelementptr inbounds i8, ptr %109, i64 3
  %111 = load i8, ptr %110, align 1, !tbaa !11
  store i8 %111, ptr %9, align 1, !tbaa !11
  %112 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %113 = getelementptr inbounds i8, ptr %112, i64 0
  %114 = load i8, ptr %113, align 1, !tbaa !11
  %115 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %116 = getelementptr inbounds i8, ptr %115, i64 3
  store i8 %114, ptr %116, align 1, !tbaa !11
  %117 = load i8, ptr %9, align 1, !tbaa !11
  %118 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %119 = getelementptr inbounds i8, ptr %118, i64 0
  store i8 %117, ptr %119, align 1, !tbaa !11
  br label %120

120:                                              ; preds = %92, %69
  br label %121

121:                                              ; preds = %120, %62
  br label %156

122:                                              ; preds = %2
  %123 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %124 = getelementptr inbounds i32, ptr %123, i64 1
  %125 = load i32, ptr %124, align 4, !tbaa !12
  store i32 %125, ptr %10, align 4, !tbaa !12
  %126 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %127 = getelementptr inbounds i32, ptr %126, i64 0
  %128 = load i32, ptr %127, align 4, !tbaa !12
  %129 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %130 = getelementptr inbounds i32, ptr %129, i64 1
  store i32 %128, ptr %130, align 4, !tbaa !12
  %131 = load i32, ptr %10, align 4, !tbaa !12
  %132 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %133 = getelementptr inbounds i32, ptr %132, i64 0
  store i32 %131, ptr %133, align 4, !tbaa !12
  %134 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %135 = getelementptr inbounds i32, ptr %134, i64 0
  %136 = load i32, ptr %135, align 4, !tbaa !12
  store i32 %136, ptr %10, align 4, !tbaa !12
  %137 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %138 = getelementptr inbounds i32, ptr %137, i64 1
  %139 = load i32, ptr %138, align 4, !tbaa !12
  %140 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %141 = getelementptr inbounds i32, ptr %140, i64 0
  store i32 %139, ptr %141, align 4, !tbaa !12
  %142 = load i32, ptr %10, align 4, !tbaa !12
  %143 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %144 = getelementptr inbounds i32, ptr %143, i64 1
  store i32 %142, ptr %144, align 4, !tbaa !12
  %145 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %146 = getelementptr inbounds i32, ptr %145, i64 1
  %147 = load i32, ptr %146, align 4, !tbaa !12
  store i32 %147, ptr %11, align 4, !tbaa !12
  %148 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %149 = getelementptr inbounds i32, ptr %148, i64 0
  %150 = load i32, ptr %149, align 4, !tbaa !12
  %151 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %152 = getelementptr inbounds i32, ptr %151, i64 1
  store i32 %150, ptr %152, align 4, !tbaa !12
  %153 = load i32, ptr %11, align 4, !tbaa !12
  %154 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %155 = getelementptr inbounds i32, ptr %154, i64 0
  store i32 %153, ptr %155, align 4, !tbaa !12
  br label %156

156:                                              ; preds = %122, %121
  %157 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %158 = load i64, ptr %157, align 8, !tbaa !9
  %159 = add i64 %158, 398645492
  %160 = add i64 %159, 1103385283
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = getelementptr inbounds i64, ptr %161, i64 0
  store i64 %160, ptr %162, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #2
  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.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 = !{!"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 = add i64 %3, -10089659
  %5 = and i64 %4, 16
  %.not = icmp eq i64 %5, 0
  br i1 %.not, label %12, label %6

6:                                                ; preds = %2
  %7 = and i64 %4, 4
  %.not649 = icmp eq i64 %7, 0
  br i1 %.not649, label %10, label %8

8:                                                ; preds = %6
  %9 = shl i64 %4, 2
  %.sroa.0.sroa.34.0.extract.shift422662 = lshr i64 %9, 8
  %.sroa.0.sroa.36.0.extract.shift508663 = lshr i64 %9, 16
  %.sroa.0.sroa.38.0.extract.shift594664 = lshr i64 %9, 24
  %.sroa.40.0.extract.shift102 = lshr i64 %9, 32
  %sum.shift665 = lshr i64 %9, 56
  br label %13

10:                                               ; preds = %6
  %11 = shl i64 %4, 1
  %.sroa.0.sroa.34.0.extract.shift432650 = lshr i64 %11, 8
  %.sroa.0.sroa.36.0.extract.shift518651 = lshr i64 %11, 16
  %.sroa.0.sroa.38.0.extract.shift604652 = lshr i64 %11, 24
  %.sroa.40.0.extract.shift114 = lshr i64 %11, 32
  %sum.shift653 = lshr i64 %11, 56
  br label %13

12:                                               ; preds = %2
  %.sroa.40.0.extract.shift = lshr i64 %4, 32
  %.sroa.0.sroa.0.0.insert.insert320 = and i64 %4, 16777199
  %.sroa.40.sroa.30.0.extract.shift287645 = lshr i64 %4, 24
  %.sroa.0.sroa.34.0.extract.shift388646 = lshr i64 %4, 40
  %.sroa.0.sroa.36.0.extract.shift474647 = lshr i64 %4, 48
  %sum.shift = lshr i64 %4, 56
  br label %13

13:                                               ; preds = %10, %8, %12
  %.sroa.40.sroa.30.0.in = phi i64 [ %sum.shift665, %8 ], [ %sum.shift653, %10 ], [ %.sroa.40.sroa.30.0.extract.shift287645, %12 ]
  %.sroa.40.sroa.0.sroa.0.0 = phi i64 [ %.sroa.40.0.extract.shift102, %8 ], [ %.sroa.40.0.extract.shift114, %10 ], [ %.sroa.0.sroa.0.0.insert.insert320, %12 ]
  %.sroa.0.sroa.0.0.in = phi i64 [ %9, %8 ], [ %.sroa.0.sroa.34.0.extract.shift432650, %10 ], [ %.sroa.40.0.extract.shift, %12 ]
  %.sroa.0.sroa.34.0.in = phi i64 [ %.sroa.0.sroa.34.0.extract.shift422662, %8 ], [ %11, %10 ], [ %.sroa.0.sroa.34.0.extract.shift388646, %12 ]
  %.sroa.0.sroa.36.0.in = phi i64 [ %.sroa.0.sroa.36.0.extract.shift508663, %8 ], [ %.sroa.0.sroa.36.0.extract.shift518651, %10 ], [ %.sroa.0.sroa.36.0.extract.shift474647, %12 ]
  %.sroa.0.sroa.38.0.in = phi i64 [ %.sroa.0.sroa.38.0.extract.shift594664, %8 ], [ %.sroa.0.sroa.38.0.extract.shift604652, %10 ], [ %sum.shift, %12 ]
  %.sroa.0.sroa.38.0.insert.ext620 = shl nuw i64 %.sroa.0.sroa.38.0.in, 24
  %.sroa.0.sroa.36.0.insert.ext534 = shl nuw i64 %.sroa.0.sroa.36.0.in, 16
  %.sroa.0.sroa.36.0.insert.shift535 = and i64 %.sroa.0.sroa.36.0.insert.ext534, 16711680
  %.sroa.0.sroa.34.0.insert.ext448 = shl i64 %.sroa.0.sroa.34.0.in, 8
  %.sroa.0.sroa.34.0.insert.shift449 = and i64 %.sroa.0.sroa.34.0.insert.ext448, 65280
  %.sroa.0.sroa.0.0.insert.ext363 = and i64 %.sroa.0.sroa.0.0.in, 255
  %.sroa.40.sroa.30.0.insert.ext255 = shl nuw i64 %.sroa.40.sroa.30.0.in, 24
  %.sroa.40.sroa.0.0.insert.ext180 = and i64 %.sroa.40.sroa.0.sroa.0.0, 16777215
  %.sroa.40.sroa.30.0.insert.ext255.masked = and i64 %.sroa.40.sroa.30.0.insert.ext255, 4278190080
  %.sroa.40.0.insert.ext134 = or disjoint i64 %.sroa.40.sroa.30.0.insert.ext255.masked, %.sroa.40.sroa.0.0.insert.ext180
  %.sroa.40.0.insert.shift135 = shl nuw i64 %.sroa.40.0.insert.ext134, 32
  %.sroa.0.sroa.38.0.insert.ext620.masked = and i64 %.sroa.0.sroa.38.0.insert.ext620, 4278190080
  %.sroa.0.sroa.36.0.insert.insert537.masked = add nuw nsw i64 %.sroa.0.sroa.0.0.insert.ext363, 1502030775
  %.sroa.0.sroa.34.0.insert.insert451.masked = or disjoint i64 %.sroa.0.sroa.36.0.insert.insert537.masked, %.sroa.40.0.insert.shift135
  %.sroa.0.0.insert.ext64 = add nuw nsw i64 %.sroa.0.sroa.34.0.insert.insert451.masked, %.sroa.0.sroa.34.0.insert.shift449
  %.sroa.0.0.insert.insert66 = add nuw nsw i64 %.sroa.0.0.insert.ext64, %.sroa.0.sroa.36.0.insert.shift535
  %14 = add i64 %.sroa.0.0.insert.insert66, %.sroa.0.sroa.38.0.insert.ext620.masked
  store i64 %14, 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