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

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

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

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

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

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_0x5F20x3A0x3Abasic_string0x3Cchar16_t0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar16_t0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar16_t0x3E0x3E0x3A0x3Areserve0x28unsigned0x20long0x29(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
  store i32 2147483632, ptr %14, align 4, !tbaa !9
  %19 = load i32, ptr %13, align 4, !tbaa !9
  %20 = load i32, ptr %14, align 4, !tbaa !9
  %21 = icmp ult i32 %19, %20
  %22 = zext i1 %21 to i32
  store i32 %22, ptr %13, align 4, !tbaa !9
  %23 = load i32, ptr %13, align 4, !tbaa !9
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %25, label %297

25:                                               ; preds = %3
  %26 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %26, ptr %13, align 4, !tbaa !9
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.w2c_hermes, ptr %27, i32 0, i32 6
  %29 = load i32, ptr %13, align 4, !tbaa !9
  %30 = zext i32 %29 to i64
  %31 = add i64 %30, 8
  %32 = call i32 @i32_load(ptr noundef %28, i64 noundef %31)
  store i32 %32, ptr %13, align 4, !tbaa !9
  store i32 2147483647, ptr %14, align 4, !tbaa !9
  %33 = load i32, ptr %14, align 4, !tbaa !9
  %34 = load i32, ptr %13, align 4, !tbaa !9
  %35 = and i32 %34, %33
  store i32 %35, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %36 = load i32, ptr %14, align 4, !tbaa !9
  %37 = load i32, ptr %13, align 4, !tbaa !9
  %38 = sub i32 %37, %36
  store i32 %38, ptr %13, align 4, !tbaa !9
  store i32 4, ptr %14, align 4, !tbaa !9
  %39 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %39, ptr %15, align 4, !tbaa !9
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.w2c_hermes, ptr %40, i32 0, i32 6
  %42 = load i32, ptr %15, align 4, !tbaa !9
  %43 = zext i32 %42 to i64
  %44 = add i64 %43, 11
  %45 = call i32 @i32_load8_u(ptr noundef %41, i64 noundef %44)
  store i32 %45, ptr %15, align 4, !tbaa !9
  %46 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %46, ptr %7, align 4, !tbaa !9
  %47 = load i32, ptr %15, align 4, !tbaa !9
  %48 = trunc i32 %47 to i8
  %49 = sext i8 %48 to i32
  store i32 %49, ptr %15, align 4, !tbaa !9
  %50 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %50, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %16, align 4, !tbaa !9
  %51 = load i32, ptr %15, align 4, !tbaa !9
  %52 = load i32, ptr %16, align 4, !tbaa !9
  %53 = icmp slt i32 %51, %52
  %54 = zext i1 %53 to i32
  store i32 %54, ptr %15, align 4, !tbaa !9
  %55 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %55, ptr %12, align 4, !tbaa !9
  %56 = load i32, ptr %15, align 4, !tbaa !9
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %60

58:                                               ; preds = %25
  %59 = load i32, ptr %13, align 4, !tbaa !9
  br label %62

60:                                               ; preds = %25
  %61 = load i32, ptr %14, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %60, %58
  %63 = phi i32 [ %59, %58 ], [ %61, %60 ]
  store i32 %63, ptr %13, align 4, !tbaa !9
  %64 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %64, ptr %8, 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 %13, align 4, !tbaa !9
  %67 = load i32, ptr %14, align 4, !tbaa !9
  %68 = icmp uge i32 %66, %67
  %69 = zext i1 %68 to i32
  store i32 %69, ptr %13, align 4, !tbaa !9
  %70 = load i32, ptr %13, align 4, !tbaa !9
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %72, label %73

72:                                               ; preds = %62
  br label %296

73:                                               ; preds = %62
  store i32 4, ptr %13, align 4, !tbaa !9
  %74 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %74, ptr %14, align 4, !tbaa !9
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.w2c_hermes, ptr %75, i32 0, i32 6
  %77 = load i32, ptr %14, align 4, !tbaa !9
  %78 = zext i32 %77 to i64
  %79 = add i64 %78, 4
  %80 = call i32 @i32_load(ptr noundef %76, i64 noundef %79)
  store i32 %80, ptr %14, align 4, !tbaa !9
  %81 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %81, ptr %15, align 4, !tbaa !9
  %82 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %82, ptr %16, align 4, !tbaa !9
  store i32 0, ptr %17, align 4, !tbaa !9
  %83 = load i32, ptr %16, align 4, !tbaa !9
  %84 = load i32, ptr %17, align 4, !tbaa !9
  %85 = icmp slt i32 %83, %84
  %86 = zext i1 %85 to i32
  store i32 %86, ptr %16, align 4, !tbaa !9
  %87 = load i32, ptr %16, align 4, !tbaa !9
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %91

89:                                               ; preds = %73
  %90 = load i32, ptr %14, align 4, !tbaa !9
  br label %93

91:                                               ; preds = %73
  %92 = load i32, ptr %15, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %91, %89
  %94 = phi i32 [ %90, %89 ], [ %92, %91 ]
  store i32 %94, ptr %14, align 4, !tbaa !9
  %95 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %95, ptr %7, align 4, !tbaa !9
  %96 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %96, ptr %15, align 4, !tbaa !9
  %97 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %97, ptr %16, align 4, !tbaa !9
  %98 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %98, ptr %17, align 4, !tbaa !9
  %99 = load i32, ptr %16, align 4, !tbaa !9
  %100 = load i32, ptr %17, align 4, !tbaa !9
  %101 = icmp ult i32 %99, %100
  %102 = zext i1 %101 to i32
  store i32 %102, ptr %16, align 4, !tbaa !9
  %103 = load i32, ptr %16, align 4, !tbaa !9
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %107

105:                                              ; preds = %93
  %106 = load i32, ptr %14, align 4, !tbaa !9
  br label %109

107:                                              ; preds = %93
  %108 = load i32, ptr %15, align 4, !tbaa !9
  br label %109

109:                                              ; preds = %107, %105
  %110 = phi i32 [ %106, %105 ], [ %108, %107 ]
  store i32 %110, ptr %14, align 4, !tbaa !9
  %111 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %111, ptr %6, align 4, !tbaa !9
  store i32 7, 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 = or i32 %113, %112
  store i32 %114, ptr %14, align 4, !tbaa !9
  %115 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %115, ptr %15, align 4, !tbaa !9
  store i32 5, ptr %16, align 4, !tbaa !9
  %116 = load i32, ptr %15, align 4, !tbaa !9
  %117 = load i32, ptr %16, align 4, !tbaa !9
  %118 = icmp ult i32 %116, %117
  %119 = zext i1 %118 to i32
  store i32 %119, ptr %15, align 4, !tbaa !9
  %120 = load i32, ptr %15, align 4, !tbaa !9
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %122, label %124

122:                                              ; preds = %109
  %123 = load i32, ptr %13, align 4, !tbaa !9
  br label %126

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

126:                                              ; preds = %124, %122
  %127 = phi i32 [ %123, %122 ], [ %125, %124 ]
  store i32 %127, ptr %13, align 4, !tbaa !9
  %128 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %128, ptr %9, align 4, !tbaa !9
  %129 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %129, ptr %14, align 4, !tbaa !9
  %130 = load i32, ptr %13, align 4, !tbaa !9
  %131 = load i32, ptr %14, align 4, !tbaa !9
  %132 = icmp eq i32 %130, %131
  %133 = zext i1 %132 to i32
  store i32 %133, ptr %13, align 4, !tbaa !9
  %134 = load i32, ptr %13, align 4, !tbaa !9
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %136, label %137

136:                                              ; preds = %126
  br label %296

137:                                              ; preds = %126
  %138 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %138, ptr %13, align 4, !tbaa !9
  store i32 4, 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 ule 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 %156

145:                                              ; preds = %137
  %146 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %146, ptr %13, align 4, !tbaa !9
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.w2c_hermes, ptr %147, i32 0, i32 6
  %149 = load i32, ptr %13, align 4, !tbaa !9
  %150 = zext i32 %149 to i64
  %151 = call i32 @i32_load(ptr noundef %148, i64 noundef %150)
  store i32 %151, ptr %13, align 4, !tbaa !9
  %152 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %152, ptr %8, align 4, !tbaa !9
  store i32 1, ptr %13, align 4, !tbaa !9
  %153 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %153, ptr %12, align 4, !tbaa !9
  %154 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %154, ptr %13, align 4, !tbaa !9
  %155 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %155, ptr %9, align 4, !tbaa !9
  store i32 -2147483643, ptr %13, align 4, !tbaa !9
  br label %225

156:                                              ; preds = %137
  %157 = load i32, ptr %9, 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 = load i32, ptr %13, align 4, !tbaa !9
  %160 = add i32 %159, %158
  store i32 %160, ptr %13, align 4, !tbaa !9
  %161 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %161, ptr %10, align 4, !tbaa !9
  %162 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %162, ptr %13, align 4, !tbaa !9
  %163 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %163, ptr %14, align 4, !tbaa !9
  %164 = load i32, ptr %13, align 4, !tbaa !9
  %165 = load i32, ptr %14, align 4, !tbaa !9
  %166 = icmp ult i32 %164, %165
  %167 = zext i1 %166 to i32
  store i32 %167, ptr %13, align 4, !tbaa !9
  %168 = load i32, ptr %13, align 4, !tbaa !9
  %169 = icmp ne i32 %168, 0
  br i1 %169, label %170, label %180

170:                                              ; preds = %156
  %171 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %171, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  %172 = load i32, ptr %13, align 4, !tbaa !9
  %173 = load i32, ptr %14, align 4, !tbaa !9
  %174 = icmp sge i32 %172, %173
  %175 = zext i1 %174 to i32
  store i32 %175, ptr %13, align 4, !tbaa !9
  %176 = load i32, ptr %13, align 4, !tbaa !9
  %177 = icmp ne i32 %176, 0
  br i1 %177, label %178, label %179

178:                                              ; preds = %170
  br label %190

179:                                              ; preds = %170
  br label %299

180:                                              ; preds = %156
  %181 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %181, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %14, align 4, !tbaa !9
  %182 = load i32, ptr %13, align 4, !tbaa !9
  %183 = load i32, ptr %14, align 4, !tbaa !9
  %184 = icmp slt i32 %182, %183
  %185 = zext i1 %184 to i32
  store i32 %185, ptr %13, align 4, !tbaa !9
  %186 = load i32, ptr %13, align 4, !tbaa !9
  %187 = icmp ne i32 %186, 0
  br i1 %187, label %188, label %189

188:                                              ; preds = %180
  br label %299

189:                                              ; preds = %180
  br label %190

190:                                              ; preds = %189, %178
  %191 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %191, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %192 = load i32, ptr %14, align 4, !tbaa !9
  %193 = and i32 %192, 31
  %194 = load i32, ptr %13, align 4, !tbaa !9
  %195 = shl i32 %194, %193
  store i32 %195, ptr %13, align 4, !tbaa !9
  %196 = load ptr, ptr %4, align 8, !tbaa !5
  %197 = load i32, ptr %13, align 4, !tbaa !9
  %198 = call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %196, i32 noundef %197)
  store i32 %198, ptr %13, align 4, !tbaa !9
  %199 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %199, ptr %9, align 4, !tbaa !9
  %200 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %200, ptr %13, align 4, !tbaa !9
  %201 = load ptr, ptr %4, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.w2c_hermes, ptr %201, i32 0, i32 6
  %203 = load i32, ptr %13, align 4, !tbaa !9
  %204 = zext i32 %203 to i64
  %205 = call i32 @i32_load(ptr noundef %202, i64 noundef %204)
  store i32 %205, ptr %13, align 4, !tbaa !9
  %206 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %206, ptr %14, align 4, !tbaa !9
  %207 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %207, ptr %15, align 4, !tbaa !9
  store i32 0, ptr %16, align 4, !tbaa !9
  %208 = load i32, ptr %15, align 4, !tbaa !9
  %209 = load i32, ptr %16, align 4, !tbaa !9
  %210 = icmp slt i32 %208, %209
  %211 = zext i1 %210 to i32
  store i32 %211, ptr %15, align 4, !tbaa !9
  %212 = load i32, ptr %15, align 4, !tbaa !9
  %213 = icmp ne i32 %212, 0
  br i1 %213, label %214, label %216

214:                                              ; preds = %190
  %215 = load i32, ptr %13, align 4, !tbaa !9
  br label %218

216:                                              ; preds = %190
  %217 = load i32, ptr %14, align 4, !tbaa !9
  br label %218

218:                                              ; preds = %216, %214
  %219 = phi i32 [ %215, %214 ], [ %217, %216 ]
  store i32 %219, ptr %13, align 4, !tbaa !9
  %220 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %220, ptr %8, align 4, !tbaa !9
  %221 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %221, ptr %13, align 4, !tbaa !9
  store i32 -2147483648, ptr %14, align 4, !tbaa !9
  %222 = load i32, ptr %14, align 4, !tbaa !9
  %223 = load i32, ptr %13, align 4, !tbaa !9
  %224 = or i32 %223, %222
  store i32 %224, ptr %13, align 4, !tbaa !9
  br label %225

225:                                              ; preds = %218, %145
  %226 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %226, ptr %10, align 4, !tbaa !9
  %227 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %227, ptr %13, align 4, !tbaa !9
  store i32 1, ptr %14, align 4, !tbaa !9
  %228 = load i32, ptr %14, align 4, !tbaa !9
  %229 = load i32, ptr %13, align 4, !tbaa !9
  %230 = add i32 %229, %228
  store i32 %230, ptr %13, align 4, !tbaa !9
  %231 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %231, ptr %11, 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 %247

234:                                              ; preds = %225
  %235 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %235, ptr %13, align 4, !tbaa !9
  %236 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %236, ptr %14, align 4, !tbaa !9
  %237 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %237, ptr %15, align 4, !tbaa !9
  store i32 1, ptr %16, align 4, !tbaa !9
  %238 = load i32, ptr %16, align 4, !tbaa !9
  %239 = and i32 %238, 31
  %240 = load i32, ptr %15, align 4, !tbaa !9
  %241 = shl i32 %240, %239
  store i32 %241, ptr %15, align 4, !tbaa !9
  %242 = load ptr, ptr %4, align 8, !tbaa !5
  %243 = load i32, ptr %13, align 4, !tbaa !9
  %244 = load i32, ptr %14, align 4, !tbaa !9
  %245 = load i32, ptr %15, align 4, !tbaa !9
  %246 = call i32 @w2c_hermes_memmove(ptr noundef %242, i32 noundef %243, i32 noundef %244, i32 noundef %245)
  store i32 %246, ptr %13, align 4, !tbaa !9
  br label %247

247:                                              ; preds = %234, %225
  %248 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %248, ptr %13, align 4, !tbaa !9
  %249 = load i32, ptr %13, align 4, !tbaa !9
  %250 = icmp ne i32 %249, 0
  br i1 %250, label %251, label %255

251:                                              ; preds = %247
  %252 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %252, ptr %13, align 4, !tbaa !9
  %253 = load ptr, ptr %4, align 8, !tbaa !5
  %254 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %253, i32 noundef %254)
  br label %255

255:                                              ; preds = %251, %247
  %256 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %256, ptr %13, align 4, !tbaa !9
  store i32 5, ptr %14, align 4, !tbaa !9
  %257 = load i32, ptr %13, align 4, !tbaa !9
  %258 = load i32, ptr %14, align 4, !tbaa !9
  %259 = icmp uge i32 %257, %258
  %260 = zext i1 %259 to i32
  store i32 %260, ptr %13, align 4, !tbaa !9
  %261 = load i32, ptr %13, align 4, !tbaa !9
  %262 = icmp ne i32 %261, 0
  br i1 %262, label %263, label %287

263:                                              ; preds = %255
  %264 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %264, ptr %13, align 4, !tbaa !9
  %265 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %265, ptr %14, align 4, !tbaa !9
  %266 = load ptr, ptr %4, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.w2c_hermes, ptr %266, i32 0, i32 6
  %268 = load i32, ptr %13, align 4, !tbaa !9
  %269 = zext i32 %268 to i64
  %270 = add i64 %269, 4
  %271 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %267, i64 noundef %270, i32 noundef %271)
  %272 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %272, ptr %13, align 4, !tbaa !9
  %273 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %273, ptr %14, align 4, !tbaa !9
  %274 = load ptr, ptr %4, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.w2c_hermes, ptr %274, i32 0, i32 6
  %276 = load i32, ptr %13, align 4, !tbaa !9
  %277 = zext i32 %276 to i64
  %278 = add i64 %277, 8
  %279 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %275, i64 noundef %278, i32 noundef %279)
  %280 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %280, ptr %13, align 4, !tbaa !9
  %281 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %281, ptr %14, align 4, !tbaa !9
  %282 = load ptr, ptr %4, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.w2c_hermes, ptr %282, i32 0, i32 6
  %284 = load i32, ptr %13, align 4, !tbaa !9
  %285 = zext i32 %284 to i64
  %286 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %283, i64 noundef %285, i32 noundef %286)
  br label %301

287:                                              ; preds = %255
  %288 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %288, ptr %13, align 4, !tbaa !9
  %289 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %289, ptr %14, align 4, !tbaa !9
  %290 = load ptr, ptr %4, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.w2c_hermes, ptr %290, i32 0, i32 6
  %292 = load i32, ptr %13, align 4, !tbaa !9
  %293 = zext i32 %292 to i64
  %294 = add i64 %293, 11
  %295 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %291, i64 noundef %294, i32 noundef %295)
  br label %296

296:                                              ; preds = %287, %136, %72
  br label %301

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

299:                                              ; preds = %188, %179
  %300 = load ptr, ptr %4, align 8, !tbaa !5
  call void @w2c_hermes_std0x3A0x3A_0x5Fthrow_bad_array_new_length0x5Babi0x3Av150070x5D0x280x29(ptr noundef %300)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

301:                                              ; preds = %296, %263
  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_load8_u(ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

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

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

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_0x5F20x3A0x3Abasic_string0x3Cchar16_t0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar16_t0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar16_t0x3E0x3E0x3A0x3Areserve0x28unsigned0x20long0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #3 {
  %4 = icmp ult i32 %2, 2147483632
  br i1 %4, label %5, label %47

5:                                                ; preds = %3
  %6 = getelementptr inbounds i8, ptr %0, i64 40
  %7 = zext i32 %1 to i64
  %8 = add nuw nsw i64 %7, 8
  %9 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %8)
  %10 = and i32 %9, 2147483647
  %11 = add nsw i32 %10, -1
  %12 = add nuw nsw i64 %7, 11
  %13 = tail call i32 @i32_load8_u(ptr noundef nonnull %6, i64 noundef %12)
  %sext.mask = and i32 %13, 128
  %.not = icmp eq i32 %sext.mask, 0
  %14 = select i1 %.not, i32 4, i32 %11
  %.not161 = icmp ult i32 %14, %2
  br i1 %.not161, label %15, label %49

15:                                               ; preds = %5
  %16 = add nuw nsw i64 %7, 4
  %17 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %16)
  %18 = select i1 %.not, i32 %13, i32 %17
  %19 = tail call i32 @llvm.umax.i32(i32 %18, i32 %2)
  %20 = or i32 %19, 7
  %.inv = icmp ugt i32 %19, 4
  %21 = select i1 %.inv, i32 %20, i32 4
  %22 = icmp eq i32 %21, %14
  br i1 %22, label %49, label %23

23:                                               ; preds = %15
  %24 = icmp ult i32 %19, 5
  br i1 %24, label %25, label %27

25:                                               ; preds = %23
  %26 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %7)
  br label %37

27:                                               ; preds = %23
  %28 = add i32 %20, 1
  %29 = icmp uge i32 %14, %20
  %30 = icmp sgt i32 %28, -1
  %or.cond = or i1 %29, %30
  br i1 %or.cond, label %31, label %48

31:                                               ; preds = %27
  %32 = shl nuw i32 %28, 1
  %33 = tail call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %0, i32 noundef %32) #5
  %34 = tail call i32 @i32_load(ptr noundef nonnull %6, i64 noundef %7)
  %35 = select i1 %.not, i32 %1, i32 %34
  %36 = or i32 %28, -2147483648
  br label %37

37:                                               ; preds = %31, %25
  %.0156 = phi i32 [ %26, %25 ], [ %35, %31 ]
  %.0155 = phi i32 [ %1, %25 ], [ %33, %31 ]
  %.0154 = phi i1 [ false, %25 ], [ %.not, %31 ]
  %.0 = phi i32 [ -2147483643, %25 ], [ %36, %31 ]
  %38 = add i32 %18, 1
  %.not162 = icmp eq i32 %38, 0
  br i1 %.not162, label %42, label %39

39:                                               ; preds = %37
  %40 = shl i32 %38, 1
  %41 = tail call i32 @w2c_hermes_memmove(ptr noundef %0, i32 noundef %.0155, i32 noundef %.0156, i32 noundef %40) #5
  br label %42

42:                                               ; preds = %39, %37
  br i1 %.0154, label %44, label %43

43:                                               ; preds = %42
  tail call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %0, i32 noundef %.0156) #5
  br label %44

44:                                               ; preds = %43, %42
  br i1 %.inv, label %45, label %46

45:                                               ; preds = %44
  tail call void @i32_store(ptr noundef nonnull %6, i64 noundef %16, i32 noundef %18)
  tail call void @i32_store(ptr noundef nonnull %6, i64 noundef %8, i32 noundef %.0)
  tail call void @i32_store(ptr noundef nonnull %6, i64 noundef %7, i32 noundef %.0155)
  br label %49

46:                                               ; preds = %44
  tail call void @i32_store8(ptr noundef nonnull %6, i64 noundef %12, i32 noundef %18)
  br label %49

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

48:                                               ; preds = %27
  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

49:                                               ; preds = %46, %5, %15, %45
  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,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass