; 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: nounwind uwtable
define dso_local void @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Astack0x3Chermes0x3A0x3Avm0x3A0x3AGCCell0x2A0x2C0x20std0x3A0x3A_0x5F20x3A0x3Avector0x3Chermes0x3A0x3Avm0x3A0x3AGCCell0x2A0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Chermes0x3A0x3Avm0x3A0x3AGCCell0x2A0x3E0x3E0x3E0x3A0x3Apush0x5Babi0x3Av150070x5D0x28hermes0x3A0x3Avm0x3A0x3AGCCell0x2A0x20const0x260x29(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
  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
  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
  %17 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %17, ptr %12, align 4, !tbaa !9
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.w2c_hermes, ptr %18, i32 0, i32 6
  %20 = load i32, ptr %12, align 4, !tbaa !9
  %21 = zext i32 %20 to i64
  %22 = add i64 %21, 4
  %23 = call i32 @i32_load(ptr noundef %19, i64 noundef %22)
  store i32 %23, ptr %12, align 4, !tbaa !9
  %24 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %24, ptr %7, align 4, !tbaa !9
  %25 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %25, ptr %13, align 4, !tbaa !9
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.w2c_hermes, ptr %26, i32 0, i32 6
  %28 = load i32, ptr %13, align 4, !tbaa !9
  %29 = zext i32 %28 to i64
  %30 = add i64 %29, 8
  %31 = call i32 @i32_load(ptr noundef %27, i64 noundef %30)
  store i32 %31, ptr %13, align 4, !tbaa !9
  %32 = load i32, ptr %12, align 4, !tbaa !9
  %33 = load i32, ptr %13, align 4, !tbaa !9
  %34 = icmp ne i32 %32, %33
  %35 = zext i1 %34 to i32
  store i32 %35, ptr %12, align 4, !tbaa !9
  %36 = load i32, ptr %12, align 4, !tbaa !9
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %62

38:                                               ; preds = %3
  %39 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %39, ptr %12, align 4, !tbaa !9
  %40 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %40, ptr %13, align 4, !tbaa !9
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.w2c_hermes, ptr %41, i32 0, i32 6
  %43 = load i32, ptr %13, 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 %13, align 4, !tbaa !9
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.w2c_hermes, ptr %46, i32 0, i32 6
  %48 = load i32, ptr %12, align 4, !tbaa !9
  %49 = zext i32 %48 to i64
  %50 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %47, i64 noundef %49, i32 noundef %50)
  %51 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %51, ptr %12, align 4, !tbaa !9
  %52 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %52, ptr %13, align 4, !tbaa !9
  store i32 4, ptr %14, align 4, !tbaa !9
  %53 = load i32, ptr %14, align 4, !tbaa !9
  %54 = load i32, ptr %13, align 4, !tbaa !9
  %55 = add i32 %54, %53
  store i32 %55, ptr %13, align 4, !tbaa !9
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.w2c_hermes, ptr %56, i32 0, i32 6
  %58 = load i32, ptr %12, align 4, !tbaa !9
  %59 = zext i32 %58 to i64
  %60 = add i64 %59, 4
  %61 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %57, i64 noundef %60, i32 noundef %61)
  br label %223

62:                                               ; preds = %3
  %63 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %63, ptr %12, align 4, !tbaa !9
  %64 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %64, ptr %13, align 4, !tbaa !9
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.w2c_hermes, ptr %65, i32 0, i32 6
  %67 = load i32, ptr %13, align 4, !tbaa !9
  %68 = zext i32 %67 to i64
  %69 = call i32 @i32_load(ptr noundef %66, i64 noundef %68)
  store i32 %69, ptr %13, align 4, !tbaa !9
  %70 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %70, ptr %9, align 4, !tbaa !9
  %71 = load i32, ptr %13, align 4, !tbaa !9
  %72 = load i32, ptr %12, align 4, !tbaa !9
  %73 = sub i32 %72, %71
  store i32 %73, ptr %12, align 4, !tbaa !9
  %74 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %74, ptr %7, align 4, !tbaa !9
  store i32 2, ptr %13, align 4, !tbaa !9
  %75 = load i32, ptr %12, align 4, !tbaa !9
  %76 = load i32, ptr %13, align 4, !tbaa !9
  %77 = and i32 %76, 31
  %78 = ashr i32 %75, %77
  store i32 %78, ptr %12, align 4, !tbaa !9
  %79 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %79, ptr %10, align 4, !tbaa !9
  store i32 1, ptr %13, align 4, !tbaa !9
  %80 = load i32, ptr %13, align 4, !tbaa !9
  %81 = load i32, ptr %12, align 4, !tbaa !9
  %82 = add i32 %81, %80
  store i32 %82, ptr %12, align 4, !tbaa !9
  %83 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %83, ptr %8, align 4, !tbaa !9
  store i32 1073741824, ptr %13, align 4, !tbaa !9
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = load i32, ptr %13, align 4, !tbaa !9
  %86 = icmp ult i32 %84, %85
  %87 = zext i1 %86 to i32
  store i32 %87, ptr %12, align 4, !tbaa !9
  %88 = load i32, ptr %12, align 4, !tbaa !9
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %219

90:                                               ; preds = %62
  store i32 1073741823, ptr %12, align 4, !tbaa !9
  %91 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %91, ptr %13, 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 %11, align 4, !tbaa !9
  %97 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %97, ptr %14, align 4, !tbaa !9
  %98 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %98, ptr %15, align 4, !tbaa !9
  %99 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %99, ptr %16, align 4, !tbaa !9
  %100 = load i32, ptr %15, align 4, !tbaa !9
  %101 = load i32, ptr %16, align 4, !tbaa !9
  %102 = icmp ult i32 %100, %101
  %103 = zext i1 %102 to i32
  store i32 %103, ptr %15, align 4, !tbaa !9
  %104 = load i32, ptr %15, align 4, !tbaa !9
  %105 = icmp ne i32 %104, 0
  br i1 %105, label %106, label %108

106:                                              ; preds = %90
  %107 = load i32, ptr %13, align 4, !tbaa !9
  br label %110

108:                                              ; preds = %90
  %109 = load i32, ptr %14, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %108, %106
  %111 = phi i32 [ %107, %106 ], [ %109, %108 ]
  store i32 %111, ptr %13, align 4, !tbaa !9
  %112 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %112, ptr %14, align 4, !tbaa !9
  store i32 2147483644, ptr %15, align 4, !tbaa !9
  %113 = load i32, ptr %14, align 4, !tbaa !9
  %114 = load i32, ptr %15, align 4, !tbaa !9
  %115 = icmp uge i32 %113, %114
  %116 = zext i1 %115 to i32
  store i32 %116, ptr %14, align 4, !tbaa !9
  %117 = load i32, ptr %14, align 4, !tbaa !9
  %118 = icmp ne i32 %117, 0
  br i1 %118, label %119, label %121

119:                                              ; preds = %110
  %120 = load i32, ptr %12, align 4, !tbaa !9
  br label %123

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

123:                                              ; preds = %121, %119
  %124 = phi i32 [ %120, %119 ], [ %122, %121 ]
  store i32 %124, ptr %12, align 4, !tbaa !9
  %125 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %125, ptr %8, align 4, !tbaa !9
  %126 = load i32, ptr %12, align 4, !tbaa !9
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %128, label %146

128:                                              ; preds = %123
  %129 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %129, ptr %12, align 4, !tbaa !9
  store i32 1073741824, ptr %13, align 4, !tbaa !9
  %130 = load i32, ptr %12, align 4, !tbaa !9
  %131 = load i32, ptr %13, align 4, !tbaa !9
  %132 = icmp uge i32 %130, %131
  %133 = zext i1 %132 to i32
  store i32 %133, ptr %12, align 4, !tbaa !9
  %134 = load i32, ptr %12, align 4, !tbaa !9
  %135 = icmp ne i32 %134, 0
  br i1 %135, label %136, label %137

136:                                              ; preds = %128
  br label %221

137:                                              ; preds = %128
  %138 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %138, ptr %12, align 4, !tbaa !9
  store i32 2, ptr %13, align 4, !tbaa !9
  %139 = load i32, ptr %13, align 4, !tbaa !9
  %140 = and i32 %139, 31
  %141 = load i32, ptr %12, align 4, !tbaa !9
  %142 = shl i32 %141, %140
  store i32 %142, ptr %12, align 4, !tbaa !9
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = load i32, ptr %12, align 4, !tbaa !9
  %145 = call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %143, i32 noundef %144)
  store i32 %145, ptr %12, align 4, !tbaa !9
  br label %147

146:                                              ; preds = %123
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %147

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

214:                                              ; preds = %147
  %215 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %215, ptr %12, align 4, !tbaa !9
  %216 = load ptr, ptr %4, align 8, !tbaa !5
  %217 = load i32, ptr %12, align 4, !tbaa !9
  call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %216, i32 noundef %217)
  br label %218

218:                                              ; preds = %214, %147
  br label %223

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

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

223:                                              ; preds = %218, %38
  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 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_0x5F20x3A0x3Astack0x3Chermes0x3A0x3Avm0x3A0x3AGCCell0x2A0x2C0x20std0x3A0x3A_0x5F20x3A0x3Avector0x3Chermes0x3A0x3Avm0x3A0x3AGCCell0x2A0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Chermes0x3A0x3Avm0x3A0x3AGCCell0x2A0x3E0x3E0x3E0x3A0x3Apush0x5Babi0x3Av150070x5D0x28hermes0x3A0x3Avm0x3A0x3AGCCell0x2A0x20const0x260x29(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, 4
  %7 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %6)
  %8 = add nuw nsw i64 %5, 8
  %9 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %8)
  %.not = icmp eq i32 %7, %9
  br i1 %.not, label %15, label %10

10:                                               ; preds = %3
  %11 = zext i32 %2 to i64
  %12 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %11)
  %13 = zext i32 %7 to i64
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %13, i32 noundef %12)
  %14 = add i32 %7, 4
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %6, i32 noundef %14)
  br label %42

15:                                               ; preds = %3
  %16 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %5)
  %17 = sub i32 %7, %16
  %18 = ashr i32 %17, 2
  %19 = add nsw i32 %18, 1
  %20 = icmp ult i32 %19, 1073741824
  br i1 %20, label %21, label %40

21:                                               ; preds = %15
  %22 = ashr i32 %17, 1
  %23 = tail call i32 @llvm.umax.i32(i32 %19, i32 %22)
  %24 = icmp ugt i32 %17, 2147483643
  %25 = select i1 %24, i32 1073741823, i32 %23
  %.not122 = icmp eq i32 %25, 0
  br i1 %.not122, label %._crit_edge, label %26

26:                                               ; preds = %21
  %27 = icmp ugt i32 %25, 1073741823
  br i1 %27, label %41, label %28

28:                                               ; preds = %26
  %29 = shl nuw i32 %25, 2
  %30 = tail call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %0, i32 noundef %29) #5
  br label %._crit_edge

._crit_edge:                                      ; preds = %21, %28
  %.pre-phi = phi i32 [ %29, %28 ], [ 0, %21 ]
  %.0 = phi i32 [ %30, %28 ], [ 0, %21 ]
  %31 = and i32 %17, -4
  %32 = add i32 %.0, %31
  %33 = zext i32 %2 to i64
  %34 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %33)
  %35 = zext i32 %32 to i64
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %35, i32 noundef %34)
  %36 = tail call i32 @w2c_hermes_memmove(ptr noundef %0, i32 noundef %.0, i32 noundef %16, i32 noundef %17) #5
  %37 = add i32 %36, %.pre-phi
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %8, i32 noundef %37)
  %38 = add i32 %32, 4
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %6, i32 noundef %38)
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %5, i32 noundef %36)
  %.not123 = icmp eq i32 %16, 0
  br i1 %.not123, label %42, label %39

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

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

41:                                               ; preds = %26
  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

42:                                               ; preds = %._crit_edge, %39, %10
  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