'use strict';
var $ = require('../internals/export');
var toObject = require('../internals/to-object');
var lengthOfArrayLike = require('../internals/length-of-array-like');
var fails = require('../internals/fails');

var $TypeError = TypeError;
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;

var INCORRECT_TO_LENGTH = fails(function () {
  return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
});

// V8 and Safari < 15.4
// https://bugs.chromium.org/p/v8/issues/detail?id=12681
var SILENT_ON_NON_WRITABLE_LENGTH = !fails(function () {
  // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  Object.defineProperty([], 'length', { writable: false }).push();
});

// `Array.prototype.push` method
// https://tc39.es/ecma262/#sec-array.prototype.push
$({ target: 'Array', proto: true, arity: 1, forced: INCORRECT_TO_LENGTH || SILENT_ON_NON_WRITABLE_LENGTH }, {
  // eslint-disable-next-line no-unused-vars -- required for `.length`
  push: function push(item) {
    var O = toObject(this);
    var len = lengthOfArrayLike(O);
    var argCount = arguments.length;
    if (len + argCount > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed length exceeded');
    for (var i = 0; i < argCount; i++) {
      O[len] = arguments[i];
      len++;
    }
    O.length = len;
    return len;
  }
});

@@ -171,21 +171,40 @@
 ');%0Avar 
-fails
+doesNotExceedSafeInteger
  = requi
@@ -224,85 +224,81 @@
 als/
-fails
+does-not-exceed-safe-integer
 ');%0A
-%0A
 var 
-$TypeError = TypeError;%0Avar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF
+fails = require('../internals/fails')
 ;%0A%0Av
@@ -431,16 +431,17 @@
 Safari %3C
+=
  15.4%0A//
@@ -1098,97 +1098,47 @@
     
-if (len + argCount %3E MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed length exceeded'
+doesNotExceedSafeInteger(len + argCount
 );%0A 

use `doesNotExceedSafeInteger` helper