; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

declare void @w2c_hermes_0x5F_assert_fail(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

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

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

37:                                               ; preds = %4
  br label %38

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

52:                                               ; preds = %38
  br label %164

53:                                               ; preds = %38
  %54 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %54, ptr %11, align 4, !tbaa !9
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.w2c_hermes, ptr %55, i32 0, i32 6
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  %59 = add i64 %58, 4
  %60 = call i32 @i32_load(ptr noundef %56, i64 noundef %59)
  store i32 %60, ptr %11, align 4, !tbaa !9
  store i32 -8, ptr %12, align 4, !tbaa !9
  %61 = load i32, ptr %11, align 4, !tbaa !9
  %62 = load i32, ptr %12, align 4, !tbaa !9
  %63 = icmp ult i32 %61, %62
  %64 = zext i1 %63 to i32
  store i32 %64, ptr %11, align 4, !tbaa !9
  %65 = load i32, ptr %11, align 4, !tbaa !9
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %68

67:                                               ; preds = %53
  br label %164

68:                                               ; preds = %53
  %69 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %69, ptr %11, align 4, !tbaa !9
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.w2c_hermes, ptr %70, i32 0, i32 6
  %72 = load i32, ptr %11, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = add i64 %73, 588
  %75 = call i32 @i32_load(ptr noundef %71, i64 noundef %74)
  store i32 %75, ptr %11, align 4, !tbaa !9
  %76 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %76, ptr %12, align 4, !tbaa !9
  store i32 -4194304, ptr %13, align 4, !tbaa !9
  %77 = load i32, ptr %13, align 4, !tbaa !9
  %78 = load i32, ptr %12, align 4, !tbaa !9
  %79 = and i32 %78, %77
  store i32 %79, ptr %12, align 4, !tbaa !9
  %80 = load i32, ptr %11, align 4, !tbaa !9
  %81 = load i32, ptr %12, align 4, !tbaa !9
  %82 = icmp eq i32 %80, %81
  %83 = zext i1 %82 to i32
  store i32 %83, ptr %11, align 4, !tbaa !9
  %84 = load i32, ptr %11, align 4, !tbaa !9
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %87

86:                                               ; preds = %68
  br label %180

87:                                               ; preds = %68
  %88 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %88, ptr %11, align 4, !tbaa !9
  %89 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %89, ptr %12, align 4, !tbaa !9
  %90 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %90, ptr %13, align 4, !tbaa !9
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.w2c_hermes, ptr %91, i32 0, i32 6
  %93 = load i32, ptr %13, align 4, !tbaa !9
  %94 = zext i32 %93 to i64
  %95 = call i32 @i32_load(ptr noundef %92, i64 noundef %94)
  store i32 %95, ptr %13, align 4, !tbaa !9
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.w2c_hermes, ptr %96, i32 0, i32 6
  %98 = load i32, ptr %13, align 4, !tbaa !9
  %99 = zext i32 %98 to i64
  %100 = add i64 %99, 16
  %101 = call i32 @i32_load(ptr noundef %97, i64 noundef %100)
  store i32 %101, ptr %13, align 4, !tbaa !9
  %102 = load i32, ptr %13, align 4, !tbaa !9
  %103 = load ptr, ptr %5, 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 2
  %106 = load i32, ptr %105, align 4, !tbaa !11
  %107 = icmp ult i32 %102, %106
  br i1 %107, label %108, label %131

108:                                              ; preds = %87
  %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 %13, 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 1
  %117 = load ptr, ptr %116, align 8, !tbaa !18
  %118 = icmp ne ptr %117, null
  br i1 %118, label %119, label %131

119:                                              ; preds = %108
  %120 = load ptr, ptr @w2c_hermes_t0, align 8, !tbaa !5
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.w2c_hermes, ptr %121, i32 0, i32 7
  %123 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %122, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8, !tbaa !17
  %125 = load i32, ptr %13, align 4, !tbaa !9
  %126 = zext i32 %125 to i64
  %127 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %124, i64 %126
  %128 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %127, i32 0, i32 0
  %129 = load ptr, ptr %128, align 8, !tbaa !20
  %130 = call zeroext i1 @func_types_eq(ptr noundef %120, ptr noundef %129)
  br label %131

131:                                              ; preds = %119, %108, %87
  %132 = phi i1 [ false, %108 ], [ false, %87 ], [ %130, %119 ]
  %133 = xor i1 %132, true
  %134 = xor i1 %133, true
  %135 = zext i1 %134 to i32
  %136 = sext i32 %135 to i64
  %137 = call i64 @llvm.expect.i64(i64 %136, i64 1)
  %138 = icmp ne i64 %137, 0
  br i1 %138, label %141, label %139

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

140:                                              ; No predecessors!
  br label %141

141:                                              ; preds = %140, %131
  %142 = phi i1 [ true, %131 ], [ false, %140 ]
  %143 = zext i1 %142 to i32
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.w2c_hermes, ptr %144, i32 0, i32 7
  %146 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %145, i32 0, i32 0
  %147 = load ptr, ptr %146, align 8, !tbaa !17
  %148 = load i32, ptr %13, align 4, !tbaa !9
  %149 = zext i32 %148 to i64
  %150 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %147, i64 %149
  %151 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %150, i32 0, i32 1
  %152 = load ptr, ptr %151, align 8, !tbaa !18
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.w2c_hermes, ptr %153, i32 0, i32 7
  %155 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %154, i32 0, i32 0
  %156 = load ptr, ptr %155, align 8, !tbaa !17
  %157 = load i32, ptr %13, align 4, !tbaa !9
  %158 = zext i32 %157 to i64
  %159 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %156, i64 %158
  %160 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %159, i32 0, i32 2
  %161 = load ptr, ptr %160, align 8, !tbaa !21
  %162 = load i32, ptr %11, align 4, !tbaa !9
  %163 = load i32, ptr %12, align 4, !tbaa !9
  call void %152(ptr noundef %161, i32 noundef %162, i32 noundef %163)
  br label %164

164:                                              ; preds = %141, %67, %52
  %165 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %165, ptr %11, align 4, !tbaa !9
  store i32 12, ptr %12, align 4, !tbaa !9
  %166 = load i32, ptr %12, align 4, !tbaa !9
  %167 = load i32, ptr %11, align 4, !tbaa !9
  %168 = add i32 %167, %166
  store i32 %168, ptr %11, align 4, !tbaa !9
  %169 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %169, ptr %9, align 4, !tbaa !9
  %170 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %170, ptr %12, align 4, !tbaa !9
  %171 = load i32, ptr %11, align 4, !tbaa !9
  %172 = load i32, ptr %12, align 4, !tbaa !9
  %173 = icmp ne i32 %171, %172
  %174 = zext i1 %173 to i32
  store i32 %174, ptr %11, align 4, !tbaa !9
  %175 = load i32, ptr %11, align 4, !tbaa !9
  %176 = icmp ne i32 %175, 0
  br i1 %176, label %177, label %178

177:                                              ; preds = %164
  br label %38

178:                                              ; preds = %164
  br label %179

179:                                              ; preds = %178, %4
  br label %198

180:                                              ; preds = %86
  store i32 0, ptr %11, align 4, !tbaa !9
  %181 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %181, ptr %9, align 4, !tbaa !9
  store i32 155380, ptr %12, align 4, !tbaa !9
  %182 = load i32, ptr %12, align 4, !tbaa !9
  %183 = load i32, ptr %11, align 4, !tbaa !9
  %184 = add i32 %183, %182
  store i32 %184, ptr %11, align 4, !tbaa !9
  %185 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %185, ptr %12, align 4, !tbaa !9
  store i32 61125, ptr %13, align 4, !tbaa !9
  %186 = load i32, ptr %13, align 4, !tbaa !9
  %187 = load i32, ptr %12, align 4, !tbaa !9
  %188 = add i32 %187, %186
  store i32 %188, ptr %12, align 4, !tbaa !9
  store i32 176, ptr %13, align 4, !tbaa !9
  %189 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %189, ptr %14, align 4, !tbaa !9
  store i32 42097, ptr %15, align 4, !tbaa !9
  %190 = load i32, ptr %15, align 4, !tbaa !9
  %191 = load i32, ptr %14, align 4, !tbaa !9
  %192 = add i32 %191, %190
  store i32 %192, ptr %14, align 4, !tbaa !9
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = load i32, ptr %11, align 4, !tbaa !9
  %195 = load i32, ptr %12, align 4, !tbaa !9
  %196 = load i32, ptr %13, align 4, !tbaa !9
  %197 = load i32, ptr %14, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %193, i32 noundef %194, i32 noundef %195, i32 noundef %196, i32 noundef %197)
  call void @wasm_rt_trap(i32 noundef 5) #7
  unreachable

198:                                              ; preds = %179
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 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_t0 = external local_unnamed_addr constant ptr, align 8

declare void @w2c_hermes_0x5F_assert_fail(ptr noundef, i32 noundef, i32 noundef, i32 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_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_hermes0x3A0x3Avm0x3A0x3AIdentifierTable0x3A0x3AmarkIdentifiers0x28hermes0x3A0x3Avm0x3A0x3ARootAcceptor0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHadesGC0x260x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #3 {
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  %6 = zext i32 %1 to i64
  %7 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %6)
  %8 = add nuw nsw i64 %6, 4
  %9 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %8)
  %.not = icmp eq i32 %7, %9
  br i1 %.not, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %4
  %10 = zext i32 %3 to i64
  %11 = add nuw nsw i64 %10, 588
  %12 = zext i32 %2 to i64
  %13 = getelementptr inbounds i8, ptr %0, i64 80
  %14 = getelementptr inbounds i8, ptr %0, i64 92
  %15 = load ptr, ptr @w2c_hermes_t0, align 8
  br label %16

16:                                               ; preds = %.preheader, %50
  %.0 = phi i32 [ %51, %50 ], [ %7, %.preheader ]
  %17 = zext i32 %.0 to i64
  %18 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %17)
  %.not75 = icmp eq i32 %18, 0
  br i1 %.not75, label %50, label %19

19:                                               ; preds = %16
  %20 = add nuw nsw i64 %17, 4
  %21 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %20)
  %22 = icmp ult i32 %21, -8
  br i1 %22, label %50, label %23

23:                                               ; preds = %19
  %24 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %11)
  %25 = and i32 %18, -4194304
  %26 = icmp eq i32 %24, %25
  br i1 %26, label %52, label %27

27:                                               ; preds = %23
  %28 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %12)
  %29 = zext i32 %28 to i64
  %30 = add nuw nsw i64 %29, 16
  %31 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %30)
  %32 = load i32, ptr %14, align 4, !tbaa !5
  %33 = icmp ult i32 %31, %32
  br i1 %33, label %34, label %.critedge, !prof !15

34:                                               ; preds = %27
  %35 = load ptr, ptr %13, align 8, !tbaa !16
  %36 = zext i32 %31 to i64
  %37 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %35, i64 %36
  %38 = getelementptr inbounds i8, ptr %37, i64 8
  %39 = load ptr, ptr %38, align 8, !tbaa !17
  %.not76 = icmp eq ptr %39, null
  br i1 %.not76, label %.critedge, label %40, !prof !19

40:                                               ; preds = %34
  %41 = load ptr, ptr %37, align 8, !tbaa !20
  %42 = tail call zeroext i1 @func_types_eq(ptr noundef %15, ptr noundef %41)
  br i1 %42, label %43, label %.critedge, !prof !15

.critedge:                                        ; preds = %34, %27, %40
  tail call void @wasm_rt_trap(i32 noundef 6) #4
  unreachable

43:                                               ; preds = %40
  %44 = load ptr, ptr %13, align 8, !tbaa !16
  %45 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %44, i64 %36
  %46 = getelementptr inbounds i8, ptr %45, i64 8
  %47 = load ptr, ptr %46, align 8, !tbaa !17
  %48 = getelementptr inbounds i8, ptr %45, i64 16
  %49 = load ptr, ptr %48, align 8, !tbaa !21
  tail call void %47(ptr noundef %49, i32 noundef %2, i32 noundef %.0) #5
  br label %50

50:                                               ; preds = %19, %16, %43
  %51 = add i32 %.0, 12
  %.not77 = icmp eq i32 %51, %9
  br i1 %.not77, label %.loopexit, label %16

52:                                               ; preds = %23
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 155380, i32 noundef 61125, i32 noundef 176, i32 noundef 42097) #5
  tail call void @wasm_rt_trap(i32 noundef 5) #4
  unreachable

.loopexit:                                        ; preds = %50, %4
  ret void
}

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 = { 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 = { 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 = { noreturn nounwind }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !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 = !{!18, !7, i64 0}
!21 = !{!18, !7, i64 16}


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