; 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 i8, align 1
  %9 = alloca i8, align 1
  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 1, ptr %8) #2
  call void @llvm.lifetime.start.p0(i64 1, 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 %85

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

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
  %39 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %40 = getelementptr inbounds i8, ptr %39, i64 1
  %41 = load i8, ptr %40, align 1, !tbaa !11
  store i8 %41, ptr %7, align 1, !tbaa !11
  %42 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %43 = getelementptr inbounds i8, ptr %42, i64 2
  %44 = load i8, ptr %43, align 1, !tbaa !11
  %45 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %46 = getelementptr inbounds i8, ptr %45, i64 1
  store i8 %44, ptr %46, align 1, !tbaa !11
  %47 = load i8, ptr %7, align 1, !tbaa !11
  %48 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %49 = getelementptr inbounds i8, ptr %48, i64 2
  store i8 %47, ptr %49, align 1, !tbaa !11
  %50 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %51 = getelementptr inbounds i8, ptr %50, i64 5
  %52 = load i8, ptr %51, align 1, !tbaa !11
  store i8 %52, ptr %7, align 1, !tbaa !11
  %53 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %54 = getelementptr inbounds i8, ptr %53, i64 6
  %55 = load i8, ptr %54, align 1, !tbaa !11
  %56 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %57 = getelementptr inbounds i8, ptr %56, i64 5
  store i8 %55, ptr %57, align 1, !tbaa !11
  %58 = load i8, ptr %7, align 1, !tbaa !11
  %59 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %60 = getelementptr inbounds i8, ptr %59, i64 6
  store i8 %58, ptr %60, align 1, !tbaa !11
  br label %84

61:                                               ; preds = %21
  %62 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %63 = getelementptr inbounds i8, ptr %62, i64 1
  %64 = load i8, ptr %63, align 1, !tbaa !11
  store i8 %64, ptr %8, align 1, !tbaa !11
  %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
  %68 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %69 = getelementptr inbounds i8, ptr %68, i64 1
  store i8 %67, ptr %69, align 1, !tbaa !11
  %70 = load i8, ptr %8, 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 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %74 = getelementptr inbounds i8, ptr %73, i64 4
  %75 = load i8, ptr %74, align 1, !tbaa !11
  store i8 %75, ptr %8, align 1, !tbaa !11
  %76 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %77 = getelementptr inbounds i8, ptr %76, i64 7
  %78 = load i8, ptr %77, align 1, !tbaa !11
  %79 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %80 = getelementptr inbounds i8, ptr %79, i64 4
  store i8 %78, ptr %80, align 1, !tbaa !11
  %81 = load i8, ptr %8, align 1, !tbaa !11
  %82 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %83 = getelementptr inbounds i8, ptr %82, i64 7
  store i8 %81, ptr %83, align 1, !tbaa !11
  br label %84

84:                                               ; preds = %61, %27
  br label %102

85:                                               ; preds = %2
  %86 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %87 = getelementptr inbounds i8, ptr %86, i64 6
  %88 = load i8, ptr %87, align 1, !tbaa !11
  store i8 %88, ptr %9, align 1, !tbaa !11
  %89 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %90 = getelementptr inbounds i8, ptr %89, i64 7
  %91 = load i8, ptr %90, align 1, !tbaa !11
  %92 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %93 = getelementptr inbounds i8, ptr %92, i64 6
  store i8 %91, ptr %93, align 1, !tbaa !11
  %94 = load i8, ptr %9, align 1, !tbaa !11
  %95 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %96 = getelementptr inbounds i8, ptr %95, i64 7
  store i8 %94, ptr %96, align 1, !tbaa !11
  %97 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %98 = load i64, ptr %97, align 8, !tbaa !9
  %99 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %100 = load i64, ptr %99, align 8, !tbaa !9
  %101 = add i64 %100, %98
  store i64 %101, ptr %99, align 8, !tbaa !9
  br label %102

102:                                              ; preds = %85, %84
  %103 = getelementptr inbounds [1 x i64], ptr %5, i64 0, i64 0
  %104 = load i64, ptr %103, align 8, !tbaa !9
  %105 = add i64 %104, 1044838405
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds i64, ptr %106, i64 0
  store i64 %105, ptr %107, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 1, 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}


