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

; 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: inlinehint nounwind uwtable
declare hidden void @i32_store(ptr noundef, i64 noundef, i32 noundef) #1

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

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

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

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

declare void @w2c_hermes_abort(ptr noundef) #3

declare void @w2c_hermes_std0x3A0x3A_0x5Fthrow_bad_array_new_length0x5Babi0x3Av150070x5D0x280x29(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_llvh0x3A0x3ADomTreeNodeBase0x3Chermes0x3A0x3ABasicBlock0x3E0x3A0x3AaddChild0x28std0x3A0x3A_0x5F20x3A0x3Aunique_ptr0x3Cllvh0x3A0x3ADomTreeNodeBase0x3Chermes0x3A0x3ABasicBlock0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Adefault_delete0x3Cllvh0x3A0x3ADomTreeNodeBase0x3Chermes0x3A0x3ABasicBlock0x3E0x3E0x3E0x29(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 = add i64 %22, 16
  %24 = call i32 @i32_load(ptr noundef %20, i64 noundef %23)
  store i32 %24, ptr %13, align 4, !tbaa !9
  %25 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %25, ptr %7, align 4, !tbaa !9
  %26 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %26, ptr %14, 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 %14, align 4, !tbaa !9
  %30 = zext i32 %29 to i64
  %31 = add i64 %30, 20
  %32 = call i32 @i32_load(ptr noundef %28, i64 noundef %31)
  store i32 %32, ptr %14, align 4, !tbaa !9
  %33 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %33, ptr %8, align 4, !tbaa !9
  %34 = load i32, ptr %13, align 4, !tbaa !9
  %35 = load i32, ptr %14, align 4, !tbaa !9
  %36 = icmp ult i32 %34, %35
  %37 = zext i1 %36 to i32
  store i32 %37, ptr %13, align 4, !tbaa !9
  %38 = load i32, ptr %13, align 4, !tbaa !9
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %60

40:                                               ; preds = %3
  %41 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %41, ptr %13, align 4, !tbaa !9
  %42 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %42, ptr %14, align 4, !tbaa !9
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.w2c_hermes, ptr %43, i32 0, i32 6
  %45 = load i32, ptr %13, align 4, !tbaa !9
  %46 = zext i32 %45 to i64
  %47 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %44, i64 noundef %46, i32 noundef %47)
  %48 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %48, ptr %13, align 4, !tbaa !9
  %49 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %49, ptr %14, align 4, !tbaa !9
  store i32 4, ptr %15, align 4, !tbaa !9
  %50 = load i32, ptr %15, align 4, !tbaa !9
  %51 = load i32, ptr %14, align 4, !tbaa !9
  %52 = add i32 %51, %50
  store i32 %52, ptr %14, align 4, !tbaa !9
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.w2c_hermes, ptr %53, i32 0, i32 6
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = zext i32 %55 to i64
  %57 = add i64 %56, 16
  %58 = load i32, ptr %14, align 4, !tbaa !9
  call void @i32_store(ptr noundef %54, i64 noundef %57, i32 noundef %58)
  %59 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %59, ptr %13, align 4, !tbaa !9
  br label %224

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

89:                                               ; preds = %60
  store i32 1073741823, ptr %13, align 4, !tbaa !9
  %90 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %90, ptr %14, align 4, !tbaa !9
  %91 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %91, ptr %15, align 4, !tbaa !9
  %92 = load i32, ptr %15, align 4, !tbaa !9
  %93 = load i32, ptr %14, align 4, !tbaa !9
  %94 = sub i32 %93, %92
  store i32 %94, ptr %14, align 4, !tbaa !9
  %95 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %95, ptr %8, align 4, !tbaa !9
  store i32 1, ptr %15, align 4, !tbaa !9
  %96 = load i32, ptr %14, align 4, !tbaa !9
  %97 = load i32, ptr %15, align 4, !tbaa !9
  %98 = and i32 %97, 31
  %99 = ashr i32 %96, %98
  store i32 %99, ptr %14, align 4, !tbaa !9
  %100 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %100, ptr %12, align 4, !tbaa !9
  %101 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %101, ptr %15, align 4, !tbaa !9
  %102 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %102, ptr %16, align 4, !tbaa !9
  %103 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %103, ptr %17, align 4, !tbaa !9
  %104 = load i32, ptr %16, align 4, !tbaa !9
  %105 = load i32, ptr %17, align 4, !tbaa !9
  %106 = icmp ult i32 %104, %105
  %107 = zext i1 %106 to i32
  store i32 %107, ptr %16, align 4, !tbaa !9
  %108 = load i32, ptr %16, align 4, !tbaa !9
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %110, label %112

110:                                              ; preds = %89
  %111 = load i32, ptr %14, align 4, !tbaa !9
  br label %114

112:                                              ; preds = %89
  %113 = load i32, ptr %15, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %112, %110
  %115 = phi i32 [ %111, %110 ], [ %113, %112 ]
  store i32 %115, ptr %14, align 4, !tbaa !9
  %116 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %116, ptr %15, align 4, !tbaa !9
  store i32 2147483644, ptr %16, align 4, !tbaa !9
  %117 = load i32, ptr %15, align 4, !tbaa !9
  %118 = load i32, ptr %16, align 4, !tbaa !9
  %119 = icmp uge i32 %117, %118
  %120 = zext i1 %119 to i32
  store i32 %120, ptr %15, align 4, !tbaa !9
  %121 = load i32, ptr %15, align 4, !tbaa !9
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %123, label %125

123:                                              ; preds = %114
  %124 = load i32, ptr %13, align 4, !tbaa !9
  br label %127

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

127:                                              ; preds = %125, %123
  %128 = phi i32 [ %124, %123 ], [ %126, %125 ]
  store i32 %128, ptr %13, align 4, !tbaa !9
  %129 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %129, ptr %7, align 4, !tbaa !9
  %130 = load i32, ptr %13, align 4, !tbaa !9
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %150

132:                                              ; preds = %127
  %133 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %133, ptr %13, align 4, !tbaa !9
  store i32 1073741824, ptr %14, align 4, !tbaa !9
  %134 = load i32, ptr %13, align 4, !tbaa !9
  %135 = load i32, ptr %14, align 4, !tbaa !9
  %136 = icmp uge i32 %134, %135
  %137 = zext i1 %136 to i32
  store i32 %137, ptr %13, align 4, !tbaa !9
  %138 = load i32, ptr %13, align 4, !tbaa !9
  %139 = icmp ne i32 %138, 0
  br i1 %139, label %140, label %141

140:                                              ; preds = %132
  br label %222

141:                                              ; preds = %132
  %142 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %142, ptr %13, align 4, !tbaa !9
  store i32 2, ptr %14, align 4, !tbaa !9
  %143 = load i32, ptr %14, align 4, !tbaa !9
  %144 = and i32 %143, 31
  %145 = load i32, ptr %13, align 4, !tbaa !9
  %146 = shl i32 %145, %144
  store i32 %146, ptr %13, align 4, !tbaa !9
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = load i32, ptr %13, align 4, !tbaa !9
  %149 = call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %147, i32 noundef %148)
  store i32 %149, ptr %13, align 4, !tbaa !9
  br label %151

150:                                              ; preds = %127
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %151

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

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

218:                                              ; preds = %214, %151
  %219 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %219, ptr %13, align 4, !tbaa !9
  br label %224

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

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

224:                                              ; preds = %218, %40
  %225 = 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 %225
}

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 void @i32_store(ptr noundef, i64 noundef, i32 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: noreturn
declare void @wasm_rt_trap(i32 noundef) local_unnamed_addr #1

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

declare void @w2c_hermes_abort(ptr noundef) local_unnamed_addr #2

declare void @w2c_hermes_std0x3A0x3A_0x5Fthrow_bad_array_new_length0x5Babi0x3Av150070x5D0x280x29(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @w2c_hermes_llvh0x3A0x3ADomTreeNodeBase0x3Chermes0x3A0x3ABasicBlock0x3E0x3A0x3AaddChild0x28std0x3A0x3A_0x5F20x3A0x3Aunique_ptr0x3Cllvh0x3A0x3ADomTreeNodeBase0x3Chermes0x3A0x3ABasicBlock0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Adefault_delete0x3Cllvh0x3A0x3ADomTreeNodeBase0x3Chermes0x3A0x3ABasicBlock0x3E0x3E0x3E0x29(ptr noundef %0, i32 noundef %1, i32 noundef returned %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, 16
  %7 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %6)
  %8 = add nuw nsw i64 %5, 20
  %9 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %8)
  %10 = icmp ult i32 %7, %9
  br i1 %10, label %11, label %14

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

14:                                               ; preds = %3
  %15 = add nuw nsw i64 %5, 12
  %16 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %15)
  %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 %39

21:                                               ; preds = %14
  %22 = sub i32 %9, %16
  %23 = ashr i32 %22, 1
  %24 = tail call i32 @llvm.umax.i32(i32 %19, i32 %23)
  %25 = icmp ugt i32 %22, 2147483643
  %26 = select i1 %25, i32 1073741823, i32 %24
  %.not = icmp eq i32 %26, 0
  br i1 %.not, label %._crit_edge, label %27

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

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

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

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

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

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

41:                                               ; preds = %._crit_edge, %38, %11
  ret i32 %2
}

; 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