; LLVM IR from BitFunnel/NativeJIT :: src/NativeJIT (CallNode)

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

%"class.NativeJIT::Register.33" = type { i32 }
%"class.NativeJIT::Register" = type { i32 }
%"class.NativeJIT::SaveRestoreVolatilesHelper" = type { i32, i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<NativeJIT::ExpressionTree::Storage<void *>, Allocators::StlAllocator<NativeJIT::ExpressionTree::Storage<void *>>>::_Vector_impl" }
%"struct.std::_Vector_base<NativeJIT::ExpressionTree::Storage<void *>, Allocators::StlAllocator<NativeJIT::ExpressionTree::Storage<void *>>>::_Vector_impl" = type { %"class.Allocators::StlAllocator", %"struct.std::_Vector_base<NativeJIT::ExpressionTree::Storage<void *>, Allocators::StlAllocator<NativeJIT::ExpressionTree::Storage<void *>>>::_Vector_impl_data" }
%"class.Allocators::StlAllocator" = type { ptr }
%"struct.std::_Vector_base<NativeJIT::ExpressionTree::Storage<void *>, Allocators::StlAllocator<NativeJIT::ExpressionTree::Storage<void *>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [80 x i8], align 1
@__FUNCTION__._ZN9NativeJIT26SaveRestoreVolatilesHelper16RestoreVolatilesERNS_14ExpressionTreeE = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK9NativeJIT26SaveRestoreVolatilesHelper22GetRegistersToPreserveILb0EEEjRNS_14ExpressionTreeE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(808)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK9NativeJIT26SaveRestoreVolatilesHelper22GetRegistersToPreserveILb1EEEjRNS_14ExpressionTreeE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(808)) #1 align 2

declare noundef nonnull align 8 dereferenceable(133) ptr @_ZNK9NativeJIT14ExpressionTree16GetCodeGeneratorEv(ptr noundef nonnull align 8 dereferenceable(808)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE15GetBaseRegisterEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE9GetOffsetEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9NativeJIT5BitOp8ClearBitIjEEvPT_j(ptr noundef, i32 noundef) #4

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NativeJIT26SaveRestoreVolatilesHelper16RestoreVolatilesERNS_14ExpressionTreeE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(808) %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %"class.NativeJIT::Register.33", align 4
  %10 = alloca %"class.NativeJIT::Register", align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"class.NativeJIT::Register", align 4
  %14 = alloca %"class.NativeJIT::Register", align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = call noundef nonnull align 8 dereferenceable(133) ptr @_ZNK9NativeJIT14ExpressionTree16GetCodeGeneratorEv(ptr noundef nonnull align 8 dereferenceable(808) %16)
  store ptr %17, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = call noundef i32 @_ZNK9NativeJIT26SaveRestoreVolatilesHelper22GetRegistersToPreserveILb1EEEjRNS_14ExpressionTreeE(ptr noundef nonnull align 8 dereferenceable(40) %15, ptr noundef nonnull align 8 dereferenceable(808) %18)
  store i32 %19, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %31, %2
  %21 = load i32, ptr %6, align 4, !tbaa !9
  %22 = zext i32 %21 to i64
  %23 = call noundef zeroext i1 @_ZN9NativeJIT5BitOp16GetHighestBitSetEmPj(i64 noundef %22, ptr noundef %7)
  br i1 %23, label %24, label %47

24:                                               ; preds = %20
  br label %25

25:                                               ; preds = %24
  %26 = getelementptr inbounds %"class.NativeJIT::SaveRestoreVolatilesHelper", ptr %15, i32 0, i32 2
  %27 = call noundef zeroext i1 @_ZNKSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %26) #5
  br i1 %27, label %28, label %29

28:                                               ; preds = %25
  call void (ptr, ptr, i32, ptr, ptr, ...) @_ZN9NativeJIT12LogThrowImplEPKcS1_jS1_S1_z(ptr noundef @.str, ptr noundef @__FUNCTION__._ZN9NativeJIT26SaveRestoreVolatilesHelper16RestoreVolatilesERNS_14ExpressionTreeE, i32 noundef 125, ptr noundef @.str.1, ptr noundef @.str.2)
  br label %29

29:                                               ; preds = %28, %25
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %32 = getelementptr inbounds %"class.NativeJIT::SaveRestoreVolatilesHelper", ptr %15, i32 0, i32 2
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %32) #5
  store ptr %33, ptr %8, align 8, !tbaa !5
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZN9NativeJIT8RegisterILj8ELb1EEC2Ej(ptr noundef nonnull align 4 dereferenceable(4) %9, i32 noundef %35)
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = call i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE15GetBaseRegisterEv(ptr noundef nonnull align 8 dereferenceable(8) %36)
  %38 = getelementptr inbounds %"class.NativeJIT::Register", ptr %10, i32 0, i32 0
  store i32 %37, ptr %38, align 4
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = call noundef i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE9GetOffsetEv(ptr noundef nonnull align 8 dereferenceable(8) %39)
  %41 = getelementptr inbounds %"class.NativeJIT::Register.33", ptr %9, i32 0, i32 0
  %42 = load i32, ptr %41, align 4
  %43 = getelementptr inbounds %"class.NativeJIT::Register", ptr %10, i32 0, i32 0
  %44 = load i32, ptr %43, align 4
  call void @_ZN9NativeJIT16X64CodeGenerator4EmitILNS_6OpCodeE17ELj8ELb1EEEvNS_8RegisterIXT0_EXT1_EEENS3_ILj8ELb0EEEi(ptr noundef nonnull align 8 dereferenceable(104) %34, i32 %42, i32 %44, i32 noundef %40)
  %45 = getelementptr inbounds %"class.NativeJIT::SaveRestoreVolatilesHelper", ptr %15, i32 0, i32 2
  call void @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(32) %45) #5
  %46 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZN9NativeJIT5BitOp8ClearBitIjEEvPT_j(ptr noundef %6, i32 noundef %46)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %20, !llvm.loop !11

47:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = call noundef i32 @_ZNK9NativeJIT26SaveRestoreVolatilesHelper22GetRegistersToPreserveILb0EEEjRNS_14ExpressionTreeE(ptr noundef nonnull align 8 dereferenceable(40) %15, ptr noundef nonnull align 8 dereferenceable(808) %48)
  store i32 %49, ptr %11, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %61, %47
  %51 = load i32, ptr %11, align 4, !tbaa !9
  %52 = zext i32 %51 to i64
  %53 = call noundef zeroext i1 @_ZN9NativeJIT5BitOp16GetHighestBitSetEmPj(i64 noundef %52, ptr noundef %7)
  br i1 %53, label %54, label %77

54:                                               ; preds = %50
  br label %55

55:                                               ; preds = %54
  %56 = getelementptr inbounds %"class.NativeJIT::SaveRestoreVolatilesHelper", ptr %15, i32 0, i32 2
  %57 = call noundef zeroext i1 @_ZNKSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %56) #5
  br i1 %57, label %58, label %59

58:                                               ; preds = %55
  call void (ptr, ptr, i32, ptr, ptr, ...) @_ZN9NativeJIT12LogThrowImplEPKcS1_jS1_S1_z(ptr noundef @.str, ptr noundef @__FUNCTION__._ZN9NativeJIT26SaveRestoreVolatilesHelper16RestoreVolatilesERNS_14ExpressionTreeE, i32 noundef 140, ptr noundef @.str.1, ptr noundef @.str.2)
  br label %59

59:                                               ; preds = %58, %55
  br label %60

60:                                               ; preds = %59
  br label %61

61:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %62 = getelementptr inbounds %"class.NativeJIT::SaveRestoreVolatilesHelper", ptr %15, i32 0, i32 2
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %62) #5
  store ptr %63, ptr %12, align 8, !tbaa !5
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZN9NativeJIT8RegisterILj8ELb0EEC2Ej(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 noundef %65)
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = call i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE15GetBaseRegisterEv(ptr noundef nonnull align 8 dereferenceable(8) %66)
  %68 = getelementptr inbounds %"class.NativeJIT::Register", ptr %14, i32 0, i32 0
  store i32 %67, ptr %68, align 4
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = call noundef i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE9GetOffsetEv(ptr noundef nonnull align 8 dereferenceable(8) %69)
  %71 = getelementptr inbounds %"class.NativeJIT::Register", ptr %13, i32 0, i32 0
  %72 = load i32, ptr %71, align 4
  %73 = getelementptr inbounds %"class.NativeJIT::Register", ptr %14, i32 0, i32 0
  %74 = load i32, ptr %73, align 4
  call void @_ZN9NativeJIT16X64CodeGenerator4EmitILNS_6OpCodeE17ELj8ELb0EEEvNS_8RegisterIXT0_EXT1_EEENS3_ILj8ELb0EEEi(ptr noundef nonnull align 8 dereferenceable(104) %64, i32 %72, i32 %74, i32 noundef %70)
  %75 = getelementptr inbounds %"class.NativeJIT::SaveRestoreVolatilesHelper", ptr %15, i32 0, i32 2
  call void @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(32) %75) #5
  %76 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZN9NativeJIT5BitOp8ClearBitIjEEvPT_j(ptr noundef %11, i32 noundef %76)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %50, !llvm.loop !13

77:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9NativeJIT5BitOp16GetHighestBitSetEmPj(i64 noundef, ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

declare void @_ZN9NativeJIT12LogThrowImplEPKcS1_jS1_S1_z(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NativeJIT16X64CodeGenerator4EmitILNS_6OpCodeE17ELj8ELb1EEEvNS_8RegisterIXT0_EXT1_EEENS3_ILj8ELb0EEEi(ptr noundef nonnull align 8 dereferenceable(104), i32, i32, i32 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NativeJIT16X64CodeGenerator4EmitILNS_6OpCodeE17ELj8ELb0EEEvNS_8RegisterIXT0_EXT1_EEENS3_ILj8ELb0EEEi(ptr noundef nonnull align 8 dereferenceable(104), i32, i32, i32 noundef) #1 align 2

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


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

%"class.NativeJIT::Register.33" = type { i32 }
%"class.NativeJIT::Register" = type { i32 }

@.str = external hidden unnamed_addr constant [80 x i8], align 1
@__FUNCTION__._ZN9NativeJIT26SaveRestoreVolatilesHelper16RestoreVolatilesERNS_14ExpressionTreeE = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK9NativeJIT26SaveRestoreVolatilesHelper22GetRegistersToPreserveILb0EEEjRNS_14ExpressionTreeE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(808)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK9NativeJIT26SaveRestoreVolatilesHelper22GetRegistersToPreserveILb1EEEjRNS_14ExpressionTreeE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(808)) local_unnamed_addr #1 align 2

declare noundef nonnull align 8 dereferenceable(133) ptr @_ZNK9NativeJIT14ExpressionTree16GetCodeGeneratorEv(ptr noundef nonnull align 8 dereferenceable(808)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE15GetBaseRegisterEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE9GetOffsetEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9NativeJIT5BitOp8ClearBitIjEEvPT_j(ptr noundef, i32 noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NativeJIT26SaveRestoreVolatilesHelper16RestoreVolatilesERNS_14ExpressionTreeE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(808) %1) local_unnamed_addr #1 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.NativeJIT::Register.33", align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.NativeJIT::Register", align 4
  %8 = tail call noundef nonnull align 8 dereferenceable(133) ptr @_ZNK9NativeJIT14ExpressionTree16GetCodeGeneratorEv(ptr noundef nonnull align 8 dereferenceable(808) %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %9 = tail call noundef i32 @_ZNK9NativeJIT26SaveRestoreVolatilesHelper22GetRegistersToPreserveILb1EEEjRNS_14ExpressionTreeE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(808) %1)
  store i32 %9, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  %10 = zext i32 %9 to i64
  %11 = call noundef zeroext i1 @_ZN9NativeJIT5BitOp16GetHighestBitSetEmPj(i64 noundef %10, ptr noundef nonnull %4)
  br i1 %11, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  br label %13

13:                                               ; preds = %.lr.ph, %16
  %14 = call noundef zeroext i1 @_ZNKSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  br i1 %14, label %15, label %16

15:                                               ; preds = %13
  call void (ptr, ptr, i32, ptr, ptr, ...) @_ZN9NativeJIT12LogThrowImplEPKcS1_jS1_S1_z(ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN9NativeJIT26SaveRestoreVolatilesHelper16RestoreVolatilesERNS_14ExpressionTreeE, i32 noundef 125, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2)
  br label %16

16:                                               ; preds = %15, %13
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  %18 = load i32, ptr %4, align 4, !tbaa !5
  call void @_ZN9NativeJIT8RegisterILj8ELb1EEC2Ej(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef %18)
  %19 = call i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE15GetBaseRegisterEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
  %20 = call noundef i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE9GetOffsetEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
  %21 = load i32, ptr %5, align 4
  call void @_ZN9NativeJIT16X64CodeGenerator4EmitILNS_6OpCodeE17ELj8ELb1EEEvNS_8RegisterIXT0_EXT1_EEENS3_ILj8ELb0EEEi(ptr noundef nonnull align 8 dereferenceable(104) %8, i32 %21, i32 %19, i32 noundef %20)
  call void @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  %22 = load i32, ptr %4, align 4, !tbaa !5
  call void @_ZN9NativeJIT5BitOp8ClearBitIjEEvPT_j(ptr noundef nonnull %3, i32 noundef %22)
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = zext i32 %23 to i64
  %25 = call noundef zeroext i1 @_ZN9NativeJIT5BitOp16GetHighestBitSetEmPj(i64 noundef %24, ptr noundef nonnull %4)
  br i1 %25, label %13, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %16, %2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %26 = call noundef i32 @_ZNK9NativeJIT26SaveRestoreVolatilesHelper22GetRegistersToPreserveILb0EEEjRNS_14ExpressionTreeE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(808) %1)
  store i32 %26, ptr %6, align 4, !tbaa !5
  %27 = zext i32 %26 to i64
  %28 = call noundef zeroext i1 @_ZN9NativeJIT5BitOp16GetHighestBitSetEmPj(i64 noundef %27, ptr noundef nonnull %4)
  br i1 %28, label %.lr.ph12, label %._crit_edge13

.lr.ph12:                                         ; preds = %._crit_edge
  %29 = getelementptr inbounds i8, ptr %0, i64 8
  br label %30

30:                                               ; preds = %.lr.ph12, %33
  %31 = call noundef zeroext i1 @_ZNKSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %29) #5
  br i1 %31, label %32, label %33

32:                                               ; preds = %30
  call void (ptr, ptr, i32, ptr, ptr, ...) @_ZN9NativeJIT12LogThrowImplEPKcS1_jS1_S1_z(ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN9NativeJIT26SaveRestoreVolatilesHelper16RestoreVolatilesERNS_14ExpressionTreeE, i32 noundef 140, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2)
  br label %33

33:                                               ; preds = %32, %30
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %29) #5
  %35 = load i32, ptr %4, align 4, !tbaa !5
  call void @_ZN9NativeJIT8RegisterILj8ELb0EEC2Ej(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 noundef %35)
  %36 = call i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE15GetBaseRegisterEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  %37 = call noundef i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE9GetOffsetEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  %38 = load i32, ptr %7, align 4
  call void @_ZN9NativeJIT16X64CodeGenerator4EmitILNS_6OpCodeE17ELj8ELb0EEEvNS_8RegisterIXT0_EXT1_EEENS3_ILj8ELb0EEEi(ptr noundef nonnull align 8 dereferenceable(104) %8, i32 %38, i32 %36, i32 noundef %37)
  call void @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(32) %29) #5
  %39 = load i32, ptr %4, align 4, !tbaa !5
  call void @_ZN9NativeJIT5BitOp8ClearBitIjEEvPT_j(ptr noundef nonnull %6, i32 noundef %39)
  %40 = load i32, ptr %6, align 4, !tbaa !5
  %41 = zext i32 %40 to i64
  %42 = call noundef zeroext i1 @_ZN9NativeJIT5BitOp16GetHighestBitSetEmPj(i64 noundef %41, ptr noundef nonnull %4)
  br i1 %42, label %30, label %._crit_edge13, !llvm.loop !11

._crit_edge13:                                    ; preds = %33, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9NativeJIT5BitOp16GetHighestBitSetEmPj(i64 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

declare void @_ZN9NativeJIT12LogThrowImplEPKcS1_jS1_S1_z(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NativeJIT16X64CodeGenerator4EmitILNS_6OpCodeE17ELj8ELb1EEEvNS_8RegisterIXT0_EXT1_EEENS3_ILj8ELb0EEEi(ptr noundef nonnull align 8 dereferenceable(104), i32, i32, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NativeJIT16X64CodeGenerator4EmitILNS_6OpCodeE17ELj8ELb0EEEvNS_8RegisterIXT0_EXT1_EEENS3_ILj8ELb0EEEi(ptr noundef nonnull align 8 dereferenceable(104), i32, i32, i32 noundef) local_unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = { 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 #4 = { inlinehint 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 #5 = { 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"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass