; 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_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 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: noreturn
declare void @wasm_rt_trap(i32 noundef) #2

; 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) #3

declare void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fthrow_out_of_range0x5Babi0x3Av150070x5D0x28char0x20const0x2A0x29(ptr noundef) #4

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

49:                                               ; preds = %3
  br label %50

50:                                               ; preds = %272, %49
  %51 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %51, ptr %13, align 4, !tbaa !9
  %52 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %52, ptr %14, align 4, !tbaa !9
  store i32 12, ptr %15, align 4, !tbaa !9
  %53 = load i32, ptr %15, align 4, !tbaa !9
  %54 = load i32, ptr %14, align 4, !tbaa !9
  %55 = mul i32 %54, %53
  store i32 %55, ptr %14, align 4, !tbaa !9
  %56 = load i32, ptr %14, align 4, !tbaa !9
  %57 = load i32, ptr %13, align 4, !tbaa !9
  %58 = add i32 %57, %56
  store i32 %58, ptr %13, align 4, !tbaa !9
  %59 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %59, ptr %11, align 4, !tbaa !9
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.w2c_hermes, ptr %60, i32 0, i32 6
  %62 = load i32, ptr %13, align 4, !tbaa !9
  %63 = zext i32 %62 to i64
  %64 = call i32 @i32_load(ptr noundef %61, i64 noundef %63)
  store i32 %64, ptr %13, align 4, !tbaa !9
  %65 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %65, ptr %12, align 4, !tbaa !9
  %66 = load i32, ptr %13, align 4, !tbaa !9
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %221

68:                                               ; preds = %50
  %69 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %69, ptr %13, align 4, !tbaa !9
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.w2c_hermes, ptr %70, i32 0, i32 6
  %72 = load i32, ptr %13, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = add i64 %73, 4
  %75 = call i32 @i32_load(ptr noundef %71, i64 noundef %74)
  store i32 %75, ptr %13, align 4, !tbaa !9
  %76 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %76, ptr %7, align 4, !tbaa !9
  %77 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %77, ptr %13, align 4, !tbaa !9
  %78 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %78, ptr %14, align 4, !tbaa !9
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.w2c_hermes, ptr %79, i32 0, i32 6
  %81 = load i32, ptr %13, align 4, !tbaa !9
  %82 = zext i32 %81 to i64
  %83 = add i64 %82, 12
  %84 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %80, i64 noundef %83, i32 noundef %84)
  %85 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %85, ptr %13, align 4, !tbaa !9
  %86 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %86, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %15, align 4, !tbaa !9
  %87 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %87, ptr %16, align 4, !tbaa !9
  store i32 -9, ptr %17, align 4, !tbaa !9
  %88 = load i32, ptr %16, align 4, !tbaa !9
  %89 = load i32, ptr %17, align 4, !tbaa !9
  %90 = icmp ugt i32 %88, %89
  %91 = zext i1 %90 to i32
  store i32 %91, ptr %16, align 4, !tbaa !9
  %92 = load i32, ptr %16, align 4, !tbaa !9
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %96

94:                                               ; preds = %68
  %95 = load i32, ptr %14, align 4, !tbaa !9
  br label %98

96:                                               ; preds = %68
  %97 = load i32, ptr %15, align 4, !tbaa !9
  br label %98

98:                                               ; preds = %96, %94
  %99 = phi i32 [ %95, %94 ], [ %97, %96 ]
  store i32 %99, ptr %14, align 4, !tbaa !9
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.w2c_hermes, ptr %100, i32 0, i32 6
  %102 = load i32, ptr %13, align 4, !tbaa !9
  %103 = zext i32 %102 to i64
  %104 = add i64 %103, 8
  %105 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %101, i64 noundef %104, i32 noundef %105)
  %106 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %106, ptr %13, align 4, !tbaa !9
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.w2c_hermes, ptr %107, i32 0, i32 6
  %109 = load i32, ptr %13, align 4, !tbaa !9
  %110 = zext i32 %109 to i64
  %111 = add i64 %110, 16
  %112 = call i32 @i32_load(ptr noundef %108, i64 noundef %111)
  store i32 %112, ptr %13, align 4, !tbaa !9
  %113 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %113, ptr %7, align 4, !tbaa !9
  %114 = load i32, ptr %13, align 4, !tbaa !9
  %115 = icmp ne i32 %114, 0
  %116 = xor i1 %115, true
  %117 = zext i1 %116 to i32
  store i32 %117, ptr %13, align 4, !tbaa !9
  %118 = load i32, ptr %13, align 4, !tbaa !9
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %120, label %121

120:                                              ; preds = %98
  br label %282

121:                                              ; preds = %98
  %122 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %122, ptr %13, align 4, !tbaa !9
  %123 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %123, ptr %14, align 4, !tbaa !9
  store i32 12, ptr %15, align 4, !tbaa !9
  %124 = load i32, ptr %15, align 4, !tbaa !9
  %125 = load i32, ptr %14, align 4, !tbaa !9
  %126 = add i32 %125, %124
  store i32 %126, ptr %14, align 4, !tbaa !9
  %127 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %127, ptr %15, align 4, !tbaa !9
  store i32 8, ptr %16, align 4, !tbaa !9
  %128 = load i32, ptr %16, align 4, !tbaa !9
  %129 = load i32, ptr %15, align 4, !tbaa !9
  %130 = add i32 %129, %128
  store i32 %130, ptr %15, align 4, !tbaa !9
  %131 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %131, ptr %16, align 4, !tbaa !9
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.w2c_hermes, ptr %132, i32 0, i32 6
  %134 = load i32, ptr %16, align 4, !tbaa !9
  %135 = zext i32 %134 to i64
  %136 = call i32 @i32_load(ptr noundef %133, i64 noundef %135)
  store i32 %136, ptr %16, align 4, !tbaa !9
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.w2c_hermes, ptr %137, i32 0, i32 6
  %139 = load i32, ptr %16, align 4, !tbaa !9
  %140 = zext i32 %139 to i64
  %141 = add i64 %140, 24
  %142 = call i32 @i32_load(ptr noundef %138, i64 noundef %141)
  store i32 %142, ptr %16, align 4, !tbaa !9
  %143 = load i32, ptr %16, align 4, !tbaa !9
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.w2c_hermes, ptr %144, i32 0, i32 7
  %146 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %145, i32 0, i32 2
  %147 = load i32, ptr %146, align 4, !tbaa !17
  %148 = icmp ult i32 %143, %147
  br i1 %148, label %149, label %172

149:                                              ; preds = %121
  %150 = load ptr, ptr %4, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.w2c_hermes, ptr %150, i32 0, i32 7
  %152 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %151, i32 0, i32 0
  %153 = load ptr, ptr %152, align 8, !tbaa !18
  %154 = load i32, ptr %16, align 4, !tbaa !9
  %155 = zext i32 %154 to i64
  %156 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %153, i64 %155
  %157 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %156, i32 0, i32 1
  %158 = load ptr, ptr %157, align 8, !tbaa !19
  %159 = icmp ne ptr %158, null
  br i1 %159, label %160, label %172

160:                                              ; preds = %149
  %161 = load ptr, ptr @w2c_hermes_t2, align 8, !tbaa !5
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.w2c_hermes, ptr %162, i32 0, i32 7
  %164 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %163, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8, !tbaa !18
  %166 = load i32, ptr %16, align 4, !tbaa !9
  %167 = zext i32 %166 to i64
  %168 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %165, i64 %167
  %169 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %168, i32 0, i32 0
  %170 = load ptr, ptr %169, align 8, !tbaa !21
  %171 = call zeroext i1 @func_types_eq(ptr noundef %161, ptr noundef %170)
  br label %172

172:                                              ; preds = %160, %149, %121
  %173 = phi i1 [ false, %149 ], [ false, %121 ], [ %171, %160 ]
  %174 = xor i1 %173, true
  %175 = xor i1 %174, true
  %176 = zext i1 %175 to i32
  %177 = sext i32 %176 to i64
  %178 = call i64 @llvm.expect.i64(i64 %177, i64 1)
  %179 = icmp ne i64 %178, 0
  br i1 %179, label %182, label %180

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

181:                                              ; No predecessors!
  br label %182

182:                                              ; preds = %181, %172
  %183 = phi i1 [ true, %172 ], [ false, %181 ]
  %184 = zext i1 %183 to i32
  %185 = load ptr, ptr %4, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.w2c_hermes, ptr %185, i32 0, i32 7
  %187 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %186, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8, !tbaa !18
  %189 = load i32, ptr %16, align 4, !tbaa !9
  %190 = zext i32 %189 to i64
  %191 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %188, i64 %190
  %192 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %191, i32 0, i32 1
  %193 = load ptr, ptr %192, align 8, !tbaa !19
  %194 = load ptr, ptr %4, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.w2c_hermes, ptr %194, i32 0, i32 7
  %196 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %195, i32 0, i32 0
  %197 = load ptr, ptr %196, align 8, !tbaa !18
  %198 = load i32, ptr %16, align 4, !tbaa !9
  %199 = zext i32 %198 to i64
  %200 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %197, i64 %199
  %201 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %200, i32 0, i32 2
  %202 = load ptr, ptr %201, align 8, !tbaa !22
  %203 = load i32, ptr %13, align 4, !tbaa !9
  %204 = load i32, ptr %14, align 4, !tbaa !9
  %205 = load i32, ptr %15, align 4, !tbaa !9
  call void %193(ptr noundef %202, i32 noundef %203, i32 noundef %204, i32 noundef %205)
  %206 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %206, ptr %13, align 4, !tbaa !9
  %207 = load ptr, ptr %4, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.w2c_hermes, ptr %207, i32 0, i32 6
  %209 = load i32, ptr %13, align 4, !tbaa !9
  %210 = zext i32 %209 to i64
  %211 = add i64 %210, 4
  %212 = call i32 @i32_load(ptr noundef %208, i64 noundef %211)
  store i32 %212, ptr %13, align 4, !tbaa !9
  %213 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %213, ptr %10, align 4, !tbaa !9
  %214 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %214, ptr %13, align 4, !tbaa !9
  %215 = load ptr, ptr %4, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.w2c_hermes, ptr %215, i32 0, i32 6
  %217 = load i32, ptr %13, align 4, !tbaa !9
  %218 = zext i32 %217 to i64
  %219 = call i32 @i32_load(ptr noundef %216, i64 noundef %218)
  store i32 %219, ptr %13, align 4, !tbaa !9
  %220 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %220, ptr %7, align 4, !tbaa !9
  br label %221

221:                                              ; preds = %182, %50
  %222 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %222, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %223 = load i32, ptr %14, align 4, !tbaa !9
  %224 = load i32, ptr %13, align 4, !tbaa !9
  %225 = add i32 %224, %223
  store i32 %225, ptr %13, align 4, !tbaa !9
  %226 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %226, ptr %9, align 4, !tbaa !9
  %227 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %227, ptr %14, align 4, !tbaa !9
  %228 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %228, ptr %15, align 4, !tbaa !9
  %229 = load i32, ptr %15, align 4, !tbaa !9
  %230 = load i32, ptr %14, align 4, !tbaa !9
  %231 = sub i32 %230, %229
  store i32 %231, ptr %14, align 4, !tbaa !9
  store i32 12, ptr %15, align 4, !tbaa !9
  %232 = load i32, ptr %15, align 4, !tbaa !9
  %233 = icmp eq i32 %232, 0
  %234 = xor i1 %233, true
  %235 = xor i1 %234, true
  %236 = zext i1 %235 to i32
  %237 = sext i32 %236 to i64
  %238 = call i64 @llvm.expect.i64(i64 %237, i64 0)
  %239 = icmp ne i64 %238, 0
  br i1 %239, label %240, label %242

240:                                              ; preds = %221
  call void @wasm_rt_trap(i32 noundef 3) #7
  unreachable

241:                                              ; No predecessors!
  br label %264

242:                                              ; preds = %221
  %243 = load i32, ptr %14, align 4, !tbaa !9
  %244 = icmp eq i32 %243, -2147483648
  br i1 %244, label %245, label %248

245:                                              ; preds = %242
  %246 = load i32, ptr %15, align 4, !tbaa !9
  %247 = icmp eq i32 %246, -1
  br label %248

248:                                              ; preds = %245, %242
  %249 = phi i1 [ false, %242 ], [ %247, %245 ]
  %250 = xor i1 %249, true
  %251 = xor i1 %250, true
  %252 = zext i1 %251 to i32
  %253 = sext i32 %252 to i64
  %254 = call i64 @llvm.expect.i64(i64 %253, i64 0)
  %255 = icmp ne i64 %254, 0
  br i1 %255, label %256, label %258

256:                                              ; preds = %248
  call void @wasm_rt_trap(i32 noundef 2) #7
  unreachable

257:                                              ; No predecessors!
  br label %262

258:                                              ; preds = %248
  %259 = load i32, ptr %14, align 4, !tbaa !9
  %260 = load i32, ptr %15, align 4, !tbaa !9
  %261 = sdiv i32 %259, %260
  br label %262

262:                                              ; preds = %258, %257
  %263 = phi i32 [ 0, %257 ], [ %261, %258 ]
  br label %264

264:                                              ; preds = %262, %241
  %265 = phi i32 [ 0, %241 ], [ %263, %262 ]
  store i32 %265, ptr %14, align 4, !tbaa !9
  %266 = load i32, ptr %13, align 4, !tbaa !9
  %267 = load i32, ptr %14, align 4, !tbaa !9
  %268 = icmp ult i32 %266, %267
  %269 = zext i1 %268 to i32
  store i32 %269, ptr %13, align 4, !tbaa !9
  %270 = load i32, ptr %13, align 4, !tbaa !9
  %271 = icmp ne i32 %270, 0
  br i1 %271, label %272, label %273

272:                                              ; preds = %264
  br label %50

273:                                              ; preds = %264
  br label %274

274:                                              ; preds = %273, %3
  %275 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %275, ptr %13, align 4, !tbaa !9
  store i32 16, ptr %14, align 4, !tbaa !9
  %276 = load i32, ptr %14, align 4, !tbaa !9
  %277 = load i32, ptr %13, align 4, !tbaa !9
  %278 = add i32 %277, %276
  store i32 %278, ptr %13, align 4, !tbaa !9
  %279 = load i32, ptr %13, align 4, !tbaa !9
  %280 = load ptr, ptr %4, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.w2c_hermes, ptr %280, i32 0, i32 3
  store i32 %279, ptr %281, align 8, !tbaa !11
  br label %284

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 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 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: noreturn
declare void @wasm_rt_trap(i32 noundef) local_unnamed_addr #1

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

declare void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3A_0x5Fthrow_out_of_range0x5Babi0x3Av150070x5D0x28char0x20const0x2A0x29(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AIdentifierTable0x3A0x3AvisitIdentifiers0x28std0x3A0x3A_0x5F20x3A0x3Afunction0x3Cvoid0x200x28hermes0x3A0x3Avm0x3A0x3ASymbolID0x2C0x20hermes0x3A0x3Avm0x3A0x3AStringPrimitive0x20const0x2A0x290x3E0x20const0x260x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #3 {
  %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, 4
  %10 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %9)
  %11 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %8)
  %.not = icmp eq i32 %10, %11
  br i1 %.not, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %3
  %12 = zext i32 %6 to i64
  %13 = add nuw nsw i64 %12, 12
  %14 = add nuw nsw i64 %12, 8
  %15 = zext i32 %2 to i64
  %16 = add nuw nsw i64 %15, 16
  %17 = add i32 %5, -4
  %18 = add i32 %5, -8
  %19 = getelementptr inbounds i8, ptr %0, i64 80
  %20 = getelementptr inbounds i8, ptr %0, i64 92
  %21 = load ptr, ptr @w2c_hermes_t2, align 8
  br label %22

22:                                               ; preds = %.preheader, %59
  %.0110 = phi i32 [ %60, %59 ], [ 0, %.preheader ]
  %.0108 = phi i32 [ %.1109, %59 ], [ %10, %.preheader ]
  %.0 = phi i32 [ %.1, %59 ], [ %11, %.preheader ]
  %23 = mul i32 %.0110, 12
  %24 = add i32 %.0, %23
  %25 = zext i32 %24 to i64
  %26 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %25)
  %.not116 = icmp eq i32 %26, 0
  br i1 %.not116, label %59, label %27

27:                                               ; preds = %22
  %28 = add nuw nsw i64 %25, 4
  %29 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %28)
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %13, i32 noundef %.0110)
  %30 = icmp ugt i32 %29, -9
  %31 = select i1 %30, i32 %26, i32 0
  tail call void @i32_store(ptr noundef nonnull %7, i64 noundef %14, i32 noundef %31)
  %32 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %16)
  %.not117 = icmp eq i32 %32, 0
  br i1 %.not117, label %64, label %33

33:                                               ; preds = %27
  %34 = zext i32 %32 to i64
  %35 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %34)
  %36 = zext i32 %35 to i64
  %37 = add nuw nsw i64 %36, 24
  %38 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %37)
  %39 = load i32, ptr %20, align 4, !tbaa !15
  %40 = icmp ult i32 %38, %39
  br i1 %40, label %41, label %.critedge, !prof !16

41:                                               ; preds = %33
  %42 = load ptr, ptr %19, align 8, !tbaa !17
  %43 = zext i32 %38 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 !18
  %.not118 = icmp eq ptr %46, null
  br i1 %.not118, label %.critedge, label %47, !prof !20

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

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

50:                                               ; preds = %47
  %51 = load ptr, ptr %19, align 8, !tbaa !17
  %52 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %51, i64 %43
  %53 = getelementptr inbounds i8, ptr %52, i64 8
  %54 = load ptr, ptr %53, align 8, !tbaa !18
  %55 = getelementptr inbounds i8, ptr %52, i64 16
  %56 = load ptr, ptr %55, align 8, !tbaa !22
  tail call void %54(ptr noundef %56, i32 noundef %32, i32 noundef %17, i32 noundef %18) #5
  %57 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %9)
  %58 = tail call i32 @i32_load(ptr noundef nonnull %7, i64 noundef %8)
  br label %59

59:                                               ; preds = %50, %22
  %.1109 = phi i32 [ %57, %50 ], [ %.0108, %22 ]
  %.1 = phi i32 [ %58, %50 ], [ %.0, %22 ]
  %60 = add nuw i32 %.0110, 1
  %61 = sub i32 %.1109, %.1
  %62 = sdiv i32 %61, 12
  %63 = icmp ult i32 %60, %62
  br i1 %63, label %22, label %.loopexit

.loopexit:                                        ; preds = %59, %3
  store i32 %5, ptr %4, align 8, !tbaa !5
  ret void

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 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 = !{!19, !7, i64 0}
!22 = !{!19, !7, i64 16}


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