; 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.11.0.extract.shift = lshr i64 %4, 8
  %.sroa.17.0.extract.shift = lshr i64 %4, 16
  %.sroa.1992.0.extract.shift = lshr i64 %4, 32
  %.sroa.21.0.extract.shift = lshr i64 %4, 40
  %.sroa.25.0.extract.shift = lshr i64 %4, 48
  %.sroa.29.0.extract.shift = lshr i64 %4, 56
  %.sroa.25.0.insert.ext = and i64 %.sroa.25.0.extract.shift, 255
  %.sroa.25.0.insert.shift = shl nuw nsw i64 %.sroa.25.0.insert.ext, 48
  %.sroa.21.0.insert.shift = and i64 %4, 280375465082880
  %.sroa.21.0.insert.insert = or disjoint i64 %.sroa.25.0.insert.shift, %.sroa.21.0.insert.shift
  %.sroa.1992.0.insert.shift = and i64 %4, 1095216660480
  %.sroa.1992.0.insert.insert = or disjoint i64 %.sroa.21.0.insert.insert, %.sroa.1992.0.insert.shift
  %.sroa.19.0.insert.shift = and i64 %4, 4278190080
  %.sroa.19.0.insert.insert = or disjoint i64 %.sroa.1992.0.insert.insert, %.sroa.19.0.insert.shift
  %.sroa.17.0.insert.shift = and i64 %4, 16711680
  %.sroa.11.0.insert.shift = and i64 %4, 65280
  %.sroa.11.0.insert.mask = or disjoint i64 %.sroa.19.0.insert.insert, %.sroa.17.0.insert.shift
  %.sroa.0.0.insert.ext = and i64 %4, 255
  %.sroa.0.0.insert.mask = or disjoint i64 %.sroa.11.0.insert.mask, %.sroa.11.0.insert.shift
  %.sroa.0.0.insert.insert = or i64 %.sroa.0.0.insert.mask, %.sroa.0.0.insert.ext
  %5 = and i64 %.sroa.0.0.insert.insert, 16
  %.not = icmp eq i64 %5, 0
  br i1 %.not, label %10, label %6

6:                                                ; preds = %2
  %7 = and i64 %.sroa.0.0.insert.insert, 8
  %.not185 = icmp eq i64 %7, 0
  br i1 %.not185, label %8, label %12

8:                                                ; preds = %6
  %9 = and i64 %.sroa.1992.0.extract.shift, 255
  br label %12

10:                                               ; preds = %2
  %.sroa.29.0.insert.shift168 = shl nuw i64 %.sroa.25.0.insert.ext, 56
  %.sroa.25.0.insert.shift145 = shl nuw nsw i64 %.sroa.29.0.extract.shift, 48
  %.sroa.25.0.insert.insert147 = or disjoint i64 %.sroa.29.0.insert.shift168, %.sroa.25.0.insert.shift145
  %.sroa.21.0.insert.insert124 = or disjoint i64 %.sroa.25.0.insert.insert147, %.sroa.21.0.insert.shift
  %.sroa.1992.0.insert.insert102 = or disjoint i64 %.sroa.21.0.insert.insert124, %.sroa.1992.0.insert.shift
  %.sroa.19.0.insert.insert79 = or disjoint i64 %.sroa.1992.0.insert.insert102, %.sroa.19.0.insert.shift
  %.sroa.11.0.insert.mask32 = or disjoint i64 %.sroa.19.0.insert.insert79, %.sroa.17.0.insert.shift
  %.sroa.0.0.insert.mask13 = or disjoint i64 %.sroa.11.0.insert.mask32, %.sroa.11.0.insert.shift
  %.sroa.0.0.insert.insert14 = or i64 %.sroa.0.0.insert.mask13, %.sroa.0.0.insert.ext
  %11 = shl i64 %.sroa.0.0.insert.insert14, 1
  %.sroa.11.0.extract.shift39 = lshr i64 %11, 8
  %.sroa.17.0.extract.shift63 = lshr i64 %11, 16
  %.sroa.1992.0.extract.shift108 = lshr i64 %11, 32
  %.sroa.21.0.extract.shift130 = lshr i64 %11, 40
  %.sroa.25.0.extract.shift153 = lshr i64 %11, 48
  %.sroa.29.0.extract.shift176 = lshr i64 %11, 56
  %.pre = and i64 %11, 4278190080
  br label %12

12:                                               ; preds = %6, %8, %10
  %.sroa.19.0.insert.ext88.pre-phi = phi i64 [ %.sroa.19.0.insert.shift, %6 ], [ %.sroa.19.0.insert.shift, %8 ], [ %.pre, %10 ]
  %.sroa.17.0 = phi i64 [ %.sroa.21.0.extract.shift, %6 ], [ %.sroa.17.0.extract.shift, %8 ], [ %.sroa.17.0.extract.shift63, %10 ]
  %.sroa.11.0 = phi i64 [ %.sroa.17.0.extract.shift, %6 ], [ %4, %8 ], [ %.sroa.11.0.extract.shift39, %10 ]
  %.sroa.0.0.in = phi i64 [ %4, %6 ], [ %.sroa.11.0.extract.shift, %8 ], [ %11, %10 ]
  %.sroa.1992.0.in = phi i64 [ %.sroa.1992.0.extract.shift, %6 ], [ %.sroa.29.0.extract.shift, %8 ], [ %.sroa.1992.0.extract.shift108, %10 ]
  %.sroa.21.0 = phi i64 [ %.sroa.25.0.extract.shift, %6 ], [ %.sroa.21.0.extract.shift, %8 ], [ %.sroa.21.0.extract.shift130, %10 ]
  %.sroa.25.0 = phi i64 [ %.sroa.11.0.extract.shift, %6 ], [ %.sroa.25.0.extract.shift, %8 ], [ %.sroa.25.0.extract.shift153, %10 ]
  %.sroa.29.0 = phi i64 [ %.sroa.29.0.extract.shift, %6 ], [ %9, %8 ], [ %.sroa.29.0.extract.shift176, %10 ]
  %.sroa.29.0.insert.shift180 = shl nuw i64 %.sroa.29.0, 56
  %.sroa.25.0.insert.ext156 = shl i64 %.sroa.25.0, 48
  %.sroa.25.0.insert.shift157 = and i64 %.sroa.25.0.insert.ext156, 71776119061217280
  %.sroa.25.0.insert.insert159 = or disjoint i64 %.sroa.29.0.insert.shift180, %.sroa.25.0.insert.shift157
  %.sroa.21.0.insert.ext133 = shl nuw i64 %.sroa.21.0, 40
  %.sroa.21.0.insert.shift134 = and i64 %.sroa.21.0.insert.ext133, 280375465082880
  %.sroa.21.0.insert.insert136 = or disjoint i64 %.sroa.25.0.insert.insert159, %.sroa.21.0.insert.shift134
  %.sroa.1992.0.insert.ext111 = shl nuw i64 %.sroa.1992.0.in, 32
  %.sroa.1992.0.insert.shift112 = and i64 %.sroa.1992.0.insert.ext111, 1095216660480
  %.sroa.1992.0.insert.insert114 = or disjoint i64 %.sroa.21.0.insert.insert136, %.sroa.1992.0.insert.shift112
  %.sroa.19.0.insert.insert91 = or disjoint i64 %.sroa.1992.0.insert.insert114, %.sroa.19.0.insert.ext88.pre-phi
  %.sroa.17.0.insert.ext66 = shl nuw i64 %.sroa.17.0, 16
  %.sroa.17.0.insert.shift67 = and i64 %.sroa.17.0.insert.ext66, 16711680
  %.sroa.11.0.insert.ext42 = shl i64 %.sroa.11.0, 8
  %.sroa.11.0.insert.shift43 = and i64 %.sroa.11.0.insert.ext42, 65280
  %.sroa.11.0.insert.mask44 = or disjoint i64 %.sroa.19.0.insert.insert91, %.sroa.17.0.insert.shift67
  %.sroa.0.0.insert.ext21 = and i64 %.sroa.0.0.in, 255
  %.sroa.0.0.insert.mask22 = or disjoint i64 %.sroa.11.0.insert.mask44, %.sroa.11.0.insert.shift43
  %.sroa.0.0.insert.insert23 = or i64 %.sroa.0.0.insert.mask22, %.sroa.0.0.insert.ext21
  %13 = add i64 %.sroa.0.0.insert.insert23, 1044838405
  store i64 %13, 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: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass