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

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

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

@w2c_hermes_t2 = external constant ptr, align 8

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

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

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

; 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: nounwind uwtable
declare dso_local void @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3ASetBuffered0x280x29(ptr noundef, i32 noundef) #4

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28unsigned0x20char0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) #4 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.w2c_hermes, ptr %14, i32 0, i32 3
  %16 = load i32, ptr %15, align 8, !tbaa !11
  store i32 %16, ptr %10, align 4, !tbaa !9
  store i32 16, ptr %11, align 4, !tbaa !9
  %17 = load i32, ptr %11, align 4, !tbaa !9
  %18 = load i32, ptr %10, align 4, !tbaa !9
  %19 = sub i32 %18, %17
  store i32 %19, ptr %10, align 4, !tbaa !9
  %20 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %20, ptr %8, align 4, !tbaa !9
  %21 = load i32, ptr %10, align 4, !tbaa !9
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.w2c_hermes, ptr %22, i32 0, i32 3
  store i32 %21, ptr %23, align 8, !tbaa !11
  %24 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %24, ptr %10, align 4, !tbaa !9
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.w2c_hermes, ptr %25, i32 0, i32 6
  %27 = load i32, ptr %10, align 4, !tbaa !9
  %28 = zext i32 %27 to i64
  %29 = add i64 %28, 12
  %30 = call i32 @i32_load(ptr noundef %26, i64 noundef %29)
  store i32 %30, ptr %10, align 4, !tbaa !9
  %31 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %31, ptr %7, align 4, !tbaa !9
  %32 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %32, ptr %11, align 4, !tbaa !9
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.w2c_hermes, ptr %33, i32 0, i32 6
  %35 = load i32, ptr %11, align 4, !tbaa !9
  %36 = zext i32 %35 to i64
  %37 = add i64 %36, 8
  %38 = call i32 @i32_load(ptr noundef %34, i64 noundef %37)
  store i32 %38, ptr %11, align 4, !tbaa !9
  %39 = load i32, ptr %10, align 4, !tbaa !9
  %40 = load i32, ptr %11, align 4, !tbaa !9
  %41 = icmp ult i32 %39, %40
  %42 = zext i1 %41 to i32
  store i32 %42, ptr %10, align 4, !tbaa !9
  %43 = load i32, ptr %10, align 4, !tbaa !9
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %46

45:                                               ; preds = %3
  br label %287

46:                                               ; preds = %3
  br label %47

47:                                               ; preds = %285, %46
  %48 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %48, ptr %10, align 4, !tbaa !9
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.w2c_hermes, ptr %49, i32 0, i32 6
  %51 = load i32, ptr %10, align 4, !tbaa !9
  %52 = zext i32 %51 to i64
  %53 = add i64 %52, 4
  %54 = call i32 @i32_load(ptr noundef %50, i64 noundef %53)
  store i32 %54, ptr %10, align 4, !tbaa !9
  %55 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %55, ptr %9, align 4, !tbaa !9
  %56 = load i32, ptr %10, align 4, !tbaa !9
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %157

58:                                               ; preds = %47
  %59 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %59, ptr %10, align 4, !tbaa !9
  %60 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %60, ptr %11, align 4, !tbaa !9
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.w2c_hermes, ptr %61, i32 0, i32 6
  %63 = load i32, ptr %10, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  %65 = add i64 %64, 12
  %66 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store(ptr noundef %62, i64 noundef %65, i32 noundef %66)
  %67 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %67, ptr %10, align 4, !tbaa !9
  %68 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %68, ptr %11, align 4, !tbaa !9
  %69 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %69, ptr %12, align 4, !tbaa !9
  %70 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %70, ptr %13, align 4, !tbaa !9
  %71 = load i32, ptr %13, align 4, !tbaa !9
  %72 = load i32, ptr %12, align 4, !tbaa !9
  %73 = sub i32 %72, %71
  store i32 %73, ptr %12, align 4, !tbaa !9
  %74 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %74, ptr %13, align 4, !tbaa !9
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.w2c_hermes, ptr %75, i32 0, i32 6
  %77 = load i32, ptr %13, align 4, !tbaa !9
  %78 = zext i32 %77 to i64
  %79 = call i32 @i32_load(ptr noundef %76, i64 noundef %78)
  store i32 %79, ptr %13, align 4, !tbaa !9
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.w2c_hermes, ptr %80, i32 0, i32 6
  %82 = load i32, ptr %13, align 4, !tbaa !9
  %83 = zext i32 %82 to i64
  %84 = add i64 %83, 28
  %85 = call i32 @i32_load(ptr noundef %81, i64 noundef %84)
  store i32 %85, ptr %13, align 4, !tbaa !9
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.w2c_hermes, ptr %87, i32 0, i32 7
  %89 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %88, i32 0, i32 2
  %90 = load i32, ptr %89, align 4, !tbaa !17
  %91 = icmp ult i32 %86, %90
  br i1 %91, label %92, label %115

92:                                               ; preds = %58
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.w2c_hermes, ptr %93, i32 0, i32 7
  %95 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %94, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8, !tbaa !18
  %97 = load i32, ptr %13, align 4, !tbaa !9
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %96, i64 %98
  %100 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %99, i32 0, i32 1
  %101 = load ptr, ptr %100, align 8, !tbaa !19
  %102 = icmp ne ptr %101, null
  br i1 %102, label %103, label %115

103:                                              ; preds = %92
  %104 = load ptr, ptr @w2c_hermes_t2, align 8, !tbaa !5
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.w2c_hermes, ptr %105, i32 0, i32 7
  %107 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %106, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8, !tbaa !18
  %109 = load i32, ptr %13, align 4, !tbaa !9
  %110 = zext i32 %109 to i64
  %111 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %108, i64 %110
  %112 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %111, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8, !tbaa !21
  %114 = call zeroext i1 @func_types_eq(ptr noundef %104, ptr noundef %113)
  br label %115

115:                                              ; preds = %103, %92, %58
  %116 = phi i1 [ false, %92 ], [ false, %58 ], [ %114, %103 ]
  %117 = xor i1 %116, true
  %118 = xor i1 %117, true
  %119 = zext i1 %118 to i32
  %120 = sext i32 %119 to i64
  %121 = call i64 @llvm.expect.i64(i64 %120, i64 1)
  %122 = icmp ne i64 %121, 0
  br i1 %122, label %125, label %123

123:                                              ; preds = %115
  call void @wasm_rt_trap(i32 noundef 6) #6
  unreachable

124:                                              ; No predecessors!
  br label %125

125:                                              ; preds = %124, %115
  %126 = phi i1 [ true, %115 ], [ false, %124 ]
  %127 = zext i1 %126 to i32
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.w2c_hermes, ptr %128, i32 0, i32 7
  %130 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %129, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !18
  %132 = load i32, ptr %13, align 4, !tbaa !9
  %133 = zext i32 %132 to i64
  %134 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %131, i64 %133
  %135 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %134, i32 0, i32 1
  %136 = load ptr, ptr %135, align 8, !tbaa !19
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.w2c_hermes, ptr %137, i32 0, i32 7
  %139 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %138, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !18
  %141 = load i32, ptr %13, align 4, !tbaa !9
  %142 = zext i32 %141 to i64
  %143 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %140, i64 %142
  %144 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %143, i32 0, i32 2
  %145 = load ptr, ptr %144, align 8, !tbaa !22
  %146 = load i32, ptr %10, align 4, !tbaa !9
  %147 = load i32, ptr %11, align 4, !tbaa !9
  %148 = load i32, ptr %12, align 4, !tbaa !9
  call void %136(ptr noundef %145, i32 noundef %146, i32 noundef %147, i32 noundef %148)
  %149 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %149, ptr %10, align 4, !tbaa !9
  %150 = load ptr, ptr %4, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.w2c_hermes, ptr %150, i32 0, i32 6
  %152 = load i32, ptr %10, align 4, !tbaa !9
  %153 = zext i32 %152 to i64
  %154 = add i64 %153, 12
  %155 = call i32 @i32_load(ptr noundef %151, i64 noundef %154)
  store i32 %155, ptr %10, align 4, !tbaa !9
  %156 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %156, ptr %7, align 4, !tbaa !9
  br label %287

157:                                              ; preds = %47
  %158 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %158, ptr %10, align 4, !tbaa !9
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.w2c_hermes, ptr %159, i32 0, i32 6
  %161 = load i32, ptr %10, align 4, !tbaa !9
  %162 = zext i32 %161 to i64
  %163 = add i64 %162, 16
  %164 = call i32 @i32_load(ptr noundef %160, i64 noundef %163)
  store i32 %164, ptr %10, align 4, !tbaa !9
  %165 = load i32, ptr %10, align 4, !tbaa !9
  %166 = icmp ne i32 %165, 0
  %167 = xor i1 %166, true
  %168 = zext i1 %167 to i32
  store i32 %168, ptr %10, align 4, !tbaa !9
  %169 = load i32, ptr %10, align 4, !tbaa !9
  %170 = icmp ne i32 %169, 0
  br i1 %170, label %171, label %260

171:                                              ; preds = %157
  %172 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %172, ptr %10, align 4, !tbaa !9
  %173 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %173, ptr %11, align 4, !tbaa !9
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.w2c_hermes, ptr %174, i32 0, i32 6
  %176 = load i32, ptr %10, align 4, !tbaa !9
  %177 = zext i32 %176 to i64
  %178 = add i64 %177, 15
  %179 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %175, i64 noundef %178, i32 noundef %179)
  %180 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %180, ptr %10, align 4, !tbaa !9
  %181 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %181, ptr %11, align 4, !tbaa !9
  store i32 15, ptr %12, align 4, !tbaa !9
  %182 = load i32, ptr %12, align 4, !tbaa !9
  %183 = load i32, ptr %11, align 4, !tbaa !9
  %184 = add i32 %183, %182
  store i32 %184, ptr %11, align 4, !tbaa !9
  store i32 1, ptr %12, align 4, !tbaa !9
  %185 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %185, ptr %13, align 4, !tbaa !9
  %186 = load ptr, ptr %4, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.w2c_hermes, ptr %186, i32 0, i32 6
  %188 = load i32, ptr %13, align 4, !tbaa !9
  %189 = zext i32 %188 to i64
  %190 = call i32 @i32_load(ptr noundef %187, i64 noundef %189)
  store i32 %190, ptr %13, align 4, !tbaa !9
  %191 = load ptr, ptr %4, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.w2c_hermes, ptr %191, i32 0, i32 6
  %193 = load i32, ptr %13, align 4, !tbaa !9
  %194 = zext i32 %193 to i64
  %195 = add i64 %194, 28
  %196 = call i32 @i32_load(ptr noundef %192, i64 noundef %195)
  store i32 %196, ptr %13, align 4, !tbaa !9
  %197 = load i32, ptr %13, align 4, !tbaa !9
  %198 = load ptr, ptr %4, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.w2c_hermes, ptr %198, i32 0, i32 7
  %200 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %199, i32 0, i32 2
  %201 = load i32, ptr %200, align 4, !tbaa !17
  %202 = icmp ult i32 %197, %201
  br i1 %202, label %203, label %226

203:                                              ; preds = %171
  %204 = load ptr, ptr %4, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.w2c_hermes, ptr %204, i32 0, i32 7
  %206 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %205, i32 0, i32 0
  %207 = load ptr, ptr %206, align 8, !tbaa !18
  %208 = load i32, ptr %13, align 4, !tbaa !9
  %209 = zext i32 %208 to i64
  %210 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %207, i64 %209
  %211 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %210, i32 0, i32 1
  %212 = load ptr, ptr %211, align 8, !tbaa !19
  %213 = icmp ne ptr %212, null
  br i1 %213, label %214, label %226

214:                                              ; preds = %203
  %215 = load ptr, ptr @w2c_hermes_t2, align 8, !tbaa !5
  %216 = load ptr, ptr %4, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.w2c_hermes, ptr %216, i32 0, i32 7
  %218 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %217, i32 0, i32 0
  %219 = load ptr, ptr %218, align 8, !tbaa !18
  %220 = load i32, ptr %13, align 4, !tbaa !9
  %221 = zext i32 %220 to i64
  %222 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %219, i64 %221
  %223 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %222, i32 0, i32 0
  %224 = load ptr, ptr %223, align 8, !tbaa !21
  %225 = call zeroext i1 @func_types_eq(ptr noundef %215, ptr noundef %224)
  br label %226

226:                                              ; preds = %214, %203, %171
  %227 = phi i1 [ false, %203 ], [ false, %171 ], [ %225, %214 ]
  %228 = xor i1 %227, true
  %229 = xor i1 %228, true
  %230 = zext i1 %229 to i32
  %231 = sext i32 %230 to i64
  %232 = call i64 @llvm.expect.i64(i64 %231, i64 1)
  %233 = icmp ne i64 %232, 0
  br i1 %233, label %236, label %234

234:                                              ; preds = %226
  call void @wasm_rt_trap(i32 noundef 6) #6
  unreachable

235:                                              ; No predecessors!
  br label %236

236:                                              ; preds = %235, %226
  %237 = phi i1 [ true, %226 ], [ false, %235 ]
  %238 = zext i1 %237 to i32
  %239 = load ptr, ptr %4, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.w2c_hermes, ptr %239, i32 0, i32 7
  %241 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %240, i32 0, i32 0
  %242 = load ptr, ptr %241, align 8, !tbaa !18
  %243 = load i32, ptr %13, align 4, !tbaa !9
  %244 = zext i32 %243 to i64
  %245 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %242, i64 %244
  %246 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %245, i32 0, i32 1
  %247 = load ptr, ptr %246, align 8, !tbaa !19
  %248 = load ptr, ptr %4, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.w2c_hermes, ptr %248, i32 0, i32 7
  %250 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %249, i32 0, i32 0
  %251 = load ptr, ptr %250, align 8, !tbaa !18
  %252 = load i32, ptr %13, align 4, !tbaa !9
  %253 = zext i32 %252 to i64
  %254 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %251, i64 %253
  %255 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %254, i32 0, i32 2
  %256 = load ptr, ptr %255, align 8, !tbaa !22
  %257 = load i32, ptr %10, align 4, !tbaa !9
  %258 = load i32, ptr %11, align 4, !tbaa !9
  %259 = load i32, ptr %12, align 4, !tbaa !9
  call void %247(ptr noundef %256, i32 noundef %257, i32 noundef %258, i32 noundef %259)
  br label %306

260:                                              ; preds = %157
  %261 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %261, ptr %10, align 4, !tbaa !9
  %262 = load ptr, ptr %4, align 8, !tbaa !5
  %263 = load i32, ptr %10, align 4, !tbaa !9
  call void @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3ASetBuffered0x280x29(ptr noundef %262, i32 noundef %263)
  %264 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %264, ptr %10, align 4, !tbaa !9
  %265 = load ptr, ptr %4, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.w2c_hermes, ptr %265, i32 0, i32 6
  %267 = load i32, ptr %10, align 4, !tbaa !9
  %268 = zext i32 %267 to i64
  %269 = add i64 %268, 12
  %270 = call i32 @i32_load(ptr noundef %266, i64 noundef %269)
  store i32 %270, ptr %10, align 4, !tbaa !9
  %271 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %271, ptr %7, align 4, !tbaa !9
  %272 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %272, ptr %11, align 4, !tbaa !9
  %273 = load ptr, ptr %4, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.w2c_hermes, ptr %273, i32 0, i32 6
  %275 = load i32, ptr %11, align 4, !tbaa !9
  %276 = zext i32 %275 to i64
  %277 = add i64 %276, 8
  %278 = call i32 @i32_load(ptr noundef %274, i64 noundef %277)
  store i32 %278, ptr %11, align 4, !tbaa !9
  %279 = load i32, ptr %10, align 4, !tbaa !9
  %280 = load i32, ptr %11, align 4, !tbaa !9
  %281 = icmp uge i32 %279, %280
  %282 = zext i1 %281 to i32
  store i32 %282, ptr %10, align 4, !tbaa !9
  %283 = load i32, ptr %10, align 4, !tbaa !9
  %284 = icmp ne i32 %283, 0
  br i1 %284, label %285, label %286

285:                                              ; preds = %260
  br label %47

286:                                              ; preds = %260
  br label %287

287:                                              ; preds = %286, %125, %45
  %288 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %288, ptr %10, align 4, !tbaa !9
  %289 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %289, ptr %11, align 4, !tbaa !9
  store i32 1, ptr %12, align 4, !tbaa !9
  %290 = load i32, ptr %12, align 4, !tbaa !9
  %291 = load i32, ptr %11, align 4, !tbaa !9
  %292 = add i32 %291, %290
  store i32 %292, ptr %11, align 4, !tbaa !9
  %293 = load ptr, ptr %4, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.w2c_hermes, ptr %293, i32 0, i32 6
  %295 = load i32, ptr %10, align 4, !tbaa !9
  %296 = zext i32 %295 to i64
  %297 = add i64 %296, 12
  %298 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store(ptr noundef %294, i64 noundef %297, i32 noundef %298)
  %299 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %299, ptr %10, align 4, !tbaa !9
  %300 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %300, ptr %11, align 4, !tbaa !9
  %301 = load ptr, ptr %4, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.w2c_hermes, ptr %301, i32 0, i32 6
  %303 = load i32, ptr %10, align 4, !tbaa !9
  %304 = zext i32 %303 to i64
  %305 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %302, i64 noundef %304, i32 noundef %305)
  br label %306

306:                                              ; preds = %287, %236
  %307 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %307, ptr %10, align 4, !tbaa !9
  store i32 16, ptr %11, align 4, !tbaa !9
  %308 = load i32, ptr %11, align 4, !tbaa !9
  %309 = load i32, ptr %10, align 4, !tbaa !9
  %310 = add i32 %309, %308
  store i32 %310, ptr %10, align 4, !tbaa !9
  %311 = load i32, ptr %10, align 4, !tbaa !9
  %312 = load ptr, ptr %4, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.w2c_hermes, ptr %312, i32 0, i32 3
  store i32 %311, ptr %313, align 8, !tbaa !11
  %314 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %314, ptr %10, align 4, !tbaa !9
  %315 = load i32, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret i32 %315
}

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 = { 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 #5 = { nounwind }
attributes #6 = { 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 24}
!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, !10, i64 92}
!18 = !{!12, !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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden 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: nounwind uwtable
declare dso_local void @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3ASetBuffered0x280x29(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3Awrite0x28unsigned0x20char0x29(ptr noundef %0, i32 noundef returned %1, i32 noundef %2) local_unnamed_addr #2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = add i32 %5, -16
  store i32 %6, ptr %4, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 40
  %8 = zext i32 %1 to i64
  %9 = add nuw nsw i64 %8, 12
  %10 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %9)
  %11 = add nuw nsw i64 %8, 8
  %12 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %11)
  %13 = icmp ult i32 %10, %12
  br i1 %13, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %3
  %14 = add nuw nsw i64 %8, 4
  %15 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %14)
  %.not135 = icmp eq i32 %15, 0
  br i1 %.not135, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %16 = add nuw nsw i64 %8, 16
  br label %46

17:                                               ; preds = %77
  %18 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %14)
  %.not = icmp eq i32 %18, 0
  br i1 %.not, label %46, label %._crit_edge

._crit_edge:                                      ; preds = %17, %.preheader
  %.0.lcssa = phi i32 [ %10, %.preheader ], [ %78, %17 ]
  %.lcssa = phi i32 [ %15, %.preheader ], [ %18, %17 ]
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %9, i32 noundef %.lcssa)
  %19 = sub i32 %.0.lcssa, %.lcssa
  %20 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %8)
  %21 = zext i32 %20 to i64
  %22 = add nuw nsw i64 %21, 28
  %23 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %22)
  %24 = getelementptr inbounds i8, ptr %0, i64 80
  %25 = getelementptr inbounds i8, ptr %0, i64 92
  %26 = load i32, ptr %25, align 4, !tbaa !15
  %27 = icmp ult i32 %23, %26
  br i1 %27, label %28, label %.critedge, !prof !16

28:                                               ; preds = %._crit_edge
  %29 = load ptr, ptr %24, align 8, !tbaa !17
  %30 = zext i32 %23 to i64
  %31 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %29, i64 %30
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  %33 = load ptr, ptr %32, align 8, !tbaa !18
  %.not127 = icmp eq ptr %33, null
  br i1 %.not127, label %.critedge, label %34, !prof !20

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

.critedge:                                        ; preds = %28, %._crit_edge, %34
  tail call void @wasm_rt_trap(i32 noundef 6) #3
  unreachable

38:                                               ; preds = %34
  %39 = load ptr, ptr %24, align 8, !tbaa !17
  %40 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %39, i64 %30
  %41 = getelementptr inbounds i8, ptr %40, i64 8
  %42 = load ptr, ptr %41, align 8, !tbaa !18
  %43 = getelementptr inbounds i8, ptr %40, i64 16
  %44 = load ptr, ptr %43, align 8, !tbaa !23
  tail call void %42(ptr noundef %44, i32 noundef %1, i32 noundef %.lcssa, i32 noundef %19) #4
  %45 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %9)
  br label %.loopexit

46:                                               ; preds = %.lr.ph, %17
  %47 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %16)
  %.not124 = icmp eq i32 %47, 0
  br i1 %.not124, label %48, label %77

48:                                               ; preds = %46
  %49 = zext i32 %6 to i64
  %50 = add nuw nsw i64 %49, 15
  tail call void @i32_store8(ptr noundef nonnull %7, i64 noundef %50, i32 noundef %2)
  %51 = add i32 %5, -1
  %52 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %8)
  %53 = zext i32 %52 to i64
  %54 = add nuw nsw i64 %53, 28
  %55 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %54)
  %56 = getelementptr inbounds i8, ptr %0, i64 80
  %57 = getelementptr inbounds i8, ptr %0, i64 92
  %58 = load i32, ptr %57, align 4, !tbaa !15
  %59 = icmp ult i32 %55, %58
  br i1 %59, label %60, label %.critedge129, !prof !16

60:                                               ; preds = %48
  %61 = load ptr, ptr %56, align 8, !tbaa !17
  %62 = zext i32 %55 to i64
  %63 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %61, i64 %62
  %64 = getelementptr inbounds i8, ptr %63, i64 8
  %65 = load ptr, ptr %64, align 8, !tbaa !18
  %.not126 = icmp eq ptr %65, null
  br i1 %.not126, label %.critedge129, label %66, !prof !20

66:                                               ; preds = %60
  %67 = load ptr, ptr @w2c_hermes_t2, align 8, !tbaa !21
  %68 = load ptr, ptr %63, align 8, !tbaa !22
  %69 = tail call zeroext i1 @func_types_eq(ptr noundef %67, ptr noundef %68)
  br i1 %69, label %70, label %.critedge129, !prof !16

.critedge129:                                     ; preds = %60, %48, %66
  tail call void @wasm_rt_trap(i32 noundef 6) #3
  unreachable

70:                                               ; preds = %66
  %71 = load ptr, ptr %56, align 8, !tbaa !17
  %72 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %71, i64 %62
  %73 = getelementptr inbounds i8, ptr %72, i64 8
  %74 = load ptr, ptr %73, align 8, !tbaa !18
  %75 = getelementptr inbounds i8, ptr %72, i64 16
  %76 = load ptr, ptr %75, align 8, !tbaa !23
  tail call void %74(ptr noundef %76, i32 noundef %1, i32 noundef %51, i32 noundef 1) #4
  br label %82

77:                                               ; preds = %46
  tail call void @w2c_hermes_llvh0x3A0x3Araw_ostream0x3A0x3ASetBuffered0x280x29(ptr noundef %0, i32 noundef %1)
  %78 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %9)
  %79 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %11)
  %.not125 = icmp ult i32 %78, %79
  br i1 %.not125, label %.loopexit, label %17

.loopexit:                                        ; preds = %77, %3, %38
  %.1 = phi i32 [ %10, %3 ], [ %45, %38 ], [ %78, %77 ]
  %80 = add i32 %.1, 1
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %9, i32 noundef %80)
  %81 = zext i32 %.1 to i64
  tail call void @i32_store8(ptr noundef nonnull %7, i64 noundef %81, i32 noundef %2)
  br label %82

82:                                               ; preds = %.loopexit, %70
  store i32 %5, ptr %4, align 8, !tbaa !5
  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 = { 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 = { noreturn nounwind }
attributes #4 = { nounwind }

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass