; 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 i32 @w2c_hermes_0x5F_memset(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #3

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: nounwind uwtable
define dso_local void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Avector0x3Cchar16_t0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar16_t0x3E0x3E0x3A0x3A_0x5Fappend0x28unsigned0x20long0x29(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 %6, align 4, !tbaa !9
  store i32 %18, ptr %13, align 4, !tbaa !9
  %19 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %19, ptr %14, align 4, !tbaa !9
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.w2c_hermes, ptr %20, i32 0, i32 6
  %22 = load i32, ptr %14, align 4, !tbaa !9
  %23 = zext i32 %22 to i64
  %24 = add i64 %23, 8
  %25 = call i32 @i32_load(ptr noundef %21, i64 noundef %24)
  store i32 %25, ptr %14, align 4, !tbaa !9
  %26 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %26, ptr %8, align 4, !tbaa !9
  %27 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %27, ptr %15, align 4, !tbaa !9
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.w2c_hermes, ptr %28, i32 0, i32 6
  %30 = load i32, ptr %15, align 4, !tbaa !9
  %31 = zext i32 %30 to i64
  %32 = add i64 %31, 4
  %33 = call i32 @i32_load(ptr noundef %29, i64 noundef %32)
  store i32 %33, ptr %15, align 4, !tbaa !9
  %34 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %34, ptr %7, align 4, !tbaa !9
  %35 = load i32, ptr %15, align 4, !tbaa !9
  %36 = load i32, ptr %14, align 4, !tbaa !9
  %37 = sub i32 %36, %35
  store i32 %37, ptr %14, align 4, !tbaa !9
  store i32 1, ptr %15, align 4, !tbaa !9
  %38 = load i32, ptr %14, align 4, !tbaa !9
  %39 = load i32, ptr %15, align 4, !tbaa !9
  %40 = and i32 %39, 31
  %41 = ashr i32 %38, %40
  store i32 %41, ptr %14, align 4, !tbaa !9
  %42 = load i32, ptr %13, align 4, !tbaa !9
  %43 = load i32, ptr %14, align 4, !tbaa !9
  %44 = icmp ule i32 %42, %43
  %45 = zext i1 %44 to i32
  store i32 %45, ptr %13, align 4, !tbaa !9
  %46 = load i32, ptr %13, align 4, !tbaa !9
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %48, label %79

48:                                               ; preds = %3
  %49 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %49, ptr %13, align 4, !tbaa !9
  %50 = load i32, ptr %13, align 4, !tbaa !9
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %70

52:                                               ; preds = %48
  %53 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %53, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  %54 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %54, ptr %15, align 4, !tbaa !9
  store i32 1, ptr %16, align 4, !tbaa !9
  %55 = load i32, ptr %16, align 4, !tbaa !9
  %56 = and i32 %55, 31
  %57 = load i32, ptr %15, align 4, !tbaa !9
  %58 = shl i32 %57, %56
  store i32 %58, ptr %15, align 4, !tbaa !9
  %59 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %59, ptr %6, align 4, !tbaa !9
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = load i32, ptr %13, align 4, !tbaa !9
  %62 = load i32, ptr %14, align 4, !tbaa !9
  %63 = load i32, ptr %15, align 4, !tbaa !9
  %64 = call i32 @w2c_hermes_0x5F_memset(ptr noundef %60, i32 noundef %61, i32 noundef %62, i32 noundef %63)
  store i32 %64, ptr %13, align 4, !tbaa !9
  %65 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %65, ptr %14, align 4, !tbaa !9
  %66 = load i32, ptr %14, align 4, !tbaa !9
  %67 = load i32, ptr %13, align 4, !tbaa !9
  %68 = add i32 %67, %66
  store i32 %68, ptr %13, align 4, !tbaa !9
  %69 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %69, ptr %7, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %52, %48
  %71 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %71, ptr %13, align 4, !tbaa !9
  %72 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %72, ptr %14, align 4, !tbaa !9
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.w2c_hermes, ptr %73, i32 0, i32 6
  %75 = load i32, ptr %13, align 4, !tbaa !9
  %76 = zext i32 %75 to i64
  %77 = add i64 %76, 4
  %78 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %74, i64 noundef %77, i32 noundef %78)
  br label %243

79:                                               ; preds = %3
  %80 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %80, ptr %13, align 4, !tbaa !9
  %81 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %81, ptr %14, align 4, !tbaa !9
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.w2c_hermes, ptr %82, i32 0, i32 6
  %84 = load i32, ptr %14, align 4, !tbaa !9
  %85 = zext i32 %84 to i64
  %86 = call i32 @i32_load(ptr noundef %83, i64 noundef %85)
  store i32 %86, ptr %14, align 4, !tbaa !9
  %87 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %87, ptr %9, align 4, !tbaa !9
  %88 = load i32, ptr %14, align 4, !tbaa !9
  %89 = load i32, ptr %13, align 4, !tbaa !9
  %90 = sub i32 %89, %88
  store i32 %90, ptr %13, align 4, !tbaa !9
  %91 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %91, ptr %11, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %92 = load i32, ptr %13, align 4, !tbaa !9
  %93 = load i32, ptr %14, align 4, !tbaa !9
  %94 = and i32 %93, 31
  %95 = ashr i32 %92, %94
  store i32 %95, ptr %13, align 4, !tbaa !9
  %96 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %96, ptr %12, align 4, !tbaa !9
  %97 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %97, ptr %14, align 4, !tbaa !9
  %98 = load i32, ptr %14, align 4, !tbaa !9
  %99 = load i32, ptr %13, align 4, !tbaa !9
  %100 = add i32 %99, %98
  store i32 %100, ptr %13, align 4, !tbaa !9
  %101 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %101, ptr %10, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  %102 = load i32, ptr %13, align 4, !tbaa !9
  %103 = load i32, ptr %14, align 4, !tbaa !9
  %104 = icmp sge i32 %102, %103
  %105 = zext i1 %104 to i32
  store i32 %105, ptr %13, align 4, !tbaa !9
  %106 = load i32, ptr %13, align 4, !tbaa !9
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %239

108:                                              ; preds = %79
  store i32 0, ptr %13, align 4, !tbaa !9
  %109 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %109, ptr %7, align 4, !tbaa !9
  store i32 2147483647, ptr %13, align 4, !tbaa !9
  %110 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %110, ptr %14, align 4, !tbaa !9
  %111 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %111, ptr %15, align 4, !tbaa !9
  %112 = load i32, ptr %15, align 4, !tbaa !9
  %113 = load i32, ptr %14, align 4, !tbaa !9
  %114 = sub i32 %113, %112
  store i32 %114, ptr %14, align 4, !tbaa !9
  %115 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %115, ptr %8, align 4, !tbaa !9
  %116 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %116, ptr %15, align 4, !tbaa !9
  %117 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %117, ptr %16, align 4, !tbaa !9
  %118 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %118, ptr %17, align 4, !tbaa !9
  %119 = load i32, ptr %16, align 4, !tbaa !9
  %120 = load i32, ptr %17, align 4, !tbaa !9
  %121 = icmp ugt i32 %119, %120
  %122 = zext i1 %121 to i32
  store i32 %122, ptr %16, align 4, !tbaa !9
  %123 = load i32, ptr %16, align 4, !tbaa !9
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %125, label %127

125:                                              ; preds = %108
  %126 = load i32, ptr %14, align 4, !tbaa !9
  br label %129

127:                                              ; preds = %108
  %128 = load i32, ptr %15, align 4, !tbaa !9
  br label %129

129:                                              ; preds = %127, %125
  %130 = phi i32 [ %126, %125 ], [ %128, %127 ]
  store i32 %130, ptr %14, align 4, !tbaa !9
  %131 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %131, ptr %15, align 4, !tbaa !9
  store i32 2147483646, ptr %16, align 4, !tbaa !9
  %132 = load i32, ptr %15, align 4, !tbaa !9
  %133 = load i32, ptr %16, align 4, !tbaa !9
  %134 = icmp uge i32 %132, %133
  %135 = zext i1 %134 to i32
  store i32 %135, ptr %15, align 4, !tbaa !9
  %136 = load i32, ptr %15, align 4, !tbaa !9
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %138, label %140

138:                                              ; preds = %129
  %139 = load i32, ptr %13, align 4, !tbaa !9
  br label %142

140:                                              ; preds = %129
  %141 = load i32, ptr %14, align 4, !tbaa !9
  br label %142

142:                                              ; preds = %140, %138
  %143 = phi i32 [ %139, %138 ], [ %141, %140 ]
  store i32 %143, ptr %13, align 4, !tbaa !9
  %144 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %144, ptr %8, align 4, !tbaa !9
  %145 = load i32, ptr %13, align 4, !tbaa !9
  %146 = icmp ne i32 %145, 0
  br i1 %146, label %147, label %166

147:                                              ; preds = %142
  %148 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %148, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  %149 = load i32, ptr %13, align 4, !tbaa !9
  %150 = load i32, ptr %14, align 4, !tbaa !9
  %151 = icmp slt i32 %149, %150
  %152 = zext i1 %151 to i32
  store i32 %152, ptr %13, align 4, !tbaa !9
  %153 = load i32, ptr %13, align 4, !tbaa !9
  %154 = icmp ne i32 %153, 0
  br i1 %154, label %155, label %156

155:                                              ; preds = %147
  br label %241

156:                                              ; preds = %147
  %157 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %157, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %158 = load i32, ptr %14, align 4, !tbaa !9
  %159 = and i32 %158, 31
  %160 = load i32, ptr %13, align 4, !tbaa !9
  %161 = shl i32 %160, %159
  store i32 %161, ptr %13, align 4, !tbaa !9
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = load i32, ptr %13, align 4, !tbaa !9
  %164 = call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %162, i32 noundef %163)
  store i32 %164, ptr %13, align 4, !tbaa !9
  %165 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %165, ptr %7, align 4, !tbaa !9
  br label %166

166:                                              ; preds = %156, %142
  %167 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %167, ptr %13, align 4, !tbaa !9
  %168 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %168, ptr %14, align 4, !tbaa !9
  store i32 1, ptr %15, align 4, !tbaa !9
  %169 = load i32, ptr %15, align 4, !tbaa !9
  %170 = and i32 %169, 31
  %171 = load i32, ptr %14, align 4, !tbaa !9
  %172 = shl i32 %171, %170
  store i32 %172, ptr %14, align 4, !tbaa !9
  %173 = load i32, ptr %14, align 4, !tbaa !9
  %174 = load i32, ptr %13, align 4, !tbaa !9
  %175 = add i32 %174, %173
  store i32 %175, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  %176 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %176, ptr %15, align 4, !tbaa !9
  store i32 1, ptr %16, align 4, !tbaa !9
  %177 = load i32, ptr %16, align 4, !tbaa !9
  %178 = and i32 %177, 31
  %179 = load i32, ptr %15, align 4, !tbaa !9
  %180 = shl i32 %179, %178
  store i32 %180, ptr %15, align 4, !tbaa !9
  %181 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %181, ptr %6, align 4, !tbaa !9
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = load i32, ptr %13, align 4, !tbaa !9
  %184 = load i32, ptr %14, align 4, !tbaa !9
  %185 = load i32, ptr %15, align 4, !tbaa !9
  %186 = call i32 @w2c_hermes_0x5F_memset(ptr noundef %182, i32 noundef %183, i32 noundef %184, i32 noundef %185)
  store i32 %186, ptr %13, align 4, !tbaa !9
  %187 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %187, ptr %10, align 4, !tbaa !9
  %188 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %188, ptr %13, align 4, !tbaa !9
  %189 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %189, ptr %14, align 4, !tbaa !9
  %190 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %190, ptr %15, align 4, !tbaa !9
  %191 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %191, ptr %16, align 4, !tbaa !9
  %192 = load ptr, ptr %4, align 8, !tbaa !5
  %193 = load i32, ptr %14, align 4, !tbaa !9
  %194 = load i32, ptr %15, align 4, !tbaa !9
  %195 = load i32, ptr %16, align 4, !tbaa !9
  %196 = call i32 @w2c_hermes_memmove(ptr noundef %192, i32 noundef %193, i32 noundef %194, i32 noundef %195)
  store i32 %196, ptr %14, align 4, !tbaa !9
  %197 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %197, ptr %7, align 4, !tbaa !9
  %198 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %198, ptr %15, align 4, !tbaa !9
  store i32 1, ptr %16, align 4, !tbaa !9
  %199 = load i32, ptr %16, align 4, !tbaa !9
  %200 = and i32 %199, 31
  %201 = load i32, ptr %15, align 4, !tbaa !9
  %202 = shl i32 %201, %200
  store i32 %202, ptr %15, align 4, !tbaa !9
  %203 = load i32, ptr %15, align 4, !tbaa !9
  %204 = load i32, ptr %14, align 4, !tbaa !9
  %205 = add i32 %204, %203
  store i32 %205, ptr %14, align 4, !tbaa !9
  %206 = load ptr, ptr %4, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.w2c_hermes, ptr %206, i32 0, i32 6
  %208 = load i32, ptr %13, align 4, !tbaa !9
  %209 = zext i32 %208 to i64
  %210 = add i64 %209, 8
  %211 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %207, i64 noundef %210, i32 noundef %211)
  %212 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %212, ptr %13, align 4, !tbaa !9
  %213 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %213, ptr %14, align 4, !tbaa !9
  %214 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %214, ptr %15, align 4, !tbaa !9
  %215 = load i32, ptr %15, align 4, !tbaa !9
  %216 = load i32, ptr %14, align 4, !tbaa !9
  %217 = add i32 %216, %215
  store i32 %217, ptr %14, align 4, !tbaa !9
  %218 = load ptr, ptr %4, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.w2c_hermes, ptr %218, i32 0, i32 6
  %220 = load i32, ptr %13, align 4, !tbaa !9
  %221 = zext i32 %220 to i64
  %222 = add i64 %221, 4
  %223 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %219, i64 noundef %222, i32 noundef %223)
  %224 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %224, ptr %13, align 4, !tbaa !9
  %225 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %225, ptr %14, align 4, !tbaa !9
  %226 = load ptr, ptr %4, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.w2c_hermes, ptr %226, i32 0, i32 6
  %228 = load i32, ptr %13, align 4, !tbaa !9
  %229 = zext i32 %228 to i64
  %230 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %227, i64 noundef %229, i32 noundef %230)
  %231 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %231, ptr %13, align 4, !tbaa !9
  %232 = load i32, ptr %13, align 4, !tbaa !9
  %233 = icmp ne i32 %232, 0
  br i1 %233, label %234, label %238

234:                                              ; preds = %166
  %235 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %235, ptr %13, align 4, !tbaa !9
  %236 = load ptr, ptr %4, align 8, !tbaa !5
  %237 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %236, i32 noundef %237)
  br label %238

238:                                              ; preds = %234, %166
  br label %243

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

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

243:                                              ; preds = %238, %70
  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 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 = { "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 i32 @w2c_hermes_0x5F_memset(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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: nounwind uwtable
define dso_local void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Avector0x3Cchar16_t0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar16_t0x3E0x3E0x3A0x3A_0x5Fappend0x28unsigned0x20long0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #3 {
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  %5 = zext i32 %1 to i64
  %6 = add nuw nsw i64 %5, 8
  %7 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %6)
  %8 = add nuw nsw i64 %5, 4
  %9 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %8)
  %10 = sub i32 %7, %9
  %11 = ashr i32 %10, 1
  %.not = icmp ult i32 %11, %2
  br i1 %.not, label %18, label %12

12:                                               ; preds = %3
  %.not143 = icmp eq i32 %2, 0
  br i1 %.not143, label %17, label %13

13:                                               ; preds = %12
  %14 = shl i32 %2, 1
  %15 = tail call i32 @w2c_hermes_0x5F_memset(ptr noundef %0, i32 noundef %9, i32 noundef 0, i32 noundef %14) #5
  %16 = add i32 %15, %14
  br label %17

17:                                               ; preds = %13, %12
  %.0 = phi i32 [ %16, %13 ], [ %9, %12 ]
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %8, i32 noundef %.0)
  br label %44

18:                                               ; preds = %3
  %19 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %5)
  %20 = sub i32 %9, %19
  %21 = ashr i32 %20, 1
  %22 = add i32 %21, %2
  %23 = icmp sgt i32 %22, -1
  br i1 %23, label %24, label %42

24:                                               ; preds = %18
  %25 = sub i32 %7, %19
  %26 = tail call i32 @llvm.umax.i32(i32 %25, i32 %22)
  %27 = icmp ugt i32 %25, 2147483645
  %28 = select i1 %27, i32 2147483647, i32 %26
  %.not141 = icmp eq i32 %28, 0
  br i1 %.not141, label %._crit_edge, label %29

29:                                               ; preds = %24
  %30 = icmp slt i32 %28, 0
  br i1 %30, label %43, 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 = %24, %31
  %.pre-phi = phi i32 [ %32, %31 ], [ 0, %24 ]
  %.1 = phi i32 [ %33, %31 ], [ 0, %24 ]
  %34 = and i32 %20, -2
  %35 = add i32 %.1, %34
  %36 = shl i32 %2, 1
  %37 = tail call i32 @w2c_hermes_0x5F_memset(ptr noundef %0, i32 noundef %35, i32 noundef 0, i32 noundef %36) #5
  %38 = tail call i32 @w2c_hermes_memmove(ptr noundef %0, i32 noundef %.1, i32 noundef %19, i32 noundef %20) #5
  %39 = add i32 %38, %.pre-phi
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %6, i32 noundef %39)
  %40 = add i32 %37, %36
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %8, i32 noundef %40)
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %5, i32 noundef %38)
  %.not142 = icmp eq i32 %19, 0
  br i1 %.not142, label %44, label %41

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

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

43:                                               ; 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

44:                                               ; preds = %._crit_edge, %41, %17
  ret void
}

; 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,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass