; LLVM IR from gem5/gem5 :: ext/nomali/lib/jobcontrol.ll (ZN6NoMali10JobControl13updateJsStateEt)

; 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"

%"struct.NoMali::RegAddr" = type { i32 }
%"class.NoMali::GPUBlock" = type { ptr, ptr, %"class.NoMali::RegVector" }
%"class.NoMali::RegVector" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.NoMali::JobControl" = type { %"class.NoMali::GPUBlockInt", %"class.std::vector.0" }
%"class.NoMali::GPUBlockInt" = type { %"class.NoMali::GPUBlock", %"struct.NoMali::RegAddr", %"struct.NoMali::RegAddr", %"struct.NoMali::RegAddr", %"struct.NoMali::RegAddr" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<NoMali::JobSlot, std::allocator<NoMali::JobSlot>>::_Vector_impl" }
%"struct.std::_Vector_base<NoMali::JobSlot, std::allocator<NoMali::JobSlot>>::_Vector_impl" = type { %"struct.std::_Vector_base<NoMali::JobSlot, std::allocator<NoMali::JobSlot>>::_Vector_impl_data" }
%"struct.std::_Vector_base<NoMali::JobSlot, std::allocator<NoMali::JobSlot>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6NoMali7RegAddrC2Ej(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #1 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6NoMali10JobControl13updateJsStateEt(ptr noundef nonnull align 8 dereferenceable(80) %0, i16 noundef zeroext %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i16, align 2
  %5 = alloca i32, align 4
  %6 = alloca i16, align 2
  %7 = alloca %"struct.NoMali::RegAddr", align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.NoMali::RegAddr", align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i16 %1, ptr %4, align 2, !tbaa !9
  %11 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %12 = load i16, ptr %4, align 2, !tbaa !9
  %13 = zext i16 %12 to i32
  %14 = load i16, ptr %4, align 2, !tbaa !9
  %15 = zext i16 %14 to i32
  %16 = shl i32 %15, 16
  %17 = or i32 %13, %16
  store i32 %17, ptr %5, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 2, ptr %6) #4
  %18 = getelementptr inbounds %"class.NoMali::GPUBlock", ptr %11, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @_ZN6NoMali7RegAddrC2Ej(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 noundef 16)
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6NoMali9RegVectorixERKNS_7RegAddrE(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %20 = load i32, ptr %19, align 4, !tbaa !11
  %21 = load i32, ptr %5, align 4, !tbaa !11
  %22 = xor i32 %21, -1
  %23 = and i32 %20, %22
  %24 = trunc i32 %23 to i16
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  store i16 %24, ptr %6, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %25

25:                                               ; preds = %63, %2
  %26 = load i32, ptr %8, align 4, !tbaa !11
  %27 = icmp slt i32 %26, 16
  br i1 %27, label %29, label %28

28:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %66

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %30 = getelementptr inbounds %"class.NoMali::JobControl", ptr %11, i32 0, i32 1
  %31 = load i32, ptr %8, align 4, !tbaa !11
  %32 = sext i32 %31 to i64
  %33 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %32) #4
  store ptr %33, ptr %9, align 8, !tbaa !5
  %34 = load i16, ptr %4, align 2, !tbaa !9
  %35 = zext i16 %34 to i32
  %36 = load i32, ptr %8, align 4, !tbaa !11
  %37 = shl i32 1, %36
  %38 = and i32 %35, %37
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %62

40:                                               ; preds = %29
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56) %41)
  br i1 %42, label %43, label %46

43:                                               ; preds = %40
  %44 = load i32, ptr %8, align 4, !tbaa !11
  %45 = shl i32 1, %44
  br label %47

46:                                               ; preds = %40
  br label %47

47:                                               ; preds = %46, %43
  %48 = phi i32 [ %45, %43 ], [ 0, %46 ]
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  %50 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56) %49)
  br i1 %50, label %51, label %54

51:                                               ; preds = %47
  %52 = load i32, ptr %8, align 4, !tbaa !11
  %53 = shl i32 65536, %52
  br label %55

54:                                               ; preds = %47
  br label %55

55:                                               ; preds = %54, %51
  %56 = phi i32 [ %53, %51 ], [ 0, %54 ]
  %57 = or i32 %48, %56
  %58 = load i16, ptr %6, align 2, !tbaa !9
  %59 = zext i16 %58 to i32
  %60 = or i32 %59, %57
  %61 = trunc i32 %60 to i16
  store i16 %61, ptr %6, align 2, !tbaa !9
  br label %62

62:                                               ; preds = %55, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %63

63:                                               ; preds = %62
  %64 = load i32, ptr %8, align 4, !tbaa !11
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %8, align 4, !tbaa !11
  br label %25, !llvm.loop !13

66:                                               ; preds = %28
  %67 = load i16, ptr %6, align 2, !tbaa !9
  %68 = zext i16 %67 to i32
  %69 = getelementptr inbounds %"class.NoMali::GPUBlock", ptr %11, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @_ZN6NoMali7RegAddrC2Ej(ptr noundef nonnull align 4 dereferenceable(4) %10, i32 noundef 16)
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6NoMali9RegVectorixERKNS_7RegAddrE(ptr noundef nonnull align 8 dereferenceable(24) %69, ptr noundef nonnull align 4 dereferenceable(4) %10)
  store i32 %68, ptr %70, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6NoMali9RegVectorixERKNS_7RegAddrE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

declare noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56)) #3

declare noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56)) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { mustprogress 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 #3 = { "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 #4 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"short", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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"

%"struct.NoMali::RegAddr" = type { i32 }

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6NoMali7RegAddrC2Ej(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6NoMali10JobControl13updateJsStateEt(ptr noundef nonnull align 8 dereferenceable(80) %0, i16 noundef zeroext %1) local_unnamed_addr #2 align 2 {
  %3 = alloca %"struct.NoMali::RegAddr", align 4
  %4 = alloca %"struct.NoMali::RegAddr", align 4
  %5 = zext i16 %1 to i32
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  call void @_ZN6NoMali7RegAddrC2Ej(ptr noundef nonnull align 4 dereferenceable(4) %3, i32 noundef 16)
  %7 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6NoMali9RegVectorixERKNS_7RegAddrE(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %9 = xor i32 %5, -1
  %10 = and i32 %8, %9
  %11 = trunc i32 %10 to i16
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  %12 = getelementptr inbounds i8, ptr %0, i64 56
  %13 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0) #4
  %14 = and i32 %5, 1
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %20, label %15

15:                                               ; preds = %2
  %16 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56) %13)
  %17 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56) %13)
  %18 = zext i1 %16 to i16
  %19 = or disjoint i16 %18, %11
  br label %20

20:                                               ; preds = %15, %2
  %.1 = phi i16 [ %19, %15 ], [ %11, %2 ]
  %21 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 1) #4
  %22 = and i32 %5, 2
  %.not.1 = icmp eq i32 %22, 0
  br i1 %.not.1, label %28, label %23

23:                                               ; preds = %20
  %24 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56) %21)
  %25 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56) %21)
  %26 = select i1 %24, i16 2, i16 0
  %27 = or i16 %26, %.1
  br label %28

28:                                               ; preds = %23, %20
  %.1.1 = phi i16 [ %27, %23 ], [ %.1, %20 ]
  %29 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 2) #4
  %30 = and i32 %5, 4
  %.not.2 = icmp eq i32 %30, 0
  br i1 %.not.2, label %36, label %31

31:                                               ; preds = %28
  %32 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56) %29)
  %33 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56) %29)
  %34 = select i1 %32, i16 4, i16 0
  %35 = or i16 %34, %.1.1
  br label %36

36:                                               ; preds = %31, %28
  %.1.2 = phi i16 [ %35, %31 ], [ %.1.1, %28 ]
  %37 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 3) #4
  %38 = and i32 %5, 8
  %.not.3 = icmp eq i32 %38, 0
  br i1 %.not.3, label %44, label %39

39:                                               ; preds = %36
  %40 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56) %37)
  %41 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56) %37)
  %42 = select i1 %40, i16 8, i16 0
  %43 = or i16 %42, %.1.2
  br label %44

44:                                               ; preds = %39, %36
  %.1.3 = phi i16 [ %43, %39 ], [ %.1.2, %36 ]
  %45 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 4) #4
  %46 = and i32 %5, 16
  %.not.4 = icmp eq i32 %46, 0
  br i1 %.not.4, label %52, label %47

47:                                               ; preds = %44
  %48 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56) %45)
  %49 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56) %45)
  %50 = select i1 %48, i16 16, i16 0
  %51 = or i16 %50, %.1.3
  br label %52

52:                                               ; preds = %47, %44
  %.1.4 = phi i16 [ %51, %47 ], [ %.1.3, %44 ]
  %53 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 5) #4
  %54 = and i32 %5, 32
  %.not.5 = icmp eq i32 %54, 0
  br i1 %.not.5, label %60, label %55

55:                                               ; preds = %52
  %56 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56) %53)
  %57 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56) %53)
  %58 = select i1 %56, i16 32, i16 0
  %59 = or i16 %58, %.1.4
  br label %60

60:                                               ; preds = %55, %52
  %.1.5 = phi i16 [ %59, %55 ], [ %.1.4, %52 ]
  %61 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 6) #4
  %62 = and i32 %5, 64
  %.not.6 = icmp eq i32 %62, 0
  br i1 %.not.6, label %68, label %63

63:                                               ; preds = %60
  %64 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56) %61)
  %65 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56) %61)
  %66 = select i1 %64, i16 64, i16 0
  %67 = or i16 %66, %.1.5
  br label %68

68:                                               ; preds = %63, %60
  %.1.6 = phi i16 [ %67, %63 ], [ %.1.5, %60 ]
  %69 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 7) #4
  %70 = and i32 %5, 128
  %.not.7 = icmp eq i32 %70, 0
  br i1 %.not.7, label %76, label %71

71:                                               ; preds = %68
  %72 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56) %69)
  %73 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56) %69)
  %74 = select i1 %72, i16 128, i16 0
  %75 = or i16 %74, %.1.6
  br label %76

76:                                               ; preds = %71, %68
  %.1.7 = phi i16 [ %75, %71 ], [ %.1.6, %68 ]
  %77 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 8) #4
  %78 = and i32 %5, 256
  %.not.8 = icmp eq i32 %78, 0
  br i1 %.not.8, label %84, label %79

79:                                               ; preds = %76
  %80 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56) %77)
  %81 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56) %77)
  %82 = select i1 %80, i16 256, i16 0
  %83 = or i16 %82, %.1.7
  br label %84

84:                                               ; preds = %79, %76
  %.1.8 = phi i16 [ %83, %79 ], [ %.1.7, %76 ]
  %85 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 9) #4
  %86 = and i32 %5, 512
  %.not.9 = icmp eq i32 %86, 0
  br i1 %.not.9, label %92, label %87

87:                                               ; preds = %84
  %88 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56) %85)
  %89 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56) %85)
  %90 = select i1 %88, i16 512, i16 0
  %91 = or i16 %90, %.1.8
  br label %92

92:                                               ; preds = %87, %84
  %.1.9 = phi i16 [ %91, %87 ], [ %.1.8, %84 ]
  %93 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 10) #4
  %94 = and i32 %5, 1024
  %.not.10 = icmp eq i32 %94, 0
  br i1 %.not.10, label %100, label %95

95:                                               ; preds = %92
  %96 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56) %93)
  %97 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56) %93)
  %98 = select i1 %96, i16 1024, i16 0
  %99 = or i16 %98, %.1.9
  br label %100

100:                                              ; preds = %95, %92
  %.1.10 = phi i16 [ %99, %95 ], [ %.1.9, %92 ]
  %101 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 11) #4
  %102 = and i32 %5, 2048
  %.not.11 = icmp eq i32 %102, 0
  br i1 %.not.11, label %108, label %103

103:                                              ; preds = %100
  %104 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56) %101)
  %105 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56) %101)
  %106 = select i1 %104, i16 2048, i16 0
  %107 = or i16 %106, %.1.10
  br label %108

108:                                              ; preds = %103, %100
  %.1.11 = phi i16 [ %107, %103 ], [ %.1.10, %100 ]
  %109 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 12) #4
  %110 = and i32 %5, 4096
  %.not.12 = icmp eq i32 %110, 0
  br i1 %.not.12, label %116, label %111

111:                                              ; preds = %108
  %112 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56) %109)
  %113 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56) %109)
  %114 = select i1 %112, i16 4096, i16 0
  %115 = or i16 %114, %.1.11
  br label %116

116:                                              ; preds = %111, %108
  %.1.12 = phi i16 [ %115, %111 ], [ %.1.11, %108 ]
  %117 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 13) #4
  %118 = and i32 %5, 8192
  %.not.13 = icmp eq i32 %118, 0
  br i1 %.not.13, label %124, label %119

119:                                              ; preds = %116
  %120 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56) %117)
  %121 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56) %117)
  %122 = select i1 %120, i16 8192, i16 0
  %123 = or i16 %122, %.1.12
  br label %124

124:                                              ; preds = %119, %116
  %.1.13 = phi i16 [ %123, %119 ], [ %.1.12, %116 ]
  %125 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 14) #4
  %126 = and i32 %5, 16384
  %.not.14 = icmp eq i32 %126, 0
  br i1 %.not.14, label %132, label %127

127:                                              ; preds = %124
  %128 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56) %125)
  %129 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56) %125)
  %130 = select i1 %128, i16 16384, i16 0
  %131 = or i16 %130, %.1.13
  br label %132

132:                                              ; preds = %127, %124
  %.1.14 = phi i16 [ %131, %127 ], [ %.1.13, %124 ]
  %133 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorIN6NoMali7JobSlotESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 15) #4
  %.not.15 = icmp sgt i16 %1, -1
  br i1 %.not.15, label %139, label %134

134:                                              ; preds = %132
  %135 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56) %133)
  %136 = call noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56) %133)
  %137 = select i1 %135, i16 -32768, i16 0
  %138 = or i16 %137, %.1.14
  br label %139

139:                                              ; preds = %134, %132
  %.1.15 = phi i16 [ %138, %134 ], [ %.1.14, %132 ]
  %140 = zext i16 %.1.15 to i32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  call void @_ZN6NoMali7RegAddrC2Ej(ptr noundef nonnull align 4 dereferenceable(4) %4, i32 noundef 16)
  %141 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6NoMali9RegVectorixERKNS_7RegAddrE(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store i32 %140, ptr %141, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6NoMali9RegVectorixERKNS_7RegAddrE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

declare noundef zeroext i1 @_ZNK6NoMali7JobSlot6activeEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #3

declare noundef zeroext i1 @_ZNK6NoMali7JobSlot10activeNextEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { mustprogress 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 #3 = { "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 #4 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LICMPass,LoopRotatePass,SROAPass,SimplifyCFGPass