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

; 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 }

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

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

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

declare void @w2c_hermes_abort(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @w2c_hermes_std0x3A0x3A_0x5Fthrow_bad_array_new_length0x5Babi0x3Av150070x5D0x280x29(ptr noundef) #4

declare i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef, i32 noundef) #3

declare i32 @w2c_hermes_memmove(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #3

declare void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef, i32 noundef) #3

; 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: nounwind uwtable
define dso_local i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Aback_insert_iterator0x3Cstd0x3A0x3A_0x5F20x3A0x3Avector0x3Cchar16_t0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar16_t0x3E0x3E0x3E0x3A0x3Aoperator0x3D0x5Babi0x3Av150070x5D0x28char16_t0x260x260x29(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
  %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) #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
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %18 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %18, ptr %13, align 4, !tbaa !9
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.w2c_hermes, ptr %19, i32 0, i32 6
  %21 = load i32, ptr %13, align 4, !tbaa !9
  %22 = zext i32 %21 to i64
  %23 = call i32 @i32_load(ptr noundef %20, i64 noundef %22)
  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 ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.w2c_hermes, ptr %25, i32 0, i32 6
  %27 = load i32, ptr %13, align 4, !tbaa !9
  %28 = zext i32 %27 to i64
  %29 = add i64 %28, 4
  %30 = call i32 @i32_load(ptr noundef %26, i64 noundef %29)
  store i32 %30, ptr %13, align 4, !tbaa !9
  %31 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %31, ptr %7, align 4, !tbaa !9
  %32 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %32, ptr %14, 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 %14, 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 %14, align 4, !tbaa !9
  %39 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %39, ptr %9, align 4, !tbaa !9
  %40 = load i32, ptr %13, align 4, !tbaa !9
  %41 = load i32, ptr %14, align 4, !tbaa !9
  %42 = icmp ult i32 %40, %41
  %43 = zext i1 %42 to i32
  store i32 %43, ptr %13, align 4, !tbaa !9
  %44 = load i32, ptr %13, align 4, !tbaa !9
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %71

46:                                               ; preds = %3
  %47 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %47, ptr %13, align 4, !tbaa !9
  %48 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %48, ptr %14, 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 %14, align 4, !tbaa !9
  %52 = zext i32 %51 to i64
  %53 = call i32 @i32_load16_u(ptr noundef %50, i64 noundef %52)
  store i32 %53, ptr %14, align 4, !tbaa !9
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.w2c_hermes, ptr %54, i32 0, i32 6
  %56 = load i32, ptr %13, align 4, !tbaa !9
  %57 = zext i32 %56 to i64
  %58 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store16(ptr noundef %55, i64 noundef %57, i32 noundef %58)
  %59 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %59, ptr %13, align 4, !tbaa !9
  %60 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %60, ptr %14, align 4, !tbaa !9
  store i32 2, ptr %15, align 4, !tbaa !9
  %61 = load i32, ptr %15, align 4, !tbaa !9
  %62 = load i32, ptr %14, align 4, !tbaa !9
  %63 = add i32 %62, %61
  store i32 %63, ptr %14, align 4, !tbaa !9
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.w2c_hermes, ptr %64, i32 0, i32 6
  %66 = load i32, ptr %13, align 4, !tbaa !9
  %67 = zext i32 %66 to i64
  %68 = add i64 %67, 4
  %69 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %65, i64 noundef %68, i32 noundef %69)
  %70 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %70, ptr %13, align 4, !tbaa !9
  br label %234

71:                                               ; preds = %3
  %72 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %72, ptr %13, align 4, !tbaa !9
  %73 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %73, ptr %14, align 4, !tbaa !9
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.w2c_hermes, ptr %74, i32 0, i32 6
  %76 = load i32, ptr %14, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  %78 = call i32 @i32_load(ptr noundef %75, i64 noundef %77)
  store i32 %78, ptr %14, align 4, !tbaa !9
  %79 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %79, ptr %10, align 4, !tbaa !9
  %80 = load i32, ptr %14, align 4, !tbaa !9
  %81 = load i32, ptr %13, align 4, !tbaa !9
  %82 = sub i32 %81, %80
  store i32 %82, ptr %13, align 4, !tbaa !9
  %83 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %83, ptr %12, align 4, !tbaa !9
  store i32 -3, ptr %14, align 4, !tbaa !9
  %84 = load i32, ptr %13, align 4, !tbaa !9
  %85 = load i32, ptr %14, align 4, !tbaa !9
  %86 = icmp sgt i32 %84, %85
  %87 = zext i1 %86 to i32
  store i32 %87, ptr %13, align 4, !tbaa !9
  %88 = load i32, ptr %13, align 4, !tbaa !9
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %230

90:                                               ; preds = %71
  store i32 2147483647, ptr %13, align 4, !tbaa !9
  %91 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %91, ptr %14, align 4, !tbaa !9
  %92 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %92, ptr %15, align 4, !tbaa !9
  %93 = load i32, ptr %15, align 4, !tbaa !9
  %94 = load i32, ptr %14, align 4, !tbaa !9
  %95 = sub i32 %94, %93
  store i32 %95, ptr %14, align 4, !tbaa !9
  %96 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %96, ptr %7, align 4, !tbaa !9
  %97 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %97, ptr %15, align 4, !tbaa !9
  store i32 1, ptr %16, align 4, !tbaa !9
  %98 = load i32, ptr %15, align 4, !tbaa !9
  %99 = load i32, ptr %16, align 4, !tbaa !9
  %100 = and i32 %99, 31
  %101 = ashr i32 %98, %100
  store i32 %101, ptr %15, align 4, !tbaa !9
  %102 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %102, ptr %11, align 4, !tbaa !9
  store i32 1, ptr %16, align 4, !tbaa !9
  %103 = load i32, ptr %16, align 4, !tbaa !9
  %104 = load i32, ptr %15, align 4, !tbaa !9
  %105 = add i32 %104, %103
  store i32 %105, ptr %15, align 4, !tbaa !9
  %106 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %106, ptr %9, align 4, !tbaa !9
  %107 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %107, ptr %16, align 4, !tbaa !9
  %108 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %108, ptr %17, align 4, !tbaa !9
  %109 = load i32, ptr %16, align 4, !tbaa !9
  %110 = load i32, ptr %17, align 4, !tbaa !9
  %111 = icmp ugt i32 %109, %110
  %112 = zext i1 %111 to i32
  store i32 %112, ptr %16, align 4, !tbaa !9
  %113 = load i32, ptr %16, align 4, !tbaa !9
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %115, label %117

115:                                              ; preds = %90
  %116 = load i32, ptr %14, align 4, !tbaa !9
  br label %119

117:                                              ; preds = %90
  %118 = load i32, ptr %15, align 4, !tbaa !9
  br label %119

119:                                              ; preds = %117, %115
  %120 = phi i32 [ %116, %115 ], [ %118, %117 ]
  store i32 %120, ptr %14, align 4, !tbaa !9
  %121 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %121, ptr %15, align 4, !tbaa !9
  store i32 2147483646, ptr %16, align 4, !tbaa !9
  %122 = load i32, ptr %15, align 4, !tbaa !9
  %123 = load i32, ptr %16, align 4, !tbaa !9
  %124 = icmp uge i32 %122, %123
  %125 = zext i1 %124 to i32
  store i32 %125, ptr %15, align 4, !tbaa !9
  %126 = load i32, ptr %15, align 4, !tbaa !9
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %128, label %130

128:                                              ; preds = %119
  %129 = load i32, ptr %13, align 4, !tbaa !9
  br label %132

130:                                              ; preds = %119
  %131 = load i32, ptr %14, align 4, !tbaa !9
  br label %132

132:                                              ; preds = %130, %128
  %133 = phi i32 [ %129, %128 ], [ %131, %130 ]
  store i32 %133, ptr %13, align 4, !tbaa !9
  %134 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %134, ptr %7, align 4, !tbaa !9
  %135 = load i32, ptr %13, align 4, !tbaa !9
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %137, label %155

137:                                              ; preds = %132
  %138 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %138, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  %139 = load i32, ptr %13, align 4, !tbaa !9
  %140 = load i32, ptr %14, align 4, !tbaa !9
  %141 = icmp slt i32 %139, %140
  %142 = zext i1 %141 to i32
  store i32 %142, ptr %13, align 4, !tbaa !9
  %143 = load i32, ptr %13, align 4, !tbaa !9
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %145, label %146

145:                                              ; preds = %137
  br label %232

146:                                              ; preds = %137
  %147 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %147, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %148 = load i32, ptr %14, align 4, !tbaa !9
  %149 = and i32 %148, 31
  %150 = load i32, ptr %13, align 4, !tbaa !9
  %151 = shl i32 %150, %149
  store i32 %151, ptr %13, align 4, !tbaa !9
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = load i32, ptr %13, align 4, !tbaa !9
  %154 = call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %152, i32 noundef %153)
  store i32 %154, ptr %13, align 4, !tbaa !9
  br label %156

155:                                              ; preds = %132
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %156

156:                                              ; preds = %155, %146
  %157 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %157, ptr %9, align 4, !tbaa !9
  %158 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %158, ptr %13, align 4, !tbaa !9
  %159 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %159, ptr %14, align 4, !tbaa !9
  store i32 1, ptr %15, align 4, !tbaa !9
  %160 = load i32, ptr %15, align 4, !tbaa !9
  %161 = and i32 %160, 31
  %162 = load i32, ptr %14, align 4, !tbaa !9
  %163 = shl i32 %162, %161
  store i32 %163, ptr %14, align 4, !tbaa !9
  %164 = load i32, ptr %14, align 4, !tbaa !9
  %165 = load i32, ptr %13, align 4, !tbaa !9
  %166 = add i32 %165, %164
  store i32 %166, ptr %13, align 4, !tbaa !9
  %167 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %167, ptr %11, align 4, !tbaa !9
  %168 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %168, ptr %14, align 4, !tbaa !9
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.w2c_hermes, ptr %169, i32 0, i32 6
  %171 = load i32, ptr %14, align 4, !tbaa !9
  %172 = zext i32 %171 to i64
  %173 = call i32 @i32_load16_u(ptr noundef %170, i64 noundef %172)
  store i32 %173, ptr %14, 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 %13, align 4, !tbaa !9
  %177 = zext i32 %176 to i64
  %178 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store16(ptr noundef %175, i64 noundef %177, i32 noundef %178)
  %179 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %179, ptr %13, align 4, !tbaa !9
  %180 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %180, ptr %14, align 4, !tbaa !9
  %181 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %181, ptr %15, align 4, !tbaa !9
  %182 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %182, ptr %16, align 4, !tbaa !9
  %183 = load ptr, ptr %4, align 8, !tbaa !5
  %184 = load i32, ptr %14, align 4, !tbaa !9
  %185 = load i32, ptr %15, align 4, !tbaa !9
  %186 = load i32, ptr %16, align 4, !tbaa !9
  %187 = call i32 @w2c_hermes_memmove(ptr noundef %183, i32 noundef %184, i32 noundef %185, i32 noundef %186)
  store i32 %187, ptr %14, align 4, !tbaa !9
  %188 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %188, ptr %6, align 4, !tbaa !9
  %189 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %189, ptr %15, align 4, !tbaa !9
  store i32 1, ptr %16, align 4, !tbaa !9
  %190 = load i32, ptr %16, align 4, !tbaa !9
  %191 = and i32 %190, 31
  %192 = load i32, ptr %15, align 4, !tbaa !9
  %193 = shl i32 %192, %191
  store i32 %193, ptr %15, align 4, !tbaa !9
  %194 = load i32, ptr %15, align 4, !tbaa !9
  %195 = load i32, ptr %14, align 4, !tbaa !9
  %196 = add i32 %195, %194
  store i32 %196, ptr %14, align 4, !tbaa !9
  %197 = load ptr, ptr %4, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.w2c_hermes, ptr %197, i32 0, i32 6
  %199 = load i32, ptr %13, align 4, !tbaa !9
  %200 = zext i32 %199 to i64
  %201 = add i64 %200, 8
  %202 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %198, i64 noundef %201, i32 noundef %202)
  %203 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %203, ptr %13, align 4, !tbaa !9
  %204 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %204, ptr %14, align 4, !tbaa !9
  store i32 2, ptr %15, align 4, !tbaa !9
  %205 = load i32, ptr %15, align 4, !tbaa !9
  %206 = load i32, ptr %14, align 4, !tbaa !9
  %207 = add i32 %206, %205
  store i32 %207, ptr %14, align 4, !tbaa !9
  %208 = load ptr, ptr %4, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.w2c_hermes, ptr %208, i32 0, i32 6
  %210 = load i32, ptr %13, align 4, !tbaa !9
  %211 = zext i32 %210 to i64
  %212 = add i64 %211, 4
  %213 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %209, i64 noundef %212, i32 noundef %213)
  %214 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %214, ptr %13, align 4, !tbaa !9
  %215 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %215, ptr %14, align 4, !tbaa !9
  %216 = load ptr, ptr %4, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.w2c_hermes, ptr %216, i32 0, i32 6
  %218 = load i32, ptr %13, align 4, !tbaa !9
  %219 = zext i32 %218 to i64
  %220 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %217, i64 noundef %219, i32 noundef %220)
  %221 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %221, ptr %13, align 4, !tbaa !9
  %222 = load i32, ptr %13, align 4, !tbaa !9
  %223 = icmp ne i32 %222, 0
  br i1 %223, label %224, label %228

224:                                              ; preds = %156
  %225 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %225, ptr %13, align 4, !tbaa !9
  %226 = load ptr, ptr %4, align 8, !tbaa !5
  %227 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %226, i32 noundef %227)
  br label %228

228:                                              ; preds = %224, %156
  %229 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %229, ptr %13, align 4, !tbaa !9
  br label %234

230:                                              ; preds = %71
  %231 = load ptr, ptr %4, align 8, !tbaa !5
  call void @w2c_hermes_abort(ptr noundef %231)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

232:                                              ; preds = %145
  %233 = load ptr, ptr %4, align 8, !tbaa !5
  call void @w2c_hermes_std0x3A0x3A_0x5Fthrow_bad_array_new_length0x5Babi0x3Av150070x5D0x280x29(ptr noundef %233)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

234:                                              ; preds = %228, %46
  %235 = load i32, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  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 %235
}

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 = { "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}


; 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"

; 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

declare void @w2c_hermes_abort(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @w2c_hermes_std0x3A0x3A_0x5Fthrow_bad_array_new_length0x5Babi0x3Av150070x5D0x280x29(ptr noundef) local_unnamed_addr #3

declare i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @w2c_hermes_memmove(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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

; 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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Aback_insert_iterator0x3Cstd0x3A0x3A_0x5F20x3A0x3Avector0x3Cchar16_t0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar16_t0x3E0x3E0x3E0x3A0x3Aoperator0x3D0x5Babi0x3Av150070x5D0x28char16_t0x260x260x29(ptr noundef %0, i32 noundef returned %1, i32 noundef %2) local_unnamed_addr #3 {
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %5 = zext i32 %1 to i64
  %6 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %5)
  %7 = zext i32 %6 to i64
  %8 = add nuw nsw i64 %7, 4
  %9 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %8)
  %10 = add nuw nsw i64 %7, 8
  %11 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %10)
  %12 = icmp ult i32 %9, %11
  br i1 %12, label %13, label %18

13:                                               ; preds = %3
  %14 = zext i32 %2 to i64
  %15 = tail call i32 @i32_load16_u(ptr noundef nonnull %4, i64 noundef %14)
  %16 = zext i32 %9 to i64
  tail call void @i32_store16(ptr noundef nonnull %4, i64 noundef %16, i32 noundef %15)
  %17 = add i32 %9, 2
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %8, i32 noundef %17)
  br label %45

18:                                               ; preds = %3
  %19 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %7)
  %20 = sub i32 %9, %19
  %21 = icmp sgt i32 %20, -3
  br i1 %21, label %22, label %43

22:                                               ; preds = %18
  %23 = sub i32 %11, %19
  %24 = ashr i32 %20, 1
  %25 = add nsw i32 %24, 1
  %26 = tail call i32 @llvm.umax.i32(i32 %23, i32 %25)
  %27 = icmp ugt i32 %23, 2147483645
  %28 = select i1 %27, i32 2147483647, i32 %26
  %.not = icmp eq i32 %28, 0
  br i1 %.not, label %._crit_edge, label %29

29:                                               ; preds = %22
  %30 = icmp slt i32 %28, 0
  br i1 %30, label %44, label %31

31:                                               ; preds = %29
  %32 = shl nuw i32 %28, 1
  %33 = tail call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %0, i32 noundef %32) #5
  br label %._crit_edge

._crit_edge:                                      ; preds = %22, %31
  %.pre-phi = phi i32 [ %32, %31 ], [ 0, %22 ]
  %.0 = phi i32 [ %33, %31 ], [ 0, %22 ]
  %34 = and i32 %20, -2
  %35 = add i32 %.0, %34
  %36 = zext i32 %2 to i64
  %37 = tail call i32 @i32_load16_u(ptr noundef nonnull %4, i64 noundef %36)
  %38 = zext i32 %35 to i64
  tail call void @i32_store16(ptr noundef nonnull %4, i64 noundef %38, i32 noundef %37)
  %39 = tail call i32 @w2c_hermes_memmove(ptr noundef %0, i32 noundef %.0, i32 noundef %19, i32 noundef %20) #5
  %40 = add i32 %39, %.pre-phi
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %10, i32 noundef %40)
  %41 = add i32 %35, 2
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %8, i32 noundef %41)
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %7, i32 noundef %39)
  %.not132 = icmp eq i32 %19, 0
  br i1 %.not132, label %45, label %42

42:                                               ; preds = %._crit_edge
  tail call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %0, i32 noundef %19) #5
  br label %45

43:                                               ; preds = %18
  tail call void @w2c_hermes_abort(ptr noundef %0) #5
  tail call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

44:                                               ; preds = %29
  tail call void @w2c_hermes_std0x3A0x3A_0x5Fthrow_bad_array_new_length0x5Babi0x3Av150070x5D0x280x29(ptr noundef %0)
  tail call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

45:                                               ; preds = %._crit_edge, %42, %13
  ret i32 %1
}

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

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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)"}


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