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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.w2c_hermes = type { ptr, ptr, ptr, i32, i32, i32, %struct.wasm_rt_memory_t, %struct.wasm_rt_funcref_table_t }
%struct.wasm_rt_memory_t = type { ptr, i64, i64, i64, i8 }
%struct.wasm_rt_funcref_table_t = type { ptr, i32, i32 }
%struct.wasm_rt_funcref_t = type { ptr, ptr, ptr }

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

declare i32 @w2c_hermes_0x5F_memset(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #1

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #4

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

declare i32 @w2c_hermes_hermes0x3A0x3AcheckedMalloc0x28unsigned0x20long0x29(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ACodeBlock0x3A0x3AcreateCodeBlock0x28hermes0x3A0x3Avm0x3A0x3ARuntimeModule0x2A0x2C0x20hermes0x3A0x3Ahbc0x3A0x3ARuntimeFunctionHeader0x2C0x20unsigned0x20char0x20const0x2A0x2C0x20unsigned0x20int0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #5 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %22 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %22, ptr %16, align 4, !tbaa !9
  store i32 1, ptr %17, align 4, !tbaa !9
  %23 = load i32, ptr %17, align 4, !tbaa !9
  %24 = load i32, ptr %16, align 4, !tbaa !9
  %25 = and i32 %24, %23
  store i32 %25, ptr %16, align 4, !tbaa !9
  %26 = load i32, ptr %16, align 4, !tbaa !9
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %28, label %57

28:                                               ; preds = %5
  %29 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %29, ptr %16, align 4, !tbaa !9
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.w2c_hermes, ptr %30, i32 0, i32 6
  %32 = load i32, ptr %16, align 4, !tbaa !9
  %33 = zext i32 %32 to i64
  %34 = add i64 %33, 27
  %35 = call i32 @i32_load8_u(ptr noundef %31, i64 noundef %34)
  store i32 %35, ptr %16, align 4, !tbaa !9
  %36 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %36, ptr %11, align 4, !tbaa !9
  store i32 1, ptr %17, align 4, !tbaa !9
  %37 = load i32, ptr %17, align 4, !tbaa !9
  %38 = load i32, ptr %16, align 4, !tbaa !9
  %39 = add i32 %38, %37
  store i32 %39, ptr %16, align 4, !tbaa !9
  store i32 0, ptr %17, align 4, !tbaa !9
  %40 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %40, ptr %18, align 4, !tbaa !9
  %41 = load i32, ptr %18, align 4, !tbaa !9
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %43, label %45

43:                                               ; preds = %28
  %44 = load i32, ptr %16, align 4, !tbaa !9
  br label %47

45:                                               ; preds = %28
  %46 = load i32, ptr %17, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %45, %43
  %48 = phi i32 [ %44, %43 ], [ %46, %45 ]
  store i32 %48, ptr %16, align 4, !tbaa !9
  %49 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %49, ptr %12, align 4, !tbaa !9
  %50 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %50, ptr %16, align 4, !tbaa !9
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.w2c_hermes, ptr %51, i32 0, i32 6
  %53 = load i32, ptr %16, align 4, !tbaa !9
  %54 = zext i32 %53 to i64
  %55 = add i64 %54, 28
  %56 = call i32 @i32_load8_u(ptr noundef %52, i64 noundef %55)
  store i32 %56, ptr %16, align 4, !tbaa !9
  br label %96

57:                                               ; preds = %5
  %58 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %58, ptr %16, align 4, !tbaa !9
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.w2c_hermes, ptr %59, i32 0, i32 6
  %61 = load i32, ptr %16, align 4, !tbaa !9
  %62 = zext i32 %61 to i64
  %63 = add i64 %62, 12
  %64 = call i64 @i64_load16_u(ptr noundef %60, i64 noundef %63)
  store i64 %64, ptr %20, align 8, !tbaa !11
  store i64 32, ptr %21, align 8, !tbaa !11
  %65 = load i64, ptr %21, align 8, !tbaa !11
  %66 = and i64 %65, 63
  %67 = load i64, ptr %20, align 8, !tbaa !11
  %68 = shl i64 %67, %66
  store i64 %68, ptr %20, align 8, !tbaa !11
  store i64 40, ptr %21, align 8, !tbaa !11
  %69 = load i64, ptr %21, align 8, !tbaa !11
  %70 = and i64 %69, 63
  %71 = load i64, ptr %20, align 8, !tbaa !11
  %72 = lshr i64 %71, %70
  store i64 %72, ptr %20, align 8, !tbaa !11
  %73 = load i64, ptr %20, align 8, !tbaa !11
  %74 = trunc i64 %73 to i32
  store i32 %74, ptr %16, align 4, !tbaa !9
  %75 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %75, ptr %11, align 4, !tbaa !9
  store i32 1, ptr %17, align 4, !tbaa !9
  %76 = load i32, ptr %17, align 4, !tbaa !9
  %77 = load i32, ptr %16, align 4, !tbaa !9
  %78 = add i32 %77, %76
  store i32 %78, ptr %16, align 4, !tbaa !9
  store i32 0, ptr %17, align 4, !tbaa !9
  %79 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %79, ptr %18, align 4, !tbaa !9
  %80 = load i32, ptr %18, align 4, !tbaa !9
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %84

82:                                               ; preds = %57
  %83 = load i32, ptr %16, align 4, !tbaa !9
  br label %86

84:                                               ; preds = %57
  %85 = load i32, ptr %17, align 4, !tbaa !9
  br label %86

86:                                               ; preds = %84, %82
  %87 = phi i32 [ %83, %82 ], [ %85, %84 ]
  store i32 %87, ptr %16, align 4, !tbaa !9
  %88 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %88, ptr %12, align 4, !tbaa !9
  %89 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %89, ptr %16, align 4, !tbaa !9
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.w2c_hermes, ptr %90, i32 0, i32 6
  %92 = load i32, ptr %16, align 4, !tbaa !9
  %93 = zext i32 %92 to i64
  %94 = add i64 %93, 14
  %95 = call i32 @i32_load8_u(ptr noundef %91, i64 noundef %94)
  store i32 %95, ptr %16, align 4, !tbaa !9
  br label %96

96:                                               ; preds = %86, %47
  %97 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %97, ptr %11, align 4, !tbaa !9
  store i32 512, ptr %16, align 4, !tbaa !9
  %98 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %98, ptr %17, align 4, !tbaa !9
  store i32 255, ptr %18, align 4, !tbaa !9
  %99 = load i32, ptr %18, align 4, !tbaa !9
  %100 = load i32, ptr %17, align 4, !tbaa !9
  %101 = and i32 %100, %99
  store i32 %101, ptr %17, align 4, !tbaa !9
  %102 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %102, ptr %11, align 4, !tbaa !9
  store i32 1, ptr %18, align 4, !tbaa !9
  %103 = load i32, ptr %18, align 4, !tbaa !9
  %104 = load i32, ptr %17, align 4, !tbaa !9
  %105 = add i32 %104, %103
  store i32 %105, ptr %17, align 4, !tbaa !9
  store i32 0, ptr %18, align 4, !tbaa !9
  %106 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %106, ptr %19, align 4, !tbaa !9
  %107 = load i32, ptr %19, align 4, !tbaa !9
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %111

109:                                              ; preds = %96
  %110 = load i32, ptr %17, align 4, !tbaa !9
  br label %113

111:                                              ; preds = %96
  %112 = load i32, ptr %18, align 4, !tbaa !9
  br label %113

113:                                              ; preds = %111, %109
  %114 = phi i32 [ %110, %109 ], [ %112, %111 ]
  store i32 %114, ptr %17, align 4, !tbaa !9
  %115 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %115, ptr %18, align 4, !tbaa !9
  %116 = load i32, ptr %18, align 4, !tbaa !9
  %117 = load i32, ptr %17, align 4, !tbaa !9
  %118 = add i32 %117, %116
  store i32 %118, ptr %17, align 4, !tbaa !9
  %119 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %119, ptr %18, align 4, !tbaa !9
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.w2c_hermes, ptr %120, i32 0, i32 6
  %122 = load i32, ptr %18, align 4, !tbaa !9
  %123 = zext i32 %122 to i64
  %124 = add i64 %123, 40
  %125 = call i32 @i32_load(ptr noundef %121, i64 noundef %124)
  store i32 %125, ptr %18, align 4, !tbaa !9
  %126 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %126, ptr %11, align 4, !tbaa !9
  %127 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %127, ptr %19, align 4, !tbaa !9
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.w2c_hermes, ptr %128, i32 0, i32 6
  %130 = load i32, ptr %19, align 4, !tbaa !9
  %131 = zext i32 %130 to i64
  %132 = call i32 @i32_load(ptr noundef %129, i64 noundef %131)
  store i32 %132, ptr %19, align 4, !tbaa !9
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.w2c_hermes, ptr %133, i32 0, i32 6
  %135 = load i32, ptr %19, align 4, !tbaa !9
  %136 = zext i32 %135 to i64
  %137 = add i64 %136, 44
  %138 = call i32 @i32_load(ptr noundef %134, i64 noundef %137)
  store i32 %138, ptr %19, align 4, !tbaa !9
  %139 = load i32, ptr %19, align 4, !tbaa !9
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.w2c_hermes, ptr %140, i32 0, i32 7
  %142 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %141, i32 0, i32 2
  %143 = load i32, ptr %142, align 4, !tbaa !13
  %144 = icmp ult i32 %139, %143
  br i1 %144, label %145, label %168

145:                                              ; preds = %113
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.w2c_hermes, ptr %146, i32 0, i32 7
  %148 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %147, i32 0, i32 0
  %149 = load ptr, ptr %148, align 8, !tbaa !18
  %150 = load i32, ptr %19, align 4, !tbaa !9
  %151 = zext i32 %150 to i64
  %152 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %149, i64 %151
  %153 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %152, i32 0, i32 1
  %154 = load ptr, ptr %153, align 8, !tbaa !19
  %155 = icmp ne ptr %154, null
  br i1 %155, label %156, label %168

156:                                              ; preds = %145
  %157 = load ptr, ptr @w2c_hermes_t2, align 8, !tbaa !5
  %158 = load ptr, ptr %6, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.w2c_hermes, ptr %158, i32 0, i32 7
  %160 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %159, i32 0, i32 0
  %161 = load ptr, ptr %160, align 8, !tbaa !18
  %162 = load i32, ptr %19, align 4, !tbaa !9
  %163 = zext i32 %162 to i64
  %164 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %161, i64 %163
  %165 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %164, i32 0, i32 0
  %166 = load ptr, ptr %165, align 8, !tbaa !21
  %167 = call zeroext i1 @func_types_eq(ptr noundef %157, ptr noundef %166)
  br label %168

168:                                              ; preds = %156, %145, %113
  %169 = phi i1 [ false, %145 ], [ false, %113 ], [ %167, %156 ]
  %170 = xor i1 %169, true
  %171 = xor i1 %170, true
  %172 = zext i1 %171 to i32
  %173 = sext i32 %172 to i64
  %174 = call i64 @llvm.expect.i64(i64 %173, i64 1)
  %175 = icmp ne i64 %174, 0
  br i1 %175, label %178, label %176

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

177:                                              ; No predecessors!
  br label %178

178:                                              ; preds = %177, %168
  %179 = phi i1 [ true, %168 ], [ false, %177 ]
  %180 = zext i1 %179 to i32
  %181 = load ptr, ptr %6, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.w2c_hermes, ptr %181, i32 0, i32 7
  %183 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %182, i32 0, i32 0
  %184 = load ptr, ptr %183, align 8, !tbaa !18
  %185 = load i32, ptr %19, align 4, !tbaa !9
  %186 = zext i32 %185 to i64
  %187 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %184, i64 %186
  %188 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %187, i32 0, i32 1
  %189 = load ptr, ptr %188, align 8, !tbaa !19
  %190 = load ptr, ptr %6, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.w2c_hermes, ptr %190, i32 0, i32 7
  %192 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %191, i32 0, i32 0
  %193 = load ptr, ptr %192, align 8, !tbaa !18
  %194 = load i32, ptr %19, align 4, !tbaa !9
  %195 = zext i32 %194 to i64
  %196 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %193, i64 %195
  %197 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %196, i32 0, i32 2
  %198 = load ptr, ptr %197, align 8, !tbaa !22
  %199 = load i32, ptr %18, align 4, !tbaa !9
  %200 = call i32 %189(ptr noundef %198, i32 noundef %199)
  store i32 %200, ptr %18, align 4, !tbaa !9
  %201 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %201, ptr %19, align 4, !tbaa !9
  %202 = load i32, ptr %19, align 4, !tbaa !9
  %203 = icmp ne i32 %202, 0
  %204 = xor i1 %203, true
  %205 = zext i1 %204 to i32
  store i32 %205, ptr %19, align 4, !tbaa !9
  %206 = load i32, ptr %19, align 4, !tbaa !9
  %207 = load i32, ptr %18, align 4, !tbaa !9
  %208 = or i32 %207, %206
  store i32 %208, ptr %18, align 4, !tbaa !9
  %209 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %209, ptr %14, align 4, !tbaa !9
  %210 = load i32, ptr %18, align 4, !tbaa !9
  %211 = icmp ne i32 %210, 0
  br i1 %211, label %212, label %214

212:                                              ; preds = %178
  %213 = load i32, ptr %16, align 4, !tbaa !9
  br label %216

214:                                              ; preds = %178
  %215 = load i32, ptr %17, align 4, !tbaa !9
  br label %216

216:                                              ; preds = %214, %212
  %217 = phi i32 [ %213, %212 ], [ %215, %214 ]
  store i32 %217, ptr %16, align 4, !tbaa !9
  %218 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %218, ptr %13, align 4, !tbaa !9
  store i32 3, ptr %17, align 4, !tbaa !9
  %219 = load i32, ptr %17, align 4, !tbaa !9
  %220 = and i32 %219, 31
  %221 = load i32, ptr %16, align 4, !tbaa !9
  %222 = shl i32 %221, %220
  store i32 %222, ptr %16, align 4, !tbaa !9
  %223 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %223, ptr %15, align 4, !tbaa !9
  store i32 24, ptr %17, align 4, !tbaa !9
  %224 = load i32, ptr %17, align 4, !tbaa !9
  %225 = load i32, ptr %16, align 4, !tbaa !9
  %226 = add i32 %225, %224
  store i32 %226, ptr %16, align 4, !tbaa !9
  %227 = load ptr, ptr %6, align 8, !tbaa !5
  %228 = load i32, ptr %16, align 4, !tbaa !9
  %229 = call i32 @w2c_hermes_hermes0x3A0x3AcheckedMalloc0x28unsigned0x20long0x29(ptr noundef %227, i32 noundef %228)
  store i32 %229, ptr %16, align 4, !tbaa !9
  %230 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %230, ptr %11, align 4, !tbaa !9
  store i32 256, ptr %17, align 4, !tbaa !9
  %231 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %231, ptr %18, align 4, !tbaa !9
  %232 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %232, ptr %19, align 4, !tbaa !9
  %233 = load i32, ptr %19, align 4, !tbaa !9
  %234 = icmp ne i32 %233, 0
  br i1 %234, label %235, label %237

235:                                              ; preds = %216
  %236 = load i32, ptr %17, align 4, !tbaa !9
  br label %239

237:                                              ; preds = %216
  %238 = load i32, ptr %18, align 4, !tbaa !9
  br label %239

239:                                              ; preds = %237, %235
  %240 = phi i32 [ %236, %235 ], [ %238, %237 ]
  store i32 %240, ptr %17, align 4, !tbaa !9
  %241 = load ptr, ptr %6, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.w2c_hermes, ptr %241, i32 0, i32 6
  %243 = load i32, ptr %16, align 4, !tbaa !9
  %244 = zext i32 %243 to i64
  %245 = add i64 %244, 20
  %246 = load i32, ptr %17, align 4, !tbaa !9
  call void @i32_store(ptr noundef %242, i64 noundef %245, i32 noundef %246)
  %247 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %247, ptr %16, align 4, !tbaa !9
  %248 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %248, ptr %17, align 4, !tbaa !9
  %249 = load ptr, ptr %6, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.w2c_hermes, ptr %249, i32 0, i32 6
  %251 = load i32, ptr %16, align 4, !tbaa !9
  %252 = zext i32 %251 to i64
  %253 = add i64 %252, 16
  %254 = load i32, ptr %17, align 4, !tbaa !9
  call void @i32_store(ptr noundef %250, i64 noundef %253, i32 noundef %254)
  %255 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %255, ptr %16, align 4, !tbaa !9
  %256 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %256, ptr %17, align 4, !tbaa !9
  %257 = load ptr, ptr %6, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.w2c_hermes, ptr %257, i32 0, i32 6
  %259 = load i32, ptr %16, align 4, !tbaa !9
  %260 = zext i32 %259 to i64
  %261 = add i64 %260, 12
  %262 = load i32, ptr %17, align 4, !tbaa !9
  call void @i32_store(ptr noundef %258, i64 noundef %261, i32 noundef %262)
  %263 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %263, ptr %16, align 4, !tbaa !9
  %264 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %264, ptr %17, align 4, !tbaa !9
  %265 = load ptr, ptr %6, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.w2c_hermes, ptr %265, i32 0, i32 6
  %267 = load i32, ptr %16, align 4, !tbaa !9
  %268 = zext i32 %267 to i64
  %269 = add i64 %268, 8
  %270 = load i32, ptr %17, align 4, !tbaa !9
  call void @i32_store(ptr noundef %266, i64 noundef %269, i32 noundef %270)
  %271 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %271, ptr %16, align 4, !tbaa !9
  %272 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %272, ptr %17, align 4, !tbaa !9
  %273 = load ptr, ptr %6, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.w2c_hermes, ptr %273, i32 0, i32 6
  %275 = load i32, ptr %16, align 4, !tbaa !9
  %276 = zext i32 %275 to i64
  %277 = add i64 %276, 4
  %278 = load i32, ptr %17, align 4, !tbaa !9
  call void @i32_store(ptr noundef %274, i64 noundef %277, i32 noundef %278)
  %279 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %279, ptr %16, align 4, !tbaa !9
  %280 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %280, ptr %17, align 4, !tbaa !9
  %281 = load ptr, ptr %6, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.w2c_hermes, ptr %281, i32 0, i32 6
  %283 = load i32, ptr %16, align 4, !tbaa !9
  %284 = zext i32 %283 to i64
  %285 = load i32, ptr %17, align 4, !tbaa !9
  call void @i32_store(ptr noundef %282, i64 noundef %284, i32 noundef %285)
  %286 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %286, ptr %16, align 4, !tbaa !9
  %287 = load i32, ptr %16, align 4, !tbaa !9
  %288 = icmp ne i32 %287, 0
  br i1 %288, label %289, label %300

289:                                              ; preds = %239
  %290 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %290, ptr %16, align 4, !tbaa !9
  store i32 24, ptr %17, align 4, !tbaa !9
  %291 = load i32, ptr %17, align 4, !tbaa !9
  %292 = load i32, ptr %16, align 4, !tbaa !9
  %293 = add i32 %292, %291
  store i32 %293, ptr %16, align 4, !tbaa !9
  store i32 0, ptr %17, align 4, !tbaa !9
  %294 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %294, ptr %18, align 4, !tbaa !9
  %295 = load ptr, ptr %6, align 8, !tbaa !5
  %296 = load i32, ptr %16, align 4, !tbaa !9
  %297 = load i32, ptr %17, align 4, !tbaa !9
  %298 = load i32, ptr %18, align 4, !tbaa !9
  %299 = call i32 @w2c_hermes_0x5F_memset(ptr noundef %295, i32 noundef %296, i32 noundef %297, i32 noundef %298)
  store i32 %299, ptr %16, align 4, !tbaa !9
  br label %300

300:                                              ; preds = %289, %239
  %301 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %301, ptr %16, align 4, !tbaa !9
  %302 = load i32, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  ret i32 %302
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #5 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 92}
!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, !6, i64 80}
!19 = !{!20, !6, i64 8}
!20 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!20, !6, i64 0}
!22 = !{!20, !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

declare i32 @w2c_hermes_0x5F_memset(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

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

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

declare i32 @w2c_hermes_hermes0x3A0x3AcheckedMalloc0x28unsigned0x20long0x29(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ACodeBlock0x3A0x3AcreateCodeBlock0x28hermes0x3A0x3Avm0x3A0x3ARuntimeModule0x2A0x2C0x20hermes0x3A0x3Ahbc0x3A0x3ARuntimeFunctionHeader0x2C0x20unsigned0x20char0x20const0x2A0x2C0x20unsigned0x20int0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #3 {
  %6 = and i32 %2, 1
  %.not = icmp eq i32 %6, 0
  %7 = getelementptr inbounds i8, ptr %0, i64 40
  %8 = zext i32 %2 to i64
  br i1 %.not, label %14, label %9

9:                                                ; preds = %5
  %10 = add nuw nsw i64 %8, 27
  %11 = tail call i32 @i32_load8_u(ptr noundef nonnull %7, i64 noundef %10)
  %12 = add i32 %11, 1
  %.not135 = icmp eq i32 %11, 0
  %13 = select i1 %.not135, i32 0, i32 %12
  br label %21

14:                                               ; preds = %5
  %15 = add nuw nsw i64 %8, 12
  %16 = tail call i64 @i64_load16_u(ptr noundef nonnull %7, i64 noundef %15)
  %17 = trunc i64 %16 to i32
  %18 = lshr i32 %17, 8
  %19 = add nuw nsw i32 %18, 1
  %.not134 = icmp ult i32 %17, 256
  %20 = select i1 %.not134, i32 0, i32 %19
  br label %21

21:                                               ; preds = %14, %9
  %.sink141 = phi i64 [ 14, %14 ], [ 28, %9 ]
  %.0 = phi i32 [ %20, %14 ], [ %13, %9 ]
  %22 = add nuw nsw i64 %.sink141, %8
  %23 = tail call i32 @i32_load8_u(ptr noundef nonnull %7, i64 noundef %22)
  %24 = and i32 %23, 255
  %25 = add nuw nsw i32 %24, 1
  %.not136 = icmp eq i32 %24, 0
  %26 = select i1 %.not136, i32 0, i32 %25
  %27 = add i32 %26, %.0
  %28 = getelementptr inbounds i8, ptr %0, i64 40
  %29 = zext i32 %1 to i64
  %30 = add nuw nsw i64 %29, 40
  %31 = tail call i32 @i32_load(ptr noundef nonnull %28, i64 noundef %30)
  %32 = zext i32 %31 to i64
  %33 = tail call i32 @i32_load(ptr noundef nonnull %28, i64 noundef %32)
  %34 = zext i32 %33 to i64
  %35 = add nuw nsw i64 %34, 44
  %36 = tail call i32 @i32_load(ptr noundef nonnull %28, i64 noundef %35)
  %37 = getelementptr inbounds i8, ptr %0, i64 80
  %38 = getelementptr inbounds i8, ptr %0, i64 92
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = icmp ult i32 %36, %39
  br i1 %40, label %41, label %.critedge, !prof !15

41:                                               ; preds = %21
  %42 = load ptr, ptr %37, align 8, !tbaa !16
  %43 = zext i32 %36 to i64
  %44 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %42, i64 %43
  %45 = getelementptr inbounds i8, ptr %44, i64 8
  %46 = load ptr, ptr %45, align 8, !tbaa !17
  %.not137 = icmp eq ptr %46, null
  br i1 %.not137, label %.critedge, label %47, !prof !19

47:                                               ; preds = %41
  %48 = load ptr, ptr @w2c_hermes_t2, align 8, !tbaa !20
  %49 = load ptr, ptr %44, align 8, !tbaa !21
  %50 = tail call zeroext i1 @func_types_eq(ptr noundef %48, ptr noundef %49)
  br i1 %50, label %51, label %.critedge, !prof !15

.critedge:                                        ; preds = %41, %21, %47
  tail call void @wasm_rt_trap(i32 noundef 6) #4
  unreachable

51:                                               ; preds = %47
  %52 = load ptr, ptr %37, align 8, !tbaa !16
  %53 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %52, i64 %43
  %54 = getelementptr inbounds i8, ptr %53, i64 8
  %55 = load ptr, ptr %54, align 8, !tbaa !17
  %56 = getelementptr inbounds i8, ptr %53, i64 16
  %57 = load ptr, ptr %56, align 8, !tbaa !22
  %58 = tail call i32 %55(ptr noundef %57, i32 noundef %31) #5
  %.not138 = icmp eq i32 %3, 0
  %59 = zext i1 %.not138 to i32
  %60 = or i32 %58, %59
  %.not139 = icmp eq i32 %60, 0
  %61 = select i1 %.not139, i32 %27, i32 512
  %62 = shl i32 %61, 3
  %63 = add i32 %62, 24
  %64 = tail call i32 @w2c_hermes_hermes0x3A0x3AcheckedMalloc0x28unsigned0x20long0x29(ptr noundef nonnull %0, i32 noundef %63) #5
  %65 = select i1 %.not139, i32 %.0, i32 256
  %66 = zext i32 %64 to i64
  %67 = add nuw nsw i64 %66, 20
  tail call void @i32_store(ptr noundef nonnull %28, i64 noundef %67, i32 noundef %65)
  %68 = add nuw nsw i64 %66, 16
  tail call void @i32_store(ptr noundef nonnull %28, i64 noundef %68, i32 noundef %61)
  %69 = add nuw nsw i64 %66, 12
  tail call void @i32_store(ptr noundef nonnull %28, i64 noundef %69, i32 noundef %4)
  %70 = add nuw nsw i64 %66, 8
  tail call void @i32_store(ptr noundef nonnull %28, i64 noundef %70, i32 noundef %3)
  %71 = add nuw nsw i64 %66, 4
  tail call void @i32_store(ptr noundef nonnull %28, i64 noundef %71, i32 noundef %2)
  tail call void @i32_store(ptr noundef nonnull %28, i64 noundef %66, i32 noundef %1)
  %.not140 = icmp eq i32 %61, 0
  br i1 %.not140, label %75, label %72

72:                                               ; preds = %51
  %73 = add i32 %64, 24
  %74 = tail call i32 @w2c_hermes_0x5F_memset(ptr noundef nonnull %0, i32 noundef %73, i32 noundef 0, i32 noundef %62) #5
  br label %75

75:                                               ; preds = %72, %51
  ret i32 %64
}

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

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 92}
!6 = !{!"w2c_hermes", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !11, i64 40, !14, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"", !7, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !13, i64 32}
!12 = !{!"long", !8, i64 0}
!13 = !{!"_Bool", !8, i64 0}
!14 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12}
!15 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!16 = !{!6, !7, i64 80}
!17 = !{!18, !7, i64 8}
!18 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16}
!19 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!20 = !{!7, !7, i64 0}
!21 = !{!18, !7, i64 0}
!22 = !{!18, !7, i64 16}


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