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

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

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

@w2c_hermes_t5 = 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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @i64_load16_u(ptr noundef, i64 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 1, 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 = add i32 %100, %99
  store i32 %101, ptr %17, align 4, !tbaa !9
  store i32 0, ptr %18, align 4, !tbaa !9
  %102 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %102, ptr %19, align 4, !tbaa !9
  %103 = load i32, ptr %19, align 4, !tbaa !9
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %107

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

107:                                              ; preds = %96
  %108 = load i32, ptr %18, align 4, !tbaa !9
  br label %109

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

141:                                              ; preds = %109
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.w2c_hermes, ptr %142, i32 0, i32 7
  %144 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %143, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8, !tbaa !18
  %146 = load i32, ptr %19, align 4, !tbaa !9
  %147 = zext i32 %146 to i64
  %148 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %145, i64 %147
  %149 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %148, i32 0, i32 1
  %150 = load ptr, ptr %149, align 8, !tbaa !19
  %151 = icmp ne ptr %150, null
  br i1 %151, label %152, label %164

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

164:                                              ; preds = %152, %141, %109
  %165 = phi i1 [ false, %141 ], [ false, %109 ], [ %163, %152 ]
  %166 = xor i1 %165, true
  %167 = xor i1 %166, true
  %168 = zext i1 %167 to i32
  %169 = sext i32 %168 to i64
  %170 = call i64 @llvm.expect.i64(i64 %169, i64 1)
  %171 = icmp ne i64 %170, 0
  br i1 %171, label %174, label %172

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

173:                                              ; No predecessors!
  br label %174

174:                                              ; preds = %173, %164
  %175 = phi i1 [ true, %164 ], [ false, %173 ]
  %176 = zext i1 %175 to i32
  %177 = load ptr, ptr %6, 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 !18
  %181 = load i32, ptr %19, 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 1
  %185 = load ptr, ptr %184, align 8, !tbaa !19
  %186 = load ptr, ptr %6, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.w2c_hermes, ptr %186, i32 0, i32 7
  %188 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %187, i32 0, i32 0
  %189 = load ptr, ptr %188, align 8, !tbaa !18
  %190 = load i32, ptr %19, align 4, !tbaa !9
  %191 = zext i32 %190 to i64
  %192 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %189, i64 %191
  %193 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %192, i32 0, i32 2
  %194 = load ptr, ptr %193, align 8, !tbaa !22
  %195 = load i32, ptr %18, align 4, !tbaa !9
  %196 = call i32 %185(ptr noundef %194, i32 noundef %195)
  store i32 %196, ptr %18, align 4, !tbaa !9
  %197 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %197, ptr %19, align 4, !tbaa !9
  %198 = load i32, ptr %19, align 4, !tbaa !9
  %199 = icmp ne i32 %198, 0
  %200 = xor i1 %199, true
  %201 = zext i1 %200 to i32
  store i32 %201, ptr %19, align 4, !tbaa !9
  %202 = load i32, ptr %19, align 4, !tbaa !9
  %203 = load i32, ptr %18, align 4, !tbaa !9
  %204 = or i32 %203, %202
  store i32 %204, ptr %18, align 4, !tbaa !9
  %205 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %205, ptr %14, align 4, !tbaa !9
  %206 = load i32, ptr %18, align 4, !tbaa !9
  %207 = icmp ne i32 %206, 0
  br i1 %207, label %208, label %210

208:                                              ; preds = %174
  %209 = load i32, ptr %16, align 4, !tbaa !9
  br label %212

210:                                              ; preds = %174
  %211 = load i32, ptr %17, align 4, !tbaa !9
  br label %212

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

231:                                              ; preds = %212
  %232 = load i32, ptr %17, align 4, !tbaa !9
  br label %235

233:                                              ; preds = %212
  %234 = load i32, ptr %18, align 4, !tbaa !9
  br label %235

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

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

296:                                              ; preds = %285, %235
  %297 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %297, ptr %16, align 4, !tbaa !9
  %298 = 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 %298
}

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, !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_t5 = 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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @i64_load16_u(ptr noundef, i64 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
  %.not132 = icmp eq i32 %11, 0
  %13 = select i1 %.not132, 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
  %.not131 = icmp ult i32 %17, 256
  %20 = select i1 %.not131, i32 0, i32 %19
  br label %21

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

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

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

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

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

71:                                               ; preds = %50
  %72 = add i32 %63, 24
  %73 = tail call i32 @w2c_hermes_0x5F_memset(ptr noundef nonnull %0, i32 noundef %72, i32 noundef 0, i32 noundef %61) #5
  br label %74

74:                                               ; preds = %71, %50
  ret i32 %63
}

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