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

; 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: nounwind uwtable
declare dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ARuntime0x3A0x3AraiseTypeError0x28hermes0x3A0x3Avm0x3A0x3ATwineChar160x20const0x260x29(ptr noundef, i32 noundef, i32 noundef) #0

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @i64_store(ptr noundef, i64 noundef, i64 noundef) #2

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @i64_load(ptr noundef, i64 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AJSTypedArrayBase0x3A0x3AvalidateTypedArray0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x2C0x20bool0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #0 {
  %5 = alloca ptr, align 8
  %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 i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  store i64 0, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.w2c_hermes, ptr %19, i32 0, i32 3
  %21 = load i32, ptr %20, align 8, !tbaa !13
  store i32 %21, ptr %12, align 4, !tbaa !9
  store i32 48, ptr %13, align 4, !tbaa !9
  %22 = load i32, ptr %13, align 4, !tbaa !9
  %23 = load i32, ptr %12, align 4, !tbaa !9
  %24 = sub i32 %23, %22
  store i32 %24, ptr %12, align 4, !tbaa !9
  %25 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %25, ptr %9, align 4, !tbaa !9
  %26 = load i32, ptr %12, align 4, !tbaa !9
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.w2c_hermes, ptr %27, i32 0, i32 3
  store i32 %26, ptr %28, align 8, !tbaa !13
  store i32 67200, ptr %12, align 4, !tbaa !9
  %29 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %29, ptr %10, align 4, !tbaa !9
  %30 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %30, ptr %12, align 4, !tbaa !9
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.w2c_hermes, ptr %31, i32 0, i32 6
  %33 = load i32, ptr %12, align 4, !tbaa !9
  %34 = zext i32 %33 to i64
  %35 = call i64 @i64_load(ptr noundef %32, i64 noundef %34)
  store i64 %35, ptr %16, align 8, !tbaa !11
  %36 = load i64, ptr %16, align 8, !tbaa !11
  store i64 %36, ptr %11, align 8, !tbaa !11
  store i64 -844424930131968, ptr %17, align 8, !tbaa !11
  %37 = load i64, ptr %16, align 8, !tbaa !11
  %38 = load i64, ptr %17, align 8, !tbaa !11
  %39 = icmp uge i64 %37, %38
  %40 = zext i1 %39 to i32
  store i32 %40, ptr %12, align 4, !tbaa !9
  %41 = load i32, ptr %12, align 4, !tbaa !9
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %43, label %68

43:                                               ; preds = %4
  store i32 67200, ptr %12, align 4, !tbaa !9
  %44 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %44, ptr %13, align 4, !tbaa !9
  %45 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %45, ptr %18, align 8, !tbaa !11
  %46 = load i64, ptr %18, align 8, !tbaa !11
  %47 = trunc i64 %46 to i32
  store i32 %47, ptr %14, align 4, !tbaa !9
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.w2c_hermes, ptr %48, i32 0, i32 6
  %50 = load i32, ptr %14, align 4, !tbaa !9
  %51 = zext i32 %50 to i64
  %52 = call i32 @i32_load(ptr noundef %49, i64 noundef %51)
  store i32 %52, ptr %14, align 4, !tbaa !9
  store i32 587202560, ptr %15, align 4, !tbaa !9
  %53 = load i32, ptr %15, align 4, !tbaa !9
  %54 = load i32, ptr %14, align 4, !tbaa !9
  %55 = sub i32 %54, %53
  store i32 %55, ptr %14, align 4, !tbaa !9
  store i32 184549376, ptr %15, align 4, !tbaa !9
  %56 = load i32, ptr %14, align 4, !tbaa !9
  %57 = load i32, ptr %15, align 4, !tbaa !9
  %58 = icmp uge i32 %56, %57
  %59 = zext i1 %58 to i32
  store i32 %59, ptr %14, align 4, !tbaa !9
  %60 = load i32, ptr %14, align 4, !tbaa !9
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %64

62:                                               ; preds = %43
  %63 = load i32, ptr %12, align 4, !tbaa !9
  br label %66

64:                                               ; preds = %43
  %65 = load i32, ptr %13, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %64, %62
  %67 = phi i32 [ %63, %62 ], [ %65, %64 ]
  store i32 %67, ptr %12, align 4, !tbaa !9
  br label %69

68:                                               ; preds = %4
  store i32 67200, ptr %12, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %68, %66
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.w2c_hermes, ptr %70, i32 0, i32 6
  %72 = load i32, ptr %12, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = call i64 @i64_load(ptr noundef %71, i64 noundef %73)
  store i64 %74, ptr %16, align 8, !tbaa !11
  %75 = load i64, ptr %16, align 8, !tbaa !11
  store i64 %75, ptr %11, align 8, !tbaa !11
  store i64 -844424930131968, ptr %17, align 8, !tbaa !11
  %76 = load i64, ptr %16, align 8, !tbaa !11
  %77 = load i64, ptr %17, align 8, !tbaa !11
  %78 = icmp uge i64 %76, %77
  %79 = zext i1 %78 to i32
  store i32 %79, ptr %12, align 4, !tbaa !9
  %80 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %80, ptr %17, align 8, !tbaa !11
  store i64 4294967295, ptr %18, align 8, !tbaa !11
  %81 = load i64, ptr %18, align 8, !tbaa !11
  %82 = load i64, ptr %17, align 8, !tbaa !11
  %83 = and i64 %82, %81
  store i64 %83, ptr %17, align 8, !tbaa !11
  store i64 0, ptr %18, align 8, !tbaa !11
  %84 = load i64, ptr %17, align 8, !tbaa !11
  %85 = load i64, ptr %18, align 8, !tbaa !11
  %86 = icmp ne i64 %84, %85
  %87 = zext i1 %86 to i32
  store i32 %87, ptr %13, align 4, !tbaa !9
  %88 = load i32, ptr %13, align 4, !tbaa !9
  %89 = load i32, ptr %12, align 4, !tbaa !9
  %90 = and i32 %89, %88
  store i32 %90, ptr %12, align 4, !tbaa !9
  %91 = load i32, ptr %12, align 4, !tbaa !9
  %92 = icmp ne i32 %91, 0
  %93 = xor i1 %92, true
  %94 = zext i1 %93 to i32
  store i32 %94, ptr %12, align 4, !tbaa !9
  %95 = load i32, ptr %12, align 4, !tbaa !9
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %136

97:                                               ; preds = %69
  %98 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %98, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.w2c_hermes, ptr %99, i32 0, i32 6
  %101 = load i32, ptr %12, align 4, !tbaa !9
  %102 = zext i32 %101 to i64
  %103 = add i64 %102, 40
  %104 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %100, i64 noundef %103, i32 noundef %104)
  %105 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %105, ptr %12, align 4, !tbaa !9
  store i64 223338299393, ptr %17, align 8, !tbaa !11
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.w2c_hermes, ptr %106, i32 0, i32 6
  %108 = load i32, ptr %12, align 4, !tbaa !9
  %109 = zext i32 %108 to i64
  %110 = add i64 %109, 32
  %111 = load i64, ptr %17, align 8, !tbaa !11
  call void @i64_store(ptr noundef %107, i64 noundef %110, i64 noundef %111)
  %112 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %112, ptr %12, align 4, !tbaa !9
  store i32 3, ptr %13, align 4, !tbaa !9
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.w2c_hermes, ptr %113, i32 0, i32 6
  %115 = load i32, ptr %12, align 4, !tbaa !9
  %116 = zext i32 %115 to i64
  %117 = add i64 %116, 16
  %118 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %114, i64 noundef %117, i32 noundef %118)
  %119 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %119, ptr %12, align 4, !tbaa !9
  store i32 17581, ptr %13, align 4, !tbaa !9
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.w2c_hermes, ptr %120, i32 0, i32 6
  %122 = load i32, ptr %12, align 4, !tbaa !9
  %123 = zext i32 %122 to i64
  %124 = add i64 %123, 8
  %125 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %121, i64 noundef %124, i32 noundef %125)
  %126 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %126, ptr %12, align 4, !tbaa !9
  %127 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %127, ptr %13, align 4, !tbaa !9
  store i32 8, ptr %14, align 4, !tbaa !9
  %128 = load i32, ptr %14, align 4, !tbaa !9
  %129 = load i32, ptr %13, align 4, !tbaa !9
  %130 = add i32 %129, %128
  store i32 %130, ptr %13, align 4, !tbaa !9
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = load i32, ptr %12, align 4, !tbaa !9
  %133 = load i32, ptr %13, align 4, !tbaa !9
  %134 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ARuntime0x3A0x3AraiseTypeError0x28hermes0x3A0x3Avm0x3A0x3ATwineChar160x20const0x260x29(ptr noundef %131, i32 noundef %132, i32 noundef %133)
  store i32 %134, ptr %12, align 4, !tbaa !9
  %135 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %135, ptr %7, align 4, !tbaa !9
  br label %210

136:                                              ; preds = %69
  store i32 1, ptr %12, align 4, !tbaa !9
  %137 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %137, ptr %7, align 4, !tbaa !9
  %138 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %138, ptr %12, align 4, !tbaa !9
  %139 = load i32, ptr %12, align 4, !tbaa !9
  %140 = icmp ne i32 %139, 0
  %141 = xor i1 %140, true
  %142 = zext i1 %141 to i32
  store i32 %142, ptr %12, align 4, !tbaa !9
  %143 = load i32, ptr %12, align 4, !tbaa !9
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %145, label %146

145:                                              ; preds = %136
  br label %210

146:                                              ; preds = %136
  %147 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %147, ptr %16, align 8, !tbaa !11
  %148 = load i64, ptr %16, align 8, !tbaa !11
  %149 = trunc i64 %148 to i32
  store i32 %149, ptr %12, align 4, !tbaa !9
  %150 = load ptr, ptr %5, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.w2c_hermes, ptr %150, i32 0, i32 6
  %152 = load i32, ptr %12, align 4, !tbaa !9
  %153 = zext i32 %152 to i64
  %154 = add i64 %153, 20
  %155 = call i32 @i32_load(ptr noundef %151, i64 noundef %154)
  store i32 %155, ptr %12, align 4, !tbaa !9
  %156 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %156, ptr %8, align 4, !tbaa !9
  %157 = load i32, ptr %12, align 4, !tbaa !9
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %159, label %171

159:                                              ; preds = %146
  %160 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %160, ptr %12, align 4, !tbaa !9
  %161 = load ptr, ptr %5, 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 = add i64 %164, 29
  %166 = call i32 @i32_load8_u(ptr noundef %162, i64 noundef %165)
  store i32 %166, ptr %12, align 4, !tbaa !9
  %167 = load i32, ptr %12, align 4, !tbaa !9
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %169, label %170

169:                                              ; preds = %159
  br label %210

170:                                              ; preds = %159
  br label %171

171:                                              ; preds = %170, %146
  %172 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %172, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.w2c_hermes, ptr %173, i32 0, i32 6
  %175 = load i32, ptr %12, align 4, !tbaa !9
  %176 = zext i32 %175 to i64
  %177 = add i64 %176, 40
  %178 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %174, i64 noundef %177, i32 noundef %178)
  %179 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %179, ptr %12, align 4, !tbaa !9
  store i64 244813135873, ptr %17, align 8, !tbaa !11
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.w2c_hermes, ptr %180, i32 0, i32 6
  %182 = load i32, ptr %12, align 4, !tbaa !9
  %183 = zext i32 %182 to i64
  %184 = add i64 %183, 32
  %185 = load i64, ptr %17, align 8, !tbaa !11
  call void @i64_store(ptr noundef %181, i64 noundef %184, i64 noundef %185)
  %186 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %186, ptr %12, align 4, !tbaa !9
  store i32 3, ptr %13, align 4, !tbaa !9
  %187 = load ptr, ptr %5, 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, 16
  %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 %9, align 4, !tbaa !9
  store i32 %193, ptr %12, align 4, !tbaa !9
  store i32 17691, ptr %13, align 4, !tbaa !9
  %194 = load ptr, ptr %5, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.w2c_hermes, ptr %194, i32 0, i32 6
  %196 = load i32, ptr %12, align 4, !tbaa !9
  %197 = zext i32 %196 to i64
  %198 = add i64 %197, 8
  %199 = load i32, ptr %13, align 4, !tbaa !9
  call void @i32_store(ptr noundef %195, i64 noundef %198, i32 noundef %199)
  %200 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %200, ptr %12, align 4, !tbaa !9
  %201 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %201, ptr %13, align 4, !tbaa !9
  store i32 8, ptr %14, align 4, !tbaa !9
  %202 = load i32, ptr %14, align 4, !tbaa !9
  %203 = load i32, ptr %13, align 4, !tbaa !9
  %204 = add i32 %203, %202
  store i32 %204, ptr %13, align 4, !tbaa !9
  %205 = load ptr, ptr %5, align 8, !tbaa !5
  %206 = load i32, ptr %12, align 4, !tbaa !9
  %207 = load i32, ptr %13, align 4, !tbaa !9
  %208 = call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ARuntime0x3A0x3AraiseTypeError0x28hermes0x3A0x3Avm0x3A0x3ATwineChar160x20const0x260x29(ptr noundef %205, i32 noundef %206, i32 noundef %207)
  store i32 %208, ptr %12, align 4, !tbaa !9
  %209 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %209, ptr %7, align 4, !tbaa !9
  br label %210

210:                                              ; preds = %171, %169, %145, %97
  %211 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %211, ptr %12, align 4, !tbaa !9
  store i32 48, ptr %13, align 4, !tbaa !9
  %212 = load i32, ptr %13, align 4, !tbaa !9
  %213 = load i32, ptr %12, align 4, !tbaa !9
  %214 = add i32 %213, %212
  store i32 %214, ptr %12, align 4, !tbaa !9
  %215 = load i32, ptr %12, align 4, !tbaa !9
  %216 = load ptr, ptr %5, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.w2c_hermes, ptr %216, i32 0, i32 3
  store i32 %215, ptr %217, align 8, !tbaa !13
  %218 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %218, ptr %12, align 4, !tbaa !9
  %219 = load i32, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  ret i32 %219
}

