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

; 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_t1 = 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: 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 i32 @i32_load(ptr noundef, i64 noundef) #1

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

; 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

declare void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef, i32 noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_local_data0x280x29(ptr noundef) #5

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

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_void0x2A0x20std0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_proxy0x5Babi0x3Av150070x5D0x3Cstd0x3A0x3A_0x5F20x3A0x3Atuple0x3Cstd0x3A0x3A_0x5F20x3A0x3Aunique_ptr0x3Cstd0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_struct0x2C0x20std0x3A0x3A_0x5F20x3A0x3Adefault_delete0x3Cstd0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_struct0x3E0x3E0x2C0x20void0x200x280x2A0x290x28unsigned0x20char0x20const0x2A0x2C0x20unsigned0x20int0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aatomic0x3Cbool0x3E0x2A0x290x2C0x20unsigned0x20char0x20const0x2A0x2C0x20unsigned0x20int0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aatomic0x3Cbool0x3E0x2A0x3E0x3E0x28void0x2A0x29(ptr noundef %0, i32 noundef %1) #5 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %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 %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_local_data0x280x29(ptr noundef %11)
  store i32 %12, ptr %7, align 4, !tbaa !9
  %13 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %13, ptr %5, align 4, !tbaa !9
  %14 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %14, ptr %7, align 4, !tbaa !9
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.w2c_hermes, ptr %15, i32 0, i32 6
  %17 = load i32, ptr %7, align 4, !tbaa !9
  %18 = zext i32 %17 to i64
  %19 = call i32 @i32_load(ptr noundef %16, i64 noundef %18)
  store i32 %19, ptr %7, align 4, !tbaa !9
  %20 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %20, ptr %6, align 4, !tbaa !9
  %21 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %21, ptr %7, align 4, !tbaa !9
  store i32 0, ptr %8, align 4, !tbaa !9
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.w2c_hermes, ptr %22, i32 0, i32 6
  %24 = load i32, ptr %7, align 4, !tbaa !9
  %25 = zext i32 %24 to i64
  %26 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %23, i64 noundef %25, i32 noundef %26)
  %27 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %27, ptr %7, align 4, !tbaa !9
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.w2c_hermes, ptr %28, i32 0, i32 6
  %30 = load i32, ptr %7, align 4, !tbaa !9
  %31 = zext i32 %30 to i64
  %32 = call i32 @i32_load(ptr noundef %29, i64 noundef %31)
  store i32 %32, ptr %7, align 4, !tbaa !9
  %33 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %33, ptr %8, align 4, !tbaa !9
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = load i32, ptr %7, align 4, !tbaa !9
  %36 = load i32, ptr %8, align 4, !tbaa !9
  %37 = call i32 @w2c_hermes_pthread_setspecific(ptr noundef %34, i32 noundef %35, i32 noundef %36)
  store i32 %37, ptr %7, align 4, !tbaa !9
  %38 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %38, ptr %7, align 4, !tbaa !9
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.w2c_hermes, ptr %39, i32 0, i32 6
  %41 = load i32, ptr %7, align 4, !tbaa !9
  %42 = zext i32 %41 to i64
  %43 = add i64 %42, 8
  %44 = call i32 @i32_load(ptr noundef %40, i64 noundef %43)
  store i32 %44, ptr %7, align 4, !tbaa !9
  %45 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %45, ptr %8, align 4, !tbaa !9
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.w2c_hermes, ptr %46, i32 0, i32 6
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = zext i32 %48 to i64
  %50 = add i64 %49, 12
  %51 = call i32 @i32_load(ptr noundef %47, i64 noundef %50)
  store i32 %51, ptr %8, align 4, !tbaa !9
  %52 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %52, ptr %9, align 4, !tbaa !9
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.w2c_hermes, ptr %53, i32 0, i32 6
  %55 = load i32, ptr %9, align 4, !tbaa !9
  %56 = zext i32 %55 to i64
  %57 = add i64 %56, 16
  %58 = call i32 @i32_load(ptr noundef %54, i64 noundef %57)
  store i32 %58, ptr %9, align 4, !tbaa !9
  %59 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %59, ptr %10, align 4, !tbaa !9
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.w2c_hermes, ptr %60, i32 0, i32 6
  %62 = load i32, ptr %10, align 4, !tbaa !9
  %63 = zext i32 %62 to i64
  %64 = add i64 %63, 4
  %65 = call i32 @i32_load(ptr noundef %61, i64 noundef %64)
  store i32 %65, ptr %10, align 4, !tbaa !9
  %66 = load i32, ptr %10, align 4, !tbaa !9
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.w2c_hermes, ptr %67, i32 0, i32 7
  %69 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %68, i32 0, i32 2
  %70 = load i32, ptr %69, align 4, !tbaa !11
  %71 = icmp ult i32 %66, %70
  br i1 %71, label %72, label %95

72:                                               ; preds = %2
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.w2c_hermes, ptr %73, i32 0, i32 7
  %75 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %74, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8, !tbaa !17
  %77 = load i32, ptr %10, align 4, !tbaa !9
  %78 = zext i32 %77 to i64
  %79 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %76, i64 %78
  %80 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %79, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8, !tbaa !18
  %82 = icmp ne ptr %81, null
  br i1 %82, label %83, label %95

83:                                               ; preds = %72
  %84 = load ptr, ptr @w2c_hermes_t1, align 8, !tbaa !5
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.w2c_hermes, ptr %85, i32 0, i32 7
  %87 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8, !tbaa !17
  %89 = load i32, ptr %10, align 4, !tbaa !9
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %88, i64 %90
  %92 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !20
  %94 = call zeroext i1 @func_types_eq(ptr noundef %84, ptr noundef %93)
  br label %95

95:                                               ; preds = %83, %72, %2
  %96 = phi i1 [ false, %72 ], [ false, %2 ], [ %94, %83 ]
  %97 = xor i1 %96, true
  %98 = xor i1 %97, true
  %99 = zext i1 %98 to i32
  %100 = sext i32 %99 to i64
  %101 = call i64 @llvm.expect.i64(i64 %100, i64 1)
  %102 = icmp ne i64 %101, 0
  br i1 %102, label %105, label %103

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

104:                                              ; No predecessors!
  br label %105

105:                                              ; preds = %104, %95
  %106 = phi i1 [ true, %95 ], [ false, %104 ]
  %107 = zext i1 %106 to i32
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.w2c_hermes, ptr %108, i32 0, i32 7
  %110 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %109, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !17
  %112 = load i32, ptr %10, align 4, !tbaa !9
  %113 = zext i32 %112 to i64
  %114 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %111, i64 %113
  %115 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %114, i32 0, i32 1
  %116 = load ptr, ptr %115, align 8, !tbaa !18
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.w2c_hermes, ptr %117, i32 0, i32 7
  %119 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %118, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8, !tbaa !17
  %121 = load i32, ptr %10, align 4, !tbaa !9
  %122 = zext i32 %121 to i64
  %123 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %120, i64 %122
  %124 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %123, i32 0, i32 2
  %125 = load ptr, ptr %124, align 8, !tbaa !21
  %126 = load i32, ptr %7, align 4, !tbaa !9
  %127 = load i32, ptr %8, align 4, !tbaa !9
  %128 = load i32, ptr %9, align 4, !tbaa !9
  call void %116(ptr noundef %125, i32 noundef %126, i32 noundef %127, i32 noundef %128)
  %129 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %129, ptr %7, align 4, !tbaa !9
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.w2c_hermes, ptr %130, i32 0, i32 6
  %132 = load i32, ptr %7, align 4, !tbaa !9
  %133 = zext i32 %132 to i64
  %134 = call i32 @i32_load(ptr noundef %131, i64 noundef %133)
  store i32 %134, ptr %7, align 4, !tbaa !9
  %135 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %135, ptr %5, align 4, !tbaa !9
  %136 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %136, ptr %7, align 4, !tbaa !9
  store i32 0, ptr %8, align 4, !tbaa !9
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.w2c_hermes, ptr %137, i32 0, i32 6
  %139 = load i32, ptr %7, align 4, !tbaa !9
  %140 = zext i32 %139 to i64
  %141 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %138, i64 noundef %140, i32 noundef %141)
  %142 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %142, ptr %7, align 4, !tbaa !9
  %143 = load i32, ptr %7, align 4, !tbaa !9
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %145, label %152

145:                                              ; preds = %105
  %146 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %146, ptr %7, align 4, !tbaa !9
  %147 = load ptr, ptr %3, align 8, !tbaa !5
  %148 = load i32, ptr %7, align 4, !tbaa !9
  %149 = call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_struct0x3A0x3A0x7E_0x5Fthread_struct0x280x29(ptr noundef %147, i32 noundef %148)
  store i32 %149, ptr %7, align 4, !tbaa !9
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = load i32, ptr %7, align 4, !tbaa !9
  call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %150, i32 noundef %151)
  br label %152

152:                                              ; preds = %145, %105
  %153 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %153, ptr %7, align 4, !tbaa !9
  %154 = load ptr, ptr %3, align 8, !tbaa !5
  %155 = load i32, ptr %7, align 4, !tbaa !9
  call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %154, i32 noundef %155)
  store i32 0, ptr %7, align 4, !tbaa !9
  %156 = load i32, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret i32 %156
}

declare i32 @w2c_hermes_pthread_setspecific(ptr noundef, i32 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 = { "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 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 #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_t1 = 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 void @i32_store(ptr noundef, i64 noundef, i32 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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_local_data0x280x29(ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @w2c_hermes_void0x2A0x20std0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_proxy0x5Babi0x3Av150070x5D0x3Cstd0x3A0x3A_0x5F20x3A0x3Atuple0x3Cstd0x3A0x3A_0x5F20x3A0x3Aunique_ptr0x3Cstd0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_struct0x2C0x20std0x3A0x3A_0x5F20x3A0x3Adefault_delete0x3Cstd0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_struct0x3E0x3E0x2C0x20void0x200x280x2A0x290x28unsigned0x20char0x20const0x2A0x2C0x20unsigned0x20int0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aatomic0x3Cbool0x3E0x2A0x290x2C0x20unsigned0x20char0x20const0x2A0x2C0x20unsigned0x20int0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aatomic0x3Cbool0x3E0x2A0x3E0x3E0x28void0x2A0x29(ptr noundef %0, i32 noundef %1) local_unnamed_addr #3 {
  %3 = tail call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_local_data0x280x29(ptr noundef %0)
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %5 = zext i32 %1 to i64
  %6 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %5)
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %5, i32 noundef 0)
  %7 = zext i32 %3 to i64
  %8 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %7)
  %9 = tail call i32 @w2c_hermes_pthread_setspecific(ptr noundef %0, i32 noundef %8, i32 noundef %6) #4
  %10 = add nuw nsw i64 %5, 8
  %11 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %10)
  %12 = add nuw nsw i64 %5, 12
  %13 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %12)
  %14 = add nuw nsw i64 %5, 16
  %15 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %14)
  %16 = add nuw nsw i64 %5, 4
  %17 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %16)
  %18 = getelementptr inbounds i8, ptr %0, i64 80
  %19 = getelementptr inbounds i8, ptr %0, i64 92
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = icmp ult i32 %17, %20
  br i1 %21, label %22, label %.critedge, !prof !15

22:                                               ; preds = %2
  %23 = load ptr, ptr %18, align 8, !tbaa !16
  %24 = zext i32 %17 to i64
  %25 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %23, i64 %24
  %26 = getelementptr inbounds i8, ptr %25, i64 8
  %27 = load ptr, ptr %26, align 8, !tbaa !17
  %.not = icmp eq ptr %27, null
  br i1 %.not, label %.critedge, label %28, !prof !19

28:                                               ; preds = %22
  %29 = load ptr, ptr @w2c_hermes_t1, align 8, !tbaa !20
  %30 = load ptr, ptr %25, align 8, !tbaa !21
  %31 = tail call zeroext i1 @func_types_eq(ptr noundef %29, ptr noundef %30)
  br i1 %31, label %32, label %.critedge, !prof !15

.critedge:                                        ; preds = %22, %2, %28
  tail call void @wasm_rt_trap(i32 noundef 6) #5
  unreachable

32:                                               ; preds = %28
  %33 = load ptr, ptr %18, align 8, !tbaa !16
  %34 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %33, i64 %24
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !17
  %37 = getelementptr inbounds i8, ptr %34, i64 16
  %38 = load ptr, ptr %37, align 8, !tbaa !22
  tail call void %36(ptr noundef %38, i32 noundef %11, i32 noundef %13, i32 noundef %15) #4
  %39 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %5)
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %5, i32 noundef 0)
  %.not61 = icmp eq i32 %39, 0
  br i1 %.not61, label %42, label %40

40:                                               ; preds = %32
  %41 = tail call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fthread_struct0x3A0x3A0x7E_0x5Fthread_struct0x280x29(ptr noundef nonnull %0, i32 noundef %39)
  tail call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef nonnull %0, i32 noundef %41) #4
  br label %42

42:                                               ; preds = %40, %32
  tail call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef nonnull %0, i32 noundef %1) #4
  ret i32 0
}

declare i32 @w2c_hermes_pthread_setspecific(ptr noundef, i32 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 = { "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 = { 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 = { 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,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass