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

; 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_t0 = external constant ptr, align 8

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCBase0x3A0x3AcheckTripwire0x28unsigned0x20long0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) #0 {
  %4 = alloca ptr, align 8
  %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
  %11 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, 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
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.w2c_hermes, ptr %12, i32 0, i32 3
  %14 = load i32, ptr %13, align 8, !tbaa !11
  store i32 %14, ptr %9, align 4, !tbaa !9
  store i32 16, ptr %10, align 4, !tbaa !9
  %15 = load i32, ptr %10, align 4, !tbaa !9
  %16 = load i32, ptr %9, align 4, !tbaa !9
  %17 = sub i32 %16, %15
  store i32 %17, ptr %9, align 4, !tbaa !9
  %18 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %18, ptr %7, align 4, !tbaa !9
  %19 = load i32, ptr %9, align 4, !tbaa !9
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.w2c_hermes, ptr %20, i32 0, i32 3
  store i32 %19, ptr %21, align 8, !tbaa !11
  %22 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %22, ptr %9, align 4, !tbaa !9
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.w2c_hermes, ptr %23, i32 0, i32 6
  %25 = load i32, ptr %9, align 4, !tbaa !9
  %26 = zext i32 %25 to i64
  %27 = add i64 %26, 536
  %28 = call i32 @i32_load(ptr noundef %24, i64 noundef %27)
  store i32 %28, ptr %9, align 4, !tbaa !9
  %29 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %29, ptr %8, align 4, !tbaa !9
  %30 = load i32, ptr %9, align 4, !tbaa !9
  %31 = icmp ne i32 %30, 0
  %32 = xor i1 %31, true
  %33 = zext i1 %32 to i32
  store i32 %33, ptr %9, align 4, !tbaa !9
  %34 = load i32, ptr %9, align 4, !tbaa !9
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %37

36:                                               ; preds = %3
  br label %165

37:                                               ; preds = %3
  %38 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %38, ptr %9, align 4, !tbaa !9
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.w2c_hermes, ptr %39, i32 0, i32 6
  %41 = load i32, ptr %9, align 4, !tbaa !9
  %42 = zext i32 %41 to i64
  %43 = add i64 %42, 544
  %44 = call i32 @i32_load(ptr noundef %40, i64 noundef %43)
  store i32 %44, ptr %9, align 4, !tbaa !9
  %45 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %45, ptr %10, align 4, !tbaa !9
  %46 = load i32, ptr %9, align 4, !tbaa !9
  %47 = load i32, ptr %10, align 4, !tbaa !9
  %48 = icmp ugt i32 %46, %47
  %49 = zext i1 %48 to i32
  store i32 %49, ptr %9, align 4, !tbaa !9
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %53

52:                                               ; preds = %37
  br label %165

53:                                               ; preds = %37
  %54 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %54, ptr %9, align 4, !tbaa !9
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.w2c_hermes, ptr %55, i32 0, i32 6
  %57 = load i32, ptr %9, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  %59 = add i64 %58, 548
  %60 = call i32 @i32_load8_u(ptr noundef %56, i64 noundef %59)
  store i32 %60, ptr %9, align 4, !tbaa !9
  %61 = load i32, ptr %9, align 4, !tbaa !9
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %64

63:                                               ; preds = %53
  br label %165

64:                                               ; preds = %53
  %65 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %65, ptr %9, align 4, !tbaa !9
  store i32 276520, ptr %10, align 4, !tbaa !9
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.w2c_hermes, ptr %66, i32 0, i32 6
  %68 = load i32, ptr %9, align 4, !tbaa !9
  %69 = zext i32 %68 to i64
  %70 = add i64 %69, 12
  %71 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %67, i64 noundef %70, i32 noundef %71)
  %72 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %72, ptr %9, align 4, !tbaa !9
  store i32 1, ptr %10, align 4, !tbaa !9
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.w2c_hermes, ptr %73, i32 0, i32 6
  %75 = load i32, ptr %9, align 4, !tbaa !9
  %76 = zext i32 %75 to i64
  %77 = add i64 %76, 548
  %78 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %74, i64 noundef %77, i32 noundef %78)
  %79 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %79, ptr %9, align 4, !tbaa !9
  %80 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %80, ptr %10, align 4, !tbaa !9
  store i32 12, ptr %11, align 4, !tbaa !9
  %81 = load i32, ptr %11, align 4, !tbaa !9
  %82 = load i32, ptr %10, align 4, !tbaa !9
  %83 = add i32 %82, %81
  store i32 %83, ptr %10, align 4, !tbaa !9
  %84 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %84, ptr %11, align 4, !tbaa !9
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.w2c_hermes, ptr %85, i32 0, i32 6
  %87 = load i32, ptr %11, align 4, !tbaa !9
  %88 = zext i32 %87 to i64
  %89 = call i32 @i32_load(ptr noundef %86, i64 noundef %88)
  store i32 %89, ptr %11, align 4, !tbaa !9
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.w2c_hermes, ptr %90, i32 0, i32 6
  %92 = load i32, ptr %11, align 4, !tbaa !9
  %93 = zext i32 %92 to i64
  %94 = add i64 %93, 24
  %95 = call i32 @i32_load(ptr noundef %91, i64 noundef %94)
  store i32 %95, ptr %11, align 4, !tbaa !9
  %96 = load i32, ptr %11, align 4, !tbaa !9
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.w2c_hermes, ptr %97, i32 0, i32 7
  %99 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %98, i32 0, i32 2
  %100 = load i32, ptr %99, align 4, !tbaa !17
  %101 = icmp ult i32 %96, %100
  br i1 %101, label %102, label %125

102:                                              ; preds = %64
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.w2c_hermes, ptr %103, i32 0, i32 7
  %105 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !18
  %107 = load i32, ptr %11, align 4, !tbaa !9
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %106, i64 %108
  %110 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %109, i32 0, i32 1
  %111 = load ptr, ptr %110, align 8, !tbaa !19
  %112 = icmp ne ptr %111, null
  br i1 %112, label %113, label %125

113:                                              ; preds = %102
  %114 = load ptr, ptr @w2c_hermes_t0, align 8, !tbaa !5
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.w2c_hermes, ptr %115, i32 0, i32 7
  %117 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !18
  %119 = load i32, ptr %11, align 4, !tbaa !9
  %120 = zext i32 %119 to i64
  %121 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %118, i64 %120
  %122 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %121, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8, !tbaa !21
  %124 = call zeroext i1 @func_types_eq(ptr noundef %114, ptr noundef %123)
  br label %125

125:                                              ; preds = %113, %102, %64
  %126 = phi i1 [ false, %102 ], [ false, %64 ], [ %124, %113 ]
  %127 = xor i1 %126, true
  %128 = xor i1 %127, true
  %129 = zext i1 %128 to i32
  %130 = sext i32 %129 to i64
  %131 = call i64 @llvm.expect.i64(i64 %130, i64 1)
  %132 = icmp ne i64 %131, 0
  br i1 %132, label %135, label %133

133:                                              ; preds = %125
  call void @wasm_rt_trap(i32 noundef 6) #6
  unreachable

134:                                              ; No predecessors!
  br label %135

135:                                              ; preds = %134, %125
  %136 = phi i1 [ true, %125 ], [ false, %134 ]
  %137 = zext i1 %136 to i32
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.w2c_hermes, ptr %138, i32 0, i32 7
  %140 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %139, i32 0, i32 0
  %141 = load ptr, ptr %140, align 8, !tbaa !18
  %142 = load i32, ptr %11, align 4, !tbaa !9
  %143 = zext i32 %142 to i64
  %144 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %141, i64 %143
  %145 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %144, i32 0, i32 1
  %146 = load ptr, ptr %145, align 8, !tbaa !19
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.w2c_hermes, ptr %147, i32 0, i32 7
  %149 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %148, i32 0, i32 0
  %150 = load ptr, ptr %149, align 8, !tbaa !18
  %151 = load i32, ptr %11, align 4, !tbaa !9
  %152 = zext i32 %151 to i64
  %153 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %150, i64 %152
  %154 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %153, i32 0, i32 2
  %155 = load ptr, ptr %154, align 8, !tbaa !22
  %156 = load i32, ptr %9, align 4, !tbaa !9
  %157 = load i32, ptr %10, align 4, !tbaa !9
  call void %146(ptr noundef %155, i32 noundef %156, i32 noundef %157)
  %158 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %158, ptr %9, align 4, !tbaa !9
  store i32 12, ptr %10, align 4, !tbaa !9
  %159 = load i32, ptr %10, align 4, !tbaa !9
  %160 = load i32, ptr %9, align 4, !tbaa !9
  %161 = add i32 %160, %159
  store i32 %161, ptr %9, align 4, !tbaa !9
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = load i32, ptr %9, align 4, !tbaa !9
  %164 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCTripwireContext0x3A0x3A0x7EGCTripwireContext0x280x29(ptr noundef %162, i32 noundef %163)
  store i32 %164, ptr %9, align 4, !tbaa !9
  br label %165

165:                                              ; preds = %135, %63, %52, %36
  %166 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %166, ptr %9, align 4, !tbaa !9
  store i32 16, ptr %10, align 4, !tbaa !9
  %167 = load i32, ptr %10, align 4, !tbaa !9
  %168 = load i32, ptr %9, align 4, !tbaa !9
  %169 = add i32 %168, %167
  store i32 %169, ptr %9, align 4, !tbaa !9
  %170 = load i32, ptr %9, align 4, !tbaa !9
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.w2c_hermes, ptr %171, i32 0, i32 3
  store i32 %170, ptr %172, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void
}

attributes #0 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { 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 24}
!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, !10, i64 92}
!18 = !{!12, !6, i64 80}
!19 = !{!20, !6, i64 8}
!20 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!20, !6, i64 0}
!22 = !{!20, !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_t0 = external local_unnamed_addr constant ptr, align 8

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @i32_store8(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCBase0x3A0x3AcheckTripwire0x28unsigned0x20long0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = add i32 %5, -16
  store i32 %6, ptr %4, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 40
  %8 = zext i32 %1 to i64
  %9 = add nuw nsw i64 %8, 536
  %10 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %9)
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %49, label %11

11:                                               ; preds = %3
  %12 = add nuw nsw i64 %8, 544
  %13 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %12)
  %14 = icmp ugt i32 %13, %2
  br i1 %14, label %49, label %15

15:                                               ; preds = %11
  %16 = add nuw nsw i64 %8, 548
  %17 = tail call i32 @i32_load8_u(ptr noundef nonnull %7, i64 noundef %16)
  %.not61 = icmp eq i32 %17, 0
  br i1 %.not61, label %18, label %49

18:                                               ; preds = %15
  %19 = zext i32 %6 to i64
  %20 = add nuw nsw i64 %19, 12
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %20, i32 noundef 276520)
  tail call void @i32_store8(ptr noundef nonnull %7, i64 noundef %16, i32 noundef 1)
  %21 = add i32 %5, -4
  %22 = zext i32 %10 to i64
  %23 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %22)
  %24 = zext i32 %23 to i64
  %25 = add nuw nsw i64 %24, 24
  %26 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %25)
  %27 = getelementptr inbounds i8, ptr %0, i64 80
  %28 = getelementptr inbounds i8, ptr %0, i64 92
  %29 = load i32, ptr %28, align 4, !tbaa !15
  %30 = icmp ult i32 %26, %29
  br i1 %30, label %31, label %.critedge, !prof !16

31:                                               ; preds = %18
  %32 = load ptr, ptr %27, align 8, !tbaa !17
  %33 = zext i32 %26 to i64
  %34 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %32, i64 %33
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !18
  %.not62 = icmp eq ptr %36, null
  br i1 %.not62, label %.critedge, label %37, !prof !20

37:                                               ; preds = %31
  %38 = load ptr, ptr @w2c_hermes_t0, align 8, !tbaa !21
  %39 = load ptr, ptr %34, align 8, !tbaa !22
  %40 = tail call zeroext i1 @func_types_eq(ptr noundef %38, ptr noundef %39)
  br i1 %40, label %41, label %.critedge, !prof !16

.critedge:                                        ; preds = %31, %18, %37
  tail call void @wasm_rt_trap(i32 noundef 6) #3
  unreachable

41:                                               ; preds = %37
  %42 = load ptr, ptr %27, align 8, !tbaa !17
  %43 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %42, i64 %33
  %44 = getelementptr inbounds i8, ptr %43, i64 8
  %45 = load ptr, ptr %44, align 8, !tbaa !18
  %46 = getelementptr inbounds i8, ptr %43, i64 16
  %47 = load ptr, ptr %46, align 8, !tbaa !23
  tail call void %45(ptr noundef %47, i32 noundef %10, i32 noundef %21) #4
  %48 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCTripwireContext0x3A0x3A0x7EGCTripwireContext0x280x29(ptr noundef nonnull %0, i32 noundef %21)
  br label %49

49:                                               ; preds = %15, %11, %3, %41
  store i32 %5, ptr %4, align 8, !tbaa !5
  ret void
}

attributes #0 = { 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 = { 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 #3 = { noreturn nounwind }
attributes #4 = { 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 24}
!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 = !{!6, !10, i64 92}
!16 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!17 = !{!6, !7, i64 80}
!18 = !{!19, !7, i64 8}
!19 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16}
!20 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!21 = !{!7, !7, i64 0}
!22 = !{!19, !7, i64 0}
!23 = !{!19, !7, i64 16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LowerExpectIntrinsicPass,SROAPass,SimplifyCFGPass,TailCallElimPass