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

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

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

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

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

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

; 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_dlfree(ptr noundef, i32 noundef) #4

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

declare i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Athread0x3A0x3A0x7Ethread0x280x29(ptr noundef, i32 noundef) #4

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Ahbc0x3A0x3ABCProviderFromBuffer0x3A0x3A0x7EBCProviderFromBuffer0x280x290x2E1(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
  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
  %10 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %10, ptr %7, align 4, !tbaa !9
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = load i32, ptr %7, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Ahbc0x3A0x3ABCProviderFromBuffer0x3A0x3AstopWarmup0x280x29(ptr noundef %11, i32 noundef %12)
  %13 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %13, ptr %7, align 4, !tbaa !9
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.w2c_hermes, ptr %14, i32 0, i32 6
  %16 = load i32, ptr %7, align 4, !tbaa !9
  %17 = zext i32 %16 to i64
  %18 = add i64 %17, 128
  %19 = call i32 @i32_load(ptr noundef %15, 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 %5, align 4, !tbaa !9
  %21 = load i32, ptr %7, align 4, !tbaa !9
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %120

23:                                               ; preds = %2
  %24 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %24, ptr %7, align 4, !tbaa !9
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.w2c_hermes, ptr %25, i32 0, i32 6
  %27 = load i32, ptr %7, align 4, !tbaa !9
  %28 = zext i32 %27 to i64
  %29 = add i64 %28, 60
  %30 = call i32 @i32_load(ptr noundef %26, i64 noundef %29)
  store i32 %30, ptr %7, align 4, !tbaa !9
  %31 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %31, ptr %6, align 4, !tbaa !9
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %48

34:                                               ; preds = %23
  %35 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %35, ptr %7, align 4, !tbaa !9
  store i32 -64, ptr %8, align 4, !tbaa !9
  %36 = load i32, ptr %8, align 4, !tbaa !9
  %37 = load i32, ptr %7, align 4, !tbaa !9
  %38 = sub i32 %37, %36
  store i32 %38, ptr %7, align 4, !tbaa !9
  %39 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %39, ptr %8, align 4, !tbaa !9
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.w2c_hermes, ptr %40, i32 0, i32 6
  %42 = load i32, ptr %7, align 4, !tbaa !9
  %43 = zext i32 %42 to i64
  %44 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %41, i64 noundef %43, i32 noundef %44)
  %45 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %45, ptr %7, align 4, !tbaa !9
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = load i32, ptr %7, align 4, !tbaa !9
  call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %46, i32 noundef %47)
  br label %48

48:                                               ; preds = %34, %23
  %49 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %49, ptr %7, align 4, !tbaa !9
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.w2c_hermes, ptr %50, i32 0, i32 6
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = add i64 %53, 24
  %55 = call i32 @i32_load(ptr noundef %51, i64 noundef %54)
  store i32 %55, ptr %7, align 4, !tbaa !9
  %56 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %56, ptr %6, align 4, !tbaa !9
  %57 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %57, ptr %8, align 4, !tbaa !9
  store i32 36, ptr %9, align 4, !tbaa !9
  %58 = load i32, ptr %9, align 4, !tbaa !9
  %59 = load i32, ptr %8, align 4, !tbaa !9
  %60 = add i32 %59, %58
  store i32 %60, ptr %8, align 4, !tbaa !9
  %61 = load i32, ptr %7, align 4, !tbaa !9
  %62 = load i32, ptr %8, align 4, !tbaa !9
  %63 = icmp ne i32 %61, %62
  %64 = zext i1 %63 to i32
  store i32 %64, ptr %7, align 4, !tbaa !9
  %65 = load i32, ptr %7, align 4, !tbaa !9
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %71

67:                                               ; preds = %48
  %68 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %68, ptr %7, align 4, !tbaa !9
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = load i32, ptr %7, align 4, !tbaa !9
  call void @w2c_hermes_dlfree(ptr noundef %69, i32 noundef %70)
  br label %71

71:                                               ; preds = %67, %48
  %72 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %72, ptr %7, align 4, !tbaa !9
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.w2c_hermes, ptr %73, i32 0, i32 6
  %75 = load i32, ptr %7, align 4, !tbaa !9
  %76 = zext i32 %75 to i64
  %77 = add i64 %76, 12
  %78 = call i32 @i32_load(ptr noundef %74, i64 noundef %77)
  store i32 %78, ptr %7, align 4, !tbaa !9
  %79 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %79, ptr %6, align 4, !tbaa !9
  %80 = load i32, ptr %7, align 4, !tbaa !9
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %94

82:                                               ; preds = %71
  %83 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %83, ptr %7, align 4, !tbaa !9
  %84 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %84, ptr %8, align 4, !tbaa !9
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.w2c_hermes, ptr %85, i32 0, i32 6
  %87 = load i32, ptr %7, align 4, !tbaa !9
  %88 = zext i32 %87 to i64
  %89 = add i64 %88, 16
  %90 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %86, i64 noundef %89, i32 noundef %90)
  %91 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %91, ptr %7, align 4, !tbaa !9
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = load i32, ptr %7, align 4, !tbaa !9
  call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %92, i32 noundef %93)
  br label %94

94:                                               ; preds = %82, %71
  %95 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %95, ptr %7, align 4, !tbaa !9
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.w2c_hermes, ptr %96, i32 0, i32 6
  %98 = load i32, ptr %7, align 4, !tbaa !9
  %99 = zext i32 %98 to i64
  %100 = call i32 @i32_load(ptr noundef %97, i64 noundef %99)
  store i32 %100, ptr %7, align 4, !tbaa !9
  %101 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %101, ptr %6, align 4, !tbaa !9
  %102 = load i32, ptr %7, align 4, !tbaa !9
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %116

104:                                              ; preds = %94
  %105 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %105, ptr %7, align 4, !tbaa !9
  %106 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %106, ptr %8, align 4, !tbaa !9
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.w2c_hermes, ptr %107, i32 0, i32 6
  %109 = load i32, ptr %7, align 4, !tbaa !9
  %110 = zext i32 %109 to i64
  %111 = add i64 %110, 4
  %112 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %108, i64 noundef %111, i32 noundef %112)
  %113 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %113, ptr %7, align 4, !tbaa !9
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = load i32, ptr %7, align 4, !tbaa !9
  call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %114, i32 noundef %115)
  br label %116

116:                                              ; preds = %104, %94
  %117 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %117, ptr %7, align 4, !tbaa !9
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = load i32, ptr %7, align 4, !tbaa !9
  call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %118, i32 noundef %119)
  br label %120

120:                                              ; preds = %116, %2
  %121 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %121, ptr %7, align 4, !tbaa !9
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.w2c_hermes, ptr %122, i32 0, i32 6
  %124 = load i32, ptr %7, align 4, !tbaa !9
  %125 = zext i32 %124 to i64
  %126 = add i64 %125, 184
  %127 = call i32 @i32_load(ptr noundef %123, i64 noundef %126)
  store i32 %127, ptr %7, align 4, !tbaa !9
  %128 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %128, ptr %5, align 4, !tbaa !9
  %129 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %129, ptr %7, align 4, !tbaa !9
  store i32 0, ptr %8, 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 = add i64 %133, 184
  %135 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %131, i64 noundef %134, i32 noundef %135)
  %136 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %136, ptr %7, align 4, !tbaa !9
  %137 = load i32, ptr %7, align 4, !tbaa !9
  %138 = icmp ne i32 %137, 0
  br i1 %138, label %139, label %143

139:                                              ; preds = %120
  %140 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %140, ptr %7, align 4, !tbaa !9
  %141 = load ptr, ptr %3, align 8, !tbaa !5
  %142 = load i32, ptr %7, align 4, !tbaa !9
  call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %141, i32 noundef %142)
  br label %143

143:                                              ; preds = %139, %120
  %144 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %144, ptr %7, align 4, !tbaa !9
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.w2c_hermes, ptr %145, i32 0, i32 6
  %147 = load i32, ptr %7, align 4, !tbaa !9
  %148 = zext i32 %147 to i64
  %149 = add i64 %148, 176
  %150 = call i32 @i32_load8_u(ptr noundef %146, i64 noundef %149)
  store i32 %150, ptr %7, align 4, !tbaa !9
  %151 = load i32, ptr %7, align 4, !tbaa !9
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %153, label %168

153:                                              ; preds = %143
  %154 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %154, ptr %7, align 4, !tbaa !9
  store i32 172, ptr %8, align 4, !tbaa !9
  %155 = load i32, ptr %8, align 4, !tbaa !9
  %156 = load i32, ptr %7, align 4, !tbaa !9
  %157 = add i32 %156, %155
  store i32 %157, ptr %7, align 4, !tbaa !9
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = load i32, ptr %7, align 4, !tbaa !9
  %160 = call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Athread0x3A0x3A0x7Ethread0x280x29(ptr noundef %158, i32 noundef %159)
  store i32 %160, ptr %7, align 4, !tbaa !9
  %161 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %161, ptr %7, align 4, !tbaa !9
  store i32 0, ptr %8, align 4, !tbaa !9
  %162 = load ptr, ptr %3, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.w2c_hermes, ptr %162, i32 0, i32 6
  %164 = load i32, ptr %7, align 4, !tbaa !9
  %165 = zext i32 %164 to i64
  %166 = add i64 %165, 176
  %167 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %163, i64 noundef %166, i32 noundef %167)
  br label %168

168:                                              ; preds = %153, %143
  %169 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %169, ptr %7, align 4, !tbaa !9
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.w2c_hermes, ptr %170, i32 0, i32 6
  %172 = load i32, ptr %7, align 4, !tbaa !9
  %173 = zext i32 %172 to i64
  %174 = add i64 %173, 144
  %175 = call i32 @i32_load(ptr noundef %171, i64 noundef %174)
  store i32 %175, ptr %7, align 4, !tbaa !9
  %176 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %176, ptr %5, align 4, !tbaa !9
  %177 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %177, ptr %7, align 4, !tbaa !9
  store i32 0, ptr %8, align 4, !tbaa !9
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.w2c_hermes, ptr %178, i32 0, i32 6
  %180 = load i32, ptr %7, align 4, !tbaa !9
  %181 = zext i32 %180 to i64
  %182 = add i64 %181, 144
  %183 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %179, i64 noundef %182, i32 noundef %183)
  %184 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %184, ptr %7, align 4, !tbaa !9
  %185 = load i32, ptr %7, align 4, !tbaa !9
  %186 = icmp ne i32 %185, 0
  br i1 %186, label %187, label %262

187:                                              ; preds = %168
  %188 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %188, ptr %7, align 4, !tbaa !9
  %189 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %189, ptr %8, align 4, !tbaa !9
  %190 = load ptr, ptr %3, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.w2c_hermes, ptr %190, i32 0, i32 6
  %192 = load i32, ptr %8, align 4, !tbaa !9
  %193 = zext i32 %192 to i64
  %194 = call i32 @i32_load(ptr noundef %191, i64 noundef %193)
  store i32 %194, ptr %8, align 4, !tbaa !9
  %195 = load ptr, ptr %3, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.w2c_hermes, ptr %195, i32 0, i32 6
  %197 = load i32, ptr %8, align 4, !tbaa !9
  %198 = zext i32 %197 to i64
  %199 = add i64 %198, 4
  %200 = call i32 @i32_load(ptr noundef %196, i64 noundef %199)
  store i32 %200, ptr %8, align 4, !tbaa !9
  %201 = load i32, ptr %8, align 4, !tbaa !9
  %202 = load ptr, ptr %3, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.w2c_hermes, ptr %202, i32 0, i32 7
  %204 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %203, i32 0, i32 2
  %205 = load i32, ptr %204, align 4, !tbaa !11
  %206 = icmp ult i32 %201, %205
  br i1 %206, label %207, label %230

207:                                              ; preds = %187
  %208 = load ptr, ptr %3, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.w2c_hermes, ptr %208, i32 0, i32 7
  %210 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %209, i32 0, i32 0
  %211 = load ptr, ptr %210, align 8, !tbaa !17
  %212 = load i32, ptr %8, align 4, !tbaa !9
  %213 = zext i32 %212 to i64
  %214 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %211, i64 %213
  %215 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %214, i32 0, i32 1
  %216 = load ptr, ptr %215, align 8, !tbaa !18
  %217 = icmp ne ptr %216, null
  br i1 %217, label %218, label %230

218:                                              ; preds = %207
  %219 = load ptr, ptr @w2c_hermes_t3, align 8, !tbaa !5
  %220 = load ptr, ptr %3, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.w2c_hermes, ptr %220, i32 0, i32 7
  %222 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %221, i32 0, i32 0
  %223 = load ptr, ptr %222, align 8, !tbaa !17
  %224 = load i32, ptr %8, align 4, !tbaa !9
  %225 = zext i32 %224 to i64
  %226 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %223, i64 %225
  %227 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %226, i32 0, i32 0
  %228 = load ptr, ptr %227, align 8, !tbaa !20
  %229 = call zeroext i1 @func_types_eq(ptr noundef %219, ptr noundef %228)
  br label %230

230:                                              ; preds = %218, %207, %187
  %231 = phi i1 [ false, %207 ], [ false, %187 ], [ %229, %218 ]
  %232 = xor i1 %231, true
  %233 = xor i1 %232, true
  %234 = zext i1 %233 to i32
  %235 = sext i32 %234 to i64
  %236 = call i64 @llvm.expect.i64(i64 %235, i64 1)
  %237 = icmp ne i64 %236, 0
  br i1 %237, label %240, label %238

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

239:                                              ; No predecessors!
  br label %240

240:                                              ; preds = %239, %230
  %241 = phi i1 [ true, %230 ], [ false, %239 ]
  %242 = zext i1 %241 to i32
  %243 = load ptr, ptr %3, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.w2c_hermes, ptr %243, i32 0, i32 7
  %245 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %244, i32 0, i32 0
  %246 = load ptr, ptr %245, align 8, !tbaa !17
  %247 = load i32, ptr %8, align 4, !tbaa !9
  %248 = zext i32 %247 to i64
  %249 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %246, i64 %248
  %250 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %249, i32 0, i32 1
  %251 = load ptr, ptr %250, align 8, !tbaa !18
  %252 = load ptr, ptr %3, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.w2c_hermes, ptr %252, i32 0, i32 7
  %254 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %253, i32 0, i32 0
  %255 = load ptr, ptr %254, align 8, !tbaa !17
  %256 = load i32, ptr %8, align 4, !tbaa !9
  %257 = zext i32 %256 to i64
  %258 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %255, i64 %257
  %259 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %258, i32 0, i32 2
  %260 = load ptr, ptr %259, align 8, !tbaa !21
  %261 = load i32, ptr %7, align 4, !tbaa !9
  call void %251(ptr noundef %260, i32 noundef %261)
  br label %262

262:                                              ; preds = %240, %168
  %263 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %263, ptr %7, align 4, !tbaa !9
  store i32 265808, ptr %8, align 4, !tbaa !9
  %264 = load ptr, ptr %3, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.w2c_hermes, ptr %264, i32 0, i32 6
  %266 = load i32, ptr %7, align 4, !tbaa !9
  %267 = zext i32 %266 to i64
  %268 = load i32, ptr %8, align 4, !tbaa !9
  call void @i32_store(ptr noundef %265, i64 noundef %267, i32 noundef %268)
  %269 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %269, ptr %7, align 4, !tbaa !9
  %270 = load ptr, ptr %3, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.w2c_hermes, ptr %270, i32 0, i32 6
  %272 = load i32, ptr %7, align 4, !tbaa !9
  %273 = zext i32 %272 to i64
  %274 = add i64 %273, 143
  %275 = call i32 @i32_load8_s(ptr noundef %271, i64 noundef %274)
  store i32 %275, ptr %7, align 4, !tbaa !9
  store i32 0, ptr %8, align 4, !tbaa !9
  %276 = load i32, ptr %7, align 4, !tbaa !9
  %277 = load i32, ptr %8, align 4, !tbaa !9
  %278 = icmp slt i32 %276, %277
  %279 = zext i1 %278 to i32
  store i32 %279, ptr %7, align 4, !tbaa !9
  %280 = load i32, ptr %7, align 4, !tbaa !9
  %281 = icmp ne i32 %280, 0
  br i1 %281, label %282, label %292

282:                                              ; preds = %262
  %283 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %283, ptr %7, align 4, !tbaa !9
  %284 = load ptr, ptr %3, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.w2c_hermes, ptr %284, i32 0, i32 6
  %286 = load i32, ptr %7, align 4, !tbaa !9
  %287 = zext i32 %286 to i64
  %288 = add i64 %287, 132
  %289 = call i32 @i32_load(ptr noundef %285, i64 noundef %288)
  store i32 %289, ptr %7, align 4, !tbaa !9
  %290 = load ptr, ptr %3, align 8, !tbaa !5
  %291 = load i32, ptr %7, align 4, !tbaa !9
  call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %290, i32 noundef %291)
  br label %292

292:                                              ; preds = %282, %262
  %293 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %293, ptr %7, align 4, !tbaa !9
  %294 = load i32, ptr %7, align 4, !tbaa !9
  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 %294
}

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_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 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

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

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

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

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

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

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

declare i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Athread0x3A0x3A0x7Ethread0x280x29(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @w2c_hermes_hermes0x3A0x3Ahbc0x3A0x3ABCProviderFromBuffer0x3A0x3A0x7EBCProviderFromBuffer0x280x290x2E1(ptr noundef %0, i32 noundef returned %1) local_unnamed_addr #3 {
  tail call void @w2c_hermes_hermes0x3A0x3Ahbc0x3A0x3ABCProviderFromBuffer0x3A0x3AstopWarmup0x280x29(ptr noundef %0, i32 noundef %1)
  %3 = getelementptr inbounds i8, ptr %0, i64 40
  %4 = zext i32 %1 to i64
  %5 = add nuw nsw i64 %4, 128
  %6 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %5)
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %29, label %7

7:                                                ; preds = %2
  %8 = zext i32 %6 to i64
  %9 = add nuw nsw i64 %8, 60
  %10 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %9)
  %.not141 = icmp eq i32 %10, 0
  br i1 %.not141, label %14, label %11

11:                                               ; preds = %7
  %12 = add i32 %6, 64
  %13 = zext i32 %12 to i64
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %13, i32 noundef %10)
  tail call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %0, i32 noundef %10) #4
  br label %14

14:                                               ; preds = %11, %7
  %15 = add nuw nsw i64 %8, 24
  %16 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %15)
  %17 = add i32 %6, 36
  %.not142 = icmp eq i32 %16, %17
  br i1 %.not142, label %19, label %18

18:                                               ; preds = %14
  tail call void @w2c_hermes_dlfree(ptr noundef %0, i32 noundef %16) #4
  br label %19

19:                                               ; preds = %18, %14
  %20 = add nuw nsw i64 %8, 12
  %21 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %20)
  %.not143 = icmp eq i32 %21, 0
  br i1 %.not143, label %24, label %22

22:                                               ; preds = %19
  %23 = add nuw nsw i64 %8, 16
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %23, i32 noundef %21)
  tail call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %0, i32 noundef %21) #4
  br label %24

24:                                               ; preds = %22, %19
  %25 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %8)
  %.not144 = icmp eq i32 %25, 0
  br i1 %.not144, label %28, label %26

26:                                               ; preds = %24
  %27 = add nuw nsw i64 %8, 4
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %27, i32 noundef %25)
  tail call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %0, i32 noundef %25) #4
  br label %28

28:                                               ; preds = %26, %24
  tail call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %0, i32 noundef %6) #4
  br label %29

29:                                               ; preds = %28, %2
  %30 = add nuw nsw i64 %4, 184
  %31 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %30)
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %30, i32 noundef 0)
  %.not145 = icmp eq i32 %31, 0
  br i1 %.not145, label %33, label %32

32:                                               ; preds = %29
  tail call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %0, i32 noundef %31) #4
  br label %33

33:                                               ; preds = %32, %29
  %34 = add nuw nsw i64 %4, 176
  %35 = tail call i32 @i32_load8_u(ptr noundef nonnull %3, i64 noundef %34)
  %.not146 = icmp eq i32 %35, 0
  br i1 %.not146, label %39, label %36

36:                                               ; preds = %33
  %37 = add i32 %1, 172
  %38 = tail call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Athread0x3A0x3A0x7Ethread0x280x29(ptr noundef %0, i32 noundef %37) #4
  tail call void @i32_store8(ptr noundef nonnull %3, i64 noundef %34, i32 noundef 0)
  br label %39

39:                                               ; preds = %36, %33
  %40 = add nuw nsw i64 %4, 144
  %41 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %40)
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %40, i32 noundef 0)
  %.not147 = icmp eq i32 %41, 0
  br i1 %.not147, label %69, label %42

42:                                               ; preds = %39
  %43 = zext i32 %41 to i64
  %44 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %43)
  %45 = zext i32 %44 to i64
  %46 = add nuw nsw i64 %45, 4
  %47 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %46)
  %48 = getelementptr inbounds i8, ptr %0, i64 80
  %49 = getelementptr inbounds i8, ptr %0, i64 92
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = icmp ult i32 %47, %50
  br i1 %51, label %52, label %.critedge, !prof !15

52:                                               ; preds = %42
  %53 = load ptr, ptr %48, align 8, !tbaa !16
  %54 = zext i32 %47 to i64
  %55 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %53, i64 %54
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  %57 = load ptr, ptr %56, align 8, !tbaa !17
  %.not148 = icmp eq ptr %57, null
  br i1 %.not148, label %.critedge, label %58, !prof !19

58:                                               ; preds = %52
  %59 = load ptr, ptr @w2c_hermes_t3, align 8, !tbaa !20
  %60 = load ptr, ptr %55, align 8, !tbaa !21
  %61 = tail call zeroext i1 @func_types_eq(ptr noundef %59, ptr noundef %60)
  br i1 %61, label %62, label %.critedge, !prof !15

.critedge:                                        ; preds = %52, %42, %58
  tail call void @wasm_rt_trap(i32 noundef 6) #5
  unreachable

62:                                               ; preds = %58
  %63 = load ptr, ptr %48, align 8, !tbaa !16
  %64 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %63, i64 %54
  %65 = getelementptr inbounds i8, ptr %64, i64 8
  %66 = load ptr, ptr %65, align 8, !tbaa !17
  %67 = getelementptr inbounds i8, ptr %64, i64 16
  %68 = load ptr, ptr %67, align 8, !tbaa !22
  tail call void %66(ptr noundef %68, i32 noundef %41) #4
  br label %69

69:                                               ; preds = %62, %39
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %4, i32 noundef 265808)
  %70 = add nuw nsw i64 %4, 143
  %71 = tail call i32 @i32_load8_s(ptr noundef nonnull %3, i64 noundef %70)
  %72 = icmp slt i32 %71, 0
  br i1 %72, label %73, label %76

73:                                               ; preds = %69
  %74 = add nuw nsw i64 %4, 132
  %75 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %74)
  tail call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %0, i32 noundef %75) #4
  br label %76

76:                                               ; preds = %73, %69
  ret i32 %1
}

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: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass