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

; 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
define dso_local void @w2c_hermes_0x28anonymous0x20namespace0x290x3A0x3Aget_arraybuffer_data0x28HermesABIRuntime0x2A0x2C0x20HermesABIArrayBuffer0x29(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 i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = 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 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  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 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %16 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %16, ptr %10, align 4, !tbaa !9
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.w2c_hermes, ptr %17, i32 0, i32 6
  %19 = load i32, ptr %10, align 4, !tbaa !9
  %20 = zext i32 %19 to i64
  %21 = add i64 %20, 4
  %22 = call i32 @i32_load(ptr noundef %18, i64 noundef %21)
  store i32 %22, ptr %10, align 4, !tbaa !9
  %23 = load i32, ptr %10, align 4, !tbaa !9
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %25, label %183

25:                                               ; preds = %4
  %26 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %26, ptr %10, align 4, !tbaa !9
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.w2c_hermes, ptr %27, i32 0, i32 6
  %29 = load i32, ptr %10, align 4, !tbaa !9
  %30 = zext i32 %29 to i64
  %31 = add i64 %30, 8
  %32 = call i64 @i64_load(ptr noundef %28, i64 noundef %31)
  store i64 %32, ptr %14, align 8, !tbaa !11
  %33 = load i64, ptr %14, align 8, !tbaa !11
  store i64 %33, ptr %9, align 8, !tbaa !11
  store i64 -844424930131969, ptr %15, align 8, !tbaa !11
  %34 = load i64, ptr %14, align 8, !tbaa !11
  %35 = load i64, ptr %15, align 8, !tbaa !11
  %36 = icmp ule i64 %34, %35
  %37 = zext i1 %36 to i32
  store i32 %37, ptr %10, align 4, !tbaa !9
  %38 = load i32, ptr %10, align 4, !tbaa !9
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %41

40:                                               ; preds = %25
  br label %189

41:                                               ; preds = %25
  %42 = load i64, ptr %9, align 8, !tbaa !11
  store i64 %42, ptr %14, align 8, !tbaa !11
  %43 = load i64, ptr %14, align 8, !tbaa !11
  %44 = trunc i64 %43 to i32
  store i32 %44, ptr %10, align 4, !tbaa !9
  %45 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %45, ptr %8, align 4, !tbaa !9
  %46 = load i32, ptr %10, align 4, !tbaa !9
  %47 = icmp ne i32 %46, 0
  %48 = xor i1 %47, true
  %49 = zext i1 %48 to i32
  store i32 %49, ptr %10, align 4, !tbaa !9
  %50 = load i32, ptr %10, align 4, !tbaa !9
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %53

52:                                               ; preds = %41
  br label %195

53:                                               ; preds = %41
  %54 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %54, ptr %10, align 4, !tbaa !9
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.w2c_hermes, ptr %55, i32 0, i32 6
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  %59 = add i64 %58, 3
  %60 = call i32 @i32_load8_u(ptr noundef %56, i64 noundef %59)
  store i32 %60, ptr %10, align 4, !tbaa !9
  store i32 24, ptr %11, align 4, !tbaa !9
  %61 = load i32, ptr %11, align 4, !tbaa !9
  %62 = and i32 %61, 31
  %63 = load i32, ptr %10, align 4, !tbaa !9
  %64 = shl i32 %63, %62
  store i32 %64, ptr %10, align 4, !tbaa !9
  store i32 553648128, ptr %11, align 4, !tbaa !9
  %65 = load i32, ptr %10, align 4, !tbaa !9
  %66 = load i32, ptr %11, align 4, !tbaa !9
  %67 = icmp ne i32 %65, %66
  %68 = zext i1 %67 to i32
  store i32 %68, ptr %10, align 4, !tbaa !9
  %69 = load i32, ptr %10, align 4, !tbaa !9
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %71, label %72

71:                                               ; preds = %53
  br label %201

72:                                               ; preds = %53
  %73 = load i64, ptr %9, align 8, !tbaa !11
  store i64 %73, ptr %14, align 8, !tbaa !11
  store i64 48, ptr %15, align 8, !tbaa !11
  %74 = load i64, ptr %14, align 8, !tbaa !11
  %75 = load i64, ptr %15, align 8, !tbaa !11
  %76 = and i64 %75, 63
  %77 = ashr i64 %74, %76
  store i64 %77, ptr %14, align 8, !tbaa !11
  %78 = load i64, ptr %14, align 8, !tbaa !11
  %79 = trunc i64 %78 to i32
  store i32 %79, ptr %10, align 4, !tbaa !9
  store i32 -1, ptr %11, align 4, !tbaa !9
  %80 = load i32, ptr %10, align 4, !tbaa !9
  %81 = load i32, ptr %11, align 4, !tbaa !9
  %82 = icmp ne i32 %80, %81
  %83 = zext i1 %82 to i32
  store i32 %83, ptr %10, align 4, !tbaa !9
  %84 = load i32, ptr %10, align 4, !tbaa !9
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %87

86:                                               ; preds = %72
  br label %207

87:                                               ; preds = %72
  %88 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %88, ptr %10, align 4, !tbaa !9
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.w2c_hermes, ptr %89, i32 0, i32 6
  %91 = load i32, ptr %10, align 4, !tbaa !9
  %92 = zext i32 %91 to i64
  %93 = add i64 %92, 37
  %94 = call i32 @i32_load8_u(ptr noundef %90, i64 noundef %93)
  store i32 %94, ptr %10, align 4, !tbaa !9
  %95 = load i32, ptr %10, align 4, !tbaa !9
  %96 = icmp ne i32 %95, 0
  %97 = xor i1 %96, true
  %98 = zext i1 %97 to i32
  store i32 %98, ptr %10, align 4, !tbaa !9
  %99 = load i32, ptr %10, align 4, !tbaa !9
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %124

101:                                              ; preds = %87
  %102 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %102, ptr %10, align 4, !tbaa !9
  store i32 96, ptr %11, align 4, !tbaa !9
  %103 = load i32, ptr %11, align 4, !tbaa !9
  %104 = load i32, ptr %10, align 4, !tbaa !9
  %105 = add i32 %104, %103
  store i32 %105, ptr %10, align 4, !tbaa !9
  store i32 112677, ptr %11, align 4, !tbaa !9
  store i32 46, ptr %12, align 4, !tbaa !9
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = load i32, ptr %10, align 4, !tbaa !9
  %108 = load i32, ptr %11, align 4, !tbaa !9
  %109 = load i32, ptr %12, align 4, !tbaa !9
  %110 = call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x3A0x3A_0x5Fassign_external0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef %106, i32 noundef %107, i32 noundef %108, i32 noundef %109)
  store i32 %110, ptr %10, align 4, !tbaa !9
  %111 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %111, ptr %10, align 4, !tbaa !9
  store i32 0, ptr %11, align 4, !tbaa !9
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.w2c_hermes, ptr %112, i32 0, i32 6
  %114 = load i32, ptr %10, align 4, !tbaa !9
  %115 = zext i32 %114 to i64
  %116 = add i64 %115, 4
  %117 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store16(ptr noundef %113, i64 noundef %116, i32 noundef %117)
  %118 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %118, ptr %10, align 4, !tbaa !9
  store i32 1, ptr %11, align 4, !tbaa !9
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.w2c_hermes, ptr %119, i32 0, i32 6
  %121 = load i32, ptr %10, align 4, !tbaa !9
  %122 = zext i32 %121 to i64
  %123 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %120, i64 noundef %122, i32 noundef %123)
  br label %216

124:                                              ; preds = %87
  %125 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %125, ptr %10, align 4, !tbaa !9
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.w2c_hermes, ptr %126, i32 0, i32 6
  %128 = load i32, ptr %10, align 4, !tbaa !9
  %129 = zext i32 %128 to i64
  %130 = add i64 %129, 4
  %131 = call i32 @i32_load(ptr noundef %127, i64 noundef %130)
  store i32 %131, ptr %10, align 4, !tbaa !9
  %132 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %132, ptr %7, align 4, !tbaa !9
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.w2c_hermes, ptr %133, i32 0, i32 6
  %135 = load i32, ptr %10, align 4, !tbaa !9
  %136 = zext i32 %135 to i64
  %137 = add i64 %136, 5348
  %138 = call i32 @i32_load8_u(ptr noundef %134, i64 noundef %137)
  store i32 %138, ptr %10, align 4, !tbaa !9
  %139 = load i32, ptr %10, 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 %10, align 4, !tbaa !9
  %143 = load i32, ptr %10, align 4, !tbaa !9
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %145, label %146

145:                                              ; preds = %124
  br label %213

146:                                              ; preds = %124
  %147 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %147, ptr %10, align 4, !tbaa !9
  store i32 1316, ptr %11, align 4, !tbaa !9
  %148 = load i32, ptr %11, align 4, !tbaa !9
  %149 = load i32, ptr %10, align 4, !tbaa !9
  %150 = add i32 %149, %148
  store i32 %150, ptr %10, align 4, !tbaa !9
  %151 = load ptr, ptr %5, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.w2c_hermes, ptr %151, i32 0, i32 6
  %153 = load i32, ptr %10, align 4, !tbaa !9
  %154 = zext i32 %153 to i64
  %155 = call i32 @i32_load(ptr noundef %152, i64 noundef %154)
  store i32 %155, ptr %10, align 4, !tbaa !9
  %156 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %156, ptr %7, align 4, !tbaa !9
  %157 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %157, ptr %10, align 4, !tbaa !9
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.w2c_hermes, ptr %158, i32 0, i32 6
  %160 = load i32, ptr %10, align 4, !tbaa !9
  %161 = zext i32 %160 to i64
  %162 = add i64 %161, 28
  %163 = call i32 @i32_load(ptr noundef %159, i64 noundef %162)
  store i32 %163, ptr %10, align 4, !tbaa !9
  %164 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %164, ptr %8, align 4, !tbaa !9
  %165 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %165, ptr %10, align 4, !tbaa !9
  store i32 0, ptr %11, align 4, !tbaa !9
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.w2c_hermes, ptr %166, i32 0, i32 6
  %168 = load i32, ptr %10, align 4, !tbaa !9
  %169 = zext i32 %168 to i64
  %170 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store8(ptr noundef %167, i64 noundef %169, i32 noundef %170)
  %171 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %171, ptr %10, align 4, !tbaa !9
  %172 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %172, ptr %11, align 4, !tbaa !9
  %173 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %173, ptr %12, align 4, !tbaa !9
  %174 = load i32, ptr %12, align 4, !tbaa !9
  %175 = load i32, ptr %11, align 4, !tbaa !9
  %176 = xor i32 %175, %174
  store i32 %176, ptr %11, align 4, !tbaa !9
  %177 = load ptr, ptr %5, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.w2c_hermes, ptr %177, i32 0, i32 6
  %179 = load i32, ptr %10, align 4, !tbaa !9
  %180 = zext i32 %179 to i64
  %181 = add i64 %180, 4
  %182 = load i32, ptr %11, align 4, !tbaa !9
  call void @i32_store(ptr noundef %178, i64 noundef %181, i32 noundef %182)
  br label %216

183:                                              ; preds = %4
  store i32 131111, ptr %10, align 4, !tbaa !9
  store i32 61000, ptr %11, align 4, !tbaa !9
  store i32 95, ptr %12, align 4, !tbaa !9
  store i32 90287, ptr %13, align 4, !tbaa !9
  %184 = load ptr, ptr %5, align 8, !tbaa !5
  %185 = load i32, ptr %10, align 4, !tbaa !9
  %186 = load i32, ptr %11, align 4, !tbaa !9
  %187 = load i32, ptr %12, align 4, !tbaa !9
  %188 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %184, i32 noundef %185, i32 noundef %186, i32 noundef %187, i32 noundef %188)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

189:                                              ; preds = %40
  store i32 146777, ptr %10, align 4, !tbaa !9
  store i32 82692, ptr %11, align 4, !tbaa !9
  store i32 43, ptr %12, align 4, !tbaa !9
  store i32 24718, ptr %13, align 4, !tbaa !9
  %190 = load ptr, ptr %5, align 8, !tbaa !5
  %191 = load i32, ptr %10, align 4, !tbaa !9
  %192 = load i32, ptr %11, align 4, !tbaa !9
  %193 = load i32, ptr %12, align 4, !tbaa !9
  %194 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %190, i32 noundef %191, i32 noundef %192, i32 noundef %193, i32 noundef %194)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

195:                                              ; preds = %52
  store i32 147142, ptr %10, align 4, !tbaa !9
  store i32 82611, ptr %11, align 4, !tbaa !9
  store i32 106, ptr %12, align 4, !tbaa !9
  store i32 28119, ptr %13, align 4, !tbaa !9
  %196 = load ptr, ptr %5, align 8, !tbaa !5
  %197 = load i32, ptr %10, align 4, !tbaa !9
  %198 = load i32, ptr %11, align 4, !tbaa !9
  %199 = load i32, ptr %12, align 4, !tbaa !9
  %200 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %196, i32 noundef %197, i32 noundef %198, i32 noundef %199, i32 noundef %200)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

201:                                              ; preds = %71
  store i32 205012, ptr %10, align 4, !tbaa !9
  store i32 82611, ptr %11, align 4, !tbaa !9
  store i32 255, ptr %12, align 4, !tbaa !9
  store i32 24720, ptr %13, align 4, !tbaa !9
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = load i32, ptr %10, align 4, !tbaa !9
  %204 = load i32, ptr %11, align 4, !tbaa !9
  %205 = load i32, ptr %12, align 4, !tbaa !9
  %206 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %202, i32 noundef %203, i32 noundef %204, i32 noundef %205, i32 noundef %206)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

207:                                              ; preds = %86
  store i32 118124, ptr %10, align 4, !tbaa !9
  store i32 83341, ptr %11, align 4, !tbaa !9
  store i32 480, ptr %12, align 4, !tbaa !9
  store i32 38798, ptr %13, align 4, !tbaa !9
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = load i32, ptr %10, align 4, !tbaa !9
  %210 = load i32, ptr %11, align 4, !tbaa !9
  %211 = load i32, ptr %12, align 4, !tbaa !9
  %212 = load i32, ptr %13, align 4, !tbaa !9
  call void @w2c_hermes_0x5F_assert_fail(ptr noundef %208, i32 noundef %209, i32 noundef %210, i32 noundef %211, i32 noundef %212)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

213:                                              ; preds = %145
  store i32 51727, ptr %10, align 4, !tbaa !9
  %214 = load ptr, ptr %5, align 8, !tbaa !5
  %215 = load i32, ptr %10, align 4, !tbaa !9
  call void @w2c_hermes_hermes0x3A0x3Ahermes_fatal0x28char0x20const0x2A0x29(ptr noundef %214, i32 noundef %215)
  call void @wasm_rt_trap(i32 noundef 5) #6
  unreachable

216:                                              ; preds = %146, %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %9) #5
  ret void
}

; 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: noreturn
declare void @wasm_rt_trap(i32 noundef) #2

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @w2c_hermes_0x5F_assert_fail(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

declare void @w2c_hermes_hermes0x3A0x3Ahermes_fatal0x28char0x20const0x2A0x29(ptr noundef, i32 noundef) #4

declare i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x3A0x3A_0x5Fassign_external0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #4

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 = { 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 = { 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 #4 = { "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}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !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: nounwind uwtable
define dso_local void @w2c_hermes_0x28anonymous0x20namespace0x290x3A0x3Aget_arraybuffer_data0x28HermesABIRuntime0x2A0x2C0x20HermesABIArrayBuffer0x29(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  %6 = zext i32 %3 to i64
  %7 = add nuw nsw i64 %6, 4
  %8 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %7)
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %43, label %9

9:                                                ; preds = %4
  %10 = add nuw nsw i64 %6, 8
  %11 = tail call i64 @i64_load(ptr noundef nonnull %5, i64 noundef %10)
  %12 = icmp ult i64 %11, -844424930131968
  br i1 %12, label %44, label %13

13:                                               ; preds = %9
  %14 = and i64 %11, 4294967295
  %.not107 = icmp eq i64 %14, 0
  br i1 %.not107, label %45, label %15

15:                                               ; preds = %13
  %16 = add nuw nsw i64 %14, 3
  %17 = tail call i32 @i32_load8_u(ptr noundef nonnull %5, i64 noundef %16)
  %.mask = and i32 %17, 255
  %.not108 = icmp eq i32 %.mask, 33
  br i1 %.not108, label %18, label %46

18:                                               ; preds = %15
  %.not109 = icmp ugt i64 %11, -281474976710657
  br i1 %.not109, label %19, label %47

19:                                               ; preds = %18
  %20 = add nuw nsw i64 %14, 37
  %21 = tail call i32 @i32_load8_u(ptr noundef nonnull %5, i64 noundef %20)
  %.not111 = icmp eq i32 %21, 0
  br i1 %.not111, label %22, label %27

22:                                               ; preds = %19
  %23 = add i32 %2, 96
  %24 = tail call i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x3A0x3A_0x5Fassign_external0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef %0, i32 noundef %23, i32 noundef 112677, i32 noundef 46) #4
  %25 = zext i32 %1 to i64
  %26 = add nuw nsw i64 %25, 4
  tail call void @i32_store16(ptr noundef nonnull %5, i64 noundef %26, i32 noundef 0)
  tail call void @i32_store8(ptr noundef nonnull %5, i64 noundef %25, i32 noundef 1)
  br label %49

27:                                               ; preds = %19
  %28 = zext i32 %2 to i64
  %29 = add nuw nsw i64 %28, 4
  %30 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %29)
  %31 = zext i32 %30 to i64
  %32 = add nuw nsw i64 %31, 5348
  %33 = tail call i32 @i32_load8_u(ptr noundef nonnull %5, i64 noundef %32)
  %.not112 = icmp eq i32 %33, 0
  br i1 %.not112, label %48, label %34

34:                                               ; preds = %27
  %35 = add i32 %30, 1316
  %36 = zext i32 %35 to i64
  %37 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %36)
  %38 = add nuw nsw i64 %14, 28
  %39 = tail call i32 @i32_load(ptr noundef nonnull %5, i64 noundef %38)
  %40 = zext i32 %1 to i64
  tail call void @i32_store8(ptr noundef nonnull %5, i64 noundef %40, i32 noundef 0)
  %41 = xor i32 %39, %37
  %42 = add nuw nsw i64 %40, 4
  tail call void @i32_store(ptr noundef nonnull %5, i64 noundef %42, i32 noundef %41)
  br label %49

43:                                               ; preds = %4
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 131111, i32 noundef 61000, i32 noundef 95, i32 noundef 90287)
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

44:                                               ; preds = %9
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 146777, i32 noundef 82692, i32 noundef 43, i32 noundef 24718)
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

45:                                               ; preds = %13
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 147142, i32 noundef 82611, i32 noundef 106, i32 noundef 28119)
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

46:                                               ; preds = %15
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 205012, i32 noundef 82611, i32 noundef 255, i32 noundef 24720)
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

47:                                               ; preds = %18
  tail call void @w2c_hermes_0x5F_assert_fail(ptr noundef %0, i32 noundef 118124, i32 noundef 83341, i32 noundef 480, i32 noundef 38798)
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

48:                                               ; preds = %27
  tail call void @w2c_hermes_hermes0x3A0x3Ahermes_fatal0x28char0x20const0x2A0x29(ptr noundef %0, i32 noundef 51727) #4
  tail call void @wasm_rt_trap(i32 noundef 5) #5
  unreachable

49:                                               ; preds = %34, %22
  ret void
}

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @w2c_hermes_0x5F_assert_fail(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

declare void @w2c_hermes_hermes0x3A0x3Ahermes_fatal0x28char0x20const0x2A0x29(ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @w2c_hermes_std0x3A0x3A_0x5F20x3A0x3Abasic_string0x3Cchar0x2C0x20std0x3A0x3A_0x5F20x3A0x3Achar_traits0x3Cchar0x3E0x2C0x20std0x3A0x3A_0x5F20x3A0x3Aallocator0x3Cchar0x3E0x3E0x3A0x3A_0x5Fassign_external0x28char0x20const0x2A0x2C0x20unsigned0x20long0x29(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

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 = { 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 = { 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 = { "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 }
attributes #5 = { 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: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass