; LLVM IR from BitFunnel/NativeJIT :: src/CodeGen (FunctionBuffer)

; 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::FunctionBuffer" = type <{ %"class.NativeJIT::X64CodeGenerator", %struct.RUNTIME_FUNCTION, i32, i32, i32, i32, i8, [3 x i8] }>
%"class.NativeJIT::X64CodeGenerator" = type { %"class.NativeJIT::CodeBuffer", ptr }
%"class.NativeJIT::CodeBuffer" = type { ptr, ptr, i32, ptr, ptr, ptr, %"class.NativeJIT::JumpTable" }
%"class.NativeJIT::JumpTable" = type { %"class.std::vector", %"class.std::vector.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<const unsigned char *, std::allocator<const unsigned char *>>::_Vector_impl" }
%"struct.std::_Vector_base<const unsigned char *, std::allocator<const unsigned char *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const unsigned char *, std::allocator<const unsigned char *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const unsigned char *, std::allocator<const unsigned char *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<NativeJIT::CallSite, std::allocator<NativeJIT::CallSite>>::_Vector_impl" }
%"struct.std::_Vector_base<NativeJIT::CallSite, std::allocator<NativeJIT::CallSite>>::_Vector_impl" = type { %"struct.std::_Vector_base<NativeJIT::CallSite, std::allocator<NativeJIT::CallSite>>::_Vector_impl_data" }
%"struct.std::_Vector_base<NativeJIT::CallSite, std::allocator<NativeJIT::CallSite>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.RUNTIME_FUNCTION = type { i32, i32, i32 }

@.str = external hidden unnamed_addr constant [84 x i8], align 1
@__FUNCTION__._ZN9NativeJIT14FunctionBuffer25EndFunctionBodyGenerationERKNS_21FunctionSpecificationE = external hidden unnamed_addr constant [26 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [63 x i8], align 1

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

declare noundef i32 @_ZNK9NativeJIT21FunctionSpecification23GetUnwindInfoByteLengthEv(ptr noundef nonnull align 8 dereferenceable(112)) #0

declare noundef i32 @_ZNK9NativeJIT21FunctionSpecification15GetPrologLengthEv(ptr noundef nonnull align 8 dereferenceable(112)) #0

declare noundef i32 @_ZNK9NativeJIT10CodeBuffer15CurrentPositionEv(ptr noundef nonnull align 8 dereferenceable(96)) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NativeJIT14FunctionBuffer25EndFunctionBodyGenerationERKNS_21FunctionSpecificationE(ptr noundef nonnull align 8 dereferenceable(133) %0, ptr noundef nonnull align 8 dereferenceable(112) %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %6 = load ptr, ptr %3, align 8
  br label %7

7:                                                ; preds = %2
  %8 = load ptr, ptr %4, align 8, !tbaa !5
  %9 = call noundef i32 @_ZNK9NativeJIT21FunctionSpecification23GetUnwindInfoByteLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %8)
  %10 = getelementptr inbounds %"class.NativeJIT::FunctionBuffer", ptr %6, i32 0, i32 3
  %11 = load i32, ptr %10, align 8, !tbaa !9
  %12 = icmp ule i32 %9, %11
  br i1 %12, label %18, label %13

13:                                               ; preds = %7
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = call noundef i32 @_ZNK9NativeJIT21FunctionSpecification23GetUnwindInfoByteLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %14)
  %16 = getelementptr inbounds %"class.NativeJIT::FunctionBuffer", ptr %6, i32 0, i32 3
  %17 = load i32, ptr %16, align 8, !tbaa !9
  call void (ptr, ptr, i32, ptr, ptr, ...) @_ZN9NativeJIT12LogThrowImplEPKcS1_jS1_S1_z(ptr noundef @.str, ptr noundef @__FUNCTION__._ZN9NativeJIT14FunctionBuffer25EndFunctionBodyGenerationERKNS_21FunctionSpecificationE, i32 noundef 188, ptr noundef @.str.12, ptr noundef @.str.13, i32 noundef %15, i32 noundef %17)
  br label %18

18:                                               ; preds = %13, %7
  br label %19

19:                                               ; preds = %18
  br label %20

20:                                               ; preds = %19
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = call noundef i32 @_ZNK9NativeJIT21FunctionSpecification15GetPrologLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %21)
  %23 = getelementptr inbounds %"class.NativeJIT::FunctionBuffer", ptr %6, i32 0, i32 5
  %24 = load i32, ptr %23, align 8, !tbaa !25
  %25 = icmp ule i32 %22, %24
  br i1 %25, label %31, label %26

26:                                               ; preds = %20
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = call noundef i32 @_ZNK9NativeJIT21FunctionSpecification15GetPrologLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %27)
  %29 = getelementptr inbounds %"class.NativeJIT::FunctionBuffer", ptr %6, i32 0, i32 5
  %30 = load i32, ptr %29, align 8, !tbaa !25
  call void (ptr, ptr, i32, ptr, ptr, ...) @_ZN9NativeJIT12LogThrowImplEPKcS1_jS1_S1_z(ptr noundef @.str, ptr noundef @__FUNCTION__._ZN9NativeJIT14FunctionBuffer25EndFunctionBodyGenerationERKNS_21FunctionSpecificationE, i32 noundef 193, ptr noundef @.str.14, ptr noundef @.str.15, i32 noundef %28, i32 noundef %30)
  br label %31

31:                                               ; preds = %26, %20
  br label %32

32:                                               ; preds = %31
  %33 = getelementptr inbounds %"class.NativeJIT::FunctionBuffer", ptr %6, i32 0, i32 2
  %34 = load i32, ptr %33, align 4, !tbaa !26
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = call noundef ptr @_ZNK9NativeJIT21FunctionSpecification19GetUnwindInfoBufferEv(ptr noundef nonnull align 8 dereferenceable(112) %35)
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = call noundef i32 @_ZNK9NativeJIT21FunctionSpecification23GetUnwindInfoByteLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %37)
  call void @_ZN9NativeJIT10CodeBuffer12ReplaceBytesEjPKhj(ptr noundef nonnull align 8 dereferenceable(96) %6, i32 noundef %34, ptr noundef %36, i32 noundef %38)
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = call noundef i32 @_ZNK9NativeJIT21FunctionSpecification23GetUnwindInfoByteLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %39)
  %41 = getelementptr inbounds %"class.NativeJIT::FunctionBuffer", ptr %6, i32 0, i32 3
  store i32 %40, ptr %41, align 8, !tbaa !9
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = call noundef i32 @_ZNK9NativeJIT21FunctionSpecification15GetPrologLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %42)
  %44 = getelementptr inbounds %"class.NativeJIT::FunctionBuffer", ptr %6, i32 0, i32 5
  %45 = load i32, ptr %44, align 8, !tbaa !25
  %46 = icmp ult i32 %43, %45
  br i1 %46, label %47, label %61

47:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %48 = getelementptr inbounds %"class.NativeJIT::FunctionBuffer", ptr %6, i32 0, i32 5
  %49 = load i32, ptr %48, align 8, !tbaa !25
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = call noundef i32 @_ZNK9NativeJIT21FunctionSpecification15GetPrologLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %50)
  %52 = sub i32 %49, %51
  store i32 %52, ptr %5, align 4, !tbaa !27
  %53 = load i32, ptr %5, align 4, !tbaa !27
  %54 = getelementptr inbounds %"class.NativeJIT::FunctionBuffer", ptr %6, i32 0, i32 4
  %55 = load i32, ptr %54, align 4, !tbaa !28
  %56 = add i32 %55, %53
  store i32 %56, ptr %54, align 4, !tbaa !28
  %57 = load i32, ptr %5, align 4, !tbaa !27
  %58 = getelementptr inbounds %"class.NativeJIT::FunctionBuffer", ptr %6, i32 0, i32 5
  %59 = load i32, ptr %58, align 8, !tbaa !25
  %60 = sub i32 %59, %57
  store i32 %60, ptr %58, align 8, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %61

61:                                               ; preds = %47, %32
  %62 = getelementptr inbounds %"class.NativeJIT::FunctionBuffer", ptr %6, i32 0, i32 4
  %63 = load i32, ptr %62, align 4, !tbaa !28
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = call noundef ptr @_ZNK9NativeJIT21FunctionSpecification9GetPrologEv(ptr noundef nonnull align 8 dereferenceable(112) %64)
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = call noundef i32 @_ZNK9NativeJIT21FunctionSpecification15GetPrologLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %66)
  call void @_ZN9NativeJIT10CodeBuffer12ReplaceBytesEjPKhj(ptr noundef nonnull align 8 dereferenceable(96) %6, i32 noundef %63, ptr noundef %65, i32 noundef %67)
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = call noundef ptr @_ZNK9NativeJIT21FunctionSpecification9GetEpilogEv(ptr noundef nonnull align 8 dereferenceable(112) %68)
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = call noundef i32 @_ZNK9NativeJIT21FunctionSpecification15GetEpilogLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %70)
  call void @_ZN9NativeJIT10CodeBuffer9EmitBytesEPKhj(ptr noundef nonnull align 8 dereferenceable(96) %6, ptr noundef %69, i32 noundef %71)
  call void @_ZN9NativeJIT10CodeBuffer14PatchCallSitesEv(ptr noundef nonnull align 8 dereferenceable(96) %6)
  %72 = getelementptr inbounds %"class.NativeJIT::FunctionBuffer", ptr %6, i32 0, i32 4
  %73 = load i32, ptr %72, align 4, !tbaa !28
  %74 = getelementptr inbounds %"class.NativeJIT::FunctionBuffer", ptr %6, i32 0, i32 1
  %75 = getelementptr inbounds %struct.RUNTIME_FUNCTION, ptr %74, i32 0, i32 0
  store i32 %73, ptr %75, align 8, !tbaa !29
  %76 = call noundef i32 @_ZNK9NativeJIT10CodeBuffer15CurrentPositionEv(ptr noundef nonnull align 8 dereferenceable(96) %6)
  %77 = getelementptr inbounds %"class.NativeJIT::FunctionBuffer", ptr %6, i32 0, i32 1
  %78 = getelementptr inbounds %struct.RUNTIME_FUNCTION, ptr %77, i32 0, i32 1
  store i32 %76, ptr %78, align 4, !tbaa !30
  %79 = getelementptr inbounds %"class.NativeJIT::FunctionBuffer", ptr %6, i32 0, i32 2
  %80 = load i32, ptr %79, align 4, !tbaa !26
  %81 = getelementptr inbounds %"class.NativeJIT::FunctionBuffer", ptr %6, i32 0, i32 1
  %82 = getelementptr inbounds %struct.RUNTIME_FUNCTION, ptr %81, i32 0, i32 2
  store i32 %80, ptr %82, align 8, !tbaa !31
  %83 = getelementptr inbounds %"class.NativeJIT::FunctionBuffer", ptr %6, i32 0, i32 6
  store i8 1, ptr %83, align 4, !tbaa !32
  ret void
}

declare void @_ZN9NativeJIT10CodeBuffer12ReplaceBytesEjPKhj(ptr noundef nonnull align 8 dereferenceable(96), i32 noundef, ptr noundef, i32 noundef) #0

declare noundef ptr @_ZNK9NativeJIT21FunctionSpecification19GetUnwindInfoBufferEv(ptr noundef nonnull align 8 dereferenceable(112)) #0

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

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

declare noundef ptr @_ZNK9NativeJIT21FunctionSpecification9GetPrologEv(ptr noundef nonnull align 8 dereferenceable(112)) #0

declare void @_ZN9NativeJIT10CodeBuffer9EmitBytesEPKhj(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, i32 noundef) #0

declare noundef ptr @_ZNK9NativeJIT21FunctionSpecification9GetEpilogEv(ptr noundef nonnull align 8 dereferenceable(112)) #0

declare noundef i32 @_ZNK9NativeJIT21FunctionSpecification15GetEpilogLengthEv(ptr noundef nonnull align 8 dereferenceable(112)) #0

declare void @_ZN9NativeJIT10CodeBuffer14PatchCallSitesEv(ptr noundef nonnull align 8 dereferenceable(96)) #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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, !13, i64 120}
!10 = !{!"_ZTSN9NativeJIT14FunctionBufferE", !11, i64 0, !23, i64 104, !13, i64 116, !13, i64 120, !13, i64 124, !13, i64 128, !24, i64 132}
!11 = !{!"_ZTSN9NativeJIT16X64CodeGeneratorE", !12, i64 0, !6, i64 96}
!12 = !{!"_ZTSN9NativeJIT10CodeBufferE", !6, i64 8, !13, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !14, i64 48}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN9NativeJIT9JumpTableE", !15, i64 0, !19, i64 24}
!15 = !{!"_ZTSSt6vectorIPKhSaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIPKhSaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPKhSaIS1_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPKhSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt6vectorIN9NativeJIT8CallSiteESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIN9NativeJIT8CallSiteESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN9NativeJIT8CallSiteESaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN9NativeJIT8CallSiteESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTS16RUNTIME_FUNCTION", !13, i64 0, !13, i64 4, !13, i64 8}
!24 = !{!"bool", !7, i64 0}
!25 = !{!10, !13, i64 128}
!26 = !{!10, !13, i64 116}
!27 = !{!13, !13, i64 0}
!28 = !{!10, !13, i64 124}
!29 = !{!10, !13, i64 104}
!30 = !{!10, !13, i64 108}
!31 = !{!10, !13, i64 112}
!32 = !{!10, !24, i64 132}


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

@.str = external hidden unnamed_addr constant [84 x i8], align 1
@__FUNCTION__._ZN9NativeJIT14FunctionBuffer25EndFunctionBodyGenerationERKNS_21FunctionSpecificationE = external hidden unnamed_addr constant [26 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [63 x i8], align 1

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

declare noundef i32 @_ZNK9NativeJIT21FunctionSpecification23GetUnwindInfoByteLengthEv(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #0

declare noundef i32 @_ZNK9NativeJIT21FunctionSpecification15GetPrologLengthEv(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #0

declare noundef i32 @_ZNK9NativeJIT10CodeBuffer15CurrentPositionEv(ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9NativeJIT14FunctionBuffer25EndFunctionBodyGenerationERKNS_21FunctionSpecificationE(ptr noundef nonnull align 8 dereferenceable(133) %0, ptr noundef nonnull align 8 dereferenceable(112) %1) local_unnamed_addr #1 align 2 {
  %3 = tail call noundef i32 @_ZNK9NativeJIT21FunctionSpecification23GetUnwindInfoByteLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %1)
  %4 = getelementptr inbounds i8, ptr %0, i64 120
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %.not = icmp ugt i32 %3, %5
  br i1 %.not, label %6, label %9

6:                                                ; preds = %2
  %7 = tail call noundef i32 @_ZNK9NativeJIT21FunctionSpecification23GetUnwindInfoByteLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %1)
  %8 = load i32, ptr %4, align 8, !tbaa !5
  tail call void (ptr, ptr, i32, ptr, ptr, ...) @_ZN9NativeJIT12LogThrowImplEPKcS1_jS1_S1_z(ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN9NativeJIT14FunctionBuffer25EndFunctionBodyGenerationERKNS_21FunctionSpecificationE, i32 noundef 188, ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.13, i32 noundef %7, i32 noundef %8)
  br label %9

9:                                                ; preds = %6, %2
  %10 = tail call noundef i32 @_ZNK9NativeJIT21FunctionSpecification15GetPrologLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %1)
  %11 = getelementptr inbounds i8, ptr %0, i64 128
  %12 = load i32, ptr %11, align 8, !tbaa !24
  %.not15 = icmp ugt i32 %10, %12
  br i1 %.not15, label %13, label %16

13:                                               ; preds = %9
  %14 = tail call noundef i32 @_ZNK9NativeJIT21FunctionSpecification15GetPrologLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %1)
  %15 = load i32, ptr %11, align 8, !tbaa !24
  tail call void (ptr, ptr, i32, ptr, ptr, ...) @_ZN9NativeJIT12LogThrowImplEPKcS1_jS1_S1_z(ptr noundef nonnull @.str, ptr noundef nonnull @__FUNCTION__._ZN9NativeJIT14FunctionBuffer25EndFunctionBodyGenerationERKNS_21FunctionSpecificationE, i32 noundef 193, ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.15, i32 noundef %14, i32 noundef %15)
  br label %16

16:                                               ; preds = %9, %13
  %17 = getelementptr inbounds i8, ptr %0, i64 116
  %18 = load i32, ptr %17, align 4, !tbaa !25
  %19 = tail call noundef ptr @_ZNK9NativeJIT21FunctionSpecification19GetUnwindInfoBufferEv(ptr noundef nonnull align 8 dereferenceable(112) %1)
  %20 = tail call noundef i32 @_ZNK9NativeJIT21FunctionSpecification23GetUnwindInfoByteLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %1)
  tail call void @_ZN9NativeJIT10CodeBuffer12ReplaceBytesEjPKhj(ptr noundef nonnull align 8 dereferenceable(96) %0, i32 noundef %18, ptr noundef %19, i32 noundef %20)
  %21 = tail call noundef i32 @_ZNK9NativeJIT21FunctionSpecification23GetUnwindInfoByteLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %1)
  store i32 %21, ptr %4, align 8, !tbaa !5
  %22 = tail call noundef i32 @_ZNK9NativeJIT21FunctionSpecification15GetPrologLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %1)
  %23 = load i32, ptr %11, align 8, !tbaa !24
  %24 = icmp ult i32 %22, %23
  br i1 %24, label %25, label %._crit_edge

._crit_edge:                                      ; preds = %16
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 124
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !26
  br label %33

25:                                               ; preds = %16
  %26 = tail call noundef i32 @_ZNK9NativeJIT21FunctionSpecification15GetPrologLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %1)
  %27 = sub i32 %23, %26
  %28 = getelementptr inbounds i8, ptr %0, i64 124
  %29 = load i32, ptr %28, align 4, !tbaa !26
  %30 = add i32 %29, %27
  store i32 %30, ptr %28, align 4, !tbaa !26
  %31 = load i32, ptr %11, align 8, !tbaa !24
  %32 = sub i32 %31, %27
  store i32 %32, ptr %11, align 8, !tbaa !24
  br label %33

33:                                               ; preds = %._crit_edge, %25
  %34 = phi i32 [ %.pre, %._crit_edge ], [ %30, %25 ]
  %35 = getelementptr inbounds i8, ptr %0, i64 124
  %36 = tail call noundef ptr @_ZNK9NativeJIT21FunctionSpecification9GetPrologEv(ptr noundef nonnull align 8 dereferenceable(112) %1)
  %37 = tail call noundef i32 @_ZNK9NativeJIT21FunctionSpecification15GetPrologLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %1)
  tail call void @_ZN9NativeJIT10CodeBuffer12ReplaceBytesEjPKhj(ptr noundef nonnull align 8 dereferenceable(96) %0, i32 noundef %34, ptr noundef %36, i32 noundef %37)
  %38 = tail call noundef ptr @_ZNK9NativeJIT21FunctionSpecification9GetEpilogEv(ptr noundef nonnull align 8 dereferenceable(112) %1)
  %39 = tail call noundef i32 @_ZNK9NativeJIT21FunctionSpecification15GetEpilogLengthEv(ptr noundef nonnull align 8 dereferenceable(112) %1)
  tail call void @_ZN9NativeJIT10CodeBuffer9EmitBytesEPKhj(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef %38, i32 noundef %39)
  tail call void @_ZN9NativeJIT10CodeBuffer14PatchCallSitesEv(ptr noundef nonnull align 8 dereferenceable(96) %0)
  %40 = load i32, ptr %35, align 4, !tbaa !26
  %41 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 %40, ptr %41, align 8, !tbaa !27
  %42 = tail call noundef i32 @_ZNK9NativeJIT10CodeBuffer15CurrentPositionEv(ptr noundef nonnull align 8 dereferenceable(96) %0)
  %43 = getelementptr inbounds i8, ptr %0, i64 108
  store i32 %42, ptr %43, align 4, !tbaa !28
  %44 = load i32, ptr %17, align 4, !tbaa !25
  %45 = getelementptr inbounds i8, ptr %0, i64 112
  store i32 %44, ptr %45, align 8, !tbaa !29
  %46 = getelementptr inbounds i8, ptr %0, i64 132
  store i8 1, ptr %46, align 4, !tbaa !30
  ret void
}

declare void @_ZN9NativeJIT10CodeBuffer12ReplaceBytesEjPKhj(ptr noundef nonnull align 8 dereferenceable(96), i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare noundef ptr @_ZNK9NativeJIT21FunctionSpecification19GetUnwindInfoBufferEv(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #0

declare noundef ptr @_ZNK9NativeJIT21FunctionSpecification9GetPrologEv(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #0

declare void @_ZN9NativeJIT10CodeBuffer9EmitBytesEPKhj(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef, i32 noundef) local_unnamed_addr #0

declare noundef ptr @_ZNK9NativeJIT21FunctionSpecification9GetEpilogEv(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #0

declare noundef i32 @_ZNK9NativeJIT21FunctionSpecification15GetEpilogLengthEv(ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #0

declare void @_ZN9NativeJIT10CodeBuffer14PatchCallSitesEv(ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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" }

!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, !12, i64 120}
!6 = !{!"_ZTSN9NativeJIT14FunctionBufferE", !7, i64 0, !22, i64 104, !12, i64 116, !12, i64 120, !12, i64 124, !12, i64 128, !23, i64 132}
!7 = !{!"_ZTSN9NativeJIT16X64CodeGeneratorE", !8, i64 0, !9, i64 96}
!8 = !{!"_ZTSN9NativeJIT10CodeBufferE", !9, i64 8, !12, i64 16, !9, i64 24, !9, i64 32, !9, i64 40, !13, i64 48}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"int", !10, i64 0}
!13 = !{!"_ZTSN9NativeJIT9JumpTableE", !14, i64 0, !18, i64 24}
!14 = !{!"_ZTSSt6vectorIPKhSaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIPKhSaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPKhSaIS1_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPKhSaIS1_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!18 = !{!"_ZTSSt6vectorIN9NativeJIT8CallSiteESaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIN9NativeJIT8CallSiteESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN9NativeJIT8CallSiteESaIS1_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN9NativeJIT8CallSiteESaIS1_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!22 = !{!"_ZTS16RUNTIME_FUNCTION", !12, i64 0, !12, i64 4, !12, i64 8}
!23 = !{!"bool", !10, i64 0}
!24 = !{!6, !12, i64 128}
!25 = !{!6, !12, i64 116}
!26 = !{!6, !12, i64 124}
!27 = !{!6, !12, i64 104}
!28 = !{!6, !12, i64 108}
!29 = !{!6, !12, i64 112}
!30 = !{!6, !23, i64 132}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass