; LLVM IR from facebook/hermes :: API/hermes_sandbox/external (hermes_sandbox_impl_opt_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_t2 = 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 void @i64_store(ptr noundef, i64 noundef, i64 noundef) #1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCBase0x3A0x3Aoom0x28std0x3A0x3A_0x5F20x3A0x3Aerror_code0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) #3 {
  %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 i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  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) #6
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 0, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  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 8, ptr %14) #6
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.w2c_hermes, ptr %15, i32 0, i32 3
  %17 = load i32, ptr %16, align 8, !tbaa !13
  store i32 %17, ptr %10, align 4, !tbaa !9
  store i32 480, ptr %11, align 4, !tbaa !9
  %18 = load i32, ptr %11, align 4, !tbaa !9
  %19 = load i32, ptr %10, align 4, !tbaa !9
  %20 = sub i32 %19, %18
  store i32 %20, ptr %10, align 4, !tbaa !9
  %21 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %21, ptr %7, align 4, !tbaa !9
  %22 = load i32, ptr %10, align 4, !tbaa !9
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.w2c_hermes, ptr %23, i32 0, i32 3
  store i32 %22, ptr %24, align 8, !tbaa !13
  %25 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %25, ptr %10, align 4, !tbaa !9
  store i32 1, ptr %11, align 4, !tbaa !9
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.w2c_hermes, ptr %26, i32 0, i32 6
  %28 = load i32, ptr %10, align 4, !tbaa !9
  %29 = zext i32 %28 to i64
  %30 = add i64 %29, 78
  %31 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %27, i64 noundef %30, i32 noundef %31)
  %32 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %32, ptr %10, align 4, !tbaa !9
  store i32 400, ptr %11, align 4, !tbaa !9
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.w2c_hermes, ptr %33, i32 0, i32 6
  %35 = load i32, ptr %10, align 4, !tbaa !9
  %36 = zext i32 %35 to i64
  %37 = add i64 %36, 76
  %38 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store(ptr noundef %34, i64 noundef %37, i32 noundef %38)
  %39 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %39, ptr %10, align 4, !tbaa !9
  %40 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %40, ptr %11, align 4, !tbaa !9
  store i32 80, ptr %12, align 4, !tbaa !9
  %41 = load i32, ptr %12, align 4, !tbaa !9
  %42 = load i32, ptr %11, align 4, !tbaa !9
  %43 = add i32 %42, %41
  store i32 %43, ptr %11, align 4, !tbaa !9
  %44 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %44, ptr %8, align 4, !tbaa !9
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.w2c_hermes, ptr %45, i32 0, i32 6
  %47 = load i32, ptr %10, align 4, !tbaa !9
  %48 = zext i32 %47 to i64
  %49 = add i64 %48, 72
  %50 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store(ptr noundef %46, i64 noundef %49, i32 noundef %50)
  %51 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %51, ptr %10, align 4, !tbaa !9
  %52 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %52, ptr %11, align 4, !tbaa !9
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.w2c_hermes, ptr %53, i32 0, i32 6
  %55 = load i32, ptr %11, align 4, !tbaa !9
  %56 = zext i32 %55 to i64
  %57 = call i64 @i64_load(ptr noundef %54, i64 noundef %56)
  store i64 %57, ptr %14, align 8, !tbaa !11
  %58 = load i64, ptr %14, align 8, !tbaa !11
  store i64 %58, ptr %9, align 8, !tbaa !11
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.w2c_hermes, ptr %59, i32 0, i32 6
  %61 = load i32, ptr %10, align 4, !tbaa !9
  %62 = zext i32 %61 to i64
  %63 = add i64 %62, 64
  %64 = load i64, ptr %14, align 8, !tbaa !11
  call void @i64_store(ptr noundef %60, i64 noundef %63, i64 noundef %64)
  %65 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %65, 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 %10, align 4, !tbaa !9
  %69 = zext i32 %68 to i64
  %70 = call i32 @i32_load(ptr noundef %67, i64 noundef %69)
  store i32 %70, ptr %10, align 4, !tbaa !9
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.w2c_hermes, ptr %71, i32 0, i32 6
  %73 = load i32, ptr %10, align 4, !tbaa !9
  %74 = zext i32 %73 to i64
  %75 = add i64 %74, 80
  %76 = call i32 @i32_load(ptr noundef %72, i64 noundef %75)
  store i32 %76, ptr %10, align 4, !tbaa !9
  %77 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %77, ptr %6, align 4, !tbaa !9
  %78 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %78, ptr %10, align 4, !tbaa !9
  %79 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %79, ptr %11, align 4, !tbaa !9
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.w2c_hermes, ptr %80, i32 0, i32 6
  %82 = load i32, ptr %11, align 4, !tbaa !9
  %83 = zext i32 %82 to i64
  %84 = add i64 %83, 72
  %85 = call i64 @i64_load(ptr noundef %81, i64 noundef %84)
  store i64 %85, ptr %14, align 8, !tbaa !11
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.w2c_hermes, ptr %86, i32 0, i32 6
  %88 = load i32, ptr %10, align 4, !tbaa !9
  %89 = zext i32 %88 to i64
  %90 = add i64 %89, 40
  %91 = load i64, ptr %14, align 8, !tbaa !11
  call void @i64_store(ptr noundef %87, i64 noundef %90, i64 noundef %91)
  %92 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %92, ptr %10, align 4, !tbaa !9
  %93 = load i64, ptr %9, align 8, !tbaa !11
  store i64 %93, ptr %14, align 8, !tbaa !11
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.w2c_hermes, ptr %94, i32 0, i32 6
  %96 = load i32, ptr %10, align 4, !tbaa !9
  %97 = zext i32 %96 to i64
  %98 = add i64 %97, 32
  %99 = load i64, ptr %14, align 8, !tbaa !11
  call void @i64_store(ptr noundef %95, i64 noundef %98, i64 noundef %99)
  %100 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %100, ptr %10, align 4, !tbaa !9
  %101 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %101, ptr %11, align 4, !tbaa !9
  store i32 40, ptr %12, align 4, !tbaa !9
  %102 = load i32, ptr %12, align 4, !tbaa !9
  %103 = load i32, ptr %11, align 4, !tbaa !9
  %104 = add i32 %103, %102
  store i32 %104, ptr %11, align 4, !tbaa !9
  %105 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %105, ptr %12, align 4, !tbaa !9
  store i32 32, ptr %13, align 4, !tbaa !9
  %106 = load i32, ptr %13, align 4, !tbaa !9
  %107 = load i32, ptr %12, align 4, !tbaa !9
  %108 = add i32 %107, %106
  store i32 %108, ptr %12, align 4, !tbaa !9
  %109 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %109, ptr %13, align 4, !tbaa !9
  %110 = load i32, ptr %13, align 4, !tbaa !9
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.w2c_hermes, ptr %111, i32 0, i32 7
  %113 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %112, i32 0, i32 2
  %114 = load i32, ptr %113, align 4, !tbaa !18
  %115 = icmp ult i32 %110, %114
  br i1 %115, label %116, label %139

116:                                              ; preds = %3
  %117 = load ptr, ptr %4, 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 !19
  %121 = load i32, ptr %13, 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 1
  %125 = load ptr, ptr %124, align 8, !tbaa !20
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %139

127:                                              ; preds = %116
  %128 = load ptr, ptr @w2c_hermes_t2, align 8, !tbaa !5
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.w2c_hermes, ptr %129, i32 0, i32 7
  %131 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %130, i32 0, i32 0
  %132 = load ptr, ptr %131, align 8, !tbaa !19
  %133 = load i32, ptr %13, align 4, !tbaa !9
  %134 = zext i32 %133 to i64
  %135 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %132, i64 %134
  %136 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %135, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !22
  %138 = call zeroext i1 @func_types_eq(ptr noundef %128, ptr noundef %137)
  br label %139

139:                                              ; preds = %127, %116, %3
  %140 = phi i1 [ false, %116 ], [ false, %3 ], [ %138, %127 ]
  %141 = xor i1 %140, true
  %142 = xor i1 %141, true
  %143 = zext i1 %142 to i32
  %144 = sext i32 %143 to i64
  %145 = call i64 @llvm.expect.i64(i64 %144, i64 1)
  %146 = icmp ne i64 %145, 0
  br i1 %146, label %149, label %147

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

148:                                              ; No predecessors!
  br label %149

149:                                              ; preds = %148, %139
  %150 = phi i1 [ true, %139 ], [ false, %148 ]
  %151 = zext i1 %150 to i32
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.w2c_hermes, ptr %152, i32 0, i32 7
  %154 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %153, i32 0, i32 0
  %155 = load ptr, ptr %154, align 8, !tbaa !19
  %156 = load i32, ptr %13, align 4, !tbaa !9
  %157 = zext i32 %156 to i64
  %158 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %155, i64 %157
  %159 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %158, i32 0, i32 1
  %160 = load ptr, ptr %159, align 8, !tbaa !20
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.w2c_hermes, ptr %161, i32 0, i32 7
  %163 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %162, i32 0, i32 0
  %164 = load ptr, ptr %163, align 8, !tbaa !19
  %165 = load i32, ptr %13, align 4, !tbaa !9
  %166 = zext i32 %165 to i64
  %167 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %164, i64 %166
  %168 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %167, i32 0, i32 2
  %169 = load ptr, ptr %168, align 8, !tbaa !23
  %170 = load i32, ptr %10, align 4, !tbaa !9
  %171 = load i32, ptr %11, align 4, !tbaa !9
  %172 = load i32, ptr %12, align 4, !tbaa !9
  call void %160(ptr noundef %169, i32 noundef %170, i32 noundef %171, i32 noundef %172)
  %173 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %173, ptr %10, align 4, !tbaa !9
  %174 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %174, ptr %11, align 4, !tbaa !9
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.w2c_hermes, ptr %175, i32 0, i32 6
  %177 = load i32, ptr %10, align 4, !tbaa !9
  %178 = zext i32 %177 to i64
  %179 = add i64 %178, 16
  %180 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store(ptr noundef %176, i64 noundef %179, i32 noundef %180)
  store i32 56111, ptr %10, align 4, !tbaa !9
  store i32 57548, ptr %11, align 4, !tbaa !9
  %181 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %181, ptr %12, align 4, !tbaa !9
  store i32 16, ptr %13, align 4, !tbaa !9
  %182 = load i32, ptr %13, align 4, !tbaa !9
  %183 = load i32, ptr %12, align 4, !tbaa !9
  %184 = add i32 %183, %182
  store i32 %184, ptr %12, align 4, !tbaa !9
  %185 = load ptr, ptr %4, align 8, !tbaa !5
  %186 = load i32, ptr %10, align 4, !tbaa !9
  %187 = load i32, ptr %11, align 4, !tbaa !9
  %188 = load i32, ptr %12, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3AhermesLog0x28char0x20const0x2A0x2C0x20char0x20const0x2A0x2C0x200x2E0x2E0x2E0x29(ptr noundef %185, i32 noundef %186, i32 noundef %187, i32 noundef %188)
  %189 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %189, ptr %10, align 4, !tbaa !9
  %190 = load ptr, ptr %4, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.w2c_hermes, ptr %190, i32 0, i32 6
  %192 = load i32, ptr %10, align 4, !tbaa !9
  %193 = zext i32 %192 to i64
  %194 = add i64 %193, 28
  %195 = call i32 @i32_load(ptr noundef %191, i64 noundef %194)
  store i32 %195, ptr %10, align 4, !tbaa !9
  %196 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %196, ptr %5, align 4, !tbaa !9
  store i32 55697, ptr %11, align 4, !tbaa !9
  %197 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %197, ptr %12, align 4, !tbaa !9
  %198 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %198, ptr %13, align 4, !tbaa !9
  %199 = load ptr, ptr %4, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.w2c_hermes, ptr %199, i32 0, i32 6
  %201 = load i32, ptr %13, align 4, !tbaa !9
  %202 = zext i32 %201 to i64
  %203 = call i32 @i32_load(ptr noundef %200, i64 noundef %202)
  store i32 %203, ptr %13, align 4, !tbaa !9
  %204 = load ptr, ptr %4, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.w2c_hermes, ptr %204, i32 0, i32 6
  %206 = load i32, ptr %13, align 4, !tbaa !9
  %207 = zext i32 %206 to i64
  %208 = add i64 %207, 8
  %209 = call i32 @i32_load(ptr noundef %205, i64 noundef %208)
  store i32 %209, ptr %13, align 4, !tbaa !9
  %210 = load i32, ptr %13, align 4, !tbaa !9
  %211 = load ptr, ptr %4, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.w2c_hermes, ptr %211, i32 0, i32 7
  %213 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %212, i32 0, i32 2
  %214 = load i32, ptr %213, align 4, !tbaa !18
  %215 = icmp ult i32 %210, %214
  br i1 %215, label %216, label %239

216:                                              ; preds = %149
  %217 = load ptr, ptr %4, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.w2c_hermes, ptr %217, i32 0, i32 7
  %219 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %218, i32 0, i32 0
  %220 = load ptr, ptr %219, align 8, !tbaa !19
  %221 = load i32, ptr %13, align 4, !tbaa !9
  %222 = zext i32 %221 to i64
  %223 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %220, i64 %222
  %224 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %223, i32 0, i32 1
  %225 = load ptr, ptr %224, align 8, !tbaa !20
  %226 = icmp ne ptr %225, null
  br i1 %226, label %227, label %239

227:                                              ; preds = %216
  %228 = load ptr, ptr @w2c_hermes_t2, align 8, !tbaa !5
  %229 = load ptr, ptr %4, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.w2c_hermes, ptr %229, i32 0, i32 7
  %231 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %230, i32 0, i32 0
  %232 = load ptr, ptr %231, align 8, !tbaa !19
  %233 = load i32, ptr %13, align 4, !tbaa !9
  %234 = zext i32 %233 to i64
  %235 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %232, i64 %234
  %236 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %235, i32 0, i32 0
  %237 = load ptr, ptr %236, align 8, !tbaa !22
  %238 = call zeroext i1 @func_types_eq(ptr noundef %228, ptr noundef %237)
  br label %239

239:                                              ; preds = %227, %216, %149
  %240 = phi i1 [ false, %216 ], [ false, %149 ], [ %238, %227 ]
  %241 = xor i1 %240, true
  %242 = xor i1 %241, true
  %243 = zext i1 %242 to i32
  %244 = sext i32 %243 to i64
  %245 = call i64 @llvm.expect.i64(i64 %244, i64 1)
  %246 = icmp ne i64 %245, 0
  br i1 %246, label %249, label %247

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

248:                                              ; No predecessors!
  br label %249

249:                                              ; preds = %248, %239
  %250 = phi i1 [ true, %239 ], [ false, %248 ]
  %251 = zext i1 %250 to i32
  %252 = load ptr, ptr %4, 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 !19
  %256 = load i32, ptr %13, 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 1
  %260 = load ptr, ptr %259, align 8, !tbaa !20
  %261 = load ptr, ptr %4, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.w2c_hermes, ptr %261, i32 0, i32 7
  %263 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %262, i32 0, i32 0
  %264 = load ptr, ptr %263, align 8, !tbaa !19
  %265 = load i32, ptr %13, align 4, !tbaa !9
  %266 = zext i32 %265 to i64
  %267 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %264, i64 %266
  %268 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %267, i32 0, i32 2
  %269 = load ptr, ptr %268, align 8, !tbaa !23
  %270 = load i32, ptr %10, align 4, !tbaa !9
  %271 = load i32, ptr %11, align 4, !tbaa !9
  %272 = load i32, ptr %12, align 4, !tbaa !9
  call void %260(ptr noundef %269, i32 noundef %270, i32 noundef %271, i32 noundef %272)
  %273 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %273, ptr %10, align 4, !tbaa !9
  store i32 3, ptr %11, align 4, !tbaa !9
  %274 = load ptr, ptr %4, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.w2c_hermes, ptr %274, i32 0, i32 6
  %276 = load i32, ptr %10, align 4, !tbaa !9
  %277 = zext i32 %276 to i64
  %278 = add i64 %277, 60
  %279 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store(ptr noundef %275, i64 noundef %278, i32 noundef %279)
  %280 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %280, ptr %10, align 4, !tbaa !9
  store i32 56021, ptr %11, align 4, !tbaa !9
  %281 = load ptr, ptr %4, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.w2c_hermes, ptr %281, i32 0, i32 6
  %283 = load i32, ptr %10, align 4, !tbaa !9
  %284 = zext i32 %283 to i64
  %285 = add i64 %284, 56
  %286 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store(ptr noundef %282, i64 noundef %285, i32 noundef %286)
  %287 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %287, ptr %10, align 4, !tbaa !9
  %288 = load i64, ptr %9, align 8, !tbaa !11
  store i64 %288, ptr %14, align 8, !tbaa !11
  %289 = load ptr, ptr %4, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.w2c_hermes, ptr %289, i32 0, i32 6
  %291 = load i32, ptr %10, align 4, !tbaa !9
  %292 = zext i32 %291 to i64
  %293 = add i64 %292, 48
  %294 = load i64, ptr %14, align 8, !tbaa !11
  call void @i64_store(ptr noundef %290, i64 noundef %293, i64 noundef %294)
  %295 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %295, ptr %10, align 4, !tbaa !9
  %296 = load i64, ptr %9, align 8, !tbaa !11
  store i64 %296, ptr %14, align 8, !tbaa !11
  %297 = load ptr, ptr %4, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.w2c_hermes, ptr %297, i32 0, i32 6
  %299 = load i32, ptr %10, align 4, !tbaa !9
  %300 = zext i32 %299 to i64
  %301 = load i64, ptr %14, align 8, !tbaa !11
  call void @i64_store(ptr noundef %298, i64 noundef %300, i64 noundef %301)
  %302 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %302, ptr %10, align 4, !tbaa !9
  %303 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %303, ptr %11, align 4, !tbaa !9
  %304 = load ptr, ptr %4, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.w2c_hermes, ptr %304, i32 0, i32 6
  %306 = load i32, ptr %11, align 4, !tbaa !9
  %307 = zext i32 %306 to i64
  %308 = add i64 %307, 56
  %309 = call i64 @i64_load(ptr noundef %305, i64 noundef %308)
  store i64 %309, ptr %14, align 8, !tbaa !11
  %310 = load ptr, ptr %4, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.w2c_hermes, ptr %310, i32 0, i32 6
  %312 = load i32, ptr %10, align 4, !tbaa !9
  %313 = zext i32 %312 to i64
  %314 = add i64 %313, 8
  %315 = load i64, ptr %14, align 8, !tbaa !11
  call void @i64_store(ptr noundef %311, i64 noundef %314, i64 noundef %315)
  %316 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %316, ptr %10, align 4, !tbaa !9
  store i32 8, ptr %11, align 4, !tbaa !9
  %317 = load i32, ptr %11, align 4, !tbaa !9
  %318 = load i32, ptr %10, align 4, !tbaa !9
  %319 = add i32 %318, %317
  store i32 %319, ptr %10, align 4, !tbaa !9
  %320 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %320, ptr %11, align 4, !tbaa !9
  %321 = load ptr, ptr %4, align 8, !tbaa !5
  %322 = load i32, ptr %10, align 4, !tbaa !9
  %323 = load i32, ptr %11, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Ahermes_fatal0x28llvh0x3A0x3AStringRef0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aerror_code0x29(ptr noundef %321, i32 noundef %322, i32 noundef %323)
  call void @wasm_rt_trap(i32 noundef 5) #7
  unreachable
}

; 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) #4

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

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

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 = { 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 = { 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 = { "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, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 24}
!14 = !{!"w2c_hermes", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !15, i64 40, !17, i64 80}
!15 = !{!"", !6, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !16, i64 32}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12}
!18 = !{!14, !10, i64 92}
!19 = !{!14, !6, i64 80}
!20 = !{!21, !6, i64 8}
!21 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!21, !6, i64 0}
!23 = !{!21, !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_t2 = 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 void @i64_store(ptr noundef, i64 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: noreturn
declare void @wasm_rt_trap(i32 noundef) local_unnamed_addr #1

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

; Function Attrs: noreturn nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AGCBase0x3A0x3Aoom0x28std0x3A0x3A_0x5F20x3A0x3Aerror_code0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = add i32 %5, -480
  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, 78
  tail call void @i32_store8(ptr noundef nonnull %7, i64 noundef %9, i32 noundef 1)
  %10 = zext i32 %6 to i64
  %11 = add nuw nsw i64 %10, 76
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %11, i32 noundef 400)
  %12 = add i32 %5, -400
  %13 = add nuw nsw i64 %10, 72
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %13, i32 noundef %12)
  %14 = zext i32 %2 to i64
  %15 = tail call i64 @i64_load(ptr noundef nonnull %7, i64 noundef %14)
  %16 = add nuw nsw i64 %10, 64
  tail call void @i64_store(ptr noundef nonnull %7, i64 noundef %16, i64 noundef %15)
  %17 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %8)
  %18 = zext i32 %17 to i64
  %19 = add nuw nsw i64 %18, 80
  %20 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %19)
  %21 = tail call i64 @i64_load(ptr noundef nonnull %7, i64 noundef %13)
  %22 = add nuw nsw i64 %10, 40
  tail call void @i64_store(ptr noundef nonnull %7, i64 noundef %22, i64 noundef %21)
  %23 = add nuw nsw i64 %10, 32
  tail call void @i64_store(ptr noundef nonnull %7, i64 noundef %23, i64 noundef %15)
  %24 = add i32 %5, -440
  %25 = add i32 %5, -448
  %26 = getelementptr inbounds i8, ptr %0, i64 80
  %27 = getelementptr inbounds i8, ptr %0, i64 92
  %28 = load i32, ptr %27, align 4, !tbaa !15
  %29 = icmp ult i32 %20, %28
  br i1 %29, label %30, label %.critedge, !prof !16

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

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

.critedge:                                        ; preds = %30, %3, %36
  tail call void @wasm_rt_trap(i32 noundef 6) #4
  unreachable

40:                                               ; preds = %36
  %41 = load ptr, ptr %26, align 8, !tbaa !17
  %42 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %41, i64 %32
  %43 = getelementptr inbounds i8, ptr %42, i64 8
  %44 = load ptr, ptr %43, align 8, !tbaa !18
  %45 = getelementptr inbounds i8, ptr %42, i64 16
  %46 = load ptr, ptr %45, align 8, !tbaa !23
  tail call void %44(ptr noundef %46, i32 noundef %1, i32 noundef %24, i32 noundef %25) #5
  %47 = add nuw nsw i64 %10, 16
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %47, i32 noundef %12)
  %48 = add i32 %5, -464
  tail call void @w2c_hermes_hermes0x3A0x3AhermesLog0x28char0x20const0x2A0x2C0x20char0x20const0x2A0x2C0x200x2E0x2E0x2E0x29(ptr noundef nonnull %0, i32 noundef 56111, i32 noundef 57548, i32 noundef %48) #5
  %49 = add nuw nsw i64 %8, 28
  %50 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %49)
  %51 = zext i32 %50 to i64
  %52 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %51)
  %53 = zext i32 %52 to i64
  %54 = add nuw nsw i64 %53, 8
  %55 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %54)
  %56 = load i32, ptr %27, align 4, !tbaa !15
  %57 = icmp ult i32 %55, %56
  br i1 %57, label %58, label %.critedge138, !prof !16

58:                                               ; preds = %40
  %59 = load ptr, ptr %26, align 8, !tbaa !17
  %60 = zext i32 %55 to i64
  %61 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %59, i64 %60
  %62 = getelementptr inbounds i8, ptr %61, i64 8
  %63 = load ptr, ptr %62, align 8, !tbaa !18
  %.not136 = icmp eq ptr %63, null
  br i1 %.not136, label %.critedge138, label %64, !prof !20

64:                                               ; preds = %58
  %65 = load ptr, ptr %61, align 8, !tbaa !22
  %66 = tail call zeroext i1 @func_types_eq(ptr noundef %37, ptr noundef %65)
  br i1 %66, label %67, label %.critedge138, !prof !16

.critedge138:                                     ; preds = %58, %40, %64
  tail call void @wasm_rt_trap(i32 noundef 6) #4
  unreachable

67:                                               ; preds = %64
  %68 = load ptr, ptr %26, align 8, !tbaa !17
  %69 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %68, i64 %60
  %70 = getelementptr inbounds i8, ptr %69, i64 8
  %71 = load ptr, ptr %70, align 8, !tbaa !18
  %72 = getelementptr inbounds i8, ptr %69, i64 16
  %73 = load ptr, ptr %72, align 8, !tbaa !23
  tail call void %71(ptr noundef %73, i32 noundef %50, i32 noundef 55697, i32 noundef %12) #5
  %74 = add nuw nsw i64 %10, 60
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %74, i32 noundef 3)
  %75 = add nuw nsw i64 %10, 56
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %75, i32 noundef 56021)
  %76 = add nuw nsw i64 %10, 48
  tail call void @i64_store(ptr noundef nonnull %7, i64 noundef %76, i64 noundef %15)
  tail call void @i64_store(ptr noundef nonnull %7, i64 noundef %10, i64 noundef %15)
  %77 = tail call i64 @i64_load(ptr noundef nonnull %7, i64 noundef %75)
  %78 = add nuw nsw i64 %10, 8
  tail call void @i64_store(ptr noundef nonnull %7, i64 noundef %78, i64 noundef %77)
  %79 = add i32 %5, -472
  tail call void @w2c_hermes_hermes0x3A0x3Ahermes_fatal0x28llvh0x3A0x3AStringRef0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aerror_code0x29(ptr noundef nonnull %0, i32 noundef %79, i32 noundef %6) #5
  tail call void @wasm_rt_trap(i32 noundef 5) #4
  unreachable
}

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

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

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

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 = { noreturn nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 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,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass