; LLVM IR from facebook/hermes :: API/hermes_sandbox/external (hermes_sandbox_impl_compiled_6)

; 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.w2c_hermes = type { ptr, ptr, ptr, i32, i32, i32, %struct.wasm_rt_memory_t, %struct.wasm_rt_funcref_table_t }
%struct.wasm_rt_memory_t = type { ptr, i64, i64, i64, i8 }
%struct.wasm_rt_funcref_table_t = type { ptr, i32, i32 }
%struct.wasm_rt_funcref_t = type { ptr, ptr, ptr }

@w2c_hermes_t3 = external constant ptr, align 8

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @i32_load(ptr noundef, i64 noundef) #1

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @func_types_eq(ptr noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #2

; Function Attrs: noreturn
declare void @wasm_rt_trap(i32 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_mutex_lock0x5Babi0x3Av150070x5D0x28pthread_mutex_t0x2A0x29(ptr noundef, i32 noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_mutex_unlock0x5Babi0x3Av150070x5D0x28pthread_mutex_t0x2A0x29(ptr noundef, i32 noundef) #4

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fcall_once0x28unsigned0x20long0x20volatile0x260x2C0x20void0x2A0x2C0x20void0x200x280x2A0x290x28void0x2A0x290x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #4 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 279792, ptr %9, align 4, !tbaa !9
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  %12 = load i32, ptr %9, align 4, !tbaa !9
  %13 = call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_mutex_lock0x5Babi0x3Av150070x5D0x28pthread_mutex_t0x2A0x29(ptr noundef %11, i32 noundef %12)
  store i32 %13, ptr %9, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %31, %4
  %15 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %15, ptr %9, align 4, !tbaa !9
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.w2c_hermes, ptr %16, i32 0, i32 6
  %18 = load i32, ptr %9, align 4, !tbaa !9
  %19 = zext i32 %18 to i64
  %20 = call i32 @i32_load(ptr noundef %17, i64 noundef %19)
  store i32 %20, ptr %9, align 4, !tbaa !9
  store i32 1, ptr %10, align 4, !tbaa !9
  %21 = load i32, ptr %9, align 4, !tbaa !9
  %22 = load i32, ptr %10, align 4, !tbaa !9
  %23 = icmp ne i32 %21, %22
  %24 = zext i1 %23 to i32
  store i32 %24, ptr %9, align 4, !tbaa !9
  %25 = load i32, ptr %9, align 4, !tbaa !9
  %26 = icmp ne i32 %25, 0
  %27 = xor i1 %26, true
  %28 = zext i1 %27 to i32
  store i32 %28, ptr %9, align 4, !tbaa !9
  %29 = load i32, ptr %9, align 4, !tbaa !9
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %36

31:                                               ; preds = %14
  store i32 279816, ptr %9, align 4, !tbaa !9
  store i32 279792, ptr %10, align 4, !tbaa !9
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = load i32, ptr %9, align 4, !tbaa !9
  %34 = load i32, ptr %10, align 4, !tbaa !9
  %35 = call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_condvar_wait0x5Babi0x3Av150070x5D0x28pthread_cond_t0x2A0x2C0x20pthread_mutex_t0x2A0x29(ptr noundef %32, i32 noundef %33, i32 noundef %34)
  store i32 %35, ptr %9, align 4, !tbaa !9
  br label %14

36:                                               ; preds = %14
  %37 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %37, ptr %9, align 4, !tbaa !9
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.w2c_hermes, ptr %38, i32 0, i32 6
  %40 = load i32, ptr %9, align 4, !tbaa !9
  %41 = zext i32 %40 to i64
  %42 = call i32 @i32_load(ptr noundef %39, i64 noundef %41)
  store i32 %42, ptr %9, align 4, !tbaa !9
  %43 = load i32, ptr %9, align 4, !tbaa !9
  %44 = icmp ne i32 %43, 0
  %45 = xor i1 %44, true
  %46 = zext i1 %45 to i32
  store i32 %46, ptr %9, align 4, !tbaa !9
  %47 = load i32, ptr %9, align 4, !tbaa !9
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %131

49:                                               ; preds = %36
  %50 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %50, ptr %9, align 4, !tbaa !9
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = load i32, ptr %9, align 4, !tbaa !9
  call void @w2c_hermes_void0x20std0x3A0x3A_0x5F20x3A0x3A0x28anonymous0x20namespace0x290x3A0x3A_0x5Flibcpp_relaxed_store0x5Babi0x3Av150070x5D0x3Cunsigned0x20long0x20volatile0x2C0x20unsigned0x20long0x3E0x28unsigned0x20long0x20volatile0x2A0x2C0x20unsigned0x20long0x29(ptr noundef %51, i32 noundef %52)
  store i32 279792, ptr %9, align 4, !tbaa !9
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = load i32, ptr %9, align 4, !tbaa !9
  %55 = call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_mutex_unlock0x5Babi0x3Av150070x5D0x28pthread_mutex_t0x2A0x29(ptr noundef %53, i32 noundef %54)
  store i32 %55, ptr %9, align 4, !tbaa !9
  %56 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %56, ptr %9, align 4, !tbaa !9
  %57 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %57, ptr %10, align 4, !tbaa !9
  %58 = load i32, ptr %10, align 4, !tbaa !9
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.w2c_hermes, ptr %59, i32 0, i32 7
  %61 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %60, i32 0, i32 2
  %62 = load i32, ptr %61, align 4, !tbaa !11
  %63 = icmp ult i32 %58, %62
  br i1 %63, label %64, label %87

64:                                               ; preds = %49
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.w2c_hermes, ptr %65, i32 0, i32 7
  %67 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %66, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !17
  %69 = load i32, ptr %10, align 4, !tbaa !9
  %70 = zext i32 %69 to i64
  %71 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %68, i64 %70
  %72 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %71, i32 0, i32 1
  %73 = load ptr, ptr %72, align 8, !tbaa !18
  %74 = icmp ne ptr %73, null
  br i1 %74, label %75, label %87

75:                                               ; preds = %64
  %76 = load ptr, ptr @w2c_hermes_t3, align 8, !tbaa !5
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.w2c_hermes, ptr %77, i32 0, i32 7
  %79 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %78, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8, !tbaa !17
  %81 = load i32, ptr %10, align 4, !tbaa !9
  %82 = zext i32 %81 to i64
  %83 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %80, i64 %82
  %84 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %83, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8, !tbaa !20
  %86 = call zeroext i1 @func_types_eq(ptr noundef %76, ptr noundef %85)
  br label %87

87:                                               ; preds = %75, %64, %49
  %88 = phi i1 [ false, %64 ], [ false, %49 ], [ %86, %75 ]
  %89 = xor i1 %88, true
  %90 = xor i1 %89, true
  %91 = zext i1 %90 to i32
  %92 = sext i32 %91 to i64
  %93 = call i64 @llvm.expect.i64(i64 %92, i64 1)
  %94 = icmp ne i64 %93, 0
  br i1 %94, label %97, label %95

95:                                               ; preds = %87
  call void @wasm_rt_trap(i32 noundef 6) #7
  unreachable

96:                                               ; No predecessors!
  br label %97

97:                                               ; preds = %96, %87
  %98 = phi i1 [ true, %87 ], [ false, %96 ]
  %99 = zext i1 %98 to i32
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.w2c_hermes, ptr %100, i32 0, i32 7
  %102 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %101, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8, !tbaa !17
  %104 = load i32, ptr %10, align 4, !tbaa !9
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %103, i64 %105
  %107 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %106, i32 0, i32 1
  %108 = load ptr, ptr %107, align 8, !tbaa !18
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.w2c_hermes, ptr %109, i32 0, i32 7
  %111 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8, !tbaa !17
  %113 = load i32, ptr %10, align 4, !tbaa !9
  %114 = zext i32 %113 to i64
  %115 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %112, i64 %114
  %116 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %115, i32 0, i32 2
  %117 = load ptr, ptr %116, align 8, !tbaa !21
  %118 = load i32, ptr %9, align 4, !tbaa !9
  call void %108(ptr noundef %117, i32 noundef %118)
  store i32 279792, ptr %9, align 4, !tbaa !9
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = load i32, ptr %9, align 4, !tbaa !9
  %121 = call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_mutex_lock0x5Babi0x3Av150070x5D0x28pthread_mutex_t0x2A0x29(ptr noundef %119, i32 noundef %120)
  store i32 %121, ptr %9, align 4, !tbaa !9
  %122 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %122, ptr %9, align 4, !tbaa !9
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = load i32, ptr %9, align 4, !tbaa !9
  call void @w2c_hermes_void0x20std0x3A0x3A_0x5F20x3A0x3A0x28anonymous0x20namespace0x290x3A0x3A_0x5Flibcpp_atomic_store0x5Babi0x3Av150070x5D0x3Cunsigned0x20long0x20volatile0x2C0x20unsigned0x20long0x3E0x28unsigned0x20long0x20volatile0x2A0x2C0x20unsigned0x20long0x2C0x20int0x29(ptr noundef %123, i32 noundef %124)
  store i32 279792, ptr %9, align 4, !tbaa !9
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = load i32, ptr %9, align 4, !tbaa !9
  %127 = call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_mutex_unlock0x5Babi0x3Av150070x5D0x28pthread_mutex_t0x2A0x29(ptr noundef %125, i32 noundef %126)
  store i32 %127, ptr %9, align 4, !tbaa !9
  store i32 279816, ptr %9, align 4, !tbaa !9
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = load i32, ptr %9, align 4, !tbaa !9
  %130 = call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_condvar_broadcast0x5Babi0x3Av150070x5D0x28pthread_cond_t0x2A0x29(ptr noundef %128, i32 noundef %129)
  store i32 %130, ptr %9, align 4, !tbaa !9
  br label %135

131:                                              ; preds = %36
  store i32 279792, ptr %9, align 4, !tbaa !9
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = load i32, ptr %9, align 4, !tbaa !9
  %134 = call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_mutex_unlock0x5Babi0x3Av150070x5D0x28pthread_mutex_t0x2A0x29(ptr noundef %132, i32 noundef %133)
  store i32 %134, ptr %9, align 4, !tbaa !9
  br label %135

135:                                              ; preds = %131, %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_condvar_wait0x5Babi0x3Av150070x5D0x28pthread_cond_t0x2A0x2C0x20pthread_mutex_t0x2A0x29(ptr noundef, i32 noundef, i32 noundef) #4

declare void @w2c_hermes_void0x20std0x3A0x3A_0x5F20x3A0x3A0x28anonymous0x20namespace0x290x3A0x3A_0x5Flibcpp_relaxed_store0x5Babi0x3Av150070x5D0x3Cunsigned0x20long0x20volatile0x2C0x20unsigned0x20long0x3E0x28unsigned0x20long0x20volatile0x2A0x2C0x20unsigned0x20long0x29(ptr noundef, i32 noundef) #5

declare void @w2c_hermes_void0x20std0x3A0x3A_0x5F20x3A0x3A0x28anonymous0x20namespace0x290x3A0x3A_0x5Flibcpp_atomic_store0x5Babi0x3Av150070x5D0x3Cunsigned0x20long0x20volatile0x2C0x20unsigned0x20long0x3E0x28unsigned0x20long0x20volatile0x2A0x2C0x20unsigned0x20long0x2C0x20int0x29(ptr noundef, i32 noundef) #5

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_condvar_broadcast0x5Babi0x3Av150070x5D0x28pthread_cond_t0x2A0x29(ptr noundef, i32 noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #3 = { noreturn "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 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 = { "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 #6 = { nounwind }
attributes #7 = { noreturn }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 92}
!12 = !{!"w2c_hermes", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !13, i64 40, !16, i64 80}
!13 = !{!"", !6, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !15, i64 32}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12}
!17 = !{!12, !6, i64 80}
!18 = !{!19, !6, i64 8}
!19 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!19, !6, i64 0}
!21 = !{!19, !6, i64 16}


; 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.wasm_rt_funcref_t = type { ptr, ptr, ptr }

@w2c_hermes_t3 = external local_unnamed_addr constant ptr, align 8

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @i32_load(ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @func_types_eq(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: noreturn
declare void @wasm_rt_trap(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_mutex_lock0x5Babi0x3Av150070x5D0x28pthread_mutex_t0x2A0x29(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_mutex_unlock0x5Babi0x3Av150070x5D0x28pthread_mutex_t0x2A0x29(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fcall_once0x28unsigned0x20long0x20volatile0x260x2C0x20void0x2A0x2C0x20void0x200x280x2A0x290x28void0x2A0x290x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = tail call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_mutex_lock0x5Babi0x3Av150070x5D0x28pthread_mutex_t0x2A0x29(ptr noundef %0, i32 noundef 279792)
  %6 = getelementptr inbounds i8, ptr %0, i64 40
  %7 = zext i32 %1 to i64
  %8 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %7)
  %.not48 = icmp eq i32 %8, 1
  br i1 %.not48, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %4, %.lr.ph
  %9 = tail call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_condvar_wait0x5Babi0x3Av150070x5D0x28pthread_cond_t0x2A0x2C0x20pthread_mutex_t0x2A0x29(ptr noundef %0, i32 noundef 279816, i32 noundef 279792)
  %10 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %7)
  %.not = icmp eq i32 %10, 1
  br i1 %.not, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %4
  %11 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %7)
  %.not45 = icmp eq i32 %11, 0
  br i1 %.not45, label %12, label %38

12:                                               ; preds = %._crit_edge
  tail call void @w2c_hermes_void0x20std0x3A0x3A_0x5F20x3A0x3A0x28anonymous0x20namespace0x290x3A0x3A_0x5Flibcpp_relaxed_store0x5Babi0x3Av150070x5D0x3Cunsigned0x20long0x20volatile0x2C0x20unsigned0x20long0x3E0x28unsigned0x20long0x20volatile0x2A0x2C0x20unsigned0x20long0x29(ptr noundef %0, i32 noundef %1) #4
  %13 = tail call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_mutex_unlock0x5Babi0x3Av150070x5D0x28pthread_mutex_t0x2A0x29(ptr noundef %0, i32 noundef 279792)
  %14 = getelementptr inbounds i8, ptr %0, i64 80
  %15 = getelementptr inbounds i8, ptr %0, i64 92
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = icmp ugt i32 %16, %3
  br i1 %17, label %18, label %.critedge, !prof !15

18:                                               ; preds = %12
  %19 = load ptr, ptr %14, align 8, !tbaa !16
  %20 = zext i32 %3 to i64
  %21 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %19, i64 %20
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !17
  %.not46 = icmp eq ptr %23, null
  br i1 %.not46, label %.critedge, label %24, !prof !19

24:                                               ; preds = %18
  %25 = load ptr, ptr @w2c_hermes_t3, align 8, !tbaa !20
  %26 = load ptr, ptr %21, align 8, !tbaa !21
  %27 = tail call zeroext i1 @func_types_eq(ptr noundef %25, ptr noundef %26)
  br i1 %27, label %28, label %.critedge, !prof !15

.critedge:                                        ; preds = %18, %12, %24
  tail call void @wasm_rt_trap(i32 noundef 6) #5
  unreachable

28:                                               ; preds = %24
  %29 = load ptr, ptr %14, align 8, !tbaa !16
  %30 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %29, i64 %20
  %31 = getelementptr inbounds i8, ptr %30, i64 8
  %32 = load ptr, ptr %31, align 8, !tbaa !17
  %33 = getelementptr inbounds i8, ptr %30, i64 16
  %34 = load ptr, ptr %33, align 8, !tbaa !22
  tail call void %32(ptr noundef %34, i32 noundef %2) #4
  %35 = tail call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_mutex_lock0x5Babi0x3Av150070x5D0x28pthread_mutex_t0x2A0x29(ptr noundef nonnull %0, i32 noundef 279792)
  tail call void @w2c_hermes_void0x20std0x3A0x3A_0x5F20x3A0x3A0x28anonymous0x20namespace0x290x3A0x3A_0x5Flibcpp_atomic_store0x5Babi0x3Av150070x5D0x3Cunsigned0x20long0x20volatile0x2C0x20unsigned0x20long0x3E0x28unsigned0x20long0x20volatile0x2A0x2C0x20unsigned0x20long0x2C0x20int0x29(ptr noundef nonnull %0, i32 noundef %1) #4
  %36 = tail call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_mutex_unlock0x5Babi0x3Av150070x5D0x28pthread_mutex_t0x2A0x29(ptr noundef nonnull %0, i32 noundef 279792)
  %37 = tail call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_condvar_broadcast0x5Babi0x3Av150070x5D0x28pthread_cond_t0x2A0x29(ptr noundef nonnull %0, i32 noundef 279816)
  br label %40

38:                                               ; preds = %._crit_edge
  %39 = tail call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_mutex_unlock0x5Babi0x3Av150070x5D0x28pthread_mutex_t0x2A0x29(ptr noundef %0, i32 noundef 279792)
  br label %40

40:                                               ; preds = %38, %28
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_condvar_wait0x5Babi0x3Av150070x5D0x28pthread_cond_t0x2A0x2C0x20pthread_mutex_t0x2A0x29(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @w2c_hermes_void0x20std0x3A0x3A_0x5F20x3A0x3A0x28anonymous0x20namespace0x290x3A0x3A_0x5Flibcpp_relaxed_store0x5Babi0x3Av150070x5D0x3Cunsigned0x20long0x20volatile0x2C0x20unsigned0x20long0x3E0x28unsigned0x20long0x20volatile0x2A0x2C0x20unsigned0x20long0x29(ptr noundef, i32 noundef) local_unnamed_addr #3

declare void @w2c_hermes_void0x20std0x3A0x3A_0x5F20x3A0x3A0x28anonymous0x20namespace0x290x3A0x3A_0x5Flibcpp_atomic_store0x5Babi0x3Av150070x5D0x3Cunsigned0x20long0x20volatile0x2C0x20unsigned0x20long0x3E0x28unsigned0x20long0x20volatile0x2A0x2C0x20unsigned0x20long0x2C0x20int0x29(ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Flibcpp_condvar_broadcast0x5Babi0x3Av150070x5D0x28pthread_cond_t0x2A0x29(ptr noundef, i32 noundef) local_unnamed_addr #2

attributes #0 = { inlinehint 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 #1 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind 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 }
attributes #5 = { noreturn 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, !10, i64 92}
!6 = !{!"w2c_hermes", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !11, i64 40, !14, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"", !7, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !13, i64 32}
!12 = !{!"long", !8, i64 0}
!13 = !{!"_Bool", !8, i64 0}
!14 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12}
!15 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!16 = !{!6, !7, i64 80}
!17 = !{!18, !7, i64 8}
!18 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16}
!19 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!20 = !{!7, !7, i64 0}
!21 = !{!18, !7, i64 0}
!22 = !{!18, !7, i64 16}


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