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

; 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_t4 = 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_load8_u(ptr noundef, i64 noundef) #1

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

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

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

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

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

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

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

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

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

58:                                               ; preds = %6
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.w2c_hermes, ptr %59, i32 0, i32 7
  %61 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %60, i32 0, i32 0
  %62 = load ptr, ptr %61, align 8, !tbaa !18
  %63 = load i32, ptr %19, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  %65 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %62, i64 %64
  %66 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %65, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8, !tbaa !19
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %81

69:                                               ; preds = %58
  %70 = load ptr, ptr @w2c_hermes_t4, align 8, !tbaa !5
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.w2c_hermes, ptr %71, i32 0, i32 7
  %73 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !18
  %75 = load i32, ptr %19, align 4, !tbaa !9
  %76 = zext i32 %75 to i64
  %77 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %74, i64 %76
  %78 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %77, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8, !tbaa !21
  %80 = call zeroext i1 @func_types_eq(ptr noundef %70, ptr noundef %79)
  br label %81

81:                                               ; preds = %69, %58, %6
  %82 = phi i1 [ false, %58 ], [ false, %6 ], [ %80, %69 ]
  %83 = xor i1 %82, true
  %84 = xor i1 %83, true
  %85 = zext i1 %84 to i32
  %86 = sext i32 %85 to i64
  %87 = call i64 @llvm.expect.i64(i64 %86, i64 1)
  %88 = icmp ne i64 %87, 0
  br i1 %88, label %91, label %89

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

90:                                               ; No predecessors!
  br label %91

91:                                               ; preds = %90, %81
  %92 = phi i1 [ true, %81 ], [ false, %90 ]
  %93 = zext i1 %92 to i32
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.w2c_hermes, ptr %94, i32 0, i32 7
  %96 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %95, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !18
  %98 = load i32, ptr %19, align 4, !tbaa !9
  %99 = zext i32 %98 to i64
  %100 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %97, i64 %99
  %101 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %100, i32 0, i32 1
  %102 = load ptr, ptr %101, align 8, !tbaa !19
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.w2c_hermes, ptr %103, i32 0, i32 7
  %105 = getelementptr inbounds %struct.wasm_rt_funcref_table_t, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !18
  %107 = load i32, ptr %19, align 4, !tbaa !9
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %106, i64 %108
  %110 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %109, i32 0, i32 2
  %111 = load ptr, ptr %110, align 8, !tbaa !22
  %112 = load i32, ptr %15, align 4, !tbaa !9
  %113 = load i32, ptr %16, align 4, !tbaa !9
  %114 = load i32, ptr %17, align 4, !tbaa !9
  %115 = load i32, ptr %18, align 4, !tbaa !9
  call void %102(ptr noundef %111, i32 noundef %112, i32 noundef %113, i32 noundef %114, i32 noundef %115)
  %116 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %116, ptr %15, align 4, !tbaa !9
  %117 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %117, ptr %16, align 4, !tbaa !9
  %118 = load ptr, ptr %7, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.w2c_hermes, ptr %118, i32 0, i32 6
  %120 = load i32, ptr %16, align 4, !tbaa !9
  %121 = zext i32 %120 to i64
  %122 = add i64 %121, 8
  %123 = call i32 @i32_load(ptr noundef %119, i64 noundef %122)
  store i32 %123, ptr %16, align 4, !tbaa !9
  %124 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %124, ptr %9, align 4, !tbaa !9
  %125 = load i32, ptr %16, align 4, !tbaa !9
  %126 = icmp ne i32 %125, 0
  %127 = xor i1 %126, true
  %128 = zext i1 %127 to i32
  store i32 %128, ptr %16, align 4, !tbaa !9
  %129 = load i32, ptr %16, align 4, !tbaa !9
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %143

131:                                              ; preds = %91
  %132 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %132, ptr %16, align 4, !tbaa !9
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.w2c_hermes, ptr %133, i32 0, i32 6
  %135 = load i32, ptr %16, align 4, !tbaa !9
  %136 = zext i32 %135 to i64
  %137 = add i64 %136, 1
  %138 = call i32 @i32_load8_u(ptr noundef %134, i64 noundef %137)
  store i32 %138, ptr %16, align 4, !tbaa !9
  store i32 8, ptr %17, align 4, !tbaa !9
  %139 = load i32, ptr %17, align 4, !tbaa !9
  %140 = and i32 %139, 31
  %141 = load i32, ptr %16, align 4, !tbaa !9
  %142 = shl i32 %141, %140
  store i32 %142, ptr %16, align 4, !tbaa !9
  br label %265

143:                                              ; preds = %91
  %144 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %144, ptr %16, align 4, !tbaa !9
  %145 = load ptr, ptr %7, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.w2c_hermes, ptr %145, i32 0, i32 6
  %147 = load i32, ptr %16, align 4, !tbaa !9
  %148 = zext i32 %147 to i64
  %149 = add i64 %148, 4
  %150 = call i32 @i32_load(ptr noundef %146, i64 noundef %149)
  store i32 %150, ptr %16, align 4, !tbaa !9
  %151 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %151, ptr %17, align 4, !tbaa !9
  %152 = load ptr, ptr %7, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.w2c_hermes, ptr %152, i32 0, i32 6
  %154 = load i32, ptr %17, align 4, !tbaa !9
  %155 = zext i32 %154 to i64
  %156 = call i32 @i32_load(ptr noundef %153, i64 noundef %155)
  store i32 %156, ptr %17, align 4, !tbaa !9
  %157 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %157, ptr %14, align 4, !tbaa !9
  %158 = load i32, ptr %17, align 4, !tbaa !9
  %159 = load i32, ptr %16, align 4, !tbaa !9
  %160 = sub i32 %159, %158
  store i32 %160, ptr %16, align 4, !tbaa !9
  store i32 2, ptr %17, align 4, !tbaa !9
  %161 = load i32, ptr %16, align 4, !tbaa !9
  %162 = load i32, ptr %17, align 4, !tbaa !9
  %163 = and i32 %162, 31
  %164 = ashr i32 %161, %163
  store i32 %164, ptr %16, align 4, !tbaa !9
  %165 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %165, ptr %10, align 4, !tbaa !9
  %166 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %166, ptr %17, align 4, !tbaa !9
  %167 = load i32, ptr %16, align 4, !tbaa !9
  %168 = load i32, ptr %17, align 4, !tbaa !9
  %169 = icmp ule i32 %167, %168
  %170 = zext i1 %169 to i32
  store i32 %170, ptr %16, align 4, !tbaa !9
  %171 = load i32, ptr %16, align 4, !tbaa !9
  %172 = icmp ne i32 %171, 0
  br i1 %172, label %173, label %174

173:                                              ; preds = %143
  br label %279

174:                                              ; preds = %143
  %175 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %175, ptr %16, align 4, !tbaa !9
  %176 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %176, ptr %17, align 4, !tbaa !9
  %177 = load i32, ptr %16, align 4, !tbaa !9
  %178 = load i32, ptr %17, align 4, !tbaa !9
  %179 = icmp ule i32 %177, %178
  %180 = zext i1 %179 to i32
  store i32 %180, ptr %16, align 4, !tbaa !9
  %181 = load i32, ptr %16, align 4, !tbaa !9
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %183, label %184

183:                                              ; preds = %174
  br label %297

184:                                              ; preds = %174
  %185 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %185, ptr %16, align 4, !tbaa !9
  store i32 1, ptr %17, align 4, !tbaa !9
  %186 = load i32, ptr %16, align 4, !tbaa !9
  %187 = load i32, ptr %17, align 4, !tbaa !9
  %188 = icmp ne i32 %186, %187
  %189 = zext i1 %188 to i32
  store i32 %189, ptr %16, align 4, !tbaa !9
  %190 = load i32, ptr %16, align 4, !tbaa !9
  %191 = icmp ne i32 %190, 0
  br i1 %191, label %192, label %193

192:                                              ; preds = %184
  br label %315

193:                                              ; preds = %184
  %194 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %194, ptr %16, align 4, !tbaa !9
  %195 = load ptr, ptr %7, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.w2c_hermes, ptr %195, i32 0, i32 6
  %197 = load i32, ptr %16, align 4, !tbaa !9
  %198 = zext i32 %197 to i64
  %199 = call i32 @i32_load16_u(ptr noundef %196, i64 noundef %198)
  store i32 %199, ptr %16, align 4, !tbaa !9
  store i32 -512, ptr %17, align 4, !tbaa !9
  %200 = load i32, ptr %17, align 4, !tbaa !9
  %201 = load i32, ptr %16, align 4, !tbaa !9
  %202 = and i32 %201, %200
  store i32 %202, ptr %16, align 4, !tbaa !9
  store i32 257, ptr %17, align 4, !tbaa !9
  store i32 1, ptr %18, align 4, !tbaa !9
  %203 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %203, ptr %19, align 4, !tbaa !9
  %204 = load ptr, ptr %7, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.w2c_hermes, ptr %204, i32 0, i32 6
  %206 = load i32, ptr %19, align 4, !tbaa !9
  %207 = zext i32 %206 to i64
  %208 = add i64 %207, 12
  %209 = call i32 @i32_load(ptr noundef %205, i64 noundef %208)
  store i32 %209, ptr %19, align 4, !tbaa !9
  %210 = load i32, ptr %19, align 4, !tbaa !9
  store i32 %210, ptr %9, align 4, !tbaa !9
  %211 = load i32, ptr %19, align 4, !tbaa !9
  %212 = icmp ne i32 %211, 0
  br i1 %212, label %213, label %219

213:                                              ; preds = %193
  %214 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %214, ptr %19, align 4, !tbaa !9
  store i32 31, ptr %20, align 4, !tbaa !9
  %215 = load i32, ptr %20, align 4, !tbaa !9
  %216 = and i32 %215, 31
  %217 = load i32, ptr %19, align 4, !tbaa !9
  %218 = lshr i32 %217, %216
  store i32 %218, ptr %19, align 4, !tbaa !9
  br label %252

219:                                              ; preds = %193
  %220 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %220, ptr %19, align 4, !tbaa !9
  %221 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %221, ptr %20, align 4, !tbaa !9
  store i32 2, ptr %21, align 4, !tbaa !9
  %222 = load i32, ptr %21, align 4, !tbaa !9
  %223 = and i32 %222, 31
  %224 = load i32, ptr %20, align 4, !tbaa !9
  %225 = shl i32 %224, %223
  store i32 %225, ptr %20, align 4, !tbaa !9
  %226 = load i32, ptr %20, align 4, !tbaa !9
  %227 = load i32, ptr %19, align 4, !tbaa !9
  %228 = add i32 %227, %226
  store i32 %228, ptr %19, align 4, !tbaa !9
  %229 = load ptr, ptr %7, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.w2c_hermes, ptr %229, i32 0, i32 6
  %231 = load i32, ptr %19, align 4, !tbaa !9
  %232 = zext i32 %231 to i64
  %233 = call i32 @i32_load(ptr noundef %230, i64 noundef %232)
  store i32 %233, ptr %19, align 4, !tbaa !9
  %234 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %234, ptr %20, align 4, !tbaa !9
  %235 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %235, ptr %21, align 4, !tbaa !9
  store i32 2, ptr %22, align 4, !tbaa !9
  %236 = load i32, ptr %22, align 4, !tbaa !9
  %237 = and i32 %236, 31
  %238 = load i32, ptr %21, align 4, !tbaa !9
  %239 = shl i32 %238, %237
  store i32 %239, ptr %21, align 4, !tbaa !9
  %240 = load i32, ptr %21, align 4, !tbaa !9
  %241 = load i32, ptr %20, align 4, !tbaa !9
  %242 = add i32 %241, %240
  store i32 %242, ptr %20, align 4, !tbaa !9
  %243 = load ptr, ptr %7, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.w2c_hermes, ptr %243, i32 0, i32 6
  %245 = load i32, ptr %20, align 4, !tbaa !9
  %246 = zext i32 %245 to i64
  %247 = call i32 @i32_load(ptr noundef %244, i64 noundef %246)
  store i32 %247, ptr %20, align 4, !tbaa !9
  %248 = load i32, ptr %19, align 4, !tbaa !9
  %249 = load i32, ptr %20, align 4, !tbaa !9
  %250 = icmp ult i32 %248, %249
  %251 = zext i1 %250 to i32
  store i32 %251, ptr %19, align 4, !tbaa !9
  br label %252

252:                                              ; preds = %219, %213
  %253 = load i32, ptr %19, align 4, !tbaa !9
  store i32 %253, ptr %9, align 4, !tbaa !9
  %254 = load i32, ptr %19, align 4, !tbaa !9
  %255 = icmp ne i32 %254, 0
  br i1 %255, label %256, label %258

256:                                              ; preds = %252
  %257 = load i32, ptr %17, align 4, !tbaa !9
  br label %260

258:                                              ; preds = %252
  %259 = load i32, ptr %18, align 4, !tbaa !9
  br label %260

260:                                              ; preds = %258, %256
  %261 = phi i32 [ %257, %256 ], [ %259, %258 ]
  store i32 %261, ptr %17, align 4, !tbaa !9
  %262 = load i32, ptr %17, align 4, !tbaa !9
  %263 = load i32, ptr %16, align 4, !tbaa !9
  %264 = or i32 %263, %262
  store i32 %264, ptr %16, align 4, !tbaa !9
  br label %265

265:                                              ; preds = %260, %131
  %266 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %266, ptr %9, align 4, !tbaa !9
  %267 = load ptr, ptr %7, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.w2c_hermes, ptr %267, i32 0, i32 6
  %269 = load i32, ptr %15, align 4, !tbaa !9
  %270 = zext i32 %269 to i64
  %271 = load i32, ptr %16, align 4, !tbaa !9
  call void @i32_store16(ptr noundef %268, i64 noundef %270, i32 noundef %271)
  %272 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %272, ptr %15, align 4, !tbaa !9
  store i32 16, ptr %16, align 4, !tbaa !9
  %273 = load i32, ptr %16, align 4, !tbaa !9
  %274 = load i32, ptr %15, align 4, !tbaa !9
  %275 = add i32 %274, %273
  store i32 %275, ptr %15, align 4, !tbaa !9
  %276 = load i32, ptr %15, align 4, !tbaa !9
  %277 = load ptr, ptr %7, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.w2c_hermes, ptr %277, i32 0, i32 3
  store i32 %276, ptr %278, align 8, !tbaa !11
  br label %333

279:                                              ; preds = %173
  store i32 0, ptr %15, align 4, !tbaa !9
  %280 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %280, ptr %13, align 4, !tbaa !9
  store i32 169099, ptr %16, align 4, !tbaa !9
  %281 = load i32, ptr %16, align 4, !tbaa !9
  %282 = load i32, ptr %15, align 4, !tbaa !9
  %283 = add i32 %282, %281
  store i32 %283, ptr %15, align 4, !tbaa !9
  %284 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %284, ptr %16, align 4, !tbaa !9
  store i32 60063, ptr %17, align 4, !tbaa !9
  %285 = load i32, ptr %17, align 4, !tbaa !9
  %286 = load i32, ptr %16, align 4, !tbaa !9
  %287 = add i32 %286, %285
  store i32 %287, ptr %16, align 4, !tbaa !9
  store i32 37, ptr %17, align 4, !tbaa !9
  %288 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %288, ptr %18, align 4, !tbaa !9
  store i32 41009, ptr %19, align 4, !tbaa !9
  %289 = load i32, ptr %19, align 4, !tbaa !9
  %290 = load i32, ptr %18, align 4, !tbaa !9
  %291 = add i32 %290, %289
  store i32 %291, ptr %18, align 4, !tbaa !9
  %292 = load ptr, ptr %7, align 8, !tbaa !5
  %293 = load i32, ptr %15, align 4, !tbaa !9
  %294 = load i32, ptr %16, align 4, !tbaa !9
  %295 = load i32, ptr %17, align 4, !tbaa !9
  %296 = load i32, ptr %18, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %292, i32 noundef %293, i32 noundef %294, i32 noundef %295, i32 noundef %296)
  call void @wasm_rt_trap(i32 noundef 5) #7
  unreachable

297:                                              ; preds = %183
  store i32 0, ptr %15, align 4, !tbaa !9
  %298 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %298, ptr %13, align 4, !tbaa !9
  store i32 169052, ptr %16, align 4, !tbaa !9
  %299 = load i32, ptr %16, align 4, !tbaa !9
  %300 = load i32, ptr %15, align 4, !tbaa !9
  %301 = add i32 %300, %299
  store i32 %301, ptr %15, align 4, !tbaa !9
  %302 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %302, ptr %16, align 4, !tbaa !9
  store i32 60063, ptr %17, align 4, !tbaa !9
  %303 = load i32, ptr %17, align 4, !tbaa !9
  %304 = load i32, ptr %16, align 4, !tbaa !9
  %305 = add i32 %304, %303
  store i32 %305, ptr %16, align 4, !tbaa !9
  store i32 38, ptr %17, align 4, !tbaa !9
  %306 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %306, ptr %18, align 4, !tbaa !9
  store i32 41009, ptr %19, align 4, !tbaa !9
  %307 = load i32, ptr %19, align 4, !tbaa !9
  %308 = load i32, ptr %18, align 4, !tbaa !9
  %309 = add i32 %308, %307
  store i32 %309, ptr %18, align 4, !tbaa !9
  %310 = load ptr, ptr %7, align 8, !tbaa !5
  %311 = load i32, ptr %15, align 4, !tbaa !9
  %312 = load i32, ptr %16, align 4, !tbaa !9
  %313 = load i32, ptr %17, align 4, !tbaa !9
  %314 = load i32, ptr %18, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %310, i32 noundef %311, i32 noundef %312, i32 noundef %313, i32 noundef %314)
  call void @wasm_rt_trap(i32 noundef 5) #7
  unreachable

315:                                              ; preds = %192
  store i32 0, ptr %15, align 4, !tbaa !9
  %316 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %316, ptr %13, align 4, !tbaa !9
  store i32 109639, ptr %16, align 4, !tbaa !9
  %317 = load i32, ptr %16, align 4, !tbaa !9
  %318 = load i32, ptr %15, align 4, !tbaa !9
  %319 = add i32 %318, %317
  store i32 %319, ptr %15, align 4, !tbaa !9
  %320 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %320, ptr %16, align 4, !tbaa !9
  store i32 77564, ptr %17, align 4, !tbaa !9
  %321 = load i32, ptr %17, align 4, !tbaa !9
  %322 = load i32, ptr %16, align 4, !tbaa !9
  %323 = add i32 %322, %321
  store i32 %323, ptr %16, align 4, !tbaa !9
  store i32 179, ptr %17, align 4, !tbaa !9
  %324 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %324, ptr %18, align 4, !tbaa !9
  store i32 90402, ptr %19, align 4, !tbaa !9
  %325 = load i32, ptr %19, align 4, !tbaa !9
  %326 = load i32, ptr %18, align 4, !tbaa !9
  %327 = add i32 %326, %325
  store i32 %327, ptr %18, align 4, !tbaa !9
  %328 = load ptr, ptr %7, align 8, !tbaa !5
  %329 = load i32, ptr %15, align 4, !tbaa !9
  %330 = load i32, ptr %16, align 4, !tbaa !9
  %331 = load i32, ptr %17, align 4, !tbaa !9
  %332 = load i32, ptr %18, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %328, i32 noundef %329, i32 noundef %330, i32 noundef %331, i32 noundef %332)
  call void @wasm_rt_trap(i32 noundef 5) #7
  unreachable

333:                                              ; preds = %265
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, 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
  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_t4 = external local_unnamed_addr constant ptr, align 8

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @w2c_hermes_hermes0x3A0x3Avm0x3A0x3A0x28anonymous0x20namespace0x290x3A0x3A_less0x28hermes0x3A0x3Avm0x3A0x3ASortModel0x2A0x2C0x20std0x3A0x3A_0x5F20x3A0x3Avector0x3Cunsigned0x20int0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cunsigned0x20int0x3E0x3E0x20const0x260x2C0x20unsigned0x20int0x2C0x20unsigned0x20int0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #3 {
  %7 = getelementptr inbounds i8, ptr %0, i64 24
  %8 = load i32, ptr %7, align 8, !tbaa !5
  %9 = add i32 %8, -16
  store i32 %9, ptr %7, align 8, !tbaa !5
  %10 = add i32 %8, -8
  %11 = getelementptr inbounds i8, ptr %0, i64 40
  %12 = zext i32 %2 to i64
  %13 = tail call i32 @i32_load(ptr noundef nonnull %11, i64 noundef %12)
  %14 = zext i32 %13 to i64
  %15 = add nuw nsw i64 %14, 4
  %16 = tail call i32 @i32_load(ptr noundef nonnull %11, i64 noundef %15)
  %17 = getelementptr inbounds i8, ptr %0, i64 80
  %18 = getelementptr inbounds i8, ptr %0, i64 92
  %19 = load i32, ptr %18, align 4, !tbaa !15
  %20 = icmp ult i32 %16, %19
  br i1 %20, label %21, label %.critedge, !prof !16

21:                                               ; preds = %6
  %22 = load ptr, ptr %17, align 8, !tbaa !17
  %23 = zext i32 %16 to i64
  %24 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %22, i64 %23
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !18
  %.not = icmp eq ptr %26, null
  br i1 %.not, label %.critedge, label %27, !prof !20

27:                                               ; preds = %21
  %28 = load ptr, ptr @w2c_hermes_t4, align 8, !tbaa !21
  %29 = load ptr, ptr %24, align 8, !tbaa !22
  %30 = tail call zeroext i1 @func_types_eq(ptr noundef %28, ptr noundef %29)
  br i1 %30, label %31, label %.critedge, !prof !16

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

31:                                               ; preds = %27
  %32 = load ptr, ptr %17, align 8, !tbaa !17
  %33 = getelementptr inbounds %struct.wasm_rt_funcref_t, ptr %32, i64 %23
  %34 = getelementptr inbounds i8, ptr %33, i64 8
  %35 = load ptr, ptr %34, align 8, !tbaa !18
  %36 = getelementptr inbounds i8, ptr %33, i64 16
  %37 = load ptr, ptr %36, align 8, !tbaa !23
  tail call void %35(ptr noundef %37, i32 noundef %10, i32 noundef %2, i32 noundef %4, i32 noundef %5) #5
  %38 = zext i32 %9 to i64
  %39 = add nuw nsw i64 %38, 8
  %40 = tail call i32 @i32_load(ptr noundef nonnull %11, i64 noundef %39)
  %.not161 = icmp eq i32 %40, 0
  br i1 %.not161, label %41, label %46

41:                                               ; preds = %31
  %42 = zext i32 %1 to i64
  %43 = add nuw nsw i64 %42, 1
  %44 = tail call i32 @i32_load8_u(ptr noundef nonnull %11, i64 noundef %43)
  %45 = shl i32 %44, 8
  br label %77

46:                                               ; preds = %31
  %47 = zext i32 %3 to i64
  %48 = add nuw nsw i64 %47, 4
  %49 = tail call i32 @i32_load(ptr noundef nonnull %11, i64 noundef %48)
  %50 = tail call i32 @i32_load(ptr noundef nonnull %11, i64 noundef %47)
  %51 = sub i32 %49, %50
  %52 = ashr i32 %51, 2
  %.not162 = icmp ugt i32 %52, %4
  br i1 %.not162, label %53, label %78

53:                                               ; preds = %46
  %.not163 = icmp ugt i32 %52, %5
  br i1 %.not163, label %54, label %79

54:                                               ; preds = %53
  %.not164 = icmp eq i32 %40, 1
  br i1 %.not164, label %55, label %80

55:                                               ; preds = %54
  %56 = zext i32 %1 to i64
  %57 = tail call i32 @i32_load16_u(ptr noundef nonnull %11, i64 noundef %56)
  %58 = and i32 %57, -512
  %59 = add nuw nsw i64 %38, 12
  %60 = tail call i32 @i32_load(ptr noundef nonnull %11, i64 noundef %59)
  %.not165 = icmp eq i32 %60, 0
  br i1 %.not165, label %63, label %61

61:                                               ; preds = %55
  %62 = lshr i32 %60, 31
  br label %74

63:                                               ; preds = %55
  %64 = shl i32 %4, 2
  %65 = add i32 %50, %64
  %66 = zext i32 %65 to i64
  %67 = tail call i32 @i32_load(ptr noundef nonnull %11, i64 noundef %66)
  %68 = shl i32 %5, 2
  %69 = add i32 %50, %68
  %70 = zext i32 %69 to i64
  %71 = tail call i32 @i32_load(ptr noundef nonnull %11, i64 noundef %70)
  %72 = icmp ult i32 %67, %71
  %73 = zext i1 %72 to i32
  br label %74

74:                                               ; preds = %63, %61
  %.0 = phi i32 [ %62, %61 ], [ %73, %63 ]
  %.not166 = icmp eq i32 %.0, 0
  %75 = select i1 %.not166, i32 1, i32 257
  %76 = or disjoint i32 %75, %58
  br label %77

77:                                               ; preds = %74, %41
  %.pre-phi = phi i64 [ %56, %74 ], [ %42, %41 ]
  %.0155 = phi i32 [ %76, %74 ], [ %45, %41 ]
  tail call void @i32_store16(ptr noundef nonnull %11, i64 noundef %.pre-phi, i32 noundef %.0155)
  store i32 %8, ptr %7, align 8, !tbaa !5
  ret void

78:                                               ; preds = %46
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef nonnull %0, i32 noundef 169099, i32 noundef 60063, i32 noundef 37, i32 noundef 41009) #5
  tail call void @wasm_rt_trap(i32 noundef 5) #4
  unreachable

79:                                               ; preds = %53
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef nonnull %0, i32 noundef 169052, i32 noundef 60063, i32 noundef 38, i32 noundef 41009) #5
  tail call void @wasm_rt_trap(i32 noundef 5) #4
  unreachable

80:                                               ; preds = %54
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef nonnull %0, i32 noundef 109639, i32 noundef 77564, i32 noundef 179, i32 noundef 90402) #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 = !{!7, !7, i64 0}
!22 = !{!19, !7, i64 0}
!23 = !{!19, !7, i64 16}


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