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

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

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

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

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

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

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

declare i32 @w2c_hermes_memmove(ptr noundef, i32 noundef, i32 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 void @w2c_hermes_hermes0x3A0x3Aregex0x3A0x3ABracketNode0x3Chermes0x3A0x3Aregex0x3A0x3AUTF16RegexTraits0x3E0x3A0x3AaddClass0x28hermes0x3A0x3Aregex0x3A0x3ACharacterClass0x29(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, 56
  %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, 60
  %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_load16_u(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_store16(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 2, 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, 56
  %61 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %57, i64 noundef %60, i32 noundef %61)
  br label %221

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 = add i64 %68, 52
  %70 = call i32 @i32_load(ptr noundef %66, i64 noundef %69)
  store i32 %70, ptr %13, align 4, !tbaa !9
  %71 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %71, ptr %9, align 4, !tbaa !9
  %72 = load i32, ptr %13, align 4, !tbaa !9
  %73 = load i32, ptr %12, align 4, !tbaa !9
  %74 = sub i32 %73, %72
  store i32 %74, ptr %12, align 4, !tbaa !9
  %75 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %75, ptr %7, align 4, !tbaa !9
  store i32 -3, ptr %13, align 4, !tbaa !9
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = load i32, ptr %13, align 4, !tbaa !9
  %78 = icmp sgt i32 %76, %77
  %79 = zext i1 %78 to i32
  store i32 %79, ptr %12, align 4, !tbaa !9
  %80 = load i32, ptr %12, align 4, !tbaa !9
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %217

82:                                               ; preds = %62
  store i32 2147483647, ptr %12, align 4, !tbaa !9
  %83 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %83, ptr %13, align 4, !tbaa !9
  %84 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %84, ptr %14, align 4, !tbaa !9
  store i32 1, ptr %15, align 4, !tbaa !9
  %85 = load i32, ptr %14, align 4, !tbaa !9
  %86 = load i32, ptr %15, align 4, !tbaa !9
  %87 = and i32 %86, 31
  %88 = ashr i32 %85, %87
  store i32 %88, ptr %14, align 4, !tbaa !9
  %89 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %89, ptr %10, align 4, !tbaa !9
  store i32 1, ptr %15, align 4, !tbaa !9
  %90 = load i32, ptr %15, align 4, !tbaa !9
  %91 = load i32, ptr %14, align 4, !tbaa !9
  %92 = add i32 %91, %90
  store i32 %92, ptr %14, align 4, !tbaa !9
  %93 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %93, ptr %8, align 4, !tbaa !9
  %94 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %94, ptr %15, align 4, !tbaa !9
  %95 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %95, ptr %16, align 4, !tbaa !9
  %96 = load i32, ptr %15, align 4, !tbaa !9
  %97 = load i32, ptr %16, align 4, !tbaa !9
  %98 = icmp ugt i32 %96, %97
  %99 = zext i1 %98 to i32
  store i32 %99, ptr %15, align 4, !tbaa !9
  %100 = load i32, ptr %15, align 4, !tbaa !9
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %104

102:                                              ; preds = %82
  %103 = load i32, ptr %13, align 4, !tbaa !9
  br label %106

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

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

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

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

119:                                              ; preds = %117, %115
  %120 = phi i32 [ %116, %115 ], [ %118, %117 ]
  store i32 %120, ptr %12, align 4, !tbaa !9
  %121 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %121, ptr %8, align 4, !tbaa !9
  %122 = load i32, ptr %12, align 4, !tbaa !9
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %124, label %142

124:                                              ; preds = %119
  %125 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %125, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %126 = load i32, ptr %12, align 4, !tbaa !9
  %127 = load i32, ptr %13, align 4, !tbaa !9
  %128 = icmp slt i32 %126, %127
  %129 = zext i1 %128 to i32
  store i32 %129, ptr %12, align 4, !tbaa !9
  %130 = load i32, ptr %12, align 4, !tbaa !9
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %133

132:                                              ; preds = %124
  br label %219

133:                                              ; preds = %124
  %134 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %134, ptr %12, align 4, !tbaa !9
  store i32 1, ptr %13, align 4, !tbaa !9
  %135 = load i32, ptr %13, align 4, !tbaa !9
  %136 = and i32 %135, 31
  %137 = load i32, ptr %12, align 4, !tbaa !9
  %138 = shl i32 %137, %136
  store i32 %138, ptr %12, align 4, !tbaa !9
  %139 = load ptr, ptr %4, align 8, !tbaa !5
  %140 = load i32, ptr %12, align 4, !tbaa !9
  %141 = call i32 @w2c_hermes_operator0x20new0x28unsigned0x20long0x29(ptr noundef %139, i32 noundef %140)
  store i32 %141, ptr %12, align 4, !tbaa !9
  br label %143

142:                                              ; preds = %119
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %143

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

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

216:                                              ; preds = %212, %143
  br label %221

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

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

221:                                              ; preds = %216, %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 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 i32 @i32_load(ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

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

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

declare i32 @w2c_hermes_memmove(ptr noundef, i32 noundef, i32 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 void @w2c_hermes_hermes0x3A0x3Aregex0x3A0x3ABracketNode0x3Chermes0x3A0x3Aregex0x3A0x3AUTF16RegexTraits0x3E0x3A0x3AaddClass0x28hermes0x3A0x3Aregex0x3A0x3ACharacterClass0x29(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, 56
  %7 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %6)
  %8 = add nuw nsw i64 %5, 60
  %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_load16_u(ptr noundef nonnull %4, i64 noundef %11)
  %13 = zext i32 %7 to i64
  tail call void @i32_store16(ptr noundef nonnull %4, i64 noundef %13, i32 noundef %12)
  %14 = add i32 %7, 2
  tail call void @i32_store(ptr noundef nonnull %4, i64 noundef %6, i32 noundef %14)
  br label %42

15:                                               ; preds = %3
  %16 = add nuw nsw i64 %5, 52
  %17 = tail call i32 @i32_load(ptr noundef nonnull %4, i64 noundef %16)
  %18 = sub i32 %7, %17
  %19 = icmp sgt i32 %18, -3
  br i1 %19, label %20, label %40

20:                                               ; preds = %15
  %21 = ashr i32 %18, 1
  %22 = add nsw i32 %21, 1
  %23 = tail call i32 @llvm.umax.i32(i32 %18, i32 %22)
  %24 = icmp ugt i32 %18, 2147483645
  %25 = select i1 %24, i32 2147483647, i32 %23
  %.not120 = icmp eq i32 %25, 0
  br i1 %.not120, label %._crit_edge, label %26

26:                                               ; preds = %20
  %27 = icmp slt i32 %25, 0
  br i1 %27, label %41, label %28

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

._crit_edge:                                      ; preds = %20, %28
  %.pre-phi = phi i32 [ %29, %28 ], [ 0, %20 ]
  %.0 = phi i32 [ %30, %28 ], [ 0, %20 ]
  %31 = and i32 %18, -2
  %32 = add i32 %.0, %31
  %33 = zext i32 %2 to i64
  %34 = tail call i32 @i32_load16_u(ptr noundef nonnull %4, i64 noundef %33)
  %35 = zext i32 %32 to i64
  tail call void @i32_store16(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 %17, i32 noundef %18) #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, 2
  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 %16, i32 noundef %36)
  %.not121 = icmp eq i32 %17, 0
  br i1 %.not121, label %42, label %39

39:                                               ; preds = %._crit_edge
  tail call void @w2c_hermes_operator0x20delete0x28void0x2A0x29(ptr noundef %0, i32 noundef %17) #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) #5
  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