attributes #0 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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)"}
!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}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 24}
!14 = !{!"w2c_hermes", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !15, i64 40, !17, i64 80}
!15 = !{!"", !6, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !16, i64 32}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12}


; 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: nounwind uwtable
declare dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ARuntime0x3A0x3AraiseTypeError0x28hermes0x3A0x3Avm0x3A0x3ATwineChar160x20const0x260x29(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3AJSTypedArrayBase0x3A0x3AvalidateTypedArray0x28hermes0x3A0x3Avm0x3A0x3ARuntime0x260x2C0x20hermes0x3A0x3Avm0x3A0x3AHandle0x3Chermes0x3A0x3Avm0x3A0x3AHermesValue0x3E0x2C0x20bool0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %0, i64 24
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = add i32 %6, -48
  store i32 %7, ptr %5, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 40
  %9 = zext i32 %2 to i64
  %10 = tail call i64 @i64_load(ptr noundef nonnull %8, i64 noundef %9)
  %11 = icmp ugt i64 %10, -844424930131969
  br i1 %11, label %12, label %19

12:                                               ; preds = %4
  %13 = and i64 %10, 4294967295
  %14 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %13)
  %15 = add i32 %14, -771751936
  %16 = icmp ult i32 %15, -184549376
  %17 = select i1 %16, i32 67200, i32 %2
  %18 = zext i32 %17 to i64
  br label %19

19:                                               ; preds = %4, %12
  %.0108 = phi i64 [ %18, %12 ], [ 67200, %4 ]
  %20 = tail call i64 @i64_load(ptr noundef nonnull %8, i64 noundef %.0108)
  %21 = icmp ult i64 %20, -844424930131968
  %22 = and i64 %20, 4294967295
  %23 = icmp eq i64 %22, 0
  %.not112 = or i1 %21, %23
  br i1 %.not112, label %.sink.split, label %24

24:                                               ; preds = %19
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %39, label %25

25:                                               ; preds = %24
  %26 = add nuw nsw i64 %22, 20
  %27 = tail call i32 @i32_load(ptr noundef nonnull %8, i64 noundef %26)
  %.not113 = icmp eq i32 %27, 0
  br i1 %.not113, label %.sink.split, label %28

28:                                               ; preds = %25
  %29 = zext i32 %27 to i64
  %30 = add nuw nsw i64 %29, 29
  %31 = tail call i32 @i32_load8_u(ptr noundef nonnull %8, i64 noundef %30)
  %.not114 = icmp eq i32 %31, 0
  br i1 %.not114, label %.sink.split, label %39

.sink.split:                                      ; preds = %25, %28, %19
  %.sink118 = phi i64 [ 223338299393, %19 ], [ 244813135873, %28 ], [ 244813135873, %25 ]
  %.sink115 = phi i32 [ 17581, %19 ], [ 17691, %28 ], [ 17691, %25 ]
  %32 = zext i32 %7 to i64
  %33 = add nuw nsw i64 %32, 40
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %33, i32 noundef 0)
  %34 = add nuw nsw i64 %32, 32
  tail call void @i64_store(ptr noundef nonnull %8, i64 noundef %34, i64 noundef %.sink118)
  %35 = add nuw nsw i64 %32, 16
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %35, i32 noundef 3)
  %36 = add nuw nsw i64 %32, 8
  tail call void @i32_store(ptr noundef nonnull %8, i64 noundef %36, i32 noundef %.sink115)
  %37 = add i32 %6, -40
  %38 = tail call i32 @w2c_hermes_hermes0x3A0x3Avm0x3A0x3ARuntime0x3A0x3AraiseTypeError0x28hermes0x3A0x3Avm0x3A0x3ATwineChar160x20const0x260x29(ptr noundef nonnull %0, i32 noundef %1, i32 noundef %37)
  br label %39

39:                                               ; preds = %.sink.split, %28, %24
  %.0 = phi i32 [ 1, %24 ], [ 1, %28 ], [ %38, %.sink.split ]
  store i32 %6, ptr %5, align 8, !tbaa !5
  ret i32 %.0
}

attributes #0 = { 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 = { 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" }

!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, !10, i64 24}
!6 = !{!"w2c_hermes", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !11, i64 40, !14, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"", !7, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !13, i64 32}
!12 = !{!"long", !8, i64 0}
!13 = !{!"_Bool", !8, i64 0}
!14 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass