; 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 void @i64_store(ptr noundef, i64 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) #4

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3AFunction0x3A0x3A0x7EFunction0x280x29(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
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  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
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %13 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %13, ptr %9, 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 %9, align 4, !tbaa !9
  %17 = zext i32 %16 to i64
  %18 = add i64 %17, 60
  %19 = call i32 @i32_load(ptr noundef %15, i64 noundef %18)
  store i32 %19, ptr %9, align 4, !tbaa !9
  %20 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %20, ptr %6, align 4, !tbaa !9
  %21 = load i32, ptr %9, align 4, !tbaa !9
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %64

23:                                               ; preds = %2
  %24 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %24, ptr %9, 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 %9, align 4, !tbaa !9
  %28 = zext i32 %27 to i64
  %29 = add i64 %28, 56
  %30 = call i32 @i32_load(ptr noundef %26, i64 noundef %29)
  store i32 %30, ptr %9, align 4, !tbaa !9
  %31 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %31, ptr %5, align 4, !tbaa !9
  %32 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %32, ptr %10, align 4, !tbaa !9
  store i32 2, ptr %11, align 4, !tbaa !9
  %33 = load i32, ptr %11, align 4, !tbaa !9
  %34 = and i32 %33, 31
  %35 = load i32, ptr %10, align 4, !tbaa !9
  %36 = shl i32 %35, %34
  store i32 %36, ptr %10, align 4, !tbaa !9
  %37 = load i32, ptr %10, align 4, !tbaa !9
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = add i32 %38, %37
  store i32 %39, ptr %9, align 4, !tbaa !9
  %40 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %40, ptr %6, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %62, %23
  %42 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %42, ptr %9, align 4, !tbaa !9
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.w2c_hermes, ptr %43, i32 0, i32 6
  %45 = load i32, ptr %9, align 4, !tbaa !9
  %46 = zext i32 %45 to i64
  %47 = call i32 @i32_load(ptr noundef %44, i64 noundef %46)
  store i32 %47, ptr %9, align 4, !tbaa !9
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = load i32, ptr %9, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3AValue0x3A0x3Adestroy0x28hermes0x3A0x3AValue0x2A0x29(ptr noundef %48, i32 noundef %49)
  %50 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %50, ptr %9, align 4, !tbaa !9
  store i32 4, ptr %10, align 4, !tbaa !9
  %51 = load i32, ptr %10, align 4, !tbaa !9
  %52 = load i32, ptr %9, align 4, !tbaa !9
  %53 = add i32 %52, %51
  store i32 %53, ptr %9, align 4, !tbaa !9
  %54 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %54, ptr %5, align 4, !tbaa !9
  %55 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %55, ptr %10, align 4, !tbaa !9
  %56 = load i32, ptr %9, align 4, !tbaa !9
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = icmp ne i32 %56, %57
  %59 = zext i1 %58 to i32
  store i32 %59, ptr %9, align 4, !tbaa !9
  %60 = load i32, ptr %9, align 4, !tbaa !9
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %41
  br label %41

63:                                               ; preds = %41
  br label %64

64:                                               ; preds = %63, %2
  %65 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %65, ptr %9, align 4, !tbaa !9
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.w2c_hermes, ptr %66, i32 0, i32 6
  %68 = load i32, ptr %9, align 4, !tbaa !9
  %69 = zext i32 %68 to i64
  %70 = add i64 %69, 128
  %71 = call i32 @i32_load(ptr noundef %67, i64 noundef %70)
  store i32 %71, ptr %9, align 4, !tbaa !9
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = load i32, ptr %9, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3AValue0x3A0x3Adestroy0x28hermes0x3A0x3AValue0x2A0x29(ptr noundef %72, i32 noundef %73)
  %74 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %74, ptr %9, align 4, !tbaa !9
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.w2c_hermes, ptr %75, i32 0, i32 6
  %77 = load i32, ptr %9, align 4, !tbaa !9
  %78 = zext i32 %77 to i64
  %79 = add i64 %78, 168
  %80 = call i32 @i32_load(ptr noundef %76, i64 noundef %79)
  store i32 %80, ptr %9, align 4, !tbaa !9
  %81 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %81, ptr %5, align 4, !tbaa !9
  %82 = load i32, ptr %9, align 4, !tbaa !9
  %83 = icmp ne i32 %82, 0
  %84 = xor i1 %83, true
  %85 = zext i1 %84 to i32
  store i32 %85, ptr %9, align 4, !tbaa !9
  %86 = load i32, ptr %9, align 4, !tbaa !9
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %89

88:                                               ; preds = %64
  br label %190

89:                                               ; preds = %64
  %90 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %90, ptr %9, align 4, !tbaa !9
  %91 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %91, ptr %10, align 4, !tbaa !9
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.w2c_hermes, ptr %92, i32 0, i32 6
  %94 = load i32, ptr %10, align 4, !tbaa !9
  %95 = zext i32 %94 to i64
  %96 = add i64 %95, 4
  %97 = call i32 @i32_load(ptr noundef %93, i64 noundef %96)
  store i32 %97, ptr %10, align 4, !tbaa !9
  %98 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %98, ptr %6, align 4, !tbaa !9
  store i32 1, ptr %11, align 4, !tbaa !9
  %99 = load i32, ptr %11, align 4, !tbaa !9
  %100 = load i32, ptr %10, align 4, !tbaa !9
  %101 = sub i32 %100, %99
  store i32 %101, ptr %10, align 4, !tbaa !9
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.w2c_hermes, ptr %102, i32 0, i32 6
  %104 = load i32, ptr %9, align 4, !tbaa !9
  %105 = zext i32 %104 to i64
  %106 = add i64 %105, 4
  %107 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %103, i64 noundef %106, i32 noundef %107)
  %108 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %108, ptr %9, align 4, !tbaa !9
  %109 = load i32, ptr %9, align 4, !tbaa !9
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %111, label %112

111:                                              ; preds = %89
  br label %190

112:                                              ; preds = %89
  %113 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %113, ptr %9, align 4, !tbaa !9
  %114 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %114, ptr %10, align 4, !tbaa !9
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.w2c_hermes, ptr %115, i32 0, i32 6
  %117 = load i32, ptr %10, align 4, !tbaa !9
  %118 = zext i32 %117 to i64
  %119 = call i32 @i32_load(ptr noundef %116, i64 noundef %118)
  store i32 %119, ptr %10, align 4, !tbaa !9
  %120 = load ptr, ptr %3, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.w2c_hermes, ptr %120, i32 0, i32 6
  %122 = load i32, ptr %10, align 4, !tbaa !9
  %123 = zext i32 %122 to i64
  %124 = add i64 %123, 8
  %125 = call i32 @i32_load(ptr noundef %121, i64 noundef %124)
  store i32 %125, ptr %10, align 4, !tbaa !9
  %126 = load i32, ptr %10, align 4, !tbaa !9
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.w2c_hermes, ptr %127, i32 0, i32 7
  %129 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %128, i32 0, i32 2
  %130 = load i32, ptr %129, align 4, !tbaa !11
  %131 = icmp ult i32 %126, %130
  br i1 %131, label %132, label %155

132:                                              ; preds = %112
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.w2c_hermes, ptr %133, i32 0, i32 7
  %135 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !17
  %137 = load i32, ptr %10, align 4, !tbaa !9
  %138 = zext i32 %137 to i64
  %139 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %136, i64 %138
  %140 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %139, i32 0, i32 1
  %141 = load ptr, ptr %140, align 8, !tbaa !18
  %142 = icmp ne ptr %141, null
  br i1 %142, label %143, label %155

143:                                              ; preds = %132
  %144 = load ptr, ptr @w2c_hermes_t3, align 8, !tbaa !5
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.w2c_hermes, ptr %145, i32 0, i32 7
  %147 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !17
  %149 = load i32, ptr %10, align 4, !tbaa !9
  %150 = zext i32 %149 to i64
  %151 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %148, i64 %150
  %152 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %151, i32 0, i32 0
  %153 = load ptr, ptr %152, align 8, !tbaa !20
  %154 = call zeroext i1 @func_types_eq(ptr noundef %144, ptr noundef %153)
  br label %155

155:                                              ; preds = %143, %132, %112
  %156 = phi i1 [ false, %132 ], [ false, %112 ], [ %154, %143 ]
  %157 = xor i1 %156, true
  %158 = xor i1 %157, true
  %159 = zext i1 %158 to i32
  %160 = sext i32 %159 to i64
  %161 = call i64 @llvm.expect.i64(i64 %160, i64 1)
  %162 = icmp ne i64 %161, 0
  br i1 %162, label %165, label %163

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

164:                                              ; No predecessors!
  br label %165

165:                                              ; preds = %164, %155
  %166 = phi i1 [ true, %155 ], [ false, %164 ]
  %167 = zext i1 %166 to i32
  %168 = load ptr, ptr %3, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.w2c_hermes, ptr %168, i32 0, i32 7
  %170 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %169, i32 0, i32 0
  %171 = load ptr, ptr %170, align 8, !tbaa !17
  %172 = load i32, ptr %10, align 4, !tbaa !9
  %173 = zext i32 %172 to i64
  %174 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %171, i64 %173
  %175 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %174, i32 0, i32 1
  %176 = load ptr, ptr %175, align 8, !tbaa !18
  %177 = load ptr, ptr %3, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.w2c_hermes, ptr %177, i32 0, i32 7
  %179 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %178, i32 0, i32 0
  %180 = load ptr, ptr %179, align 8, !tbaa !17
  %181 = load i32, ptr %10, align 4, !tbaa !9
  %182 = zext i32 %181 to i64
  %183 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %180, i64 %182
  %184 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %183, i32 0, i32 2
  %185 = load ptr, ptr %184, align 8, !tbaa !21
  %186 = load i32, ptr %9, align 4, !tbaa !9
  call void %176(ptr noundef %185, i32 noundef %186)
  %187 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %187, ptr %9, align 4, !tbaa !9
  %188 = load ptr, ptr %3, align 8, !tbaa !5
  %189 = load i32, ptr %9, align 4, !tbaa !9
  call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fshared_weak_count0x3A0x3A_0x5Frelease_weak0x280x29(ptr noundef %188, i32 noundef %189)
  br label %190

190:                                              ; preds = %165, %111, %88
  %191 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %191, ptr %9, align 4, !tbaa !9
  %192 = load ptr, ptr %3, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.w2c_hermes, ptr %192, i32 0, i32 6
  %194 = load i32, ptr %9, align 4, !tbaa !9
  %195 = zext i32 %194 to i64
  %196 = add i64 %195, 56
  %197 = call i32 @i32_load(ptr noundef %193, i64 noundef %196)
  store i32 %197, ptr %9, align 4, !tbaa !9
  %198 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %198, ptr %5, align 4, !tbaa !9
  %199 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %199, ptr %10, align 4, !tbaa !9
  store i32 68, ptr %11, align 4, !tbaa !9
  %200 = load i32, ptr %11, align 4, !tbaa !9
  %201 = load i32, ptr %10, align 4, !tbaa !9
  %202 = add i32 %201, %200
  store i32 %202, ptr %10, align 4, !tbaa !9
  %203 = load i32, ptr %9, align 4, !tbaa !9
  %204 = load i32, ptr %10, align 4, !tbaa !9
  %205 = icmp ne i32 %203, %204
  %206 = zext i1 %205 to i32
  store i32 %206, ptr %9, align 4, !tbaa !9
  %207 = load i32, ptr %9, align 4, !tbaa !9
  %208 = icmp ne i32 %207, 0
  br i1 %208, label %209, label %213

209:                                              ; preds = %190
  %210 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %210, ptr %9, align 4, !tbaa !9
  %211 = load ptr, ptr %3, align 8, !tbaa !5
  %212 = load i32, ptr %9, align 4, !tbaa !9
  call void @w2c_hermes_dlfree(ptr noundef %211, i32 noundef %212)
  br label %213

213:                                              ; preds = %209, %190
  %214 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %214, ptr %9, align 4, !tbaa !9
  %215 = load ptr, ptr %3, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.w2c_hermes, ptr %215, i32 0, i32 6
  %217 = load i32, ptr %9, align 4, !tbaa !9
  %218 = zext i32 %217 to i64
  %219 = add i64 %218, 52
  %220 = call i32 @i32_load(ptr noundef %216, i64 noundef %219)
  store i32 %220, ptr %9, align 4, !tbaa !9
  %221 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %221, ptr %5, align 4, !tbaa !9
  %222 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %222, ptr %10, align 4, !tbaa !9
  store i32 48, ptr %11, align 4, !tbaa !9
  %223 = load i32, ptr %11, align 4, !tbaa !9
  %224 = load i32, ptr %10, align 4, !tbaa !9
  %225 = add i32 %224, %223
  store i32 %225, ptr %10, align 4, !tbaa !9
  %226 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %226, ptr %7, align 4, !tbaa !9
  %227 = load i32, ptr %9, align 4, !tbaa !9
  %228 = load i32, ptr %10, align 4, !tbaa !9
  %229 = icmp ne i32 %227, %228
  %230 = zext i1 %229 to i32
  store i32 %230, ptr %9, align 4, !tbaa !9
  %231 = load i32, ptr %9, align 4, !tbaa !9
  %232 = icmp ne i32 %231, 0
  br i1 %232, label %233, label %286

233:                                              ; preds = %213
  br label %234

234:                                              ; preds = %284, %233
  %235 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %235, ptr %9, align 4, !tbaa !9
  %236 = load ptr, ptr %3, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.w2c_hermes, ptr %236, i32 0, i32 6
  %238 = load i32, ptr %9, align 4, !tbaa !9
  %239 = zext i32 %238 to i64
  %240 = add i64 %239, 4
  %241 = call i32 @i32_load(ptr noundef %237, i64 noundef %240)
  store i32 %241, ptr %9, align 4, !tbaa !9
  %242 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %242, ptr %6, align 4, !tbaa !9
  %243 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %243, ptr %10, align 4, !tbaa !9
  %244 = load ptr, ptr %3, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.w2c_hermes, ptr %244, i32 0, i32 6
  %246 = load i32, ptr %10, align 4, !tbaa !9
  %247 = zext i32 %246 to i64
  %248 = call i32 @i32_load(ptr noundef %245, i64 noundef %247)
  store i32 %248, ptr %10, align 4, !tbaa !9
  %249 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %249, ptr %8, align 4, !tbaa !9
  %250 = load ptr, ptr %3, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.w2c_hermes, ptr %250, i32 0, i32 6
  %252 = load i32, ptr %9, align 4, !tbaa !9
  %253 = zext i32 %252 to i64
  %254 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %251, i64 noundef %253, i32 noundef %254)
  %255 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %255, ptr %9, align 4, !tbaa !9
  %256 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %256, ptr %10, align 4, !tbaa !9
  %257 = load ptr, ptr %3, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.w2c_hermes, ptr %257, i32 0, i32 6
  %259 = load i32, ptr %9, align 4, !tbaa !9
  %260 = zext i32 %259 to i64
  %261 = add i64 %260, 4
  %262 = load i32, ptr %10, align 4, !tbaa !9
  call void @i32_store(ptr noundef %258, i64 noundef %261, i32 noundef %262)
  %263 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %263, ptr %9, align 4, !tbaa !9
  store i64 0, ptr %12, align 8, !tbaa !22
  %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 %9, align 4, !tbaa !9
  %267 = zext i32 %266 to i64
  %268 = load i64, ptr %12, align 8, !tbaa !22
  call void @i64_store(ptr noundef %265, i64 noundef %267, i64 noundef %268)
  %269 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %269, ptr %9, align 4, !tbaa !9
  store i32 8, ptr %10, align 4, !tbaa !9
  %270 = load i32, ptr %10, align 4, !tbaa !9
  %271 = load i32, ptr %9, align 4, !tbaa !9
  %272 = add i32 %271, %270
  store i32 %272, ptr %9, align 4, !tbaa !9
  %273 = load ptr, ptr %3, align 8, !tbaa !5
  %274 = load i32, ptr %9, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3AValue0x3A0x3Adestroy0x28hermes0x3A0x3AValue0x2A0x29(ptr noundef %273, i32 noundef %274)
  %275 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %275, ptr %9, align 4, !tbaa !9
  %276 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %276, ptr %10, align 4, !tbaa !9
  %277 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %277, ptr %5, align 4, !tbaa !9
  %278 = load i32, ptr %9, align 4, !tbaa !9
  %279 = load i32, ptr %10, align 4, !tbaa !9
  %280 = icmp ne i32 %278, %279
  %281 = zext i1 %280 to i32
  store i32 %281, ptr %9, align 4, !tbaa !9
  %282 = load i32, ptr %9, align 4, !tbaa !9
  %283 = icmp ne i32 %282, 0
  br i1 %283, label %284, label %285

284:                                              ; preds = %234
  br label %234

285:                                              ; preds = %234
  br label %286

286:                                              ; preds = %285, %213
  %287 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %287, ptr %9, align 4, !tbaa !9
  %288 = load ptr, ptr %3, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.w2c_hermes, ptr %288, i32 0, i32 6
  %290 = load i32, ptr %9, align 4, !tbaa !9
  %291 = zext i32 %290 to i64
  %292 = add i64 %291, 16
  %293 = call i32 @i32_load(ptr noundef %289, i64 noundef %292)
  store i32 %293, ptr %9, align 4, !tbaa !9
  %294 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %294, ptr %5, align 4, !tbaa !9
  %295 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %295, ptr %10, align 4, !tbaa !9
  store i32 28, ptr %11, align 4, !tbaa !9
  %296 = load i32, ptr %11, align 4, !tbaa !9
  %297 = load i32, ptr %10, align 4, !tbaa !9
  %298 = add i32 %297, %296
  store i32 %298, ptr %10, align 4, !tbaa !9
  %299 = load i32, ptr %9, align 4, !tbaa !9
  %300 = load i32, ptr %10, align 4, !tbaa !9
  %301 = icmp ne i32 %299, %300
  %302 = zext i1 %301 to i32
  store i32 %302, ptr %9, align 4, !tbaa !9
  %303 = load i32, ptr %9, align 4, !tbaa !9
  %304 = icmp ne i32 %303, 0
  br i1 %304, label %305, label %309

305:                                              ; preds = %286
  %306 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %306, ptr %9, align 4, !tbaa !9
  %307 = load ptr, ptr %3, align 8, !tbaa !5
  %308 = load i32, ptr %9, align 4, !tbaa !9
  call void @w2c_hermes_dlfree(ptr noundef %307, i32 noundef %308)
  br label %309

309:                                              ; preds = %305, %286
  %310 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %310, ptr %9, align 4, !tbaa !9
  %311 = load i32, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  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 %311
}

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}
!22 = !{!14, !14, i64 0}


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

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

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

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

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

7:                                                ; preds = %2
  %8 = add nuw nsw i64 %4, 56
  %9 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %8)
  %10 = shl i32 %6, 2
  %11 = add i32 %9, %10
  br label %12

12:                                               ; preds = %12, %7
  %.0 = phi i32 [ %9, %7 ], [ %15, %12 ]
  %13 = zext i32 %.0 to i64
  %14 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %13)
  tail call void @w2c_hermes_hermes0x3A0x3AValue0x3A0x3Adestroy0x28hermes0x3A0x3AValue0x2A0x29(ptr noundef %0, i32 noundef %14)
  %15 = add i32 %.0, 4
  %.not145 = icmp eq i32 %15, %11
  br i1 %.not145, label %.loopexit153, label %12

.loopexit153:                                     ; preds = %12, %2
  %16 = add nuw nsw i64 %4, 128
  %17 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %16)
  tail call void @w2c_hermes_hermes0x3A0x3AValue0x3A0x3Adestroy0x28hermes0x3A0x3AValue0x2A0x29(ptr noundef %0, i32 noundef %17)
  %18 = add nuw nsw i64 %4, 168
  %19 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %18)
  %.not146 = icmp eq i32 %19, 0
  br i1 %.not146, label %51, label %20

20:                                               ; preds = %.loopexit153
  %21 = zext i32 %19 to i64
  %22 = add nuw nsw i64 %21, 4
  %23 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %22)
  %24 = add i32 %23, -1
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %22, i32 noundef %24)
  %.not147 = icmp eq i32 %23, 0
  br i1 %.not147, label %25, label %51

25:                                               ; preds = %20
  %26 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %21)
  %27 = zext i32 %26 to i64
  %28 = add nuw nsw i64 %27, 8
  %29 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %28)
  %30 = getelementptr inbounds i8, ptr %0, i64 80
  %31 = getelementptr inbounds i8, ptr %0, i64 92
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = icmp ult i32 %29, %32
  br i1 %33, label %34, label %.critedge, !prof !15

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

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

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

44:                                               ; preds = %40
  %45 = load ptr, ptr %30, align 8, !tbaa !16
  %46 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %45, i64 %36
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !17
  %49 = getelementptr inbounds i8, ptr %46, i64 16
  %50 = load ptr, ptr %49, align 8, !tbaa !22
  tail call void %48(ptr noundef %50, i32 noundef %19) #5
  tail call void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fshared_weak_count0x3A0x3A_0x5Frelease_weak0x280x29(ptr noundef nonnull %0, i32 noundef %19) #5
  br label %51

51:                                               ; preds = %20, %.loopexit153, %44
  %52 = add nuw nsw i64 %4, 56
  %53 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %52)
  %54 = add i32 %1, 68
  %.not149 = icmp eq i32 %53, %54
  br i1 %.not149, label %56, label %55

55:                                               ; preds = %51
  tail call void @w2c_hermes_dlfree(ptr noundef %0, i32 noundef %53) #5
  br label %56

56:                                               ; preds = %55, %51
  %57 = add nuw nsw i64 %4, 52
  %58 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %57)
  %59 = add i32 %1, 48
  %.not150 = icmp eq i32 %58, %59
  br i1 %.not150, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %56, %.preheader
  %.1 = phi i32 [ %62, %.preheader ], [ %58, %56 ]
  %60 = zext i32 %.1 to i64
  %61 = add nuw nsw i64 %60, 4
  %62 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %61)
  %63 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %60)
  %64 = zext i32 %62 to i64
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %64, i32 noundef %63)
  %65 = zext i32 %63 to i64
  %66 = add nuw nsw i64 %65, 4
  tail call void @i32_store(ptr noundef nonnull %3, i64 noundef %66, i32 noundef %62)
  tail call void @i64_store(ptr noundef nonnull %3, i64 noundef %60, i64 noundef 0)
  %67 = add i32 %.1, 8
  tail call void @w2c_hermes_hermes0x3A0x3AValue0x3A0x3Adestroy0x28hermes0x3A0x3AValue0x2A0x29(ptr noundef %0, i32 noundef %67)
  %.not151 = icmp eq i32 %59, %62
  br i1 %.not151, label %.loopexit, label %.preheader

.loopexit:                                        ; preds = %.preheader, %56
  %68 = add nuw nsw i64 %4, 16
  %69 = tail call i32 @i32_load(ptr noundef nonnull %3, i64 noundef %68)
  %70 = add i32 %1, 28
  %.not152 = icmp eq i32 %69, %70
  br i1 %.not152, label %72, label %71

71:                                               ; preds = %.loopexit
  tail call void @w2c_hermes_dlfree(ptr noundef %0, i32 noundef %69) #5
  br label %72

72:                                               ; preds = %71, %.loopexit
  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 = { 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: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,LoopUnrollPass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass