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

; 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 void @i32_store(ptr noundef, i64 noundef, i32 noundef) #1

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

; 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) #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: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #4

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

32:                                               ; preds = %3
  %33 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %33, ptr %9, align 4, !tbaa !9
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.w2c_hermes, ptr %34, i32 0, i32 6
  %36 = load i32, ptr %9, align 4, !tbaa !9
  %37 = zext i32 %36 to i64
  %38 = add i64 %37, 16
  %39 = call i32 @i32_load(ptr noundef %35, i64 noundef %38)
  store i32 %39, ptr %9, align 4, !tbaa !9
  %40 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %40, ptr %8, align 4, !tbaa !9
  %41 = load i32, ptr %9, align 4, !tbaa !9
  %42 = icmp ne i32 %41, 0
  %43 = xor i1 %42, true
  %44 = zext i1 %43 to i32
  store i32 %44, ptr %9, align 4, !tbaa !9
  %45 = load i32, ptr %9, align 4, !tbaa !9
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %47, label %48

47:                                               ; preds = %32
  br label %292

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

68:                                               ; preds = %48
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.w2c_hermes, ptr %69, i32 0, i32 7
  %71 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8, !tbaa !17
  %73 = load i32, ptr %10, align 4, !tbaa !9
  %74 = zext i32 %73 to i64
  %75 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %72, i64 %74
  %76 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %75, i32 0, i32 1
  %77 = load ptr, ptr %76, align 8, !tbaa !18
  %78 = icmp ne ptr %77, null
  br i1 %78, label %79, label %91

79:                                               ; preds = %68
  %80 = load ptr, ptr @w2c_hermes_t3, align 8, !tbaa !5
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.w2c_hermes, ptr %81, i32 0, i32 7
  %83 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !17
  %85 = load i32, ptr %10, align 4, !tbaa !9
  %86 = zext i32 %85 to i64
  %87 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %84, i64 %86
  %88 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %87, i32 0, i32 0
  %89 = load ptr, ptr %88, align 8, !tbaa !20
  %90 = call zeroext i1 @func_types_eq(ptr noundef %80, ptr noundef %89)
  br label %91

91:                                               ; preds = %79, %68, %48
  %92 = phi i1 [ false, %68 ], [ false, %48 ], [ %90, %79 ]
  %93 = xor i1 %92, true
  %94 = xor i1 %93, true
  %95 = zext i1 %94 to i32
  %96 = sext i32 %95 to i64
  %97 = call i64 @llvm.expect.i64(i64 %96, i64 1)
  %98 = icmp ne i64 %97, 0
  br i1 %98, label %101, label %99

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

100:                                              ; No predecessors!
  br label %101

101:                                              ; preds = %100, %91
  %102 = phi i1 [ true, %91 ], [ false, %100 ]
  %103 = zext i1 %102 to i32
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.w2c_hermes, ptr %104, i32 0, i32 7
  %106 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !17
  %108 = load i32, ptr %10, align 4, !tbaa !9
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %107, i64 %109
  %111 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %110, i32 0, i32 1
  %112 = load ptr, ptr %111, align 8, !tbaa !18
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.w2c_hermes, ptr %113, i32 0, i32 7
  %115 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %114, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8, !tbaa !17
  %117 = load i32, ptr %10, align 4, !tbaa !9
  %118 = zext i32 %117 to i64
  %119 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %116, i64 %118
  %120 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %119, i32 0, i32 2
  %121 = load ptr, ptr %120, align 8, !tbaa !21
  %122 = load i32, ptr %9, align 4, !tbaa !9
  call void %112(ptr noundef %121, i32 noundef %122)
  br label %123

123:                                              ; preds = %101, %3
  %124 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %124, ptr %9, align 4, !tbaa !9
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.w2c_hermes, ptr %125, i32 0, i32 6
  %127 = load i32, ptr %9, align 4, !tbaa !9
  %128 = zext i32 %127 to i64
  %129 = add i64 %128, 68
  %130 = call i32 @i32_load8_u(ptr noundef %126, i64 noundef %129)
  store i32 %130, ptr %9, align 4, !tbaa !9
  %131 = load i32, ptr %9, align 4, !tbaa !9
  %132 = icmp ne i32 %131, 0
  br i1 %132, label %133, label %147

133:                                              ; preds = %123
  %134 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %134, ptr %9, align 4, !tbaa !9
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.w2c_hermes, ptr %135, i32 0, i32 6
  %137 = load i32, ptr %9, align 4, !tbaa !9
  %138 = zext i32 %137 to i64
  %139 = add i64 %138, 64
  %140 = call i32 @i32_load(ptr noundef %136, i64 noundef %139)
  store i32 %140, ptr %9, align 4, !tbaa !9
  store i32 1, ptr %10, align 4, !tbaa !9
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.w2c_hermes, ptr %141, i32 0, i32 6
  %143 = load i32, ptr %9, align 4, !tbaa !9
  %144 = zext i32 %143 to i64
  %145 = add i64 %144, 4
  %146 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %142, i64 noundef %145, i32 noundef %146)
  br label %147

147:                                              ; preds = %133, %123
  %148 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %148, ptr %9, align 4, !tbaa !9
  %149 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %149, ptr %10, align 4, !tbaa !9
  %150 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %150, ptr %11, align 4, !tbaa !9
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.w2c_hermes, ptr %151, i32 0, i32 6
  %153 = load i32, ptr %11, align 4, !tbaa !9
  %154 = zext i32 %153 to i64
  %155 = add i64 %154, 72
  %156 = call i32 @i32_load(ptr noundef %152, i64 noundef %155)
  store i32 %156, ptr %11, align 4, !tbaa !9
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = load i32, ptr %9, align 4, !tbaa !9
  %159 = load i32, ptr %10, align 4, !tbaa !9
  %160 = load i32, ptr %11, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHadesGC0x3A0x3AdebitExternalMemory0x28hermes0x3A0x3Avm0x3A0x3AGCCell0x2A0x2C0x20unsigned0x20int0x29(ptr noundef %157, i32 noundef %158, i32 noundef %159, i32 noundef %160)
  %161 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %161, ptr %9, align 4, !tbaa !9
  store i32 0, ptr %10, align 4, !tbaa !9
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.w2c_hermes, ptr %162, i32 0, i32 6
  %164 = load i32, ptr %9, align 4, !tbaa !9
  %165 = zext i32 %164 to i64
  %166 = add i64 %165, 72
  %167 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %163, i64 noundef %166, i32 noundef %167)
  %168 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %168, ptr %9, align 4, !tbaa !9
  %169 = load i32, ptr %9, align 4, !tbaa !9
  %170 = icmp ne i32 %169, 0
  br i1 %170, label %171, label %291

171:                                              ; preds = %147
  %172 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %172, ptr %9, align 4, !tbaa !9
  %173 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %173, ptr %10, align 4, !tbaa !9
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.w2c_hermes, ptr %174, i32 0, i32 6
  %176 = load i32, ptr %10, align 4, !tbaa !9
  %177 = zext i32 %176 to i64
  %178 = add i64 %177, 16
  %179 = call i32 @i32_load(ptr noundef %175, i64 noundef %178)
  store i32 %179, ptr %10, align 4, !tbaa !9
  %180 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %180, ptr %5, align 4, !tbaa !9
  %181 = load i32, ptr %9, align 4, !tbaa !9
  %182 = load i32, ptr %10, align 4, !tbaa !9
  %183 = icmp eq i32 %181, %182
  %184 = zext i1 %183 to i32
  store i32 %184, ptr %9, align 4, !tbaa !9
  %185 = load i32, ptr %9, align 4, !tbaa !9
  %186 = icmp ne i32 %185, 0
  br i1 %186, label %187, label %198

187:                                              ; preds = %171
  %188 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %188, ptr %9, align 4, !tbaa !9
  %189 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %189, ptr %5, 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 %9, 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 %9, align 4, !tbaa !9
  store i32 16, ptr %10, align 4, !tbaa !9
  %195 = load i32, ptr %10, align 4, !tbaa !9
  %196 = load i32, ptr %9, align 4, !tbaa !9
  %197 = add i32 %196, %195
  store i32 %197, ptr %9, align 4, !tbaa !9
  br label %217

198:                                              ; preds = %171
  %199 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %199, ptr %9, align 4, !tbaa !9
  %200 = load i32, ptr %9, align 4, !tbaa !9
  %201 = icmp ne i32 %200, 0
  %202 = xor i1 %201, true
  %203 = zext i1 %202 to i32
  store i32 %203, ptr %9, align 4, !tbaa !9
  %204 = load i32, ptr %9, align 4, !tbaa !9
  %205 = icmp ne i32 %204, 0
  br i1 %205, label %206, label %207

206:                                              ; preds = %198
  br label %287

207:                                              ; preds = %198
  %208 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %208, ptr %9, align 4, !tbaa !9
  %209 = load ptr, ptr %4, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.w2c_hermes, ptr %209, i32 0, i32 6
  %211 = load i32, ptr %9, align 4, !tbaa !9
  %212 = zext i32 %211 to i64
  %213 = call i32 @i32_load(ptr noundef %210, i64 noundef %212)
  store i32 %213, ptr %9, align 4, !tbaa !9
  store i32 20, ptr %10, align 4, !tbaa !9
  %214 = load i32, ptr %10, align 4, !tbaa !9
  %215 = load i32, ptr %9, align 4, !tbaa !9
  %216 = add i32 %215, %214
  store i32 %216, ptr %9, align 4, !tbaa !9
  br label %217

217:                                              ; preds = %207, %187
  %218 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %218, ptr %6, align 4, !tbaa !9
  %219 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %219, ptr %9, align 4, !tbaa !9
  %220 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %220, ptr %10, align 4, !tbaa !9
  %221 = load ptr, ptr %4, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.w2c_hermes, ptr %221, i32 0, i32 6
  %223 = load i32, ptr %10, align 4, !tbaa !9
  %224 = zext i32 %223 to i64
  %225 = call i32 @i32_load(ptr noundef %222, i64 noundef %224)
  store i32 %225, ptr %10, align 4, !tbaa !9
  %226 = load i32, ptr %10, align 4, !tbaa !9
  %227 = load ptr, ptr %4, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.w2c_hermes, ptr %227, i32 0, i32 7
  %229 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %228, i32 0, i32 2
  %230 = load i32, ptr %229, align 4, !tbaa !11
  %231 = icmp ult i32 %226, %230
  br i1 %231, label %232, label %255

232:                                              ; preds = %217
  %233 = load ptr, ptr %4, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.w2c_hermes, ptr %233, i32 0, i32 7
  %235 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %234, i32 0, i32 0
  %236 = load ptr, ptr %235, align 8, !tbaa !17
  %237 = load i32, ptr %10, align 4, !tbaa !9
  %238 = zext i32 %237 to i64
  %239 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %236, i64 %238
  %240 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %239, i32 0, i32 1
  %241 = load ptr, ptr %240, align 8, !tbaa !18
  %242 = icmp ne ptr %241, null
  br i1 %242, label %243, label %255

243:                                              ; preds = %232
  %244 = load ptr, ptr @w2c_hermes_t3, align 8, !tbaa !5
  %245 = load ptr, ptr %4, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.w2c_hermes, ptr %245, i32 0, i32 7
  %247 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %246, i32 0, i32 0
  %248 = load ptr, ptr %247, align 8, !tbaa !17
  %249 = load i32, ptr %10, align 4, !tbaa !9
  %250 = zext i32 %249 to i64
  %251 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %248, i64 %250
  %252 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %251, i32 0, i32 0
  %253 = load ptr, ptr %252, align 8, !tbaa !20
  %254 = call zeroext i1 @func_types_eq(ptr noundef %244, ptr noundef %253)
  br label %255

255:                                              ; preds = %243, %232, %217
  %256 = phi i1 [ false, %232 ], [ false, %217 ], [ %254, %243 ]
  %257 = xor i1 %256, true
  %258 = xor i1 %257, true
  %259 = zext i1 %258 to i32
  %260 = sext i32 %259 to i64
  %261 = call i64 @llvm.expect.i64(i64 %260, i64 1)
  %262 = icmp ne i64 %261, 0
  br i1 %262, label %265, label %263

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

264:                                              ; No predecessors!
  br label %265

265:                                              ; preds = %264, %255
  %266 = phi i1 [ true, %255 ], [ false, %264 ]
  %267 = zext i1 %266 to i32
  %268 = load ptr, ptr %4, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.w2c_hermes, ptr %268, i32 0, i32 7
  %270 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %269, i32 0, i32 0
  %271 = load ptr, ptr %270, align 8, !tbaa !17
  %272 = load i32, ptr %10, align 4, !tbaa !9
  %273 = zext i32 %272 to i64
  %274 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %271, i64 %273
  %275 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %274, i32 0, i32 1
  %276 = load ptr, ptr %275, align 8, !tbaa !18
  %277 = load ptr, ptr %4, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.w2c_hermes, ptr %277, i32 0, i32 7
  %279 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %278, i32 0, i32 0
  %280 = load ptr, ptr %279, align 8, !tbaa !17
  %281 = load i32, ptr %10, align 4, !tbaa !9
  %282 = zext i32 %281 to i64
  %283 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %280, i64 %282
  %284 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %283, i32 0, i32 2
  %285 = load ptr, ptr %284, align 8, !tbaa !21
  %286 = load i32, ptr %9, align 4, !tbaa !9
  call void %276(ptr noundef %285, i32 noundef %286)
  br label %287

287:                                              ; preds = %265, %206
  %288 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %288, ptr %9, align 4, !tbaa !9
  %289 = load ptr, ptr %4, align 8, !tbaa !5
  %290 = load i32, ptr %9, align 4, !tbaa !9
  call void @w2c_hermes_dlfree(ptr noundef %289, i32 noundef %290)
  br label %291

291:                                              ; preds = %287, %147
  br label %294

292:                                              ; preds = %47
  %293 = load ptr, ptr %4, align 8, !tbaa !5
  call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fthrow_out_of_range0x5Babi0x3Av150070x5D0x28char0x20const0x2A0x29(ptr noundef %293)
  call void @wasm_rt_trap(i32 noundef 5) #7
  unreachable

294:                                              ; preds = %291
  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
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret void
}

declare void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHadesGC0x3A0x3AdebitExternalMemory0x28hermes0x3A0x3Avm0x3A0x3AGCCell0x2A0x2C0x20unsigned0x20int0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #2

declare void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fthrow_out_of_range0x5Babi0x3Av150070x5D0x28char0x20const0x2A0x29(ptr noundef) #2

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn "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_t3 = external local_unnamed_addr constant ptr, align 8

; 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 i32 @i32_load(ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

; 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 zeroext i1 @func_types_eq(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3Atesthelpers0x3A0x3ADummyObject0x3A0x3A_finalizeImpl0x28hermes0x3A0x3Avm0x3A0x3AGCCell0x2A0x2C0x20hermes0x3A0x3Avm0x3A0x3AHadesGC0x260x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #3 {
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %5 = zext i32 %2 to i64
  %6 = add nuw nsw i64 %5, 472
  %7 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %6)
  %8 = zext i32 %1 to i64
  %9 = add nuw nsw i64 %8, 80
  %10 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %9)
  %11 = xor i32 %10, %7
  %.not = icmp eq i32 %7, %10
  br i1 %.not, label %43, label %12

12:                                               ; preds = %3
  %13 = zext i32 %11 to i64
  %14 = add nuw nsw i64 %13, 16
  %15 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %14)
  %.not104 = icmp eq i32 %15, 0
  br i1 %.not104, label %89, label %16

16:                                               ; preds = %12
  %17 = zext i32 %15 to i64
  %18 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %17)
  %19 = zext i32 %18 to i64
  %20 = add nuw nsw i64 %19, 24
  %21 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %20)
  %22 = getelementptr inbounds i8, ptr %0, i64 80
  %23 = getelementptr inbounds i8, ptr %0, i64 92
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = icmp ult i32 %21, %24
  br i1 %25, label %26, label %.critedge, !prof !15

26:                                               ; preds = %16
  %27 = load ptr, ptr %22, align 8, !tbaa !16
  %28 = zext i32 %21 to i64
  %29 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %27, i64 %28
  %30 = getelementptr inbounds i8, ptr %29, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  %.not105 = icmp eq ptr %31, null
  br i1 %.not105, label %.critedge, label %32, !prof !19

32:                                               ; preds = %26
  %33 = load ptr, ptr @w2c_hermes_t3, align 8, !tbaa !20
  %34 = load ptr, ptr %29, align 8, !tbaa !21
  %35 = tail call zeroext i1 @func_types_eq(ptr noundef %33, ptr noundef %34)
  br i1 %35, label %36, label %.critedge, !prof !15

.critedge:                                        ; preds = %26, %16, %32
  tail call void @wasm_rt_trap(i32 noundef 6) #4
  unreachable

36:                                               ; preds = %32
  %37 = load ptr, ptr %22, align 8, !tbaa !16
  %38 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %37, i64 %28
  %39 = getelementptr inbounds i8, ptr %38, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !17
  %41 = getelementptr inbounds i8, ptr %38, i64 16
  %42 = load ptr, ptr %41, align 8, !tbaa !22
  tail call void %40(ptr noundef %42, i32 noundef %15) #5
  br label %43

43:                                               ; preds = %36, %3
  %44 = add nuw nsw i64 %8, 68
  %45 = tail call i32 @i32_load8_u(ptr noundef nonnull %4, i64 noundef %44)
  %.not106 = icmp eq i32 %45, 0
  br i1 %.not106, label %51, label %46

46:                                               ; preds = %43
  %47 = add nuw nsw i64 %8, 64
  %48 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %47)
  %49 = zext i32 %48 to i64
  %50 = add nuw nsw i64 %49, 4
  tail call void @i32_store8(ptr noundef nonnull %4, i64 noundef %50, i32 noundef 1)
  br label %51

51:                                               ; preds = %46, %43
  %52 = add nuw nsw i64 %8, 72
  %53 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %52)
  tail call void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHadesGC0x3A0x3AdebitExternalMemory0x28hermes0x3A0x3Avm0x3A0x3AGCCell0x2A0x2C0x20unsigned0x20int0x29(ptr noundef %0, i32 noundef %2, i32 noundef %1, i32 noundef %53) #5
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %52, i32 noundef 0)
  br i1 %.not, label %90, label %54

54:                                               ; preds = %51
  %55 = zext i32 %11 to i64
  %56 = add nuw nsw i64 %55, 16
  %57 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %56)
  %58 = icmp eq i32 %11, %57
  br i1 %58, label %62, label %59

59:                                               ; preds = %54
  %.not107 = icmp eq i32 %57, 0
  br i1 %.not107, label %88, label %60

60:                                               ; preds = %59
  %61 = zext i32 %57 to i64
  br label %62

62:                                               ; preds = %54, %60
  %.sink112 = phi i64 [ %61, %60 ], [ %55, %54 ]
  %.sink111 = phi i32 [ 20, %60 ], [ 16, %54 ]
  %.0 = phi i32 [ %57, %60 ], [ %11, %54 ]
  %63 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %.sink112)
  %64 = add i32 %63, %.sink111
  %65 = zext i32 %64 to i64
  %66 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %65)
  %67 = getelementptr inbounds i8, ptr %0, i64 80
  %68 = getelementptr inbounds i8, ptr %0, i64 92
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = icmp ult i32 %66, %69
  br i1 %70, label %71, label %.critedge110, !prof !15

71:                                               ; preds = %62
  %72 = load ptr, ptr %67, align 8, !tbaa !16
  %73 = zext i32 %66 to i64
  %74 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %72, i64 %73
  %75 = getelementptr inbounds i8, ptr %74, i64 8
  %76 = load ptr, ptr %75, align 8, !tbaa !17
  %.not108 = icmp eq ptr %76, null
  br i1 %.not108, label %.critedge110, label %77, !prof !19

77:                                               ; preds = %71
  %78 = load ptr, ptr @w2c_hermes_t3, align 8, !tbaa !20
  %79 = load ptr, ptr %74, align 8, !tbaa !21
  %80 = tail call zeroext i1 @func_types_eq(ptr noundef %78, ptr noundef %79)
  br i1 %80, label %81, label %.critedge110, !prof !15

.critedge110:                                     ; preds = %71, %62, %77
  tail call void @wasm_rt_trap(i32 noundef 6) #4
  unreachable

81:                                               ; preds = %77
  %82 = load ptr, ptr %67, align 8, !tbaa !16
  %83 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %82, i64 %73
  %84 = getelementptr inbounds i8, ptr %83, i64 8
  %85 = load ptr, ptr %84, align 8, !tbaa !17
  %86 = getelementptr inbounds i8, ptr %83, i64 16
  %87 = load ptr, ptr %86, align 8, !tbaa !22
  tail call void %85(ptr noundef %87, i32 noundef %.0) #5
  br label %88

88:                                               ; preds = %59, %81
  tail call void @w2c_hermes_dlfree(ptr noundef %0, i32 noundef %11) #5
  br label %90

89:                                               ; preds = %12
  tail call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fthrow_out_of_range0x5Babi0x3Av150070x5D0x28char0x20const0x2A0x29(ptr noundef %0) #5
  tail call void @wasm_rt_trap(i32 noundef 5) #4
  unreachable

90:                                               ; preds = %51, %88
  ret void
}

declare void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AHadesGC0x3A0x3AdebitExternalMemory0x28hermes0x3A0x3Avm0x3A0x3AGCCell0x2A0x2C0x20unsigned0x20int0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fthrow_out_of_range0x5Babi0x3Av150070x5D0x28char0x20const0x2A0x29(ptr noundef) local_unnamed_addr #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 = { "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 = { 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 = !{!7, !7, i64 0}
!21 = !{!18, !7, i64 0}
!22 = !{!18, !7, i64 16}


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