; 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::ExpressionTree::Storage" = type { ptr }
%"class.NativeJIT::Register" = type { i32 }
%"class.NativeJIT::Register.33" = 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 }

; 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

declare i32 @__gxx_personality_v0(...)

; 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NativeJIT26SaveRestoreVolatilesHelper13SaveVolatilesERNS_14ExpressionTreeE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(808) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %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 %"class.NativeJIT::ExpressionTree::Storage", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"class.NativeJIT::Register", align 4
  %13 = alloca %"class.NativeJIT::Register", align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.NativeJIT::ExpressionTree::Storage", align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.NativeJIT::Register", align 4
  %18 = alloca %"class.NativeJIT::Register.33", align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %19 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = call noundef nonnull align 8 dereferenceable(133) ptr @_ZNK9NativeJIT14ExpressionTree16GetCodeGeneratorEv(ptr noundef nonnull align 8 dereferenceable(808) %20)
  store ptr %21, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = call noundef i32 @_ZNK9NativeJIT26SaveRestoreVolatilesHelper22GetRegistersToPreserveILb0EEEjRNS_14ExpressionTreeE(ptr noundef nonnull align 8 dereferenceable(40) %19, ptr noundef nonnull align 8 dereferenceable(808) %22)
  store i32 %23, 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 %24

24:                                               ; preds = %31, %2
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = zext i32 %25 to i64
  %27 = call noundef zeroext i1 @_ZN9NativeJIT5BitOp15GetLowestBitSetEmPj(i64 noundef %26, ptr noundef %7)
  br i1 %27, label %28, label %50

28:                                               ; preds = %24
  %29 = getelementptr inbounds %"class.NativeJIT::SaveRestoreVolatilesHelper", ptr %19, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN9NativeJIT14ExpressionTree9TemporaryIPvEENS0_7StorageIT_EEv(ptr dead_on_unwind writable sret(%"class.NativeJIT::ExpressionTree::Storage") align 8 %8, ptr noundef nonnull align 8 dereferenceable(808) %30)
  invoke void @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE9push_backEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %31 unwind label %46

31:                                               ; preds = %28
  call void @_ZN9NativeJIT14ExpressionTree7StorageIPvED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %32 = getelementptr inbounds %"class.NativeJIT::SaveRestoreVolatilesHelper", ptr %19, 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 %11, align 8, !tbaa !5
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = load ptr, ptr %11, align 8, !tbaa !5
  %36 = call i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE15GetBaseRegisterEv(ptr noundef nonnull align 8 dereferenceable(8) %35)
  %37 = getelementptr inbounds %"class.NativeJIT::Register", ptr %12, i32 0, i32 0
  store i32 %36, ptr %37, align 4
  %38 = load ptr, ptr %11, align 8, !tbaa !5
  %39 = call noundef i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE9GetOffsetEv(ptr noundef nonnull align 8 dereferenceable(8) %38)
  %40 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZN9NativeJIT8RegisterILj8ELb0EEC2Ej(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 noundef %40)
  %41 = getelementptr inbounds %"class.NativeJIT::Register", ptr %12, i32 0, i32 0
  %42 = load i32, ptr %41, align 4
  %43 = getelementptr inbounds %"class.NativeJIT::Register", ptr %13, i32 0, i32 0
  %44 = load i32, ptr %43, align 4
  call void @_ZN9NativeJIT16X64CodeGenerator4EmitILNS_6OpCodeE17ELj8ELb0EEEvNS_8RegisterILj8ELb0EEEiNS3_IXT0_EXT1_EEE(ptr noundef nonnull align 8 dereferenceable(104) %34, i32 %42, i32 noundef %39, i32 %44)
  %45 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZN9NativeJIT5BitOp8ClearBitIjEEvPT_j(ptr noundef %6, i32 noundef %45)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %24, !llvm.loop !11

46:                                               ; preds = %28
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %9, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %10, align 4
  call void @_ZN9NativeJIT14ExpressionTree7StorageIPvED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %80

50:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = call noundef i32 @_ZNK9NativeJIT26SaveRestoreVolatilesHelper22GetRegistersToPreserveILb1EEEjRNS_14ExpressionTreeE(ptr noundef nonnull align 8 dereferenceable(40) %19, ptr noundef nonnull align 8 dereferenceable(808) %51)
  store i32 %52, ptr %14, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %60, %50
  %54 = load i32, ptr %14, align 4, !tbaa !9
  %55 = zext i32 %54 to i64
  %56 = call noundef zeroext i1 @_ZN9NativeJIT5BitOp15GetLowestBitSetEmPj(i64 noundef %55, ptr noundef %7)
  br i1 %56, label %57, label %79

57:                                               ; preds = %53
  %58 = getelementptr inbounds %"class.NativeJIT::SaveRestoreVolatilesHelper", ptr %19, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN9NativeJIT14ExpressionTree9TemporaryIPvEENS0_7StorageIT_EEv(ptr dead_on_unwind writable sret(%"class.NativeJIT::ExpressionTree::Storage") align 8 %15, ptr noundef nonnull align 8 dereferenceable(808) %59)
  invoke void @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE9push_backEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %58, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %60 unwind label %75

60:                                               ; preds = %57
  call void @_ZN9NativeJIT14ExpressionTree7StorageIPvED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %61 = getelementptr inbounds %"class.NativeJIT::SaveRestoreVolatilesHelper", ptr %19, i32 0, i32 2
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %61) #5
  store ptr %62, ptr %16, align 8, !tbaa !5
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = load ptr, ptr %16, align 8, !tbaa !5
  %65 = call i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE15GetBaseRegisterEv(ptr noundef nonnull align 8 dereferenceable(8) %64)
  %66 = getelementptr inbounds %"class.NativeJIT::Register", ptr %17, i32 0, i32 0
  store i32 %65, ptr %66, align 4
  %67 = load ptr, ptr %16, align 8, !tbaa !5
  %68 = call noundef i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE9GetOffsetEv(ptr noundef nonnull align 8 dereferenceable(8) %67)
  %69 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZN9NativeJIT8RegisterILj8ELb1EEC2Ej(ptr noundef nonnull align 4 dereferenceable(4) %18, i32 noundef %69)
  %70 = getelementptr inbounds %"class.NativeJIT::Register", ptr %17, i32 0, i32 0
  %71 = load i32, ptr %70, align 4
  %72 = getelementptr inbounds %"class.NativeJIT::Register.33", ptr %18, i32 0, i32 0
  %73 = load i32, ptr %72, align 4
  call void @_ZN9NativeJIT16X64CodeGenerator4EmitILNS_6OpCodeE17ELj8ELb1EEEvNS_8RegisterILj8ELb0EEEiNS3_IXT0_EXT1_EEE(ptr noundef nonnull align 8 dereferenceable(104) %63, i32 %71, i32 noundef %68, i32 %73)
  %74 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZN9NativeJIT5BitOp8ClearBitIjEEvPT_j(ptr noundef %14, i32 noundef %74)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %53, !llvm.loop !13

75:                                               ; preds = %57
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %9, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %10, align 4
  call void @_ZN9NativeJIT14ExpressionTree7StorageIPvED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %80

79:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #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

80:                                               ; preds = %75, %46
  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
  br label %81

81:                                               ; preds = %80
  %82 = load ptr, ptr %9, align 8
  %83 = load i32, ptr %10, align 4
  %84 = insertvalue { ptr, i32 } poison, ptr %82, 0
  %85 = insertvalue { ptr, i32 } %84, i32 %83, 1
  resume { ptr, i32 } %85
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NativeJIT14ExpressionTree9TemporaryIPvEENS0_7StorageIT_EEv(ptr dead_on_unwind noalias writable sret(%"class.NativeJIT::ExpressionTree::Storage") align 8, ptr noundef nonnull align 8 dereferenceable(808)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9NativeJIT14ExpressionTree7StorageIPvED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 align 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)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NativeJIT16X64CodeGenerator4EmitILNS_6OpCodeE17ELj8ELb0EEEvNS_8RegisterILj8ELb0EEEiNS3_IXT0_EXT1_EEE(ptr noundef nonnull align 8 dereferenceable(104), i32, i32 noundef, i32) #1 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) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NativeJIT8RegisterILj8ELb1EEC2Ej(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #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 = { 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 #4 = { 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::ExpressionTree::Storage" = type { ptr }
%"class.NativeJIT::Register" = type { i32 }
%"class.NativeJIT::Register.33" = 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NativeJIT26SaveRestoreVolatilesHelper13SaveVolatilesERNS_14ExpressionTreeE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(808) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.NativeJIT::ExpressionTree::Storage", align 8
  %6 = alloca %"class.NativeJIT::Register", align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.NativeJIT::ExpressionTree::Storage", align 8
  %9 = alloca %"class.NativeJIT::Register.33", align 4
  %10 = 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
  %11 = tail call noundef i32 @_ZNK9NativeJIT26SaveRestoreVolatilesHelper22GetRegistersToPreserveILb0EEEjRNS_14ExpressionTreeE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(808) %1)
  store i32 %11, 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
  %12 = zext i32 %11 to i64
  %13 = call noundef zeroext i1 @_ZN9NativeJIT5BitOp15GetLowestBitSetEmPj(i64 noundef %12, ptr noundef nonnull %4)
  br i1 %13, label %.lr.ph, label %._crit_edge

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

15:                                               ; preds = %.lr.ph, %16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @_ZN9NativeJIT14ExpressionTree9TemporaryIPvEENS0_7StorageIT_EEv(ptr dead_on_unwind nonnull writable sret(%"class.NativeJIT::ExpressionTree::Storage") align 8 %5, ptr noundef nonnull align 8 dereferenceable(808) %1)
  invoke void @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE9push_backEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %16 unwind label %26

16:                                               ; preds = %15
  call void @_ZN9NativeJIT14ExpressionTree7StorageIPvED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  %18 = call i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE15GetBaseRegisterEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
  %19 = call noundef i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE9GetOffsetEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
  %20 = load i32, ptr %4, align 4, !tbaa !5
  call void @_ZN9NativeJIT8RegisterILj8ELb0EEC2Ej(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 noundef %20)
  %21 = load i32, ptr %6, align 4
  call void @_ZN9NativeJIT16X64CodeGenerator4EmitILNS_6OpCodeE17ELj8ELb0EEEvNS_8RegisterILj8ELb0EEEiNS3_IXT0_EXT1_EEE(ptr noundef nonnull align 8 dereferenceable(104) %10, i32 %18, i32 noundef %19, i32 %21)
  %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 @_ZN9NativeJIT5BitOp15GetLowestBitSetEmPj(i64 noundef %24, ptr noundef nonnull %4)
  br i1 %25, label %15, label %._crit_edge, !llvm.loop !9

26:                                               ; preds = %15
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NativeJIT14ExpressionTree7StorageIPvED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %45

._crit_edge:                                      ; preds = %16, %2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  %28 = call noundef i32 @_ZNK9NativeJIT26SaveRestoreVolatilesHelper22GetRegistersToPreserveILb1EEEjRNS_14ExpressionTreeE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(808) %1)
  store i32 %28, ptr %7, align 4, !tbaa !5
  %29 = zext i32 %28 to i64
  %30 = call noundef zeroext i1 @_ZN9NativeJIT5BitOp15GetLowestBitSetEmPj(i64 noundef %29, ptr noundef nonnull %4)
  br i1 %30, label %.lr.ph17, label %._crit_edge18

.lr.ph17:                                         ; preds = %._crit_edge
  %31 = getelementptr inbounds i8, ptr %0, i64 8
  br label %32

32:                                               ; preds = %.lr.ph17, %33
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  call void @_ZN9NativeJIT14ExpressionTree9TemporaryIPvEENS0_7StorageIT_EEv(ptr dead_on_unwind nonnull writable sret(%"class.NativeJIT::ExpressionTree::Storage") align 8 %8, ptr noundef nonnull align 8 dereferenceable(808) %1)
  invoke void @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE9push_backEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %33 unwind label %43

33:                                               ; preds = %32
  call void @_ZN9NativeJIT14ExpressionTree7StorageIPvED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIN9NativeJIT14ExpressionTree7StorageIPvEEN10Allocators12StlAllocatorIS4_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %31) #5
  %35 = call i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE15GetBaseRegisterEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  %36 = call noundef i32 @_ZNK9NativeJIT14ExpressionTree7StorageIPvE9GetOffsetEv(ptr noundef nonnull align 8 dereferenceable(8) %34)
  %37 = load i32, ptr %4, align 4, !tbaa !5
  call void @_ZN9NativeJIT8RegisterILj8ELb1EEC2Ej(ptr noundef nonnull align 4 dereferenceable(4) %9, i32 noundef %37)
  %38 = load i32, ptr %9, align 4
  call void @_ZN9NativeJIT16X64CodeGenerator4EmitILNS_6OpCodeE17ELj8ELb1EEEvNS_8RegisterILj8ELb0EEEiNS3_IXT0_EXT1_EEE(ptr noundef nonnull align 8 dereferenceable(104) %10, i32 %35, i32 noundef %36, i32 %38)
  %39 = load i32, ptr %4, align 4, !tbaa !5
  call void @_ZN9NativeJIT5BitOp8ClearBitIjEEvPT_j(ptr noundef nonnull %7, i32 noundef %39)
  %40 = load i32, ptr %7, align 4, !tbaa !5
  %41 = zext i32 %40 to i64
  %42 = call noundef zeroext i1 @_ZN9NativeJIT5BitOp15GetLowestBitSetEmPj(i64 noundef %41, ptr noundef nonnull %4)
  br i1 %42, label %32, label %._crit_edge18, !llvm.loop !11

43:                                               ; preds = %32
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9NativeJIT14ExpressionTree7StorageIPvED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %45

._crit_edge18:                                    ; preds = %33, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #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

45:                                               ; preds = %43, %26
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %44, %43 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NativeJIT14ExpressionTree9TemporaryIPvEENS0_7StorageIT_EEv(ptr dead_on_unwind noalias writable sret(%"class.NativeJIT::ExpressionTree::Storage") align 8, ptr noundef nonnull align 8 dereferenceable(808)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9NativeJIT14ExpressionTree7StorageIPvED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4 align 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 #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NativeJIT16X64CodeGenerator4EmitILNS_6OpCodeE17ELj8ELb0EEEvNS_8RegisterILj8ELb0EEEiNS3_IXT0_EXT1_EEE(ptr noundef nonnull align 8 dereferenceable(104), i32, i32 noundef, i32) local_unnamed_addr #1 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 #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9NativeJIT8RegisterILj8ELb1EEC2Ej(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) 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 = { 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 #4 = { 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